10 ms·
Raspberry Pi Zero – Conserve power and reduce draw to 30mA
- geerlingguy 11y agoAfter posting a comparison of power consumption of the Pi Zero vs other Raspberry Pis a couple days ago, I spent another couple hours today testing various methods of reducing power consumption, and was able to get the idle power usage down to about 25-30 mA on the Pi Zero! Thanks to a few suggestions from others on the Raspberry Pi forums, Hacker News, and Reddit, I am able to disable the ACT LED and HDMI, and that results in a 5 mA and 30 mA savings, respectively.
- detaro 11y agoDoes it have something in the way of sleep states, outside of being shut down?
- geerlingguy 11y agoThis is another thing I've been investigating, and so far I've come up dry. I really wish there were some way of scheduling it to go into a sleep state, and wake up every 30s or every minute, something like that... you'd think the mobile processor would have some way of doing this, but so far all my searching has been fruitless :( There are hardware add-ons like the Sleepy Pi[1], but that's a large added expense, and makes the management of the overall platform a lot more complicated. [1] http://spellfoundry.com/products/sleepy-pi/ http://spellfoundry.com/products/sleepy-pi/
- analog31 11y agoHow much of this applies to the bigger RPi models? Also, can you throttle the clock speed of the microprocessor and further reduce current consumption?
- newman314 11y agoYou can underclock and use the ondemand cpu governor
- geerlingguy 11y agoIn my testing, underclocking only showed power savings when really stressing the CPU, so it's not as useful to me. I didn't do any GPU-related testing though.
- newman314 11y agoCan you try running things through powertop (follow the recommendations) and measure any possible differences?
- kozukumi 11y agoAnyone got any info on running a Zero with WiFi and a camera running off solar? I would love to build a ~£15-20 IP camera if possible.
- tomjacobs 11y agocamera on raspberry pi zero - is it possible? usb webcam? any line into the csi camera bus?
- perlin 11y agoWe've actually found that the RPi doesn't draw enough power, specifically to the USB ports. Our peripherals are within the USB spec of a 500ma max pull, but even so we are experiencing sporadic CPU brownouts. The first thought was to double the max_usb_current in /boot/config.txt, but that only lengthened the time between brownouts. We looked into hacks that could increase the current even more, such as this bypass method: http://hackaday.com/2015/04/06/more-power-for-raspberry-pi-usb-ports/ http://hackaday.com/2015/04/06/more-power-for-raspberry-pi-u.... Unfortunately, this isn't a viable solution as we continue to scale up our deploys. Some viable alternatives include switching to a board that supports USB3.0, underclocking the CPU, or doing a custom solution through Element14. I really wish the RPi was more stable around power / fault tolerances, but they're a blessing nonetheless :) [Plug]: If you're based in NYC, enjoy hacking hardware and find these types of problems to be delightful, please shoot me an email: mykola@colorcreative.io ;)
- lemevi 11y agoHave you tried a BeagleBone Black or any kind of BeagleBoard? What are you scaling RPi's for? Arduino and Raspberry pis strike me as toys compared to BBB's. BBBs are a lot less forgiving and require way more understanding of basic electronics to do anything with, even as simple as lighting an external LED will break your BBB if you didn't do it right, but they seem more powerful in terms of what you can do (although underpowered compared to Rasbperry Pi when it comes to video processing).
- perlin 11y agoI have plenty of experience frying BBBs while trying to make LEDs blink ;) http://colorcreative.io/portfolio.html http://colorcreative.io/portfolio.html. The reason we use RPis in my place of work is due to USB peripheral support. I love the dedicated PRU in the BBB, though. It's perfect for the tight timing spec required by the WS281x LEDs :)
- StavrosK 11y agoWait, how can you break the BBB with a LED? I'm going to use one for a LEGO robot, and I'd like to not fry it :P
- markbao 11y agoThat's really cool - with those settings, you could run it on a single charge of one of those cheap 20,000 mAh portable batteries for a month.
- teraflop 11y agoIt might require a bit of hardware hacking to get that to work. I have one of those battery packs, and according to the manual, it will shut off automatically when the output current drops below 50mA.
- geerlingguy 11y agoSame here. I actually can't run it in this configuration, I have to have something plugged in to draw a little more power and keep the battery active. Most of those batteries are designed for 1A+ power draw of a charging tablet or smartphone!
- WatchDog 11y agoWhat are the low power options to run one of these with Ethernet networking? Are there any reviews of the power usage of cheap USB Ethernet adapters?
- ascorbic 11y agoHow about using power over ethernet?
- chatman 11y agoWhy are you referring to the units of mA for "power", as opposed to current draw? The power consumed would be measured in watts or milliwatts.
- robzyb 11y agoThe Raspberry Pi runs on a fixed 5 volts. At a fixed voltage power will scale linearly with current.
- langarto 11y agoThat's a poor excuse for not using the correct terminology or the correct units.
- geerlingguy 11y agoI use Watts on the page where I aggregate my results[1], but since most USB-related projects measure mA (and most battery ratings use mAh), I use the same convention as a default, since 5V can be assumed in all cases. [1] https://github.com/geerlingguy/raspberry-pi-dramble/wiki/Power-Consumption https://github.com/geerlingguy/raspberry-pi-dramble/wiki/Pow...
- theGimp 11y agoI have pretty much never seen a component specify wattage. They always specify the voltage and current draw. Voltage and current are easy to measure with a pair of multimeters, so it's more useful to have those numbers than wattage.
- robzyb 11y agoIt wasn't intended to be an excuse for not using "correct" terminology or units. The reason that these terminology and units were used by OP was because at a fixed voltage it is common for engineers to think about current instead of watts... even when their aiming to reduce power. I'm not sure of the exact reason for this, but I suspect that it's because: a) Measuring current is a more fundamental function of instruments. Quite a lot don't even measure power. So talking about current instead of power, even when you're aim is to reduce power, makes for a smoother process from a practical sense. b) Batteries are usually measured in mAh. At lower power/currents you're usually using a linear regulator and therefore dividing mAh by mA is a very important measure. So you often keep everything in mA.
- janjongboom 11y agoWhy are we even using a Raspberry Pi for battery powered projects... 30 mA draw is so high you'll be changing batteries every 2 days, and that is without doing anything. Compare that to f.e. a normal phone chipset with deep sleep, which draws about 9 mA with a cellular connection, or .1-.2 mA in flight mode. Or, if you just use the Pi for sensor readings, get a proper microcontroller, where current is measured in micro (or even nano-)amps...
- agumonkey 11y agoBut are these phone chip application-class or domain specific ones ? meaning you can leverage linux ecosystem or do you have to program on their ~OS ? I was looking for the most power efficient thing that could run a minimal desktop on battery and fit into my palm.
- janjongboom 11y agoKinda unrelated to the whole Rpi discussion, but the SOC of any phone that runs Android would do. If that is Linux'y enough for you then it could be a solution. The problem is sourcing the SOCs. Spreadtrum makes some nice chips that include app processor, cellular, WiFi, Bluetooth, etc. for ~7$ but they're not for sale if you're not an ODM. This is a great article [1] about how Chinese SOC manufacturers and Chinese IP works. I ended up just ripping out the mainboard of phones to get access to the SOC [2]. [1] http://www.bunniestudios.com/blog/?p=4297 http://www.bunniestudios.com/blog/?p=4297 [2] http://janos.io/ http://janos.io/
- agumonkey 11y agoI thougth you were thinking of ~dumbphones, but sure enough any smartphone these days is exceptional in most features. Just today I saw a chinese dual core smartphone phone for 34$... The thing is that unless you're already in the know you can't repurpose the board. ps: funny, just an hour ago I was trying to flash an old nexus s with CM*.
- 11y ago
- joosters 11y agoDoes the PI have any kind of 'deep sleep' support? If you could put the system into something like ACPI S3/S4 sleep state (suspend to RAM) and make it periodically wake up every n seconds, you might be able to save a lot more power. The PI would still be usable for many tasks, e.g. data sampling every few seconds.
- geerlingguy 11y agoI've been looking into this; besides people calling me a 'noob' for not knowing how to do this (but not offering any suggestions as to how it' stone), I haven't seen any way to put the Pi in an official sleep mode, short of buying a Sleepy Pi hat that basically runs a lite Arduino as a hardware power management layer on top of the Pi.
- alkonaut 11y agoWhat is the practical difference between 500mA and 30mA? Both are way too high for battery power, and both are low power in terms of cooling and electricity cost? A sensor node with a 5Ah battery would have a budget of .5mAh to have the battery last s year. That is still two orders of magnitude under the Pi. Power is interesting for cooling and economics until you get below a few watts, at which point the power costs nearly nothing and the cooling is done without heat sink in air without fans.
- jacquesm 11y ago30 mA periodically gets within the range that you could do some interesting things with systems that only power up periodically and are recharged by solar.
- cstross 11y agoPlease can somebody build a case for the Pi Zero in the form factor of the Psion 5? https://en.wikipedia.org/wiki/Psion_Series_5 https://en.wikipedia.org/wiki/Psion_Series_5 (The patents on the folding keyboard will probably have expired by now -- the design dates to 1994-95 -- and with a 30mA draw the Pi 0 is within spitting distance of the sort of power the Psion 5's twin AA cells delivered. Add an e-ink display and a wee USB bluetooth peripheral for i/o (wifi too, if it can be done within battery limits) and it could be the second coming of the form factor of the Sharp Zaurus Z-1 Netwalker (only with a better keyboard and more usefully open software stack): http://www.engadget.com/2009/08/27/sharps-5-inch-pc-z1-netwalker-honors-the-zaurus-legacy/ http://www.engadget.com/2009/08/27/sharps-5-inch-pc-z1-netwa...
- jacquesm 11y agoNow there is one design that should make it to thingyverse.
- yasth 11y agoWere you to want to, you'd have much much more space and could just convert a lot of the body to li-ion which is probably a better use than really trying to get it last that long on AAs. (Also there are probably better processors, unless you really need the graphics performance (though not all the time of course), it really is true that the RPi is a GPU with a CPU accessory, shame it is so hard to do compute with the GPU) Anyways for your needs I'd look at the CHIP, which is much like the rPi 0 except it has WIFI and BT connectivity, plus built in power control and charging circuitry (and costs $9 (or $8 if you are fast)) [1] A hackish job is probably possible, the hard part would be sourcing the display. [1] http://makezine.com/2015/11/28/chip-vs-pi-zero/ http://makezine.com/2015/11/28/chip-vs-pi-zero/
- Joeboy 11y agoI would love there to be a modern Psion Series 5. I'd just stick an android device in the nice clamshell case though.
- StavrosK 11y agoMandatory OSS project plug: If you want to get your Raspberry Pi communicating securely with other computers, even over a public network, I wrote a Python library for that!: https://stringphone.readthedocs.org/ https://stringphone.readthedocs.org/
- akerro 11y agoOk, it has low power consumption... no eth, no wifi, no usb... how do you communicate and what for? Running on batteries for two days and manually coping data from sd card?
- geerlingguy 11y agoThat's one possibility. I can think of a few cases where I'd rather toss in a $5 board with a 50/50 chance of getting it/data back, rather than a more expensive circuit or something that includes a GPS device and could still get lost. Also, there are other ways to communicate that can potentially use a lot less power than Ethernet or WiFi :)
- fanf2 11y agoIt does have a USB OTG port. In principle it should support device mode, but currently the kernel has it forced off to avoid interop problems, and if you fix that the driver is known to be buggy. But if device mode can be made to work then you can use USB gadget drivers such as g_ether to communicate with a bigger computer using just a USB cable - make a cheap alternative to a USB Armory, perhaps.
- danepowell 11y agoTo put this in perspective, 30mA costs about $0.15 / year at typical US electric prices. 500mA is $2.50. A tiny draw regardless, but probably a lot more significant if you're running on batteries.
- UnoriginalGuy 11y agoHonestly that 15c/year really puts it into perspective why IoT might make sense. I've always avoided those "smart" light switches and similar because the power draw on them was too high (and it is likely closer to the $3 mark); but if something was drawing 15c/year or similar I doubt I'd care. PS - I know we aren't going to get WiFi for under a few dollars a year. But physical ye-olde switches are vastly under-estimated I feel. In particular a button to put it into "configuration" mode.
- exDM69 11y agoIs CONFIG_NOHZ enabled in the kernel? It should allow the CPU to remain in a low-power state if there is nothing of interest happening by disabling all periodic wakeups that can be disabled. https://www.kernel.org/doc/Documentation/timers/NO_HZ.txt https://www.kernel.org/doc/Documentation/timers/NO_HZ.txt