Page 1 of 2

How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 7:23 pm
by Martin Frezman
Two related questions:

1) Is there any easy way to measure how much current the Pi is drawing at the moment. Something like the way we measure what its CPU temperature is. Is there any way to do it that doesn't involve splicing cables?

2) Suppose you have a charger that is rated 2.5A, but claims to be "Smart" - which, from what I can tell, means that it can only deliver the full 2.4A if there is some "magic" on the data pins of the USB plug. Does this mean that if one uses this charger to power the Pi, you will never get more than 1A out of it? (Since the Pi has nothing connected to the data pins on the USB plug)

Re: How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 7:37 pm
by Heater
I would be very suspicious of anything that calls itself "smart". Especially if it is cheap. It's probably under spec. Marketing people are like that.

Here is what you do:

1) Power the Pi with whatever it is you have.

2) Measure the voltage on the Pi. When the Pi is doing useful work. There is a 5v pin on the GPIO header. You can use any cheap multimeter to do that.

3) If you see less than 5.2 volts then throw that supply in the bin. Smart or other wise.

Re: How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 8:26 pm
by Imperf3kt
For a more useful answer, you can buy power measuring devices that plug into your wall outlet. They're normally designed for measuring how expensive your TV is or an fridge, etc, but they can also tell you watt draw, amp draw, peak load and a variety of other useful info.

Re: How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 8:33 pm
by Martin Frezman
Imperf3kt wrote:
Mon Oct 09, 2017 8:26 pm
For a more useful answer,
Agree with your observation that the previous response was, er, less than useful.
you can buy power measuring devices that plug into your wall outlet. They're normally designed for measuring how expensive your TV is or an fridge, etc, but they can also tell you watt draw, amp draw, peak load and a variety of other useful info.
Got one. Use it often.

If what we're trying to track is cost of operation, then, of course, that's the way to go.

However, what I'm really trying to figure out is exactly how much current (at 5VDC), the Pi is drawing - and, in particular, if it is drawing more than 1A (or, similarly, close to 2.4A) from the so-called "Smart" charging outlet.

Others have solved this same problem by building spliced USB power cables. I'm trying to figure out if there is an easier way.

Re: How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 8:36 pm
by gordon77
You can get meters that plug in the usb varying in price from £6 to much more..

https://www.amazon.co.uk/Centech-USB-Po ... B00DAR4ITE

The pi will take the current it needs, is this the smart psu? https://www.maplin.co.uk/p/maplin-24a-q ... ging-n37ed

Re: How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 8:58 pm
by Imperf3kt
Well you could always build a small bob to use between two short cables like this one I made last week.

Image

This though, only handles about 1A due to the microUSB-B socket being cheap.

Re: How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 9:42 pm
by Heater
Imperf3kt and Martin Frezman,

I'm sorry but I find it odd that you say my response was "less than useful"

The OP question asks nothing about power measurement. So Imperf3kt is way off the mark.

So Martin, you question is "However, what I'm really trying to figure out is exactly how much current (at 5VDC), the Pi is drawing -"

OK, use that same cheap multimeter I mentioned above to measure the current draw of your Pi.

But, I wonder, why do you want to measure the Pi current draw. Why not just trust the current supply requirements as stated by the Raspi Foundation ?

Re: How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 9:46 pm
by W. H. Heydt
You can get inexpensive gadgets (one is called a "Charger Doctor") that alternate displaying current and voltage every few seconds. The only problem is that they come with full sized USB-A connectors, which is a pain if you're looking for the voltage the Pi actually sees at it's connector and the associated current, or if your PSU has a fixed/built-in power cable. Now if only someone were to come out with a microUSB version...though adapters could be made to work.

Here is the one from Adafruit (just as an example)... https://www.adafruit.com/product/1852

Re: How to measure current draw of the RPi

Posted: Mon Oct 09, 2017 9:50 pm
by W. H. Heydt
Heater wrote:
Mon Oct 09, 2017 9:42 pm
But, I wonder, why do you want to measure the Pi current draw. Why not just trust the current supply requirements as stated by the Raspi Foundation ?
One might want to know how much current a particular setup uses, including Pi and all attached devices. Or--as I did for some tests--one might want to know how much current was needed for a battery powered device, so one might hook up a voltage and current monitor between the battery and the Pi. It could also be used to find out how far the voltage drops under load from a given PSU. All sorts of uses beyond just curiosity.

Re: How to measure current draw of the RPi

Posted: Tue Oct 10, 2017 3:20 am
by Imperf3kt
While shopping for completely unrelated parts, I happened upon this cheap little device which looks to be ideal for what you want.
http://www.altronics.com.au/p/p1926-usb ... ent-meter/

