19

I'm a newbie to Raspberry Pi's, but one of the things I was thinking about doing is running it off batteries (I see many people do this) - that led me to concerns about shutting down gracefully. Is there a software only solution that would allow me to detect input voltage?

Aerik
  • 293
  • 1
  • 2
  • 6

3 Answers3

12

vcgencmd will show the internal voltages for core, sdram_c, sdram_i, and sdram_p:

vcgencmd measure_volts core

The output will look something like this:

volt=1.20V

The following shell commands will display all the voltages:

for id in core sdram_c sdram_i sdram_p
do
    echo -e "$id:\t$(vcgencmd measure_volts $id)"
done
Gregology
  • 229
  • 2
  • 6
10

you'll need some external circuitry to do that, because afaik the raspberry does not provide the battery voltage anywhere in the system: http://raspi.tv/tag/raspberry-pi-monitoring-its-own-battery-voltage

lenik
  • 11,533
  • 2
  • 32
  • 37
1

No, but MoPi is a tidy little board that provides the capability.

Matt
  • 131
  • 6
Fred
  • 4,592
  • 19
  • 29