element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Raspberry Pi 3 Dynamic Current Consumption, Power and Temperature Tests
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
GPIO Pinout
Raspberry Pi Wishlist
Comparison Chart
Quiz
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 11 May 2016 4:29 AM Date Created
  • Views 5984 views
  • Likes 12 likes
  • Comments 14 comments
Related
Recommended
  • rpi cooling
  • heatsink
  • keysight
  • rpiintermediate
  • u1282a
  • heat_sink
  • rpi3
  • temperature
  • raspberry_pi
  • keysight_technologies
  • thermistor
  • rpiexpert
  • rpi
  • multimeter
  • temperature_measurement
  • data logger
  • agilent

Raspberry Pi 3 Dynamic Current Consumption, Power and Temperature Tests

shabaz
shabaz
11 May 2016

Note: This is a continuation of an earlier post, Raspberry Pi 3 Cooling / Heat Sink Ideas

 

Introduction

Having recently been experimenting with Pi 3’s and displays, analog-to-digital converters (ADCs) and a very high speed data logging multimeter from Keysightvery high speed data logging multimeter from Keysight, the stars aligned to allow me to measure several parameters to get to know the Pi 3 a bit better.

 

As the Pi’s System-on-Chip (SoC) which contains the CPU and cache memory works harder, the SoC will consume more power and get hotter. It would be expected to see current consumption rise (since Power = Voltage x Current) and it would be expected to see the temperature rise as it gives off heat.

image

 

To help dissipate the heat to the environment quicker, a heat sink can be used. To calculate what size heat sink is needed requires a lot of information; the semiconductor devices etched in the silicon die can only tolerate a certain temperature (perhaps 150 degrees C) and there is a thermal resistance between the silicon and the outside world, through the SoC casing. This means that heat will not be able to escape rapidly through the SoC, causing the temperature to rise. Similarly when a heat sink is glued onto the SoC, the adhesive has a thermal resistance too. The heat sink too has a thermal resistance to the environment (air) and there may be an air flow (passive, or active using a fan) or poor air flow (a full enclosure around the Pi).

 

In the absence of technical information (the characteristics of the silicon die used in the SoC are unknown, as are details about the SoC enclosure and precisely how much power the SoC dissipates) it was decided to conduct a few measurements. It is possible to measure the current the entire Pi consumes, but difficult to measure how much of that is due to the SoC, since there are other parts on the Pi 3’s printed circuit board (PCB). With no circuit diagram or board layout diagrams it would be difficult to solve this problem.

 

Any test results are for general guidance only the values can change from release to release and I deliberately picked the 26 Feb 2016 Raspbian release since I know that the throttling behaviour is more aggressive in the subsequent release I was more interested in trying out the Keysight  U1282AU1282A multimeter in a test bed for some custom measurement circuitry and software the Pi 3 happened to be an interesting thing to try it on

 

What is ‘Throttling’?

To deploy and use a Pi there are many things to consider such as heat sink selection, how it is connected to the SoC, air flow, and enclosure design. All this is needed to ensure the Pi (or any device) runs as expected and reliably. Things can be done to ensure fault conditions do not cause harm. One example would be to have two fans; if one fails the other can take over.

 

In terms of software if necessary the Pi can take control and reduce clock speeds (this is known as dynamic frequency scaling or ‘throttling’) if the temperature measured inside the SoC hits any thresholds. The exact algorithm is outside user control to an extent; it depends on the particular software release and raspberrypi.org decisions. In general throttling is very drastic and intrusive; if applications cause throttling then either a different application should be used (or it should be immediately rewritten) or a different processor must be used. Why is this?

 

The reason is, for a home PC or laptop or a mobile phone there is not really an issue if the processor changes speed; applications may run slower but they still run.

 

