User avatar
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Energy or Power Consumptions

Fri Jan 08, 2016 1:32 pm

A multimeter may be useless for measuring power consumption of a Pi.

It's all down to accuracy of course. A multimeter may be good enough for the requirements of the task, but we already have a figure that is pretty close: 0.6 x 5 = 3W

The power is voltage multiplied by the current. The voltage is (we hope) constant. The power is therefore proportional to the current. But the current is not constant. It is going to be spiky and it will have frequency components well into the gigahertz range. The mythical $1 multimeter will not give a true average reading . It works by measuring the voltage across a shut resistance maybe twice a second so it will give us wholy unrepresentative samples of the current. Even a good multimeter is highly unlikely to get a true average, even one that purports to measure "true RMS". It isn't RMS we want in this case anyway.

It may be that a better measurement can be made with a moving iron ammeter, but I think that will be RMS too and it will probably change the high frequency components.

Howabout charging a capacitor up to 5.25V and measuring the time it takes to drop to 4.75V? That could probably be constructed for less than a reasonable multimeter costs.

Posts: 16874
Joined: Tue Jul 17, 2012 3:02 pm

Re: Energy or Power Consumptions

Fri Jan 08, 2016 1:45 pm


Quite so. That is why I said "preferably an analogue model" a few posts back. I'm pretty sure that the averaging of a mechanical movement should be sufficient for most practical purposes.

I have no idea how cheap digital multi-meters respond to noise on the input. Anyone know if they do any filtering there?

Of course if your compute load is maxing out for half a second every two seconds or some such, then that will play havoc with this scheme. At which point I'd probably want my own shunt resistor and an opamp with filter circuitry. Then you can average out the current measurement over whatever time constant you like.

Our OP seems to have disappeared so we have no idea what the actual requirement is. What accuracy is expected? Is this supposed to be installed permanently into some project or is it just a bench test? Etc, etc.
Memory in C++ is a leaky abstraction .

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
Contact: Website

Re: Energy or Power Consumptions

Sat Jan 09, 2016 11:44 am

Oh, I just love it when a plan comes together ... even when it wasn't the original plan! :lol:
It would be too complicated to thread all of the quite entertaining posts as quotes, so I'll just discuss the relevant concepts in turn.

Jim's Law - DONE! Wow, I'm honored and humbled that the Academy would bestow this on me and I'll bet I'm the only one of us who is an alumnus of an actual Academy, so put that in your craw and grind on it! ;)

As for the whiny complaints, some of you guys really can't read very well - I'm not that surprised, given what I've seen passes for "education" these days ... :cry:

First, I mentioned being a scientist and an engineer and relying on facts and evidence not only because I'm proud of that, but because Heater stated that he simply _believed_ in his position. I'm owed (but not expecting) an apology for the offense inflicted in posts since then from jealous people who apparently aren't scientists and engineers, and for not taking Heater to task for merely believing. If I were a paranoid sort, which I'm not, I might assume there's yet-another stodgy cultural old-boy network conspiracy going on here, as usual - and how infantile would that be? As for being "wrong", I'll cite what a number of famous scientists have said, and that's essentially if you're not wrong at least 90% of the time, you're not taking enough risks, and you're certainly not practicing science.

If we're doing our jobs, we scientists shouldn't know what the answer to a postulation is in advance, which makes clueless accountants and managers go apoplectic when they want to know in advance precisely how much it's going to cost to perform research activity (no wonder economics is called The Dismal Science). BTW, scientist and engineer are only two among other professions I pursue, such as educator, rotorcraft and airplane pilot, Naval officer, inventor and patent holder, and a bunch of others that require detailed technical knowledge.

For the record, virtually everything I've posted in the forums has been more of a postulation nature, and no one has ever bothered to collect indisputable evidence to disprove those postulations. Even if I were to collect every iota of data possible, that's not even half the job as someone (preferably plural) has to do their own independent experiments to confirm/disprove a postulation. I'm really disappointed in the self-appointed critics here who haven't accomplished half of what I have, just like movie and TV critics who have never produced an artistic frame in their lives - I feel so sorry for you suffering in your anger and anguish, but please go find something more productive to do because, statistically, this is going to lead to a foreshortened life for you.

OK, so, now let's review how I have been proven correct by several people. However, first we have to recap what I originally stated, which was simply that it was possible to use only software to determine the electrical power being consumed by the SOC by measuring its internal temperature via its built-in sensor, period. That means you can't use any other hardware not on the board and I didn't say anything about cost - even if your multimeter was given to you for free, that's outside what I stipulated and therefore not pertinent to the discussion.

