poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: RasPi power usage measurements ~2 watts at idle

Sun May 20, 2012 6:31 pm

Gert van Loo wrote:
poing wrote: Reading a post from you a while ago I planned to ask you to do this when I would get my second Pi, although I probably have to wait until Christmas to receive my first one :? (OK, I only ordered March 7, so I'm not complaining)
There is only so much I can do and this one is rather far down the list because there are not that many users who are willing or capably of making a modification which is so complex and risky.

I would also like to point out that working with SW is in principle free, but developing hardware requires money to get PCBs made, components ordered and sometimes pay a technician to solder them. (I can't do 0603 let alone 0402 parts)
I get all that and I also understand that basically you guys are working for the educational environment, so making the Pi more power efficient is way back on the list. That said, it's plain obvious that for a lot of uses a more efficient power solution is necessary (not excluding educational uses). Tell wasting 40% of energy to someone trying to run the Pi 24/7 from environmental energy.

So would it be possible to add efficient powering the Pi to the Gertboard? I seem to have learned power can be applied to the Pi using the GPIO pins although that means you're on your own as the fuses are circumvented. But you could add all that to the Gertboard to which it is, as I understood, not necessary to add all the options, only what's needed.

User avatar
AndrewS
Posts: 3635
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: RasPi power usage measurements ~2 watts at idle

Sun May 20, 2012 6:38 pm

The unfused "power input" available via the GPIO headers is only 5V, not the 3.3V generated by RG2 or the 2.5V generated by RG3 or the 1.8V generated from RG1 :geek:
And for truly low-power situations, you'd probably want to avoid add-ons like the Gertboard as they might draw their own power too!

Edit: which has just inspired me to ask another question... ;) Is it possible to temporarily disable the ethernet interface (when it's not needed) via the LAN_RUN signal, and would this result in any additional power-saving? Or would that also disable the USB ports?
Last edited by AndrewS on Sun May 20, 2012 6:51 pm, edited 1 time in total.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Sun May 20, 2012 6:43 pm

AndrewS wrote:
alexeames wrote:As an aside, I noticed yesterday that the current consumption goes up slightly when the Pi is shut down.
Happened again. It's reproducible. Anyone know why that is?
Possibly all the write buffers getting flushed to disk? (where in this case "disk" is the SD card).
And/or the power-management features of the SoC being disabled?
How long would the flushing take? I can see why the power would go up during shutdown, what I can't quite understand is why it uses more when it has shut down (-h) than when idle?

Your power-management SoC comment might be the answer. It kind of flies in the face of logic that when something is "off" it uses more power than when it's "on" :lol: (But it's not really off because no switch).
Alex Eames RasPi.TV, RasP.iO

User avatar
AndrewS
Posts: 3635
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: RasPi power usage measurements ~2 watts at idle

Sun May 20, 2012 6:56 pm

alexeames wrote:Your power-management SoC comment might be the answer. It kind of flies in the face of logic that when something is "off" it uses more power than when it's "on" :lol: (But it's not really off because no switch).
Who knows. (outside Broadcom ;) )
Maybe this is something that could be fixed by a future start.elf update? :?

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Sat Jun 09, 2012 6:58 pm

I've recently got hold of an Edimax EW-7811Un - the smallest WiFi dongle in the world (or so they say) because it is said to work with the Pi using no hub - and it does. So I thought I'd do a quick measurement to see how much power it takes during a heavy download (720p HD program from iplayer). This was to SD card with HDMI TV and wireless kbd/mouse dongle attached. I normally stick programs on a USB flash drive, but not enough ports for that in this test.

Edimax wifi
Before download 5.0v 0.40A = 2.0 Watts
During download 4.98v 0.50A = 2.49 Watts
After download 5.0v 0.40A = 2.0 Watts
Difference = 0.49 Watts

Ethernet
Before download 4.98v 0.42A = 2.09 Watts
During download 4.98v 0.44-0.45A = 2.22 Watts
After download 4.98v 0.42A = 2.09 Watts
Difference = 0.13 Watts

So the Wifi dongle uses quite a bit more power than ethernet (0.49W vs 0.13W). We shouldn't be too surprised about that after all. :lol:
Alex Eames RasPi.TV, RasP.iO

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe

Re: RasPi power usage measurements ~2 watts at idle

Tue Jun 12, 2012 2:09 am

