輸出 7.5V 的 USB Type A 頭

Hacker News Daily 上看到的:「My cat water fountain comes with a spicy USB power adapter (ounapuu.ee)」,原文在「My cat water fountain comes with a spicy USB power adapter」。

作者的貓咪飲水噴泉用的是 USB Type A 的頭供電:

但仔細看會發現是特規,輸出 7.5V:

如果隨便收起來亂接的話應該會燒掉不少東西...

USB PD 的誘騙器

先在 HN 上看到「USB Power Delivery for Hobby Projects (flameeyes.blog)」這則,原文是「USB Power Delivery For Hobby Projects」,裡面提到了很多想要從 USB-PD 裡面取出電流的搞法,不過在 HN 的 id=38057797 裡面有提到這搞的有點複雜,可以直接買 USB-PD 的誘騙器輸出對應的電壓:

Most of the rest seems to be over-engineering. You can get a ready-made "PD Trigger" board for literally $1 [0], which will allow you to select the desired voltage using jumpers. It even has support for the non-standard (although still common) 12V profile. Or, if you really want to do it using software, grab a $6 one from Adafruit [1] which comes with a tutorial and Arduino library.

其中的 [0] 是「PD/QC/AFC fast charge decoy trigger support 5V 9V 12V 15V 20V fixed voltage output」這個,可以直接調整 switch S1 S2 S3 選擇輸出的電壓:

不過不知道遇到沒有支援的電壓輸出時會怎麼樣 (像是有些變壓器只支援 5V 與 9V),我猜就是輸出 5V 而且不足電流,然後導致後面的設備不會動?另外比較大的問題就是不知道最大的電流與保護 XDDD

而 [1] 則是「Adafruit USB Type C Power Delivery Dummy Breakout - I2C or Fixed - HUSB238」,除了可以自己改線路設定電壓與最大電流外 (看起來直接一坨錫連過去,或是劃開預設的 5V 1A 的設定導線),也可以用 I²C 動態設定 decoy trigger:

這個看起來至少有個上限擋著?

Raspberry Pi 5 的一些細節出現了...

上一篇「Raspberry Pi 5」提到了一些來自 Raspberry Pi 官方的說明,後續各個媒體 (像是 YouTuber) 也都解禁放出不少資料可以參考了,其中電源的部分在「Answering some questions about the Raspberry Pi 5」這邊看到不認 USB PD 的 5V/5A 的問題,目前看起來是走獨規:

I also tested the Radxa USB-C PD 30W power adapter, which says it will output 5V at 5A, but the Pi only negotiates 3A with it right now. I've been in contact with Pi engineers and it seems like they have one on the way to test to see why it's not negotiating more.

另外看起來之後有機會支援 12V/2.25A (換算起來是 27W) 的充電頭,有機會透過韌體更新認得 PD?