Note that I didn't specify any assumptions about what the ambient temperature was, and therefore if that is held constant, then what I said is absolutely provable, as several people have shown. For those who aren't schooled sufficiently, the practice is to use Standard Ambient Temperature and Pressure (SATP), the former of which is 25°C / 77°F and the reason is that it's more comfortable for us lazy, good-fer-nothin', "error-prone" scientists, not to mention more typical in field use of Pii. If Standard Temperature and Pressure were used, the former is 0°C / 32°F, which can cause condensation and frost issues that electronics just seem to not like one bit, much less a gigabit.

As I think everyone agreed, the power dissipated is related to the temperature differential between the sensor and the ambient environment. The specific relationship varies depending on the sensor technology, but for semiconductor thermal sensors typically used in the Pi's SoC, dissipation is linear with temperature differential and it's remarkably consistent over a wide range of temperatures from somewhere around -40 to 200 °C. Someone from Broadcom would have to tell us what the specific technology is and what its characteristics are, but it should be a pure semiconductor-based unit.

I also said nothing about whether the board was in a case, a dra(f/ugh)ty room, a wind tunnel, etc. So, we're free to assume that it's not only in a large space with no air movement, we could even put it in an evacuated chamber so that the only cooling is via black-body radiation. That would violate the pressure portion of SATP and may also be outside the rated performance envelope specified by the manufacturer, and I don't think that's an issue, but feel free to come up with some complaint about that, too, if you really must.

As for the effect of heat from the LAN chip and other components on a Pi board, it's negligible because essentially all of the infrared radiates normal to the die's plane. Silicon and the epoxy used in packaging aren't just excellent electrical insulators, those sorts of materials are also outstanding thermal insulators for the same reasons due to physics. Plus, the SoC thermal sensor is probably located at, or near, the geometric center of the SoC die and hence the GPU, since that's around 99% of the die area and the center is surrounded by all of the heat-generating junctions.

The GPU also has the widest dynamics, by far, in power consumption on the SoC based on computing activity. If you're in command line mode only and not running a GUI or making OpenGLES/OpenVG calls, with as few OS services executing as possible (or preferably, none at all in bare-metal software), power consumed will be the minimum. If you're running a GUI and making maximal OpenGLES/OpenVG calls, the power consumed will be the maximum. Most people never get even close to this level, even if the GUI perf meter is pegged at 100% - that's only about one percent of the SoC's actual semiconductor junction count being exercised at full capacity, and the GPU may only be generating video and performing a few other tasks. It's a fairly simple thing to incrementally vary GPU activity to control power consumed based on the number and complexity of graphics elements being manipulated, as well as the variety of the manipulations themselves (translation, scaling, rotation, etc.). I wonder if someone at Broadcom has generated a table that maps GPU functions to power consumed.

As an aside, while I was trying to find an actual quote about scientists needing to be wrong most of the time, I happened across this page, which has some quotes that are peripherally related to this subject: . However, it also harbors some real gems that I found just irresistible and I thought worth sharing here:

"If you're not prepared to be wrong, you'll never come up with anything original." -- Ken Robinson

"If you thought that science was certain, well, that is just an error on your part." -- Richard Feynman

"What is not surrounded by uncertainty cannot be the truth." -- Richard Feynman

"Oh, happy he who still hopes he can emerge from Error's boundless sea!" -- Faust

"Far better an approximate answer to the right question, which is often vague, than an exact answer to the wrong quesiton, which can always be made precise." -- John W. Tukey

"Thinking is more interesting than knowing, but less interesting than looking." -- Johann Wolfgang von Goethe

"The real role of leadership in education ... is not and should not be command and control. The real role of leadership is climate control, creating a climate of possibility." -- Ken Robinson

"The person who says it cannot be done should not interrupt the person doing it." -- Chinese proverb

"Basic research is what I am doing when I don't know what I am doing." -- Werner von Braun

"Nobody is ever out of the woods. Life is the woods." -- Katharine Coles

"Scientific progress is measured in units of courage, not intelligence." -- Paul Dirac

"Discovery consists of seeing what everybody has seen and thinking what nobody has thought." -- Alert von Szent-Gyorgy

"Ideas without action are worthless." -- Harvey Mackay

"Success usually comes to those who are too busy to be looking for it." -- Henry David Thoreau

"Thinking is more interesting than knowing, but less interesting than looking." -- Johann Wolfgang von Goethe

"Nearly all men can stand adversity, but if you want to test a man's character, give him power." -- Abraham Lincoln

"There are three kinds of men. The one that learns by reading. The few who learn by observation. The rest of them have to pee on the electric fence for themselves." -- Will Rogers

"The world is full of magical things patiently waiting for our wits to grow sharper." -- Bertrand Russell

"Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers in the future may have only 1,000 vacuum tubes and perhaps weigh 1 1/2 tons." -- Popular Mechanics, March 1949

"Everyone thinks of changing the world, but no one thinks of changing himself." -- Tolstoy

"Education is a progressive discovery of our own ignorance." -- Will Durant

