I plan to use a Raspberry PI 4b powered by battery and hopefully to monitor a remote chicken farm and need it to last a week or two on a car battery.

If powerconsumption is 1A then with a 60 AH battery I need to replace and recharge the battery every few days and that is impractical.

The Raspberry needs to collect and report temperature via mobile telephony internet link every hour and pull an electromagnet to open a small hatch once a day.

Any suggestions on how to minimize power consumption when the PI needs to "sleep"? Will going to another runstate and returning through crontab and reboot work, and would it make a significant difference in power consumption?

  • 1
    just the quick one: is there any reason you would not use Zero W if wireless needed? in the idle stage it consumes around 60mA - that is 16x less than Pi 4. May 25, 2021 at 9:54
  • @ArjenR Very off topic, comment deleted ;)
    – goldilocks
    May 25, 2021 at 13:35
  • A car battery may not be the best choice for this; they have a power curve that is tilted towards high-cranking amps and being constantly recharged. You might prefer a generic lead-acid battery.
    – NomadMaker
    Jul 15, 2022 at 8:37
  • Pi4 is literally one of the worst devices on the market for low-power applications. Get a SBC which supports power management. E.g. a roadrunner can go down to 17 mA in standby or to 10 mA in suspend to RAM, so it could probably run on a power bank instead of a car battery. Jul 15, 2022 at 10:03

3 Answers 3


As @Milliways correctly stated in his answer, the RPi technically has no "sleep" state. However, using the Low Power Mode configuration described in this answer, and the addition of a Real Time Clock (RTC), it may be possible to meet your goal quite simply.

The key to your question is actually not in any sort of "Pi Magic", but in some details on power consumption that you've not included in your question. If you'll edit your question to supply those figures, I'll edit this answer to provide all the details you'll need - or explain to you what changes are needed to make it work. I won't invest a lot of time in a detailed answer until I'm convinced you're serious about a solution.

The detail required is a simple "energy budget":

Electrical power (P), for the DC case, is determined by the Voltage (Volts), and the Current (Amperes); Power = V x I. Energy is Power over Time; E = P x T. Your battery stores energy - 60 Amp-Hours according to your question. And assuming it's a 12V battery, its energy storage capacity may be estimated as 60 A-hr x 12 V = 720 Watt-hours.

==> See Note on Battery Depth of Discharge below

You need to determine how much energy the elements of your system use each day; in other words:

  • Raspberry Pi 4B
  • 'mobile telephony internet link' - hourly
  • 'electromagnet to open a small hatch' - daily

We'll use the RPi 4B as an example - you can make the same calculations for the other energy-consuming components of your system.

For the RPi 4B, we know that typical power consumption when lightly-loaded is approximately 0.6 Amps at 5 V, or P = 5 x 0.6 = 3 Watts. Over a 24 hour period, it will consume 72 watt-hours (E = 24 x 3). Comparing that to your battery's energy storage capacity:

T = 720 watt-hours ÷ 72 watt-hours per day = 10 days

But you have told us that the RPi is only needed once per hour to send a message, and once per day to open a hatch. We can take advantage of this, and conserve energy, by putting the RPi in a Low Power Mode when it is not needed.

Assume, for purposes of illustration only, that the RPi can accomplish its tasks in a total of 1 hour per day - say 2 minutes for each message transmission, and 12 minutes for hatch opening:

From this experiment, we know we can reduce the RPi 4B power consumption to approx 40 mA while in Low Power Mode. This results in a very different daily energy consumption over a 24 hour period:

E = (1 hr x 3 watts) + (23 hrs x 5 volts x .040 Amps) = 3 + 4.6 = 7.6 watt-hours

The energy savings for this mode of operation are (7.6 ÷ 72), approx 89%, and the battery will support the RPi for

T = 720 watt-hours ÷ 7.6 watt-hours per day = 94.7 days

However, this doesn't include the 'mobile telephony internet link', or the 'electromagnet to open a small hatch'. If you'll supply those figures in an edit to your question, then we'll cover how to add the Real Time Clock, and configure your system so that it starts and stops when needed to perform a task.

Note on Battery Depth of Discharge:

For simplicity, the calculations shown above assume the battery used is capable of 100% discharge. This is impractical and/or ill-advised for virtually all batteries, and ruinous/destructive for some. In terms of your power budgets, this simply means that you must do a bit of research on the battery you are using, and determine a practical Depth of Discharge (DoD). For example, if you are using a lead-acid battery rated at 60 Amp-Hrs, and you have determined that a 60% DoD is your margin, then your Power Budget should reflect 60 x 0.6 = 36 Amp-Hrs.

Also note that the DoD margin you select is subjective - at least within a certain range of discharge - which chemistry-dependent. This discussion highlights the judgments and trade-offs that typically enter into setting a margin. This reference from "Battery University" discusses DoD from perhaps a more objective point of view.

The bottom line is that this planning and budgeting will allow you to get the "best" performance from your battery - depending on your criteria for best. Determine your DoD margin, and use that in your calculations.

  • @OliverCarlsenMøller: Your edit is fine, but I woud appreciate it if you would add a reference to support your claim of 50% for lead-acid batteries.
    – Seamus
    Mar 17, 2022 at 7:50
  • And on the subject of Depth of Discharge, I feel it's fair to say that 50% is not a hard and fast rule - as suggested by this post, and further explained in this one
    – Seamus
    Mar 17, 2022 at 8:09

It is not possible to manage Pi power consumption (other than limiting running processes, which has limited impact).

The Foundation site has power usage for most models Pi Power which range from 600mA (idle) to 1.25A for the Pi4.

It is not possible to "sleep" the Pi although you could shut down with external hardware.

You do not need any significant processing power to do such a simple task, you could use a basic model but this would be more appropriate to a microcontroller such as Arduino.

  • I have to take issue with your opening sentence, as it's demonstrably untrue.
    – Seamus
    May 25, 2021 at 17:45

This is a very light usecase for a Raspberry Pi - have you considered using something smaller, cheaper and less power hungry?

Maybe something like ESP8266 or ESP32? The difference in power draw between those and a raspberry pi is more than an order of magnitude at full load and they support deep sleep during which they only keep the clock running to know when to wake up again. While in deep sleep, where it sounds like they could spend >99% of their time in your use case, the ESP's draw is fractions of a milliwatt and the total power draw would likely still be negligble in comparison to the self-discharge of the 720 watthour battery mentioned in another answer.

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.