I should also note the official adapter lists 12V at 2.25A output as an option, so maybe some future Pi could take that and run with it, for increased compatibility with more USB-C PD adapters (5V at 5A is a rarely seen, though it's an option in the spec).

不過即使走 5V/3A (15W),在一般的應用下是夠用了,到時候拿到來玩看看...

軟體模擬 FIDO2 裝置

看到「Virtual FIDO」這個專案,用軟體模擬 FIDO2 裝置:

Virtual FIDO is a virtual USB device that implements the FIDO2/U2F protocol (like a YubiKey) to support 2FA and WebAuthN.

就安全性來說有點本末倒置,畢竟硬體確保了 secret 無法被軟體直接搬走,而這個軟體模擬的方式就沒辦法了,這個專案比較像是實驗示範性質...

翻了一下 Hacker News 上也有人提到這個問題:「Show HN: A virtual Yubikey device for 2FA/WebAuthN (github.com/bulwarkid)」,但也有提到「tpm-fido」這個專案,用 TPM 來保護:

tpm-fido is FIDO token implementation for Linux that protects the token keys by using your system's TPM. tpm-fido uses Linux's uhid facility to emulate a USB HID device so that it is properly detected by browsers.

這個至少有一點保護,但還是不像實體的 YubiKey 那樣會需要碰一下才認證。

歐盟 2024 年年底強制使用 USB-C 充電頭 (終於,iPhone...)

Hacker News Daily 上看到「EU Passes Law to Switch iPhone to USB-C by End of 2024」,裡面指到了歐盟的新聞稿:「Long-awaited common charger for mobile devices will be a reality in 2024」。

2024 年年底 (所以是 2025 年) 將強制手機與平板都使用 USB-C 充電頭,2026 年則是延伸涵蓋到筆電:

By the end of 2024, all mobile phones, tablets and cameras sold in the EU will have to be equipped with a USB Type-C charging port. From spring 2026, the obligation will extend to laptops.

終於定案公告了,之前傳言好久了...

用 USB 供電的 CR2032/CR2016

在「USB board emulates CR2032 or CR2016 coin cell battery」這邊看到的有趣東西,用 USB 供 5V 電進來,然後轉成 3V 透過 CR2032 或是 CR2016 的鈕扣電池形式提供電源:

看說明是可以拿來開發測試用:

You can now develop CR2032 or CR2016 powered devices without having to use an actual coin cell thanks to Peter Misenko’s (Bobricius) “coin cell battery emulator CR2016/CR2032”.

看起來只要旁邊的延伸段不要卡住就可以這樣玩,不過一般開發測試板應該是有 pin 腳可以灌 3V 進去啦,算是蠻有趣的東西就是了...

USB Type-C 要增加 240W 的規格...

在「USB Type-C Specification 2.1 allows up to 240W Extended Power Range (EPR)」這邊看到這個規格:

Extended Power Range cables have additional requirements to assure that these cables can deliver the full defined voltage and current range for USB PD EPR operation. EPR cables shall functionally support a reported 50 V and 5 A o peration. The minimum functional voltage that a cable shall support is 53.65 V. The electrical components potentially in the path of V BUS in an EPR cable, e.g. bypass capacitors, should be minimally rated for 63 V.

All EPR cables shall be Electronically Marked and include EPR-specific information in the eMarker as defined by the USB PD specification. As defined in the USB PD specification, EPR cables are marked as 50 V and 5 A capable. All EPR cables shall be visibly identified with EPR cable identification icons as defined by the USB-IF. This is required so that end users will be able to confirm visually that the cable supports up to as high of PDP = 240W as defined in the USB PD specification.

也是基於 E-Marker 晶片的關係,除了充電頭支援外,線本身也得支援。這解決了目前很多家桌機都自己搞 >100W 的 dock 來支援高瓦數的充電,推出一個標準來涵蓋收斂...

會不會搞到以後連桌機都可以用 USB-C 界面供電啊...

PinePower 120W 充電器

在「PinePower 120W desktop power supply features display, USB PD, QC 3.0 and wireless charging」這邊看到 PinePower 120W 這個充電器:

提供了一個 Type-A QC 3.0 (18W) + 三個 Type-A 5V/3A (15W) + 一個 Type-C PD (65W),然後還有一個 Qi (10W),算了一下這些組合全部都跑滿要 138W,然後機器的上限提供 120W,這個集縮比超低,看起來也是頗猛的...

目前 out of stock,剛好可以等其他用過的人的評價...

USB 充電器的充電速度

前陣子因為好玩買了 ZY1280P,主要是可以看充電時使用的 Protocol:

其中 D+ 與 D- 資訊可以拿來判斷現在在跑的 Protocol,網路上有不少資料可以看,就會發現各家廠商在早期出了超多的快充協定。

拿到後把家裡各種可以輸出 USB 電源的東西都測了一輪,才發現有超多東西跟預想的不一樣。

首先是 HA2-50U5Q 這顆 USB 充電器:

最左邊兩個 Port 接上去只顯示了 DCP 5V1.5A + SAMSUNG 2A,接 iPad mini 上去也的確只有 1A 左右的電流。而再往右的兩個 Port 接上去就會顯示 DCP 5V1.5A + APPLE 2.4A,這時候 iPad mini 可以吃到接近 12W 左右,另外 QC 2.0 的 Port 也能提供 APPLE 2.4A

我之前把 Lightning 的線接在最左邊,難怪充電速度不怎麼樣...

另外一個是行動電源「ASUS行動電源ZenPower 10000mAh(QC3.0)-ABTU018(藍)」:

這台也有類似的情況,QC 3.0 的 Port 可以推 DCP 5V1.5A + APPLE 2.4A 出來,但是另外一個 Port 只能給 DCP 5V1.5A + SAMSUNG 2A,然後我平常也是把 Lightning 的線接在黑色的那條上面...

不過 ZY1280P 這台的 USB Type C 有遇到狀況:有些直接接 Macbook Air 可以充電,但過了 ZY1280P 就不能充 (這邊應該是走 USB PD),另外在測 Nokia 5.3 也有類似情況 (這台沒有支援 USB PD),這邊的問題年假期間研究一下,看看有什麼設定要設...

在 Hacker News 上看到 Raspberry Pi 400 使用心得

Hacker News 看到 Raspberry Pi 400 的使用心得:「I've now played with a Raspberry Pi 400 for a week and here are my conclusions」,先前在「Raspberry Pi 400」這邊有提到 Raspberry Pi 400,主要就是一台 Raspberry Pi 4 Model B 的主機,但跟鍵盤整合在一起。

在文章裡提到了 Raspberry Pi 4 可以 USB Boot 後帶來的改變 (參考之前寫的「Raspberry Pi 4 可以透過 USB 開機了」這篇),主要是透過 USB3 外接硬碟可以讓讀寫速度大幅提昇 (尤其是 SSD),這一直都是 Raspberry Pi 上面用 SD card 的問題,看起來唯一的問題還是 CPU 的速度還是沒有像目前常見的 x86-64 強。

If you give it fast enough "disk" storage it really moves. I plugged in a Kingston brand 120GB SSD on a USB3 adapter. hdparm -t gave 292MB/s read speed and the default LXDE environment was really crisply responsive, with even a first launch of Chromium taking less than two seconds. With such good storage, the only real limitation is that heavy Javascript stuff is too slow - 5+ seconds to switch between folders in Chrome, or for the thumbnail gallery to appear in Youtube. Also, video calling is marginal. Aside from that the CPU is fast enough.

另外討論裡面也有人希望 Raspberry Pi 考慮引入 eMMC 或是提供 M.2 界面改善讀寫速度,不過我覺得 SD card 的設計算是 Raspberry Pi 當初的方向,本來就有取捨,不太可能什麼都做進去...

回到作者的心得,雖然 USB3 轉 SSD 看起來 i/o 速度快不少,但我好像主要不是遇到 i/o 速度問題,反倒是最近 chromium 的硬體解碼好像有些進度,也許看影片有機會用硬體處理 (至少一部份?),希望至少可以輕鬆看 1080p60 啊...