"I was born not knowing and have had only a little time to change that here and there." -- Richard Feynman

"I am not young enough to know everything." -- Oscar Wilde

"Knowing is not enough; we must apply. Willing is not enough; we must do." -- Johann Wolfgang von Goethe

"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg." -- Bjarne Stroustrup

"Man is the only animal that can remain on friendly terms with the victims he intends to eat until he eats them." -- Samuel Butler

"I have an existential map; it has `you are here' written all over it." -- Steven Wright

"I am always doing that which I can not do, in order that I may learn how to do it." -- Pablo Picasso

"I find that the harder I work, the more luck I seem to have." -- Thomas Jefferson

"OK, so you've got a Ph.D. Now, don't touch anything." -- Anonymous

"It's not the strongest of the species that survives, nor the most intelligent, but the one most responsive to change." -- Charles Darwin

"Some scientists claim that hydrogen, because it is so plentiful, is the basic building block of the universe. I dispute that. I say there is more stupidity than hydrogen, and that is the basic building block of the universe." -- Frank Zappa

"A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort." -- Herm Albright

"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams

"Sometimes I need what only you can provide - your absence." -- Ashleigh Brilliant

"Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education alone will not; the world is full of educated derelicts. Persistence and determination alone are omnipotent." -- Calvin Coolidge

"There are two types of computer languages; those that people hate and those that nobody uses." -- J. Ousterhout

"Act always as if the future of the Universe depended on what you did, while laughing at yourself for thinking that whatever you do makes any difference." -- Buddha

"Reality leaves a lot to the imagination." -- John Lennon

"A scientist discovers what exists. An engineer creates what never was." -- von Karmon

"Estimated amount of glucose used by an adult human brain each day, expressed in M&Ms: 250." -- Harper's Index, October 1989

"Study the science of art and the art of science." -- Leonardo Da Vinci

"The best way to have a good idea is to have lots of ideas." -- Linus Pauling

"The greater danger for most of us is not that we aim too high and we miss it, but that it is too low and we reach it." -- Michelangelo

"Judge a man by his questions rather than his answers." -- Voltaire

"Congenital naysayers are among the greatest stumbling blocks to thinking free. Rather than imagining how a new idea might possibly work, they instinctively think of all the reasons why it won't. They sincerely believe that they are doing everyone a favor by reducing the amount of time spent on bad or foolish ideas. But what they really do is undermine the creativity that can be harvested from thinking free." -- Steven Sample

"Mathematicians stand on each other's shoulders while computer scientists stand on each other's toes." -- R.W. Hamming

"Less advice and more hands." -- German Proverb

"To purchase insight you must pay beforehand, in confusion." -- David Wolpert

"I haven't the slightest idea how to change people, but I still keep a long list of prospective candidates just in case I should ever figure it out." -- David Sedaris

"America believes in education: the average professor earns more money in a year than a professional athlete earns in a whole week." -- Evan Esar
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
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Energy or Power Consumptions

Sat Jan 09, 2016 12:48 pm

So what you are saying is that you were wrong. That's fine; it's been a fun conversation and made us think. There's no reason to apologise for that.

Some issues with what you say:
Black body radiation is not an issue. Most cooling comes from conduction and then convection. If you put the Pi in a vacuum chamber it would probably overheat. See my link above for the proof of that.

The Ethernet chip is a problem because it also consumes power. The total energy usage will be the total of that consumed by the two chips but you can only measure the temperature of one of them.

Posts: 16874
Joined: Tue Jul 17, 2012 3:02 pm

Re: Energy or Power Consumptions

Sun Jan 10, 2016 8:26 am

So I took a few minutes to carefully read Jim's latest rant. After removing everything that is irrelevant, self aggrandizing, insulting, incorrect, self contradictory and or simply wrong. I was left with this:
But let's try to get to the point. Jim says:
However, first we have to recap what I originally stated, which was simply that it was possible to use only software to determine the electrical power being consumed by the SOC by measuring its internal temperature via its built-in sensor, period. That means you can't use any other hardware not on the board ...
OK Jim. My Pi, while booted but idle, reports it's temperature so:

Code: Select all

$ /opt/vc/bin/vcgencmd measure_temp
What is it's power consumption? Please show your working.
Hint: The ambient temperature is about -15C. I can measure that more accurately if you like.

Jim then says:
...the practice is to use Standard Ambient Temperature and Pressure (SATP), the former of which is 25°C / 77°F...
Well, if we are going to use SATP I would have to verify that at my location. Which will need a thermometer and barometer. Which contradicts Jim's assertion about not using any other hardware.

Yes I used the word "believe" when I said "I don't believe it's as easy as you make out." It was a statement about your abilities Jim. :)
Memory in C++ is a leaky abstraction .

Return to “General discussion”