Patric
Posts: 4
Joined: Thu Apr 24, 2014 10:13 pm
Location: Seattle WA USA

Way to measure incoming power?

Thu Apr 24, 2014 10:20 pm

Hello all!

The Pi seems to be very sensitive when it comes to its own incoming power. Is there a utility that anyone knows of to measure the incoming mA on a Pi? I would really like to be able to narrow down some real-life-scenario thresholds.

Thank you for any input you might have.

Kind regards,
Patric

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5590
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Way to measure incoming power?

Fri Apr 25, 2014 7:57 am

Patric wrote:Hello all!
The Pi seems to be very sensitive when it comes to its own incoming power. Is there a utility that anyone knows of to measure the incoming mA on a Pi? I would really like to be able to narrow down some real-life-scenario thresholds.
Thank you for any input you might have.
Kind regards,
Patric
Strictly speaking it's not the Pi that's "sensitive" to poor power supply issues, since it runs from internally regulated 3.3V etc., but, rather, any connected USB devices which require a minimum of 4.75V that start to "misbehave". I'm not aware of any "utilities" but it's relatively easy to measure PSU loading characteristics with a few resistors and a DMM** . More complex measurements of "noise spikes" and "ripple" etc. require access to an oscilloscope or similar. The other part of the problem is that PSU/Charger labels can be somewhat misleading since the interpretation/meaning of a label stating "5V 1A" depends on whether it's designed/intended to be a charger or PSU. In the former case, whilst a current of 1A may be supplied it's likely not to be at 5V (since a fully discharged battery usually needs a lower charging voltage), in the latter case the 1A could mean the "max. short-circuit current" (@ ~0V) or the threshold at which short-circuit protection becomes active.
Trev.
** For example, and FWIW, see my measurements which start here:
http://www.cpmspectrepi.webspace.virgin ... plies.html
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

hal8000
Posts: 187
Joined: Fri Oct 04, 2013 5:22 pm

Re: Way to measure incoming power?

Sun Apr 27, 2014 12:21 pm

If you type:

lsusb -v


This will list the maximum current that any device draws from the USB port. You may
see 100mA for a keyboard or 500mA for some USB flash drives. They are not
forced to use maximum current, but the USB ports work at 5V.

With that in mind the Pi requires 5V at 700mA so thats 3.5W
A USB flash drive listed as 500mA would be a further 2.5W

If you want to measure accurately then measure input current with an ammeter
in series with 5V power supply. Current demand on flash drive will vary whether
its reading, writing or just waiting.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Way to measure incoming power?

Sun Apr 27, 2014 12:42 pm

Hi,
hal8000 wrote:If you type:
lsusb -v
This will list the maximum current that any device draws from the USB port.
This information is very unreliable... I'd not use it at all.

There is no USB 2.0 device with this value greater than 500mA, although there are quite some of them which draws much higher currents. For example, my Canon scanner draws about 720mA, while during USB enumeration it reports its max current consumption as 500mA.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

plugwash
Forum Moderator
Forum Moderator
Posts: 3602
Joined: Wed Dec 28, 2011 11:45 pm

Re: Way to measure incoming power?

Sun Apr 27, 2014 2:58 pm

hal8000 wrote:This will list the maximum current that any device draws from the USB port.
No it will list the maximum the device CLAIMS it will draw from the USB port.

Whether that reflects reality or not depends on the device.

Patric
Posts: 4
Joined: Thu Apr 24, 2014 10:13 pm
Location: Seattle WA USA

Re: Way to measure incoming power?

Mon Apr 28, 2014 10:07 pm

FTrevorGowen wrote: Strictly speaking it's not the Pi that's "sensitive" to poor power supply issues, since it runs from internally regulated 3.3V etc., but, rather, any connected USB devices which require a minimum of 4.75V that start to "misbehave". I'm not aware of any "utilities" but it's relatively easy to measure PSU loading characteristics with a few resistors and a DMM** . More complex measurements of "noise spikes" and "ripple" etc. require access to an oscilloscope or similar. The other part of the problem is that PSU/Charger labels can be somewhat misleading since the interpretation/meaning of a label stating "5V 1A" depends on whether it's designed/intended to be a charger or PSU. In the former case, whilst a current of 1A may be supplied it's likely not to be at 5V (since a fully discharged battery usually needs a lower charging voltage), in the latter case the 1A could mean the "max. short-circuit current" (@ ~0V) or the threshold at which short-circuit protection becomes active.
Trev.
** For example, and FWIW, see my measurements which start here:
http://www.cpmspectrepi.webspace.virgin ... plies.html
Thank you for your reply ,link and input on this matter. I wanted to figure out why exactly some powered USB hubs are sufficient in powering the Pi and why others are not.
Last edited by Patric on Mon Apr 28, 2014 10:11 pm, edited 1 time in total.

Patric
Posts: 4
Joined: Thu Apr 24, 2014 10:13 pm
Location: Seattle WA USA

Re: Way to measure incoming power?

Mon Apr 28, 2014 10:10 pm

hal8000 wrote:If you type:

lsusb -v


This will list the maximum current that any device draws from the USB port. You may
see 100mA for a keyboard or 500mA for some USB flash drives. They are not
forced to use maximum current, but the USB ports work at 5V.

With that in mind the Pi requires 5V at 700mA so thats 3.5W
A USB flash drive listed as 500mA would be a further 2.5W

If you want to measure accurately then measure input current with an ammeter
in series with 5V power supply. Current demand on flash drive will vary whether
its reading, writing or just waiting.
Thanks hal8000. I was hoping there was another utility like lsusb, but for the incoming power. The ammeter and oscilloscope method sounds more and more like the way to go.

Patric
Posts: 4
Joined: Thu Apr 24, 2014 10:13 pm
Location: Seattle WA USA

Re: Way to measure incoming power?

Mon Apr 28, 2014 10:30 pm

Thank you all for your input! I will use this info as well as this wiki http://elinux.org/R-Pi_Troubleshooting# ... r_problems to test.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Way to measure incoming power?

Tue Apr 29, 2014 10:15 am

The way I measured the power consumption of my Pi and peripherals is to use the Polyfuse as an ammeter shunt. Measure the voltage drop across it and and it gives an indication of the current. But since the resistance of individual polyfuses varies widely you need to determine what it is on your Pi. I did it by making a dummy load from a high wattage resistor of 50-100 ohms wired across 5v and GND on the GPIO pins. You know how much current will run through the resistor (100mA at 5V through 50 ohms) and doing a meaurement with and without the dummy dummy load. You can work out the value of your 'shunt' and hence the current from the voltage drop. If you stress the polyfuse at any time you'll likely change its resistance, but it stays fairly constant under normal circumstances. A raw Pi 'B' with at idle with no USB peripherals uses around 380 mA. It doesn't go up much at full CPU power. Putting some load on the GPU will increase it noticeably. Most of the static power is eaten by the LAN chip rather than the SOC. The Model A without the LAN chip uses much less power. (about a third of the 'B').

Cheap USB mouse and keyboards typically use 10-20 mA The keyboard LED indicators will use more than the keyboard itself, Wifi adaptors typically 50-100 mA, USB webcams about the same. Kinky Microsoft Sidewinder keyboard with the backlighting full up uses 55mA.

Or you could buy a fancy bench power supply with a built in ammeter and wire a micro USB plug to its 5V output.....
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Way to measure incoming power?

Tue Apr 29, 2014 12:05 pm

Search ebay for "usb charger doctor".
I find mine quite useful for ballpark measurements of USB current and voltage, but may not be super accurate - what can you expect for the price?
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Return to “General discussion”