The company is based in Australia, but if they don't ship to you, you could probably just google the model number to find a local supplier.
Voltage: DC 0~25V
Current: 50mA~6A (Adapting QC2.0)
Accuracy: ±3%
Temperature Coefficient: <100PPM/℃
Operating Temperature: 0~60℃
Relative humidity below: 80%
Stand by current: <30mA
Dimensions: 65L x 23W x 14H mm

Re: How to measure current draw of the RPi

Posted: Tue Oct 10, 2017 12:31 pm
by Pomgonewalkabout
Clamp Meter ?

Re: How to measure current draw of the RPi

Posted: Tue Oct 10, 2017 1:04 pm
by klricks
Pomgonewalkabout wrote:
Tue Oct 10, 2017 12:31 pm
Clamp Meter ?
There are clamp meters available that can measure DC current however the input power supply (+) and (-) wires must be separated as the clamp must be placed over 1 wire only.

Re: How to measure current draw of the RPi

Posted: Tue Oct 10, 2017 1:47 pm
by Martin Frezman
Of all the ideas presented so far, I think the "USB Power Meter" idea is probably going to be the most workable.

Having looked at them on Amazon, the thing that is curious is the difference in price between seemingly (more or less) identical devices. For example, the one at the link posted earlier (at amazon.uk) was 74 pounds (i.e., something like $100) (wow!). On amazon.com (i.e., in the US), there are a couple of them at about $11 (which is probably about the same as the 6 pound figure quoted above), but then there is one that is $58 and others even higher than that. Yet, they all look about the same - hard to tell from the text if there is any real difference between them.

Re: How to measure current draw of the RPi

Posted: Wed Oct 11, 2017 10:05 pm
by Paul Hutch
Heater wrote:
Mon Oct 09, 2017 7:37 pm
3) If you see less than 5.2 volts then throw that supply in the bin. Smart or other wise.
The low voltage limit for Raspberry Pi's is 4.75V. The maximum limit is 5.25V. There are very few 5V USB spec power supplies that supply more than 4.9V while supplying 2A.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 12:58 am
by Heater
Very true.

I gave up trying to find a USB power bank or charger supply that can satisfy the demands of a loaded Pi 3.

That is "satisfy" as in stopping the red power led from dipping out or any low voltage warnings being logged by "vcgencmd get_throttled".

So I use 5v PSUs that can deliver 4 amps and have a voltage adjustment trim pot. With the Pi running I can tweak the output voltage up til the Raspi never sees less than 5v. That generally means 5.2 or so volts at the PSU end of the USB cable.

I know. It's overkill. Works a treat though and is one less thing to worry about.

For a proper job it's probably better to forget the micro-usb power and just weld some heavy gauge wire to the supply pins of the GPIO header. Thus removing any worries about the resistive losses in the USB cable or the wonky micro-usb connector.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 1:16 am
by HawaiianPi
I have several of those USB meters, most from a company named Drok, but I have a few others as well. They come in handy for monitoring and troubleshooting USB power. Accuracy is something like +/- 2%, so not super precise, but good enough for troubleshooting power problems. I ordered them at different times and prices fluctuate, but I paid less than ten bucks each (one was less than $5).

Here's a picture of two I have on my desk monitoring my RAVPower charger, which is powering my Raspberry Pi3 (currently running a Minecraft server) as well as charging my phone and tablet. The charger has 2 ports. The iSmart port is rated for 5V at up to 2.4A, but actually outputs around 5.3V at less than 1A, and will still be around 5.2V at 2A. The second port is Qualcomm Quick Charge 2.0 and Samsung Adaptive Fast Charge compatible, and as you can see it outputs 9.3V when charging my Samsung Galaxy Note 4 (only 5V on non QC devices).

Image

Each meter has 1 input cable and 2 output ports. One of the output ports transfers power and data (top), the other is a dumb port for power only (bottom). For the meter on the left in the picture above the USB cable on the top is connected to my tablet using the power and data port, and the USB cable on the bottom is connected to my Pi3 from the power only port. Total current draw is 2A, most of which is going to the tablet.

I have another meter on the USB output of the Pi3 that can measure the current consumption of USB devices.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 1:19 am
by Imperf3kt
I do not recommend "welding" anything to your Pi. Solder, maybe...but not onto the GPIO header for two reasons:
1: you lose use of the header for any hat or peripheral that uses those pins
2: you bypass the safety devices and risk destroying your Pi if your power supply ever spikes or does anybother odd behaviour.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 1:37 am
by Heater
Imperf3kt,

