Hello,
I would like to be able to monitor the supply voltage and CPU temperature from software. Does such a thing exist and is the Raspi Model B board equipped with the necessary hardware to do this?
Software Monitoring of Supply Voltage and CPU Temperature
--
Michael Ray
Analyst/Programmer
Surrey, UK
4xB, 1xB+,
Creator and admin of:
raspberry-vi@freelists.org
Ham radio call: G4XBF
'Suddenly I am become death, destroyer of SD cards'
Michael Ray
Analyst/Programmer
Surrey, UK
4xB, 1xB+,
Creator and admin of:
raspberry-vi@freelists.org
Ham radio call: G4XBF
'Suddenly I am become death, destroyer of SD cards'
Re: Software Monitoring of Supply Voltage and CPU Temperatur
The temperature is easy enough - run this:
/opt/vc/bin/vcgencmd measure_temp
For the supply voltage AFAIK you'll have to add an A/D. That's what I do for my weather balloon tracker. In that I monitor the battery voltage but it could very easily be changed to modify the 5V rail or whatever.
Dave
/opt/vc/bin/vcgencmd measure_temp
For the supply voltage AFAIK you'll have to add an A/D. That's what I do for my weather balloon tracker. In that I monitor the battery voltage but it could very easily be changed to modify the 5V rail or whatever.
Dave
Re: Software Monitoring of Supply Voltage and CPU Temperatur
Per info at http://www.elinux.org/RPI_vcgencmd_usage you can measure 4 voltages on the board with:
Shows voltage. id can be one of core, sdram_c, sdram_i, sdram_p, and defaults to core if not specified.
Code: Select all
vcgencmd measure_volts <id>
Code: Select all
root@raspberrypi:~# \
> for id in core sdram_c sdram_i sdram_p ; do \
> echo -e "$id:\t$(vcgencmd measure_volts $id)" ; \
> done
core: volt=1.20V
sdram_c: volt=1.20V
sdram_i: volt=1.20V
sdram_p: volt=1.23V
Re: Software Monitoring of Supply Voltage and CPU Temperatur
If you're looking to check the input voltage of the R-Pi and get a reading like 4.8V or 5.2V, you'll need to make your own solution. the only voltage readings built-in are CPU and RAM. Those are 1.2V, so they won't help you much.
-
- Posts: 221
- Joined: Tue May 22, 2012 11:19 pm
Re: Software Monitoring of Supply Voltage and CPU Temperatur
What is an A/D?daveake wrote: ↑Tue Jan 22, 2013 2:04 pmThe temperature is easy enough - run this:
/opt/vc/bin/vcgencmd measure_temp
For the supply voltage AFAIK you'll have to add an A/D. That's what I do for my weather balloon tracker. In that I monitor the battery voltage but it could very easily be changed to modify the 5V rail or whatever.
Dave
Raspberry Pi 3 B and B+
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
Re: Software Monitoring of Supply Voltage and CPU Temperatur
Quis custodiet ipsos custodes?
Re: Software Monitoring of Supply Voltage and CPU Temperature
Where does undervoltage kick in.
My system:
RPI4 using the Raspberry Pi 15.3W USB-C Power Supply running from and powering a Samsung 840EVO 250GB ssd
My system:
Code: Select all
vcgencmd measure_volts core
volt=0.8688V
vcgencmd measure_volts sdram_i
volt=1.1000V
vcgencmd measure_volts sdram_p
volt=1.1000V
vcgencmd measure_volts sdram_c
volt=1.1000V
Who knows knows
Who doesn't doesn't
Who doesn't doesn't
- davidcoton
- Posts: 6897
- Joined: Mon Sep 01, 2014 2:37 pm
- Location: Cambridge, UK
Re: Software Monitoring of Supply Voltage and CPU Temperature
Nice necro.HvdW wrote: ↑Thu Feb 18, 2021 11:30 amWhere does undervoltage kick in.
My system:RPI4 using the Raspberry Pi 15.3W USB-C Power Supply running from and powering a Samsung 840EVO 250GB ssdCode: Select all
vcgencmd measure_volts core volt=0.8688V vcgencmd measure_volts sdram_i volt=1.1000V vcgencmd measure_volts sdram_p volt=1.1000V vcgencmd measure_volts sdram_c volt=1.1000V
The low voltage warning is NOT related to any of the rails measured using vcgencmd. It kicks in when the 5V supply is below 4.63V. The 5V supply is not measured quantitatively, the warning is generated by a simple comparator.
Location: 345th cell on the right of the 210th row of L2 cache
Re: Software Monitoring of Supply Voltage and CPU Temperature
Is it possible to read this outcome somehow, somewhere?
I mean, what's the command.
Because if the software can read it in the system it must be possible to output it on screen as well.
I mean, what's the command.
Because if the software can read it in the system it must be possible to output it on screen as well.
Who knows knows
Who doesn't doesn't
Who doesn't doesn't
-
- Posts: 498
- Joined: Mon Apr 06, 2020 3:49 am
Re: Software Monitoring of Supply Voltage and CPU Temperature
This program has some kind of voltage reading but I can't vouch for how it does it,

https://www.geeks3d.com/glz/

https://www.geeks3d.com/glz/
- davidcoton
- Posts: 6897
- Joined: Mon Sep 01, 2014 2:37 pm
- Location: Cambridge, UK
Re: Software Monitoring of Supply Voltage and CPU Temperature
Location: 345th cell on the right of the 210th row of L2 cache