Arduino Power / sleep mode solutions for long time use : RTC module?

Hi all!

SO - i'll try to keep this simple - :

The project : -A chicken coop controller, approximately 45m from the house.

-Uses a motor shield plugged on an Arduino UNO.(A 9V DC motor opens and closes the door)

  • A 433MHz RF Rx module plugged on the motor shield answer to a transmitter (in the house ) on another UNO + LCD keypad shield

  • A relay plugged on the motor shield and turns on and off a 12V camera (with 2.4Ghz video transmission )

The purpose : Allows me to open/close the door in the morning/evening + video feedback.

The problem : The device is just used 2 times a day spaced by 12 hours each, but uses current all the time and this would kill any battery.

Solutions I have in mind : Put the all thing in sleep mode when unused , beeing woken up by an RTC module separetly powered at 5V (and why not by solar pannel + battery) wich would turn the arduino/motorshield back on when I may need it (let's say between 6 and 8 am/pm).

Question : Is this possible?! If it is, how so?
If it's not, what could I go for instead?

Thank's already for your help !

ps : - the camera uses a 12V external power supply turned on/off with the relay

  • the Arduino/motorshield will probably be powered with a 9V battery
  • This is my first "big" project

Hi, yes, sounds possible.

My chicken coups have lights controlled by an Arduino (Pro Micro) + RTC. There are four houses each with an LED light strip and an electric fence energiser (to deter predators climbing the fence). Everything is powered from am 85Ah 12V SLA battery. The battery is kept topped up (most of the year) by a 30W solar panel, via a charge controller. The lights fade on at dusk for 30mins, then fade off. The time of dusk is calculated from the date. A re-purposed LCD screen shows date, time, dusk time, temperature and battery voltage. A couple of buttons allow manual override (with timeout) of the lights and setting the date/time. Various coloured LEDs flash warnings that can be seen from the house like low battery/low temperature.

In your setup, to simplify things, I would try to get rid of the requirement for the 9V battery if I could and run everything off 12V, charged by solar. Maybe just a high-watt resistor in series with the motor so it is not overloaded by the full 12V.

Use sleep modes to minimise the power drain of the Arduino. My Pro Micro and associated components use less than 10mA, vs. around 80mA for the fence energiser, so not worth squeezing that down more. You may need to wire the rf receiver to an interrupt-capable pin to wake the Arduino from sleep and receive the command.

Paul

Thank you for your answer.

Nice project of yours!

"an interrupt-capable pin to wake the Arduino from sleep and receive the command " sounds very nice but I have no idea of what that is. :confused:

-From what I understand, I should give up the RTC module?

-If I use interrupt pin , do I need to power the receiver separately?

  • Which sleep function can be call, and how?

THanks :slight_smile:

Why not use a variable buck dc to dc transformer for getting stable 9v from the 12v source?

The problem you have is that you want the arduino to respond when ever you press the button. So its got to keep looking for that button press. You could have it wake up when the RX gets a signal but that means having the Rx on permanently.

So you need the arduino to respond quickly to the button press while using the minimum power!

The way to do this would be to have your arduino wake once a second look for a signal and then go back to sleep if no signal is found. The sleep period depends on how long you want to keep your finger on the button.

Mark

As Mark says, the problem with low power modes is that the Arduino's AVR processor becomes unreactive. There are two ways around this. One is to have the AVR sleep for short periods only, waking to quickly check for inputs, and if nothing is going on, back to sleep again. The longer these short sleep periods, the longer it takes to react to any inputs, and the higher the chance of missing them completely. Shorter sleep periods avoid this but use more power. My lights controller sleeps for 20ms, so can still check for button presses 50 times per second. The other approach is to use an interrput pin. On most Arduinos only a couple of pins can be used for this.You can put the AVR in to sleep mode and any change on the interrupt pin will wake it automatically.

I used the sleep library:

http://playground.arduino.cc/Learning/arduinoSleepCode

As you are sending rf commands, which consist of a high speed series of pulses, if your AVR sleeps for short perionds, it could miss the message completely, or miss the first pulse, garbling the message. An interrupt driven approach should avoid that.

You would need to power your rf receiver, yes. Not sure what you mean by "separately".

Not sure why you considered an rtc for this project since there are no real-time controlled actions.

You could use dc-dc converters to get 9V and/or 5V. Its a question of whether they are worth it in terms of power saving. If 9V or 5V components need to run continuously and have a signigicant power draw, then they may be worthwhile. If they only run for a few seconds per day, or only draw a few mA, probably not worth it in my opinion.