18

I have a unattended raspberry with a power supply for many device. Raspberry has lately restarts and I think that may be caused by a under voltage. Is it possible to check the input voltage for software? I've seen some projects but used hardware and for me is difficult access to raspberry. If xmbc or osmc shown the rainbow square with detect under voltage, I think that hardware modification is not necesary. How xbmc does to detect under voltage?

Thanks in advance

crossmax
  • 303
  • 1
  • 2
  • 7

4 Answers4

12

In raspberry pi:

vcgencmd measure_volts core

It shows the voltage attached to the core of your Raspi. If the source it is not enough it will make the system fail.

There's more documentation about it in https://elinux.org/RPI_vcgencmd_usage.

If you cannot use vcgencmd I have written some notes about making it work. Have been the whole morning trying to set mine fine because it was not avalible in my last installation

cmbuckley
  • 103
  • 4
Jesus Cepeda
  • 399
  • 1
  • 9
8

On Pis with the 40 pin expansion header GPIO 35 is connected to a 5V supply monitoring system (it is also the GPIO used to control the power LED on the boards with a power LED fitted).

It will read high (1) if the supply is greater than 4.65V and low (0) otherwise.

See rasberrypi.org forum post.

joan
  • 71,852
  • 5
  • 76
  • 108
6

This answer is correct for Pi models available at the time. The Pi3 and Pi3B+ (and probably Pi Zero W) DO NOT use pin35 to indicate power.

As @joan stated GPIO 35 is connected to the power. This is all with 40 pin header (except Zero - which doesn't actually have a header or AFAIK a power monitor).

pin@p35 { function = "input";  termination = "no_pulling"; polarity = "active_low"; }; // Power low
Milliways
  • 62,573
  • 32
  • 113
  • 225
0

having a good power supply is critical to top performance. As in my case, a lot of the time the problem is with the power supply cable (USB to Micro USB). I was getting the low voltage warning and my Pi was only running at 600 MHZ. I moved the cable from the power supply and plugged it into a USB port on my computer and got the same results. This told me that my problem was more than likely the cable. I changed the cable and my low voltage warning went away and my Pi ran at 1200 MHZ. Problem solved!

Marpy
  • 143
  • 1
  • 2
  • 7