Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

How to measure current draw of the RPi

Mon Oct 09, 2017 7:23 pm

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)
If this post appears in the wrong forums category, my apologies.

Heater
Posts: 13592
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to measure current draw of the RPi

Mon Oct 09, 2017 7:37 pm

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.
Memory in C++ is a leaky abstraction .

User avatar
Imperf3kt
Posts: 2860
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How to measure current draw of the RPi

Mon Oct 09, 2017 8:26 pm

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.
55:55:44:44:4C
52:4C:52:42:41

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: How to measure current draw of the RPi

Mon Oct 09, 2017 8:33 pm

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.
If this post appears in the wrong forums category, my apologies.

gordon77
Posts: 4217
Joined: Sun Aug 05, 2012 3:12 pm

Re: How to measure current draw of the RPi

Mon Oct 09, 2017 8:36 pm

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

User avatar
Imperf3kt
Posts: 2860
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How to measure current draw of the RPi

Mon Oct 09, 2017 8:58 pm

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.
55:55:44:44:4C
52:4C:52:42:41

Heater
Posts: 13592
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to measure current draw of the RPi

Mon Oct 09, 2017 9:42 pm

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 ?
Memory in C++ is a leaky abstraction .

W. H. Heydt
Posts: 10981
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How to measure current draw of the RPi

Mon Oct 09, 2017 9:46 pm

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

W. H. Heydt
Posts: 10981
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How to measure current draw of the RPi

Mon Oct 09, 2017 9:50 pm

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.

User avatar
Imperf3kt
Posts: 2860
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How to measure current draw of the RPi

Tue Oct 10, 2017 3:20 am

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
55:55:44:44:4C
52:4C:52:42:41

Pomgonewalkabout
Posts: 18
Joined: Tue Jun 21, 2016 5:33 am

Re: How to measure current draw of the RPi

Tue Oct 10, 2017 12:31 pm

Clamp Meter ?

klricks
Posts: 6609
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: How to measure current draw of the RPi

Tue Oct 10, 2017 1:04 pm

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.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: How to measure current draw of the RPi

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.
If this post appears in the wrong forums category, my apologies.

Paul Hutch
Posts: 393
Joined: Fri Aug 25, 2017 2:58 pm
Location: Blackstone River Valley, MA, USA
Contact: Website

Re: How to measure current draw of the RPi

Wed Oct 11, 2017 10:05 pm

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.

Heater
Posts: 13592
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 12:58 am

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.
Memory in C++ is a leaky abstraction .

User avatar
HawaiianPi
Posts: 4716
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 1:16 am

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.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
Imperf3kt
Posts: 2860
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 1:19 am

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.
55:55:44:44:4C
52:4C:52:42:41

Heater
Posts: 13592
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 1:37 am

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.
Memory in C++ is a leaky abstraction .

W. H. Heydt
Posts: 10981
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How to measure current draw of the RPi

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?

User avatar
HawaiianPi
Posts: 4716
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 2:08 am

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:
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
Imperf3kt
Posts: 2860
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 2:19 am

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.
55:55:44:44:4C
52:4C:52:42:41

User avatar
HawaiianPi
Posts: 4716
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 2:42 am

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.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

gordon77
Posts: 4217
Joined: Sun Aug 05, 2012 3:12 pm

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 7:46 am

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.

Heater
Posts: 13592
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 8:03 am

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.
Memory in C++ is a leaky abstraction .

Heater
Posts: 13592
Joined: Tue Jul 17, 2012 3:02 pm

Re: How to measure current draw of the RPi

Thu Oct 12, 2017 8:06 am

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.
Memory in C++ is a leaky abstraction .

Return to “General discussion”