Building a cellular tracker: Part3 – Running on Batteries for Months

As described earlier, i want to create a cellular tracker – below i am going to describe what i learned about power-consumption and why i believe that the tracker could run on batteries for months…

My goal is to have a system that can run on batteries for a long time – ideally it would be able to run forever with a combination of rechargeables + a solar-panel.

But this is harder to achieve than i thought. A standard Arduino Uno consumes around 55mA while looping – and as the board is looping all the time this is the baseline – it’s actually consuming the same amount if it is in delay() all the time and practically doing nothing. Of course there are ways to put the CPU in sleep-mode, if you leverage the full potential of this with an Uno it will go down to 35mA. This would mean that an Arduino would run for less than 30 hours with a 1000mAH battery. The biggest available Lipo Batteries at Adafruit carry 6.700mAH which would mean 7 days of autonomous operation. This does not include any power requirement of Fona btw – as this can be expected to draw a lot more while sending the whole system would run less than a week with the biggest battery available…

The power needed by Fona is hard to influence – the only relevant factor here is number of measurment/upload cycles.

Therefore the Controller hast to go on diet. Which is exactly what can be done with an Arduino, and i was really excited how easy it is to build a “bareduino” which is a ATmel chip on a Breadboard with only a few additional components. The components that can be left out if you carefully design the circuit and power-needs of your sensors (and of Fona) are voltage shifters and a few other things that are known to consume a lot. Suddenly the same Arduino consumes not more than 10mA while running and goes down to less than 10μA while in sleep-mode! This is really amazing, a hundred times less in sleep mode means a lot for the goal of this project. An Arduino that consumes 0.1mA would run 416 days on battery in sleep mode. Of course this is a theoretical calculation because the battery would lose power over time etc. – but it is still very promising.

My experience regarding fona says it consumes around 100mA on average when active and doing GPRS communication. This is not the most accurate value because measuring is difficult as Fona has some peaks in using electricity and won’t run properly when under measurement – at least with my voltmeter. But i think it can be taken as an estimate – i will update this article when i finished more test-runs (one of the first runs indicates 8 days of operation with 10-minutes send intervals on a 2.000mAH battery, but i will repeat that more systematically).

This means – if i would do one measurement/upload per hour and Fona would need 1.5 minutes for this and i would use the biggest 6.7mAH battery the system would run for 100 days. There are a couple of options to reduce the consumption even more, e.g. powering the sensor with a digital PIN instead of permanent voltage so that it can go to sleep as well, shutting off the AD-Pins while sleeping, getting rid of any status-LEDs etc. – but in general i am quite confident that a system that runs on batteries for many months can be built.

I will cover the actual code i was using in a later chapter, but as the power-saving functions of an Arduino are quite tricky i will link the code-repository here already. In the code you will find a function called sleepabit(). This function does take seconds as an argument and puts the Board into the maximum sleep-function available for the given amount of time. To do this you have to activate a watchdog-function that wakes up the board from sleeping. Unfortunately the longest available time is 8seconds (!), so the function has to wake up after 8 seconds and go to sleep again etc. – the other detail that has to be considered (especially if the watchdog should be used as a real watchdog to reset the board in case of a problem) is that the Arduino/Atmel Watchdog will by default reset the board if called more than once – this is not the behavior we want while sleeping. That’s why the watchdog is always disabled and enabled again in this sleep function.

BTW – the best documentation to learn about the sleep modes i found was the official documentation from Atmel on their website – quite a (positive) surprise…

About holadiho
This entry was posted in Arduino, gsm and tagged , . Bookmark the permalink.

3 Responses to Building a cellular tracker: Part3 – Running on Batteries for Months

  1. Pingback: Building a cellular tracker: Part0 – Why future IoT Devices might run on GSM and not Wifi | Making connected stuff

  2. Pingback: Sleep mode and months of operation on small battery | DL-UAT

  3. Clemens says:

    A really good documentation source for low power and Arduino is this post also

    I chave not checked this in detali but it could be an option to send the arduino in deep sleep (without watchdog) and use an external IRQ to wake it up mostly done by a RTC. As said before I dod not check it out how much power consumption you have while wake up every 8 sec and how much power an externa RTC needs …


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s