View previous topic :: View next topic |
Author |
Message |
Mike_Putnam
Joined: 16 Jan 2015 Posts: 10
|
Posted: Thu Dec 31, 2015 12:01 am Post subject: backup battery for RTC? |
|
|
I have a project that will be using ATMEGA16 and 32768 Hz crystal to activate the real time clock feature. I was wondering about a backup battery so I do not lose time and date when there is a power out. What would be the minimal diagram for this? I don't think I want to power the whole project from a backup battery. I just want to keep the clock running so I don't have to reset date and time again. Has anyone already tackled this? Anyone have a circuit snippet that they wouldn't mind sharing?
Thanks in advance!
(BASCOM-AVR version : 2.0.7.8 ) |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Thu Dec 31, 2015 5:20 am Post subject: |
|
|
When I looked at using the clock feature I decided an external clock was the best option as it would run for years on a lithium battery
The external clock could also turn the power on at a preset date and time thus a zero power state could be achieved
Regards Paul |
|
Back to top |
|
|
Juergen Bitzer
Joined: 03 Oct 2004 Posts: 25 Location: Reichshof
|
Posted: Thu Dec 31, 2015 7:58 am Post subject: |
|
|
I recommend DS1307 for external clock.
I2C RTC with few external components.
Separating Circuit for Vcc / Vbat included,
64 Byte Memory, first 8 are Time/Date...
rest of 56 Byte can used free as battery buffered ram.
Current at Vbat: max 500nA
Works very well for me in many circuit's...
Before used PCF8563... not so good... |
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
Posted: Thu Dec 31, 2015 5:35 pm Post subject: |
|
|
Alternatively, use a DS1302:
- 3-wire SPI-like interface,
- Trickle charger allows use of rechargeable battery or Super Capacitor,
- <300nA
- capable of operating at 2V. |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Mon Jan 04, 2016 6:54 pm Post subject: |
|
|
Hello,
Now you have a large choice for RTC : I2C ou SPI with tcxo as the DS3234 with an integrated temperature-compensated
crystal oscillator (TCXO) and crystal. The DS3234 incorporates a precision, temperature-compensated
voltage reference and comparator circuit to monitor VCC
The consumption with battery is incredible low you can expect 10 Years !
I have did the program with bascom here http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=13096[url]
JP [/url] |
|
Back to top |
|
|
Mike_Putnam
Joined: 16 Jan 2015 Posts: 10
|
Posted: Thu Jan 07, 2016 10:36 pm Post subject: |
|
|
Thanks guys. I was really trying to get away from adding a additional chip and adding additional code to support it. Just want to use the 32768 Hz crystal. I don't expect to lose power for more than a few minutes if at all, so will probably just backup the VCC with battery or maybe use a supercap.
again, thanks. |
|
Back to top |
|
|
kimmi
Joined: 24 Feb 2006 Posts: 1922 Location: Denmark
|
Posted: Fri Jan 08, 2016 8:22 am Post subject: |
|
|
Why not make battery backup via power supply and battery ? _________________ / Kim |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Fri Jan 08, 2016 9:17 am Post subject: |
|
|
ok , but just a last point : some 32768 Hz crystal are very poor quality, before going to the DS3234, I used the old DS1307 but before I checked the frequency of the crystal and I add amazing frequency...
jp |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Fri Jan 08, 2016 3:14 pm Post subject: |
|
|
Maybe this is some kind of start point (see pic) |
|
Back to top |
|
|
Deanus
Joined: 26 May 2006 Posts: 188 Location: Adelaide
|
Posted: Sun Jan 10, 2016 9:21 pm Post subject: |
|
|
The trouble with this circuit it two fold.
1) You cant get a 5V battery, only 4.8V and the next step is 6V
With the 4.8V battery and the schottky diode drop, the voltage would be on the verge of a brown out.
With the 6V battery, and the diode drop, the voltage for the micro is too high.
2) The battery will not get charged as in Kimmi's link.
The best idea it to use Kimmi's link circuit with the 9.6v Ni-Mh or 12V SLA battery ( both of which are available) & regulator, and the output of that is fed to the micro's 5V reg circuit as normal.
Doing it this way, there's no modification to the micro circuit and the battery gets charged while the mains is on
Be warned that 9V-size NiMh batteries are actually made up of 6, 7, or 8 separate cells, and if one cell dies then the whole battery dies, so 9V NiMH batteries are much less hardy than AA and AAA rechargeables.
Dean |
|
Back to top |
|
|
|