alexeames wrote:As an aside, I noticed yesterday that the current consumption goes up slightly when the Pi is shut down.
Happened again. It's reproducible. Anyone know why that is?
It's Linux writing out to a bunch of log files as well as recording the state of various processes in an orderly manner as they are terminated to reduce the time needed to boot up the next time, since the system will be in a known state when shut down or rebooted. The filesystem will also be put to bed gracefully without any file handles left open - when a system crashes or loses power, most of the time needed to reboot, above-and-beyond the normal routine, is taken up by ensuring the filesystem is in a known, correctly-functioning state.

If there was anything in a RAM buffer that hadn't been written out to storage media, that would be completed as part of a normal shutdown/reboot, but, I'd be surprised if the OSes are configured to leave much hanging around in RAM any more than is absolutely necessary, especially given the paucity of RAM on the Pi and the lack of a need to wait for rotating disks to make a revolution before the read/write heads are over the correct sectors. There are configuration settings for such things that are read during boot, so, it would be feasible to look at them to see how they're set, although someone who's done the kernel work would be able to tell us in an instant whether that optimization was performed, what values were chosen, and why.

Part of the power consumption spike is also the CPU doing the processing portion of the I/O-related tasks described above, of course. Since I'm working on some GPU-maxing 3-D graphics code for our Pi-finity! educational game system, I'll run some of the tutorial examples I'm cobbling together that generate as many polygons and transformations per second as the GPU can handle and measure the actual power consumed at the power input to the board, so that we don't need to guess about the efficiencies (or lack thereof) of power supplies, off-board regulators, and such.

I seem to recall a number in the vicinity of 3.5 watts (~700 ma at 5 v) being the maximum power draw from the board with a wired network connection and a low-power keyboard and mouse connected, and the CPU and GPU cranking at full capacity, vs. a minimum of around 0.9 watts (~180 ma at 5 v) with nothing connected to the Ethernet or USB ports, and the CPU and GPU idling with just quiescent OS housekeeping going on in steady-state. I'll check those, too, while I've got things wired up for metering.
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Tue Jun 12, 2012 7:16 am

Hi Jim,

Apart from the initial set, all my recent measurements are actual power consumption of the board AFTER the regulator.

The other thing is, on shutdown, it's not just a spike (although there is one). The power draw goes up (not a huge amount, but it's noticeable and reproducible) and stays up even after the "system halted" message. If you look at the second graph, you can see that there is a spike on shutdown, but after the spike it settles at roughly the same level it was at when the cpu was being hammered.

Image

I wouldn't have found it surprising that the power use goes up during shutdown. But my comment about it using more when it's off than when it's on was meant literally. It draws more after shutdown than when idling.

My video camera's broken, but I've got another one on the way. I'll put something together to show this better once it arrives.
Alex Eames RasPi.TV, RasP.iO

User avatar
AndrewS
Posts: 3635
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: RasPi power usage measurements ~2 watts at idle

Tue Jun 12, 2012 12:34 pm


User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Tue Jun 12, 2012 12:55 pm

AndrewS wrote:Doesn't really help, but http://www.raspberrypi.org/phpBB3/viewt ... 849#p83849
Yeah I spotted that last week. It's one of those illogical things (captain) that would make Spock go nuts. It's no big deal, but it does make me curious. :D
Alex Eames RasPi.TV, RasP.iO

User avatar
AndrewS
Posts: 3635
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: RasPi power usage measurements ~2 watts at idle

Tue Jun 12, 2012 1:00 pm

:lol: Hopefully we'll fix the power-consumption issues before we meet the Vulcans!

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 1:14 am

Once Linux goes away when the system is halted, the power consumption is determined solely by whatever mode the ARM power-saving setting winds up being in at that time. Perhaps one of the Broadcom folks can comment on whether that setting can survive the OS after shutdown, and someone just needs to insert some code into the OS shutdown process to ensure that setting is explicitly put in the power-saving mode. I seem to recall that if the clock or voltage are modified from the default in any way at bootup, power-saving mode is no longer available until the next reboot.

On the other hand, we have five fingers, and an external circuit could be implemented that could be signaled via USB, Ethernet, or GPIO to turn off external power to the board after a certain amount of time after shutdown begins (e.g., via an SCR for DC, or a Triac for an AC adaptor, with an opto-isolator to prevent the possibility of AC making it anywhere near the board).

Then, there's a good ol' manual power switch - when "System is halted" appears, just flip the switch! :D
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