For a single board computer, this is unacceptable because it may be interfaced to the outside world through sensors and output devices such as relays and motors. A change in behaviour could have real, physical consequences. This is not just theoretical. The first moon landing saw the guidance computer being overwhelmed with a high level of events (known as a 1202 alarm). This is no different to a situation where the input data rate is unchanged but the processor speed has dropped underneath the software’s feet. A more likely scenario today could be a computer in control of a machine where a collision could be disastrous to the machine and anyone nearby.

 

At first thought a possible solution could be to just pick-and-choose your battles, i.e. choose different use-cases and scenarios where you can develop software intended for slow sensor and actuation rates. That way, even if clock speeds halve, there may be no issue if the sensor measurement or output is delayed by a second or two, because it will be safe for those use-cases. However, a massive warning flag is that even if input/output can be comfortably delayed by a second or so, there still is no guarantee that all is well because when software is tested for single board computers, it is done using particular hardware. Rightly or wrongly there is an expectation that the underlying hardware (and its speed) will not change. When changes occur, modern software can behave unexpectedly.  Most software is written with multiple areas of code (known as processes) which execute asynchronously to each other, and only occasionally synchronise up at pre-defined parts of the code (the synchronisation procedure is known as inter-process communication). If synchronisation is unexpectedly delayed or badly implemented then unexpected behaviour and software crashes can be extremely likely. It is known as a race condition.

 

It is quite easy to write a program which will happily run correctly 100% of the time at a particular clock speed, but which degrades and/or crashes as the clock speed is altered. If the developers and testers never anticipate nor actually run tests at different processor speeds they could never spot the issue even if they tested for a year, yet it would be reproducible within seconds if the clock speed was changed.

 

Incidentally, this is why for critical systems you must not run additional unrelated software on the same hardware without significant assessment, testing and guarantees from the software creators; better to use two (or more) separate computers. One piece of software could cause the other to crash. If you’re curious to try some experiments, I wrote a short piece of software called do1010 that runs perfectly fine at 1.2GHz (for example if you set force_turbo=1 and core_freq=400 in /boot/config.txt file on the Pi), but will have interesting effects as the clock speed reduces (e.g. by running a software tool to heavily stress the SoC causing throttling to occur) and will crash at a sufficiently slow speed. At 1.2GHz it just slowly displays toggling 1 and 0 in sequence (i.e. 1010101010…) about once per second and will do so forever if the hardware (i.e. clock speed in this case) doesn't change. At slower speeds it misbehaves very quickly.

image

 

If instead of a 1 or a 0 it had been turning on and off a heater for (say) temperature regulation for a farm animal environment, you can imagine the disaster if it crashed in the off or on position and didn't restart.

 

Test Bed Topology

A Pi 3 was used that had previously been connected to a heat sink and thermistor.

image

 

There is more information on that here, but in summary a ceramic heat sinkceramic heat sink was used (Note: I used a different ceramic heat sink but it is out of stock; the one linked here is a suitable replacement) because it has far lower thermal resistance (10.1 degrees C per Watt) compared to the traditional little stick-on aluminium heat sinks like this Raspberry Pi Heat Sink Kit that has a 25 degrees C per Watt thermal resistance value.

 

The ceramic heat sink achieves the excellent low thermal resistance because it has a micro-pores that can dissipate heat extremely well.

The thermistor used was Betatherm 100K6A1BBetatherm 100K6A1B and it was small enough to be able to be pushed into a hole that could be drilled in the heat sink.

image

 

A Keysight U1282A multimeterKeysight U1282A multimeter was used to capture the thermistor resistance measurements. It is very fast (10 captures per second) so that even subtle short changes in temperature can be easily detected. In fact the combination is sensitive enough to detect the heat given off by a laser pointer beam (which is less than 1mW).

image

 

To get power into the Pi 3, the official power supply was not used; instead a 4A capable bench supply was used with short thick wires. The wires were 16 AWG in size (1.29mm diameter) compared to the 18 AWG (1.02mm diameter) wires in the official 2.5A power supplyofficial 2.5A power supply. The wires were directly soldered to the underside of the Pi (to the test pads marked PP2 and PP5 for +5V and 0V respectively). It was tricky – 16 AWG wire is fat! To avoid ripping of the pads, the wire needed to be tied in place for a bit of strain relief.

