简体   繁体   中英

Measure input voltage of Raspberry Pi B+ running Ubuntu

I just learned that a red flashing LED indicates voltage below 4.63V on a Raspberry Pi Model B+ .

Is there a command to determine the voltage programmatically?

I tried vcgencmd measure_volts . But it yields 1.2000V, independent of the input source and the LED status. And it doesn't seem to be related to the 4.63V mentioned above.

Update

Let me describe the situation in a bit more detail:

I'm powering the Raspberry Pi with a lead-acid battery built into a moving robot. After operating the robot for a while, the voltage seams to drop below a critical minimum, causing potential damage to the file system. Therefore, I'd like to detect low voltage automatically (and trigger the robot to return to the charging station).

I'm asking here in StackOverflow, since I assume the solution not to be robotic-specific, but generally applicable to other machines.

是的,您可以按照本主题中的说法进行欠压警告,您可以了解读取GPIO 35的低电压。有关读取GPIO的信息,请参考以下主题: Python脚本读取一个引脚

Have a look at the adafruit ina219 sensor https://learn.adafruit.com/downloads/pdf/adafruit-ina219-current-sensor-breakout.pdf .

This sensor can be put between the battery and the raspberry and measures the current and the voltage along this connection (0-26V and max. 3.2A). It communicates via i2c bus. Together with an Arduino you can easyly build an battery watchdog for your raspberry. A sample program and the arduino driver can be found here: https://github.com/adafruit/Adafruit_INA219 .

根据https://raspberrypi.stackexchange.com/questions/7414/is-it-possible-to-detect-input-voltage-using-only-software的介绍,如果没有其他硬件,则无法在软件级别上做到这一点。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM