Power over fiber

Hacker News 上看到「Power over fiber (chaos.social)」這篇,是個透過雷射光傳遞能量再轉回電能的方式。

隨意先拉了其中一個 sku 來看,「3 VDC application; ST Port」的 AFBR-POC404L 單顆要 US$561.79:「AFBR-POC404L」,這顆輸入 1.8W 輸出 0.6W。

另外在「Optical Power Converters」這邊可以看到 AFBR-POC306A1 這顆,輸出可以到 3W,查到的單價則是 US$701.77 (AFBR-POC306A1),這個功率已經連 Raspberry Pi 都可以上了...

不過從官方列出的應用來看,可以看到著重在電磁隔離的性質:

  • Fully galvanically isolated power supply without capacitive coupling, suitable for gate drivers
  • Isolation transformer for MRI/RF imaging without the need for filters
  • Optically isolated probes for power electronics with a wider dynamic range than any conventional probe
  • Power source for tethered drones, enabling a higher payload and eliminating the need for battery charging
  • Sensors where power must be immune to EMI, high voltage, and magnetic fields

跟我一開始想的方向不太一樣...

Raspberry Pi 5 在 shutdown 狀態時的電力消耗過高問題

在「Reducing Raspberry Pi 5's power consumption by 140x」這邊看到的,講 Raspberry Pi 5 在 shutdown 狀態下電力消耗過高的問題。

依據 Jeff Geerling 提到,在 shutdown 狀態下仍然會消耗 1.2W~1.6W:

Because of this, a Pi 5 will still sit there consuming 1.2-1.6W when completely shut down, even without anything plugged in except power.

也有提到解決方法是把 POWER_OFF_ON_HALT 改成 1,他給的範例另外有多一些設定,但跟這次的功耗問題無關:

[all]
BOOT_UART=1
WAKE_ON_GPIO=0
POWER_OFF_ON_HALT=1

依照文章裡面的說明設定好,重開再 shutdown 測試就可以看到整個降下來了:

Save that configuration and reboot, then next time you shut down, you should see power consumption go down from 1-2W to 0.01W or even less:

應該算是某種 bug 或是 regression,後續預設值應該會修正?

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),在一般的應用下是夠用了,到時候拿到來玩看看...

XFCE (Xubuntu) 下的手動 lock + screensaver + DPMS 組合

桌機換成 Xubuntu 22.04 後會遇到手動鎖定螢幕時,螢幕不會進入省電模式,遇到的情況有點像是「DPMS Suspend on Screen Lock」這邊提到的情境。

這類問題如果用 search engine 一時間沒有找到解法的話,最好的方法都是直接去讀 source code,然後就發現透過 Ctrl+Alt+L 觸發的 /usr/bin/xflock4 其實是個 shell script,從 code 讀可以發現裡面只負責 lock 的部分,本來就跟 DPMS 無關。

我在下面提供的方案就是自己處理螢幕的部分,也就是自己先跑 DPMS 指令,然後再回頭呼叫 /usr/bin/xflock4

#!/bin/sh
/usr/bin/xset dpms force off
exec /usr/bin/xflock4

Ctrl+Alt+L 的觸發程式掛上來,這樣就會正常處理了...

用馬鈴薯判斷電極的正負...

Hacker News Daily 上看到「“You don't have a voltmeter. Do you have a potato?” (diy.stackexchange.com)」這則討論,原討論在「Is white wire with grey stripes positive or negative wire?」這邊,有人問了一個問題,說手上有一個交流轉直流的變壓器,想要重新接線到下面這種端子,但不確定變壓器輸出的兩條線裡面,正極與負極分別是哪條:

下面的答案很厲害啊,開頭先說如果你沒有伏特計 (像是三用電錶),那手上有沒有馬鈴薯:

You don't have a voltmeter. Do you have a potato?

把馬鈴薯切半,把 DC 端的兩條線插到同一顆馬鈴薯上面,大約相距 2cm,插電不久後就可以看到有一端會變綠,那端就是正極,把本來插到馬鈴薯上的端子剪掉後再接線就可以了:

With the power adapter unplugged from your electrical outlet, cut the wires, strip a little insulation from the ends, twist the strands of each wire into a point. Do not allow the bare wires to touch each other from this point on.

Cut the potato in half. Take one half, and poke both wires into the cut face of the potato about 2 cm apart. Plug in the power adapter to the wall outlet. In a short time, the potato around one of the wires will turn green. That is the positive wire.

Unplug the adapter and clip off the ends of the wires so you have clean wire for soldering your new plug.

不確定產生的是不是銅綠,但能給出這種解法的確很有娛樂性 XDDD

去年 OVH 機房大火的部份情形最近被揭露

去年三月在「OVH 法國機房 SBG2 火災全毀」這邊有提到 OVH 的機房大火事件,最近有些情況總算被揭露出來了。

Hacker News 上看到「OVHcloud fire report: SBG2 data center had wooden ceilings, no extinguisher, and no power cut-out」這篇這個月月初的報導,裡面題到了一些情形。另外對應的討論在「OVHcloud fire: SBG2 data center had no extinguisher, no power cut-out (datacenterdynamics.com)」這邊可以看到。

其中一個是在講消防隊花了三個小時才把電力切斷,因為電力室外面有非常強力的電弧:

According to the report firefighters on the scene found electrical arcs more than one meter long flashing around the door to the power room, and it took three hours to cut off the power supply because there was no universal cut-off.

另外電力室本身的設計也不利於防火 (木造天花板?),而且電力管道也沒有隔離:

The power room had a wooden ceiling designed to withstand fire for one hour, and the electrical ducts were not insulated.

另外因為節能的設計,他們設計了多個通道讓外部的空氣容易進入 data center 交換熱量,但這也導致了火苗很不容易熄滅:

Once the fire escaped from the power room, it grew rapidly. The report says that "the two interior courtyards acted as fire chimneys". JDN claims the spread of fire may have been accelerated by the site's free cooling design, which is designed to encourage the flow of outside air through the building to cool the servers.

OVH 目前因為訴訟的關係,基本上都是拒絕評論...

立端科技的 IIoT-I530

因為工作的關係,所以會關注一些特殊的硬體,但好像暫時找不到地方放,就丟在 blog 上面記錄好了...

這次看到的是支援一堆 PoE+ 的機器:「Tiger Lake-U system features dual 2.5GbE and six PoE+ ports」。

除了 PoE+ 以外另外有 mSATASATA 支援,然後還有一堆 M.2 的界面可以接 (好像是走 PCIe):

Lanner’s “IIoT-I530” embedded PC runs Linux on an 11th Gen U-series CPU and supplies with up to 64GB RAM, 2x 2.5GbE, 6x PoE+, 2x COM, 4x USB 3.0, 2x HDMI, 3x M.2, SATA, mSATA, and DIO.

用 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 界面供電啊...