【树莓派笔记】USB口供电能力

树莓派笔记 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
  1. 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

WARNING
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

猜你喜欢

转载自blog.csdn.net/u012028275/article/details/122396821