10

On the most recent pi I've been playing with I've noticed the under-voltage lightning bolt warning, discussed on this question.

My question is whether there's a way I can access the voltage reading used to trigger this warning, so that I can see how under-voltage it is, and whether removing peripherals / using a bigger supply fixes is.

There are related questions such as this one one what might be causing voltage drift of the 5V rail, and this one one what the power requirements of the pi are, and finally this one for how to measure the voltage and current from a battery, but I couldn't find an explanation of how to access the pi's onboard supply voltage measurement (assuming there is one).

3 Answers 3

11

I do not think there is any Pi circuitry to return the current supply voltage.

As far as I am aware the under voltage circuitry is a piece of hardware which triggers at 4.65V. So you could discriminate between two values, more than 4.65V or less than 4.65V.

The only justification for this answer is I remember dozens of posts where people have asked the same question and I do not remember any other answer.

5
  • 2
    if raspbian can show a low-voltage warning sign on screen, there should be some approach to read it.
    – aGuegu
    Commented Oct 12, 2019 at 6:02
  • 2
    @aGuegu Does that contradict anything in the answer?
    – joan
    Commented Oct 12, 2019 at 7:17
  • 2
    I just would like to know where to read this value.
    – aGuegu
    Commented Oct 12, 2019 at 7:40
  • 1
    @aGuegu raspberrypi.stackexchange.com/questions/60593/…
    – joan
    Commented Oct 12, 2019 at 8:28
  • this is exactly what I need, thank you very much.
    – aGuegu
    Commented Oct 14, 2019 at 1:40
5

As noted in Raspberry Pi Power Limitations (which you referenced) The newer Pi(3/2/B+) have a voltage monitor chip (APX803) which triggers at 4.63±0.07V. The Pi3B+ Pi3A+ use a MxL7704 chip to manage power, which has the same nominal trigger point.

The Pi has NO voltage measurement circuitry, this is an on/off trigger and there is no analog measurement circuitry. If you want to measure the voltage, you need a meter or one of the in-line USB monitors.

The GUI had a lightning bolt which comes up in the top right if the voltage is inadequate.

You do not need "a bigger supply" (whatever that means) you need a quality PSU whose voltage is adequate at the rated current - which most inexpensive supplies are not. Even with a decent Power Supply if you use poor quality cables you will have problems.

3
  • 1
    What about vcgencmd measure_volts core? That would seem indicate some means of measuring voltage within the Pi.
    – Edward
    Commented Dec 2, 2018 at 23:14
  • 1
    @Edward ... some context, since there's no man page... may be useful RPI vcgencmd usage Commented Dec 3, 2018 at 0:14
  • I have a question: My Pi (3B) is also showing the thunderbolt symbol, but I have measured the voltage between gnd and +5V using a multimeter, and it is 4.8V. The undervoltage should not be triggered.
    – user115413
    Commented Feb 29, 2020 at 12:38
2

I studied this official schematic diagram. It shows that all chips are powered from an onboard voltage regulator chip RG2 for 3.3 V. This means that the 5 V input voltage should not be very critical. The only other use of the input 5V is VDD_BAT1 to 4, which could be some sort of voltage measurement used to display the thunderbolt if the input voltage drops below 4.65 V. The chip used for RG2 is a NCP-1117-3.3V, with this datasheet. This ic has a voltage drop of min. 1.2V, so the input should be at least 3.3 + 1.2 = 4.5 V. Add a little margin and 4.65 V is a reasonable min. voltage to guarantee that all chips onboard of the RPi will function correctly. I do not see a problem of input voltages higher than 5 V. Of course, if the input voltage gets much higher, the dissipation of RG2 will increase, but there is no hard limit of e.g. 5 V + 5 % = 5.25 V. So e.g. 5.30 should give no problems.

This does NOT mean that every usb power supply would work. To charge a phone battery, it would not be a problem at all if the usb power supply has voltage dips. But for powering the chips inside the RPi, any voltage dip on the 3.3 V rail would be fatal, no matter how short this voltage dip would be. Translated to the 5 V usb input, this would mean that that input should NEVER drop below 4.65 V. So the official Raspberry Pi power adapter is not a regular USB charger; it is designed to NEVER drop below 4.65 V. It also has a slightly higher voltage, the nameplate voltage is 5.1 V, and I measured 5.25 V. In practice, there is always some loss of voltage in the cable and micro usb connector, so by starting at a slight overvoltage, the risk of ever getting below 4.65 V is minimal. Again, a slight overvoltage is not a problem at all, as all chips are at the 3.3 V level, and the overvoltage is dealt with by the RG2 voltage regulator.

For designing your own power supply, I got good results with a cheap 3 ampere switching regulator set to an output of 5.25 V and directly wired to the 5V and GND pins on the 20-pin RPi headers to eliminate voltage drop over a usb connector. In fact, the 5V header pins are directly connected to the usb power connector, except that the usb connector has a polyfuse, intended to avoid damage in case of a short circuit in a usb device fed from the RPi.

I am still puzzled about the exact power voltage measurement used to show the lightning bolt in case of undervoltage. I just guess that the VDD_BAT1 to 4 pins are used to measure the input voltage. I read about a APX803 (the power-monitoring device used on Pi 3) and GPIO26, but could not find anything about this on the schematic diagram. Any insight from more knowledgable people welcome.

Meanwhile, my problem of properly powering the RPi is solved, by not being afraid of using a voltage higher than 5.0 V.


Update:

Here is some very interesting official info about the onboard power supply on the newest RPi models. This probably means that the schematic diagram I mentioned above is outdated. However, my recommendation of using a pretty stable 5.25 V power supply seems still valid.

5
  • The "schematic diagram" you referenced is an original Pi from 2012 - which DOES NOT have a voltage monitor
    – Milliways
    Commented May 24, 2020 at 2:02
  • @Milliways Thanks, but do you happen to know the URL of newer schematics ?
    – Roland
    Commented May 24, 2020 at 17:25
  • 1
  • @Milliways Thanks for the link. However, these are REDUCED schematics. Still no voltage measurement ic to see, too bad. But it does show the Switched Mode Power Supply for 3.3V and other voltages, which dissipates much less than the linear voltage regulator on the older Pi. A power input voltage of 5.25 V or even slightly higher will be even less af a risk of burning the onboard power supply ic, while reducing the chance of lightning bolts because of voltage dips below 4.65 V
    – Roland
    Commented May 26, 2020 at 21:47
  • The ONLY "voltage measurement" is the PMIC - which is quite clearly shown
    – Milliways
    Commented May 27, 2020 at 1:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.