Arduino working for months

Hello to everyone.I am newbie here and i have one problem that i cannot find a solution althought i've searched a lot.Let me explain..

I am designing a beehive scale..I will measure the temperature inside the beehive,outside and the weight..So i will use three sensors.All of these measurements must be sent to my mobile via a gsm modem i've put to arduino..I have programmed everything but i am stuck in one point..

The beehive will be far away from me so i cannot supply the arduino..I will use a battery..Here begins the problem..I want the battery to stay alive for 3-4 months..I must somehow sleep the arduino or close it to save power..

I've read a lot about sleeping methods,narcoleptic,RTC and many other methods but nothing is near for what i want..I need the arduino to measure one time in the morning,then sleep or power down and measure again after 10-12 hours..so twice a day..

Is there any way to do that and keep the battery for months?

By the way i am using the arduino uno,official gsm,lm35 sensors and a load cell 100kg of PHIDGETS

I would appreciate any help! :slight_smile:

What are you having problems with in regards to making your project take a measurement twice a day, sleeping in between?

Is the problem just battery life?
Have you measured how much current it's drawing when you think you have it in sleep?
An Uno is a very bad choice for power efficiency; it's not designed for that. Even when the processor is in sleep, the auxiliary electronics keep using power. A bare-bones arduino is a must, I think.

I think if you need months of battery life in something that needs to use a cell modem twice a day, you would probably do well to investigate solar cells; that's the standard solution for powering stuff like that.

The GSM module is a real problem. They can draw a couple of amperes while transmitting, so you need a pretty hefty rechargeable battery to deal with that current. I agree with the previous poster that solar cells are necessary.

Consider storing data on an SD card or a flash memory chip instead. Here is a great resource on low power, long term data logging: https://edwardmallon.wordpress.com/

First of all thanks for listening and answering to my questions.

My only problem is the battery life yes..I need to be alive for 3-4 months but i don't find the way..

You are right about Uno..it needs lots of power even in sleeping..

Your suggestion is to buy a mini?I am also reading about stm35 which uses some uA in sleep mode..Is this suitable for what i want?

Thanks again

Here is an excellent resource on power saving, but that won't help with the GSM module problem.

I've read all of them :).I was thinking to power off the arduino completely and somehow turn it on again to save battery.Can't find better solution.Is this possible somehow?

Sure; what powers the thing that will turn it back on?

If you use a standalone Arduino equivalent running from 3.7V-4.2V LiPo or similar, you can use the Narcolepsy library or similar to put it in power down sleep mode and not be wasting power on a 5V regulator, 3.3V regulator, power-on LED, USB/Serial interface chip, and voltage source select op-amp. Then it wakes up every 8 seconds or so, checks if there is something to do, and if not goes back to sleep.

Or add a coin cell powered RTC module with alarms, use an alarm to wake sleeping 328P when it's time to do something, finishing with setting the time of the next alarm before going back to sleep.

Still in power down mode it needs lots of power and it will not stay alive for months..expect that it will wake up every 8 sec and that's not good..i need to measure then sleep for about 10 hours and measure again..

What i was thinking is a second arduino mini..this arduino will be in sleep mode and wake up only for powering a relay which will power on the Uno..Same process for powering off.Is this a good idea?

Thevsecond mini will be supplied from battery i mentioned before

Still in power down mode it needs lots of power and it will not stay alive for months

What needs a lot of power?
A bare bones Arduino, in the lowest power sleep mode but waking twice a day, will run off 2 AA batteries for years.

What about stm32 instead of arduino.Is this better?

jremington:
A bare bones Arduino, in the lowest power sleep mode but waking twice a day, will run off 2 AA batteries for years.

A mini would be a great idea. However, don't forget that we have a GSM and some others sensors connected that even in an idle state will have some power consumption.. ..

--My suggestion is a proMini with a latching relay like this one Latching Relay "Contrast to the ordinary relay, this latching relay do not need continuous power to keep the stateespecially suitable for low-power projects"..

So the proMini is in deep sleep mode(so we have almost no power consumption), wakes up only to activate the latching relay(no power consumed when idle) that will power On the Arduino Uno.. :grin: ;D :grinning: :wink: :slight_smile: For me that's the ideal solution.. Let me know what you think of it..

Edit For even better results we can use the Lightweight Low Power Arduino Library to Power Down mode with current consumption of 1.7uA ;D ..