User avatar
AndrewS
Posts: 3635
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 1:47 am

Jim Manley wrote:Then, there's a good ol' manual power switch - when "System is halted" appears, just flip the switch! :D
Image

One of my favourite pranks when younger was to edit the image in MS Paint and change the "now" to "not".

prodata
Posts: 176
Joined: Tue Jan 24, 2012 5:53 pm

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 3:30 pm

alexeames wrote:I've recently got hold of an Edimax EW-7811Un - the smallest WiFi dongle in the world (or so they say) because it is said to work with the Pi
Ethernet
Before download 4.98v 0.42A = 2.09 Watts
And chance/interest in getting a power measurement with the Pi under-clocked, eg to 300MHz say, or lower? A low clock speed might be perfectly adequate for some embedded applications and save a significant amount of power. I guess it's too much to expect that power consumption would be linear with clock but there should presumably be some correlation. And any significant power-saving by running headless?

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 4:01 pm

prodata wrote:
alexeames wrote:I've recently got hold of an Edimax EW-7811Un - the smallest WiFi dongle in the world (or so they say) because it is said to work with the Pi
Ethernet
Before download 4.98v 0.42A = 2.09 Watts
And chance/interest in getting a power measurement with the Pi under-clocked, eg to 300MHz say, or lower? A low clock speed might be perfectly adequate for some embedded applications and save a significant amount of power. I guess it's too much to expect that power consumption would be linear with clock but there should presumably be some correlation. And any significant power-saving by running headless?
I'm happy to have a go if you can let me know how to do the underclock.
And if you can give me details of what needs to be plugged in to best simulate your proposed setup, I'll get it as close as I can.

Thinking about it though, the difference between when the Pi is idle and thrashed is only about 25% so I'm doubtful we'll see large gains. Still happy to try it though.
Alex Eames RasPi.TV, RasP.iO

prodata
Posts: 176
Joined: Tue Jan 24, 2012 5:53 pm

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 4:47 pm

alexeames wrote: I'm happy to have a go if you can let me know how to do the underclock.
Sorry, I don't pretend to know the detail myself, just very interested in the principle of how it might be possible to reduce the Pi power consumption, albeit with some hit on performance. I was extrapolating from the various comments on overclocking and thinking that underclocking might well work too - based on threads such as:

http://www.raspberrypi.org/phpBB3/viewt ... =overclock

and the link to the wiki

http://elinux.org/RPi_config.txt#Overclocking_options

But I guess it might be safest for someone who knows to confirm that underclocking shouldn't cause any problems/damage (can't for the life of me see why it should, but just being cautious).

I suppose that having the ethernet port powered up is going to give a fairly constant drain, as would the GPU hence the question about headless operation (GPU status is a bit confusing - I keep seeing all these comments about how good the power-saving characteristics of the GPU can be, but it's not clear whether full GPU power-saving is enabled on the Pi at present).

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 5:05 pm

prodata wrote: But I guess it might be safest for someone who knows to confirm that underclocking shouldn't cause any problems/damage (can't for the life of me see why it should, but just being cautious).
I doubt underclocking would cause any harm, I just don't know how to do it. The wiki link shows the parameter, but not where to set it. If someone like, maybe, AndrewS knows, perhaps they'd care to chip in? :) I can't imagine it's that hard to do (and undo - hopefully).

Looks like I have to create a config.txt in /boot
containing...
arm_freq frequency of ARM in MHz. Default 700.

So would

Code: Select all

arm_freq = 300
do the job. What's the syntax? Spaces? No spaces? Do I need to specify GPU too? Do I know what I'm doing? (no :lol: )
Alex Eames RasPi.TV, RasP.iO

JeremyF
Posts: 515
Joined: Wed Jan 25, 2012 9:06 pm

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 5:52 pm

alexeames wrote:
prodata wrote: But I guess it might be safest for someone who knows to confirm that underclocking shouldn't cause any problems/damage (can't for the life of me see why it should, but just being cautious).
I doubt underclocking would cause any harm, I just don't know how to do it. The wiki link shows the parameter, but not where to set it. If someone like, maybe, AndrewS knows, perhaps they'd care to chip in? :) I can't imagine it's that hard to do (and undo - hopefully).

Looks like I have to create a config.txt in /boot
containing...
arm_freq frequency of ARM in MHz. Default 700.

So would

