I want to use the pi to analyze the moisture of my plants and decide to water or not. I want it set up in the garden. There is no power supply, so the pi will need to run on batteries.

The plan is that the Pi starts every hour, takes measurements, decide if watering is needed and sends logs to my home server via WiFi.

a) How much sense does it make to just have the Pi on all the time, but idle, and then wake up and sleep later?

b) Does it make sense to, alternatively, create secondary circuity with a timer that turns the pi on/off? How complex would it be? Would this approach save lots of energy?

c) What duration can I expect for the batteries under these circumstances?

d) What about adding a solar cell to reload the batteries? I already have some solar lamps around that grab sunlight and power small leds at night.

EDIT: A friend of mine proposed to have the battery + solar cell and something like this: https://de.hama.com/bilder/00121/abb/00121949abb.jpg. The idea is to hack the remote control and let the server-pi controls it. Then, use the outlet as a switch between the battery and the pi. Every hour the server-pi starts the outlet for 5 minutes. What about this ? Definitely cheaper than arduino+Wifi

  • 3
    You could read the series on project Curacao in the MagPi which discusses similar issues. The Pi is quite efficient, compared to most computers, but an Arduino would seem to be a better fit and runs on the smell of an oily rag.
    – Milliways
    Apr 1, 2015 at 12:53
  • agree with previous comment. have a look at openhomeautomation.net/arduino-battery using the library and just arduino chip you can reduce power consumption massively.
    – Joop
    Apr 1, 2015 at 14:46
  • @Milliways how funny is inserting data into my MySQL database from arduino?? And what's the cost of a WiFi Shield for Arduino ??
    – javirs
    Apr 2, 2015 at 9:06
  • @javirs The problem with your question is that you have not properly defined/analysed your problem (a situation I am familiar with working with young engineers). As you have not defined the problem, I was not attempting to suggest a solution, merely to suggest other approaches. My initial reaction is that for watering you don't need hourly monitoring; daily (or 12 hour) would seem to be adequate. You would likely find that interfacing an Arduino to the Pi would be simpler, and less costly than providing battery power to the Pi and implementing a timed on/off.
    – Milliways
    Apr 2, 2015 at 9:33
  • There are many ways of communicating between the 2, especially as this is a very low information rate.
    – Milliways
    Apr 2, 2015 at 9:33

1 Answer 1


The Pi isn't super energy efficient at idle, best would be to have a secondary circuit turn it on/off somehow - from what I have observed, the B+ Pi uses about 2 watts of power without any display connected, and ethernet/wifi/CPU use (no OC) don't change this number by any significant amount (less than half a watt) - how long it lasts depends on your battery, but lets go with a common Li 18650 battery - these come in sizes up to around 3400 mAh, but provide ~3.7 V, so you will need a buck-boost converter, which usually run around 90% efficiency, and raise it to 5 V, so we are left with roughly (3.400 * .9 * 3.7/5) = 2.264 Ah - the Pi will consume roughly (2 W/5 V) = .4 A, giving us roughly (2.264/.4) = 5.66 hours on a single battery before it needs to be charged. (this is assuming no shutdown on the Pi)

You certainly can add a solar panel, but that brings in a lot of variables (how large is the panel/what is it's max output, over what time period will it work, what should happen if it's cloudy/etc.) - I think it's a good idea, with the caveat that if it's cloudy, the battery MAY die and thus the Pi won't turn on - but if it is cloudy, chances are it's not all that dry either, so hopefully it won't be an issue for you.

One more thing to take care of is that batteries don't like being frozen/cooked, so you may want to bury it underground such that it isn't subject to extreme temperatures

As for how complex a circuit that turns the Pi on/off would be, have a look here - it doesn't look super complex, but the folks at the EE stack would be a better place to ask about it.

You can also add more batteries if you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.