image

 

Some known resistance is needed to ‘sense’ the current through the wire (and hence the current through the Pi). A 20 milliohm resistance was used for that purpose (you don't need it to be anything near as large as the one in the photo but it was all I had at hand; a 0.5W resistor will be sufficient). Incidentally the other connectors on the board are not relevant, they are for unrelated experiments).

image

 

The voltage across the resistance is proportional to the current going through the Pi (Ohm's law). The voltage can be measured with a multimeter or by using an analog-to-digital converter. (ADC). An ADC was used because I don’t have many logging multimeters. The accuracy of the ADC was determined before-hand with some known resistances and a handheld multimeter. The ADC reading is accurate to within a few milliamps (the software can self-calibrate to remove any offset, and gain error was removed through calibration by using a known load and confirming with a multimeter). If there is interest, let me know in the comments and I will write up the ADC project. It was designed to provide an accurate way to measure the power that USB devices consume dynamically.

image

 

The data from the  U1282AU1282A multimeter and the ADCs is collected up and graphically displayed using the kst’ application. It was actually possible to do all this using another Pi (and a 7 inch touch screen) so that it could be conveniently monitored for extended periods. But for the purposes of obtaining screen shots for this write-up, the software was run on a normal PC.

 

Running Tests

Not a lot of testing was done; the Pi was powered up and measurements taken with the Pi doing nothing (just running Raspbian with nothing connected up). A  few stress tests were run (in particular a Sysbench command that computes prime numbers and a stress command that makes all four cores work continuously, and a cpuburn-a53 program which exercises ARM NEON functionality (ARM NEON is hardware inside the SoC that is used by software libraries for accelerating math functions). I also tried using omxplayer to use the graphical processor unit (GPU) slightly.

 

For each of these tests the temperature, voltage and current were monitored in real time (and the power was computed in real time using Power = Voltage x Current). All tests used the Pi with the ceramic heat sink attached and no enclosure. Ambient temperature was around the 25 degree C ballpark and was uncontrolled.

 

After these tests were run, a small fan (25x25mm) was positioned a few centimetres away from the heat sink and run at full speed. It ran at 5V and consumed about 80mA. With the fan running, a couple of tests were repeated.

image

 

The fan was just positioned using some Blu-tack (putty) holding it against a Lego aperture that acted like a short air duct.

To run the tests I had to get my desktop/dashboard looking organized slightly! Dynamically updating charts are on the left, the Pi console is at the bottom (SoC reported temperature is in the blue window at the bottom) and the remainder was used to show the live action or any screenshots and the topology and any commands I would need to paste into the console. At top-left any observations/conclusions are displayed in a blue box.

image

 

For the detailed results there is a 30-minute video recording (right-click to open in a window to allow full-screen) which was done in one take to make sure no subtle data was lost, with no pauses except for a 5 minute period which is marked in the video during which time I was waiting for the temperature to drop after a test, and another break during which time I added the fan.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

If you don't want to sit through a 30-minute video here is the exec summary:

 

Results

For all these tests, as mentioned there was nothing connected to the Pi.

If a Logitech Unifying USB device is attached then that requires an additional 30mA to be added to the figures.

If there is a USB memory stick plugged in doing nothing then a further 30mA should be added.

 

Here are the results with just the heat sink and no fan:

Scenario #DescriptionCurrentTemperature reported by SoCTemperature measured by Thermistor
1Pi doing nothing. Rasbian running.266mA46°C41°C
2Pi running omxplayer, playing a file on the Micro SD card (connecting or disconnecting the HDMI plug made no difference)285mA
3Calculate Primes using sysbench365mA
4Running stress --cpu 4670mA75°C67°C
5Running cpuburn-a531.45A85°C75°C

 

It can be observed that the temperature was very high for the last couple of tests; hot enough to literally fry an egg. This was with a good heat sink (10 degrees C per Watt thermal resistance) nevertheless throttling was observed during test #5. The throttling effects are in the video and that part is worth observing.

 

In the shut-down state (type sudo poweroff at the command line) the Pi still consumes 80mA.

 

After this, the fan was applied and a couple of tests re-run as mentioned (results are in the video). It improved the situation despite being such a tiny fan.

 

Summary

image

In summary, although it was obvious, the results do corroborate initial thoughts that a heat sink is useful to allow the Pi to run at a high speed with less risk of throttling (but it does not necessarily rule out throttling as shown by the results). The ceramic heat sink is strongly advised not only because of the low thermal resistance but because it is not electrically conductive and therefore there is no risk of electrical shorts and there is a greatly reduced risk of impacting 802.11 (WiFi) and Bluetooth performance (the antenna is less than 20mm away from the SoC). An aluminium heat sink near the antenna would definitely impact antenna performance.

 

If ambient temperature is expected to be high (for example if the Pi is totally enclosed) then throttling is more likely to occur for heavy processing loads.

 

Inside an enclosure active cooling should be considered unless sufficient provisions can be made for passive air flow (such as using a heat pipe to the outside world). As shown in the tests, even without an enclosure throttling can occur if there is no fan. This was at 25 degrees C ambient temperature and would be worse in warmer environments.

 

If a fan is used, the 25x25mm one was effective (you can see the reduction in throttling in the video) but it didn’t eliminate throttling entirely for the last scenario although the effect was greatly diminished. The last scenario could be considered by some to be extreme though. It really depends on how the Pi is deployed.

  • Sign in to reply

Top Comments

  • michaelkellett
    michaelkellett over 9 years ago +2
    Thanks for interesting blog Shabaz. I must take you to task over the egg frying All over the internet you will see claims that approx 158F is hot enough but this is not the case, the egg will stiffen and…
  • michaelkellett
    michaelkellett over 9 years ago in reply to shabaz +1
    https://en.wikipedia.org/wiki/Serendipity Your pure research into RPi warming has yielded an unexpected benefit. Time spent measuring stuff is rarely wasted. I didn't know about the spongy ceramic stick…
  • DAB
    DAB over 9 years ago +1
    Excellent detailed post. It is always useful to see the basic device independently tested to see if the spec sheets are honest. DAB
Parents
  • michaelkellett
    michaelkellett over 9 years ago

    Thanks for interesting blog Shabaz.

     

    I must take you to task over the egg frying image

     

    All over the internet you will see  claims that approx 158F is hot enough but this is not the case, the egg will stiffen and the white (eventually) turn opaque at this temperature but frying requires temperatures above the boiling point of water. The first link gives a good idea of actual temperatures required of the hot plate:

    Recipe: Electric Skillet Temperature and Cooking Times Chart - Recipelink.com

     

    The second link is a definition of pan frying:

    https://en.wikipedia.org/wiki/Pan_frying

     

    note the comment re. the escaping steam.

     

    E14 members should not buy a Raspberry Pi to fry eggs.

     

    MK

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 9 years ago in reply to michaelkellett

    Hi Mark,

     

    Hehe I really should stick to doing what I do best, making toast : )

    It's very interesting that detail in your URL about frying.. something I'd always wondered, how come food isn't entirely soaked with oil inside, and why people wait for the oil to be hot first (something instinctive, but I never knew the reason for it). Now I know!!!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 9 years ago in reply to shabaz

    https://en.wikipedia.org/wiki/Serendipity

     

    Your pure research into RPi warming has yielded an unexpected benefit.

     

    Time spent measuring stuff is rarely wasted.

     

    I didn't know about the spongy ceramic stick on heat sinks.

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • michaelkellett
    michaelkellett over 9 years ago in reply to shabaz

    https://en.wikipedia.org/wiki/Serendipity

     

    Your pure research into RPi warming has yielded an unexpected benefit.

     

    Time spent measuring stuff is rarely wasted.

     

    I didn't know about the spongy ceramic stick on heat sinks.

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube