Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: airman00 on August 15, 2009, 11:13:31 PM

Title: AVR timekeeping for as long as possible
Post by: airman00 on August 15, 2009, 11:13:31 PM
I need my AVR to update the current time every minute or so. The problem is that the time needs to be updated on super low power for about a month. Any ideas on how to keep the time updating for a month on a backup battery - which would be one rechargeable AA battery - 2000mAH
Note that there is no LED display that needs to be on, all the time keeping can be done just on the microcontroller.
Any tips for low power timekeeping? Maybe some tricks with the watchdog timer?

I was also thinking maybe have the chip go into low power mode for 59 seconds, and be awaken by a 555 timer ( set to pulse every minute) on a pin?
Title: Re: AVR timekeeping for as long as possible
Post by: sonictj on August 16, 2009, 12:48:18 AM
the lower your clocking frequency the less power you need.  The atmega168 20pu probably 328 also can use 1.8V logic when used at low frequencies.  Your power draw will be small this way.  Are you doing anything else?  A microprocessor may not be the best solution.

Also depending on how precise you need to be the watchdog Timer may be sufficient.  From what I've been told the watchdog is not very accurate, but I have know idea of how inaccurate.
Title: Re: AVR timekeeping for as long as possible
Post by: airman00 on August 16, 2009, 06:26:36 AM
Thanks for the reply.
In low power mode, the AVR would only be doing timekeeping. How else can I do the timekeeping?
Title: Re: AVR timekeeping for as long as possible
Post by: sonictj on August 16, 2009, 08:09:06 AM
Quote
How else can I do the timekeeping?

logic chips, but a uC is probably less power hungry. To bad you gotta use an avr this is the perfect application for a Ti msp430.  Those uC are designed for low power slow clock, and huge battery life.
Title: Re: AVR timekeeping for as long as possible
Post by: airman00 on August 16, 2009, 08:37:39 AM
ATmega168P 
Low Power Consumption at 1 MHz, 1.8V, 25°C for ATmega48P/88P/168P:
–Active Mode: 0.3 mA
–Power-down Mode: 0.1 µA
–Power-save Mode: 0.8 µA (Including 32 kHz RTC)


.3mA in active mode and at a 2000mAH battery ( those small lithium ones) - thats 6,666 hours or 9 months.
Title: Re: AVR timekeeping for as long as possible
Post by: sonictj on August 16, 2009, 10:32:55 AM
That ought to work. 
Title: Re: AVR timekeeping for as long as possible
Post by: Asellith on August 17, 2009, 03:11:03 PM
Have you looked into Real Time Clock ICs? Some are designed to be really low power and they just keep time then your MCU can just ask it what time it is when ever it needs it.
Digikey has a huge listing of real time clocks in all shapes and sizes.

Why do you need the time updated? Might need some more pieces to this puzzle to find the right fit.
Title: Re: AVR timekeeping for as long as possible
Post by: Razor Concepts on August 17, 2009, 03:29:30 PM
DS1307 is a standard RTC chip, supposedly it lasts pretty much forever on a 2032 coin cell battery.