樹莓派筆記 USB口供電能力
使用Raspberry Pi 4 Model B在做一些開發作業,需要用到多個USB口,為了避免供電不足的問題,了解了下樹莓派的USB口供電能力,
Raspberry Pi 4B有2個USB3.0介面和2個USB2.0介面,理論上USB3.0介面可提供最大總線電流為900mA,USB2.0介面可提供最大總線電流為500mA,那么4個USB介面理論上提供的最大電流就是2×900+2×500=2800mA,當然這理論值肯定達不到,不可能會同時讓所有USB口都達到滿載,而且Raspberry Pi 4B使用的是5V3A的電源,怎么可能給USB口提供2.8A的電流,
到樹莓派的官網去查看相關的檔案,找到USB部分Maximum Power Output,可以看到關于USB的最大功率輸出,如下所示:
Maximum Power Output
As with all computers, the USB ports on the Raspberry Pi supply a limited amount of power. Often problems with USB devices are caused by power issues. To rule out power as the cause of an problem, connect your USB devices to the Raspberry Pi using a powered hub.
| Model | Max power output of USB ports |
|---|---|
| Pi Zero, 1 | 500mA per port 1 ^1 1 |
| Pi 2, 3, 4 | 1200mA total across all ports |
- For the original Pi 1B the limit is 100mA per port.
從檔案這段可以看到,Raspberry Pi Zero, 1的USB口供電能力是每個口500mA,Raspberry Pi 2, 3, 4的USB口供電能力是所有USB口加起來1200mA,
這個供電能力在Raspberry Pi 4之前版本的Raspberry Pi還算正常,畢竟之前都只有USB2.0介面,但是Raspberry Pi 4是有2個USB3.0介面和2個USB2.0介面的,總的供電能力居然還沒變,如果一個USB3.0介面滿載900mA,那么其他USB口就只剩300mA了,而且1200mA還是理論最大值,不可能一直處于最大值的,
綜上,Raspberry Pi 4B的USB口供電能力還是偏弱,如果需要使用多個USB口,并且USB設備中有需要大電流的設備,那么還是需要外接帶電源的USB HUB,
關于配置
在查找樹莓派USB口供電能力的資料時,在網上看到一些文章介紹說樹莓派的USB介面是有電流限制的,默認只能達到600mA,需要通過修改組態檔 /boot/config.txt,將如下內容加入,才能將最大電流變更為1200mA,
max_usb_current=1
current_limit_override=0x5A000020
avoid_warnings=2
我在樹莓派的官網去查看這配置的含義,找到關于配置max_usb_current的介紹
max_usb_current

Originally certain models of Raspberry Pi limited the USB ports to a maximum of 600mA. Setting max_usb_current=1 changed this default to 1200mA. However, all firmware now has this flag set by default, so it is no longer necessary to use this option.
從這段介紹可以看到,最初某些型號的 Raspberry Pi 將 USB 埠限制為最大 600mA,設定 max_usb_current=1 將此默認值更改為 1200mA,但是,現在所有韌體都默認設定了此標志,因此不再需要使用此選項,
目前此命令現已棄用且無效,
所以現在在使用新的樹莓派韌體時,都不需要修改組態檔的配置選項,USB口的供電能力就已經是1200mA了,
參考資料
Raspberry Pi Hardware
Maximum Power Output
max_usb_current
本文鏈接:https://blog.csdn.net/u012028275/article/details/122396821
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/413604.html
標籤:其他
上一篇:Arduino開發_數字IO操作
下一篇:【芯片使用】PCF8591