Code: Select all

arm_freq = 300
do the job. What's the syntax? Spaces? No spaces? Do I need to specify GPU too? Do I know what I'm doing? (no :lol: )
just add the line arm_freq=300 (exactly as I just typed it.)
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 8:01 pm

JeremyF wrote:just add the line arm_freq=300 (exactly as I just typed it.)
I bet I'll be the only person to deliberately make it slower :lol:
Alex Eames RasPi.TV, RasP.iO

prodata
Posts: 176
Joined: Tue Jan 24, 2012 5:53 pm

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 8:07 pm

alexeames wrote:
I bet I'll be the only person to deliberately make it slower :lol:
Possibly, but there is method in this madness. There is a whole category of potential applications for the Pi (or a lo-power successor) where just-good-enough performance (where the value of just-good-enough will vary with the application) is fine, but minimising the power draw is crucial, eg to maximise battery life. It's interesting for some of us to understand how to configure the Pi for minimum power draw, ie which tricks work and which don't help significantly.

User avatar
AndrewS
Posts: 3635
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 8:12 pm

alexeames wrote:
JeremyF wrote:just add the line arm_freq=300 (exactly as I just typed it.)
I bet I'll be the only person to deliberately make it slower :lol:
But it might give you the opportunity to change your signature ;)

User avatar
AndrewS
Posts: 3635
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: RasPi power usage measurements ~2 watts at idle

Wed Jun 13, 2012 8:20 pm

Hmmm, a question for JamesH or Dom:
If somebody had 2 Raspis (so they were happy to risk cannibalizing one), if they used the previously-released schematics to "mod" their Model B Raspi into a Model A Raspi (desolder the USB/Ethernet chip, desolder the ethernet jack, solder in the USB jumper resistors, swap around the "ID" resistors) would it actually work as a Model A Raspi, or does it need changes to start.elf or kernel.img that haven't been made yet (as there are no "real" Model As in the wild)?

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Thu Jun 14, 2012 5:18 pm

Hello London, here are the results of the Oxfordshire judges on the underclocking tests. Nothing but power and WiFi dongle plugged in (connected through SSH). The test involved downloading and transcoding a short iplayer TV program (the same one each time, naturally). This tested both wifi and processing.

300 MHz
Idle current: 0.36-0.38 A
Current while hammering WiFi: peak 0.5A, ave ~0.45
Idle current returned to: 0.36-0.38 A

700 MHz
Idle current: 0.36 A
Current while hammering WiFi: peak 0.47. ave ~0.45
Idle current returned to: 0.38 A

Shutdown -h now settles very stable at 0.40A after system halt.

Voltage was very stable throughout fluctuating rarely from 4.98-5.00V

I didn't do the full data logging thing, but it looks like there is minimal difference on the idling performance (which is kind of what I expected) and insignificant difference while hammering wifi.

As can be expected though, the underclock did slow down the processing part of things and made the pie a bit sluggish. (Slug pie - yum). Doesn't seem too hopeful for much power gain here. :(

Now I know how to clock the Pi I suppose I'll have to do an overclock :twisted:
Alex Eames RasPi.TV, RasP.iO

lb
Posts: 301
Joined: Sat Jan 28, 2012 8:07 pm

Re: RasPi power usage measurements ~2 watts at idle

Thu Jun 14, 2012 11:38 pm

Underclocking might be more useful if you also lower the CPU voltage. The over_voltage config.txt setting can be used for that, despite the name. Use a negative value. :)

User avatar
AndrewS
Posts: 3635
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK

Re: RasPi power usage measurements ~2 watts at idle

Fri Jun 15, 2012 2:43 am

Another quick question for one of the Broadcom guys: presumably undervolting doesn't blow the "there goes your warranty" fuse? ;) Or does any voltage change trigger it?

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2876
Joined: Sat Mar 03, 2012 11:57 am
Location: UK

Re: RasPi power usage measurements ~2 watts at idle

Fri Jun 15, 2012 7:06 am

AndrewS wrote:Another quick question for one of the Broadcom guys: presumably undervolting doesn't blow the "there goes your warranty" fuse? ;) Or does any voltage change trigger it?
That was my reaction too. If I had already overvolted, I'd happily give it a go, but for the moment I want to keep my warranty intact. :lol: Is the fuse set for changes or just increase?
Alex Eames RasPi.TV, RasP.iO

Return to “General discussion”