Question If we do this:(Got it from here: "Extend" Watchdog Timer Beyond 8 Seconds? - Project Guidance - Arduino Forum)

  // sleep for a total of 20 seconds
  myWatchdogEnable (0b100001);  // 8 seconds
  myWatchdogEnable (0b100001);  // 8 seconds
  myWatchdogEnable (0b100000);  // 4 seconds

Does it get out of sleep between the calls? :disappointed_relieved:

klinnis:
What about stm32 instead of arduino.Is this better?

No different.
An STM32 development board will have the same problem as an Arduino or other AVR development board - auxiliary crap wasting power and a regulator chosen on criteria other than low quintessent current.

Both AVR and STM32 chips support sleep modes with very low power usage, but development boards rarely take advantage of this.

So the proMini is in deep sleep mode(so we have almost no power consumption), wakes up only to activate the latching relay(no power consumed when idle) that will power On the Arduino Uno

Why use an Uno? The Pro Mini can do everything you want. It is the other stuff that is the problem.

jremington:
Why use an Uno? The Pro Mini can do everything you want. It is the other stuff that is the problem.

I am not using an Uno.. :grinning:

If you see the first post he already uses an Uno..

What do you suggest jremington?We agree tha uno is not for this job..Let's say we use a mini instead..still in sleep mode the mini with the gsm on it will need enough power..

We could close completely the gsm and sensors and then sleep the arduino..but i am not sure if we can power off completely the official gsm i have..Wake up the arduino after 10 hours and power on again the sensors and gsm..

It's a thought.What do you say?

klinnis:
still in sleep mode the mini with the gsm on it will need enough power..

The mini no, GSM yes..

but i am not sure if we can power off completely the official gsm i have

You can't completely powet it off.. The best you can do is use the shutdown() function to power the modem off.. Still you will have some power consumption on idle (leds etc)..

..Lm35 uses only ~158uA on idle..

zaxarias:
Question If we do this:(Got it from here: "Extend" Watchdog Timer Beyond 8 Seconds? - Project Guidance - Arduino Forum)

  // sleep for a total of 20 seconds

myWatchdogEnable (0b100001);  // 8 seconds
  myWatchdogEnable (0b100001);  // 8 seconds
  myWatchdogEnable (0b100000);  // 4 seconds




Does it get out of sleep between the calls? :disappointed_relieved:

Yes. The maximum with the watchdog timer is 8 seconds. However if you immediately go back to sleep it doesn't use much power.

Have you read my page about power?

I made a temperature sensor that has an onboard clock, and writes to an SD card. This has been running on the same 3 x AA batteries now since I made it (August 2013).

The page about the sensor describes how you can keep power consumption to a minimum.

Have a look at the Seeeduino Stalker Solar Kit http://www.seeedstudio.com/wiki/Seeeduino_Stalker_-_Waterproof_Solar_Kit I think it is more or less a ProMini with some add ons. :wink: It runs with 3.3V at 8 MHz, so good preconditions for power saving. Put on the back side some solder e.g. for waking up via RTC or switching SD power, see details at Seeeduino Stalker v2.3 | Seeed Studio Wiki But power consumption is still not excellent: Seeeduino Stalker v2.3 | Seeed Studio Wiki

The v3 has now a DS1337 as RTC while the old version had a DS3231, don't know what this means regarding power consumption.

Because we have the god of power saving in the Arduino world in this thread a question about RTC and power consumption. I wonder if a RTC with wakeup IRQ is always a good idea. I think RTCs use about 200 uA--if I remember right. When should I use a RTC for power saving?

Use the GPRSbee http://www.gprsbee.com/ instead of the official GSM board. It fits nicely in the Stalker's bee socket. Downside here is the badly documented lib.

Normally you should power off power hungry devices but the boot process of a GSM board is long and takes 20-30 seconds and more. So it could be better to use deep stand by mode instead of switching modules completely off (and consume more power by launching). Would be a calculation worth and depends e.g. on the intervalls you want to upload data.

I consider this solution for my bee monitoring project. I think the solar panel can help but I have not tested it yet. I try to use the Stalker with the GPRS bee, a shield with some temperature sensors, a IC to read out load cell output. Alterntively Stalker and bee with RFM69 as gateway who collects data from other nodes and transfers it via GSM to a webserver.

Btw see also this thread: Battery powered GSM / Cellular Shield? - Networking, Protocols, and Devices - Arduino Forum

I think RTCs use about 200 uA--if I remember right. When should I use a RTC for power saving?

In timekeeping mode, the DS3231 uses about 3 uA of the on board battery, and it can still activate its open-drain interrupt or 32 kHz output.