Of course I did not mean "welding" literally.

I do agree on point 1) obviously don't go soldering to a header that you expect to be plugging into anything else in future.

Point 2) is valid as well. It's just that in my experience the micro-usb connector is the most unreliable part of the system. Not mechanically sound.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 1:59 am
by W. H. Heydt
Heater wrote:
Thu Oct 12, 2017 1:37 am
Point 2) is valid as well. It's just that in my experience the micro-usb connector is the most unreliable part of the system. Not mechanically sound.
How many hundreds of thousands of time do you plan to plug and unplug your power connection?

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 2:08 am
by HawaiianPi
Heater wrote:
Thu Oct 12, 2017 1:37 am
Imperf3kt,

Of course I did not mean "welding" literally.
Image

After I weld these 2 gauge jumper cables to my GPIO my Pi will get plenty of power! ;) :lol:

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 2:19 am
by Imperf3kt
W. H. Heydt wrote:
Thu Oct 12, 2017 1:59 am
Heater wrote:
Thu Oct 12, 2017 1:37 am
Point 2) is valid as well. It's just that in my experience the micro-usb connector is the most unreliable part of the system. Not mechanically sound.
How many hundreds of thousands of time do you plan to plug and unplug your power connection?
While I personally agree, the port is perfectly solid, your numbers may be a tad overestimated.
For example, my first USB-b cable (so, male plug) broke after approximately 3 years of use at work to keep my phone charged.
I plug and unplugged that cable at minimum, 6 times a day (some days many more)
If we assume exactly 3 years use, that would be:
50 (work) weeks (2 weeks holiday) == 50*5 == 250 days
Minus 10 public holidays (13 if counting those that fall within other holidays)
Times 6 plug/unplugs a day
Times 3 years

((250-10)*6)*3 = 4320

The number isn't accurate, but its close enough to give you an idea that 'several hundreds of thousands of times' is somewhat overestimated.
I know you referr to the port itself, but the cable is still part of that system.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 2:42 am
by HawaiianPi
The main problem is not reliability. Look up the specs on Micro USB connectors and try to find one that is rated for 2.5A. Most are rated for less than 2A, and that is less than the recommended power supply for the Pi3. Back when the original Pi came out I had a feeling using Micro USB as a power input would be a poor long-term solution, and with the release of the Pi2, and especially the Pi3 it has become a problem.

Now most people probably don't push their Pi3 hard enough to run into problems, but true power users will not only need a good power supply with good voltage regulation, but also a good USB cable with good connectors. Lots of links in that chain for things to go wrong.

Using the GPIO power connections bypasses the protection, but it also eliminates the Micro USB connector losses. There's probably somewhere else on the board you could tap power in that doesn't bypass the protection, but I haven't really looked into it.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 7:46 am
by gordon77
Martin Frezman wrote:
Tue Oct 10, 2017 1:47 pm
Of all the ideas presented so far, I think the "USB Power Meter" idea is probably going to be the most workable.

Having looked at them on Amazon, the thing that is curious is the difference in price between seemingly (more or less) identical devices. For example, the one at the link posted earlier (at amazon.uk) was 74 pounds (i.e., something like $100) (wow!). On amazon.com (i.e., in the US), there are a couple of them at about $11 (which is probably about the same as the 6 pound figure quoted above), but then there is one that is $58 and others even higher than that. Yet, they all look about the same - hard to tell from the text if there is any real difference between them.
I agree hard to see the difference between a £6 model and a £73 model. The link hopefully showed cheaper alternatives below that expensive model.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 8:03 am
by Heater
W. H. Heydt,
How many hundreds of thousands of time do you plan to plug and unplug your power connection?
Recent experience shows that sometimes once is enough.

A true story...

We have some Pi installed 10m off the ground on poles at hard to access locations. One new installation failed a few hours after it was installed. When we next had a chance to get up that pole I got our field service engineer to swap out the SD card as I had made new images with read-only root and other goodies. I'm in Europe, the pole is in California by the way. It did not come online after power up. At a loss I told the guy to get back up the pole and tug on all the connections to make sure nothing had come lose.

Sure enough he reported back that the micro-usb plug had slipped out and that it was a very lose fit. He had reconnected it and taped it in place. Now everything works.

That micro-usb connection is not really fit for industrial use.

Re: How to measure current draw of the RPi

Posted: Thu Oct 12, 2017 8:06 am
by Heater
HawaiianPi,
After I weld these 2 gauge jumper cables to my GPIO my Pi will get plenty of power!
Ha!

Over the years vainly trying to find USB adapters and cables that can actually power the Pi properly, especially the Pi 3, I have often felt like that.