DS1307 RTC and Supercap
Archiver
Posts: 46,084
I'm attempting to add on a DS1307 RTC (real time clock) with a
supercap power backup.
Seems the cap isn't charging from the pin as I expected it would,
that some other means of keeping the charge must be supplied.
Does anyone know of an app note for doing this? Thanks.
supercap power backup.
Seems the cap isn't charging from the pin as I expected it would,
that some other means of keeping the charge must be supplied.
Does anyone know of an app note for doing this? Thanks.
Comments
ernie@c... writes:
> Seems the cap isn't charging from the pin as I expected it would,
> that some other means of keeping the charge must be supplied.
>
> Does anyone know of an app note for doing this? Thanks.
>
>
If I could make a suggestion, replace the supercap with a CR2032 Kithium
button. Has a capacity of 220 maH, which will run the clock for several years.
I'm using one in my setup.
[noparse][[/noparse]Non-text portions of this message have been removed]
(good for 10 years without power), not for a cap like other devices..
Switch to a 3v coin cell for back-up power.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: erniem1957 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=1a0XDffjKjv3EXljvNI61KAN3d-oTFFPh5-jjexO-f55jY0pOZLXhnWscgWsA2Mo4ZCQQYObX4ljpQ]ernie@c...[/url
Sent: Sunday, March 14, 2004 12:27 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] DS1307 RTC and Supercap
I'm attempting to add on a DS1307 RTC (real time clock) with a
supercap power backup.
Seems the cap isn't charging from the pin as I expected it would,
that some other means of keeping the charge must be supplied.
Does anyone know of an app note for doing this? Thanks.
> I'm attempting to add on a DS1307 RTC (real time clock) with a
> supercap power backup.
>
> Seems the cap isn't charging from the pin as I expected it would,
> that some other means of keeping the charge must be supplied.
>
> Does anyone know of an app note for doing this? Thanks.
I had to read this twice. you are trickle charging the SuperCap from
the pin ?
Are you sure the RTC is not seeing the current and preventing
charging from the anti-Lithyum charing circuit, or is it lithyum
anti-charging.... the part of the circuti that looks at the charge
and prevents charging ?
Also, you should be able to just charge the SC with a diode from any
power supply when it is connected. Maybe a voltage divider to get the
proper voltage to charge it, remember the diode drop.
My curosity is how long of a back-up you get when you have a full
charge ?
And, of course I assume the only thing on Vbat (pin 3) of the chip ?
I would expect the charge life of the SC would be the limiting factor
as the chip has such a low use.
But, I used a button with a battery instead of a SC as the holder and
battery from DigiKey was less than a buck.
Dave
Hold up time is computed directly from I = C * dV / dT, solving for
dT. From the DS1307 spec sheet, I is 500nA. Range of Vbatt is 2 to
3.5V, so let's assume we'll discharge from 3 to 2 volts for a dV of
1V. I'm picking supercaps capable of holding the full VCC of 5 volts,
such as a Panasonic EEC-S0HD223H ($2.70 each, .91 in quantity)
with .022 *FARADS* of capacitance.
This is the smallest supercap Digi-Key has in that series, and it
should give me a hold up time of 12 hours. For another 6 cents I can
get a full tenth of a farad (.1F) that brings the hold up time to
over 2 days.
Of course, this ignores any self-discharge of the cap, and any
leakage back into the cap's recharging supply.
The advantage of a SC is the device self-charges and should have a
very long life. Of course, since even a 48mAhr battery is spec'ed for
10 years of continious hold-up, I probably don't have much to worry
about.
I just don't like a limited shelf life that starts from the day a
product is assembled, not used.
--- In basicstamps@yahoogroups.com, "Dave Mucha" <davemucha@j...>
wrote:
> --- In basicstamps@yahoogroups.com, "erniem1957" <ernie@c...> wrote:
> > I'm attempting to add on a DS1307 RTC (real time clock) with a
> > supercap power backup.
> >
> > Seems the cap isn't charging from the pin as I expected it would,
> > that some other means of keeping the charge must be supplied.
> >
> > Does anyone know of an app note for doing this? Thanks.
>
>
> I had to read this twice. you are trickle charging the SuperCap
from
> the pin ?
>
> Are you sure the RTC is not seeing the current and preventing
> charging from the anti-Lithyum charing circuit, or is it lithyum
> anti-charging.... the part of the circuti that looks at the charge
> and prevents charging ?
>
> Also, you should be able to just charge the SC with a diode from
any
> power supply when it is connected. Maybe a voltage divider to get
the
> proper voltage to charge it, remember the diode drop.
>
> My curosity is how long of a back-up you get when you have a full
> charge ?
>
> And, of course I assume the only thing on Vbat (pin 3) of the
chip ?
>
> I would expect the charge life of the SC would be the limiting
factor
> as the chip has such a low use.
>
> But, I used a button with a battery instead of a SC as the holder
and
> battery from DigiKey was less than a buck.
>
> Dave
ernie@c... writes:
> The advantage of a SC is the device self-charges and should have a
> very long life. Of course, since even a 48mAhr battery is spec'ed for
> 10 years of continious hold-up, I probably don't have much to worry
> about.
>
You can not use a supercap with a DS1307. If you will look at the data sheet
is specifically says 3V battery. The chip has no provisions for a trickle
charge like the DS1302.
Sid
[noparse][[/noparse]Non-text portions of this message have been removed]
from main power to backup power, and that really works best with a
lithium coin cell as the backup.
When the main power drops below 3.75 volts (or 1.25 times the backup
--1.25*3=3.75), the interface shuts off and the Stamp can no longer
read the clock (it gets back all $FF if it tries!). At lower
voltages the clock oscillator operates off of the backup source.
Note that the main power for the I2C interface draws about 200
microamps, but the clock oscillator itself draws only 0.5 microamp.
A 200 milliamp-hour lithium cell has a projected life of 400000
hours, or over 45 years based on milliamp hours alone. Crank that
down to the shelf life of 10 years. In micro-power systems, it is
standard practice to run the DS1307 most of the time off of the
lithium cell, and only turn on the main interface power when it is
necessary to read the chip.
You could use a supercap, but you would have to provide means to
charge it up to no more than 3.3 volts. You can't use diodes alone
to drop the voltage from 5 to 3, because at those low current levels
diodes do not have much voltage drop. The theoretical backup time
from a 1 farad supercap is huge, but in practice the self discharge
rate of the capacitor limits it to hours or days. As others have
said, you will be much better off using the lithium coin cell with
the DS1307.
-- regards,
Tracy Allen
electronically monitored ecosystems
mailto:tracy@e...
http://www.emesystems.com
> Dave,
>
> Hold up time is computed directly from I = C * dV / dT, solving
for
> dT. From the DS1307 spec sheet, I is 500nA. Range of Vbatt is 2 to
> 3.5V, so let's assume we'll discharge from 3 to 2 volts for a dV of
> 1V. I'm picking supercaps capable of holding the full VCC of 5
volts,
> such as a Panasonic EEC-S0HD223H ($2.70 each, .91 in quantity)
> with .022 *FARADS* of capacitance.
>
> This is the smallest supercap Digi-Key has in that series, and it
> should give me a hold up time of 12 hours. For another 6 cents I
can
> get a full tenth of a farad (.1F) that brings the hold up time to
> over 2 days.
>
> Of course, this ignores any self-discharge of the cap, and any
> leakage back into the cap's recharging supply.
>
> The advantage of a SC is the device self-charges and should have a
> very long life. Of course, since even a 48mAhr battery is spec'ed
for
> 10 years of continious hold-up, I probably don't have much to worry
> about.
>
> I just don't like a limited shelf life that starts from the day a
> product is assembled, not used.
I have to agree about the Lithium batteries. I have seen surplus go
cheap, AND have date manufactured listed. with a 4 year old battery,
the time is numbered.
For the 220mAh lithium batt from digi-Key and a cost of about 39
cents, it is not a concern for many projects, even if you know it
will be dead in 5 or 10 years.
I have no experiance with the actual long term voltage holding of a
super cap so can't comment. I figure that it would not be hard to
charge one in a circuit that occasionally sees any type of power
supply.
Dave
> Dave,
>
> Hold up time is computed directly from I = C * dV / dT, solving
for
> dT. From the DS1307 spec sheet, I is 500nA. Range of Vbatt is 2 to
> 3.5V, so let's assume we'll discharge from 3 to 2 volts for a dV of
> 1V. I'm picking supercaps capable of holding the full VCC of 5
volts,
> such as a Panasonic EEC-S0HD223H ($2.70 each, .91 in quantity)
> with .022 *FARADS* of capacitance.
>
> This is the smallest supercap Digi-Key has in that series, and it
> should give me a hold up time of 12 hours. For another 6 cents I
can
> get a full tenth of a farad (.1F) that brings the hold up time to
> over 2 days.
>
> Of course, this ignores any self-discharge of the cap, and any
> leakage back into the cap's recharging supply.
>
> The advantage of a SC is the device self-charges and should have a
> very long life. Of course, since even a 48mAhr battery is spec'ed
for
> 10 years of continious hold-up, I probably don't have much to worry
> about.
>
> I just don't like a limited shelf life that starts from the day a
> product is assembled, not used.
I dug a little deeper on the Dallas site and found the app note on
enabling the trickle charger. It is shipped OFF and must be turned
on.
However, the note is written for the 1302, and does not explicitly
list the 1307 chip, so I do not know if it works for that one.
http://pdfserv.maxim-ic.com/en/an/app82.pdf
Charging for a rechargable battery or SuperCap can be selected in
software, but it is required that you do that.
Also, I have not tried to use the trickle charger, but it appears
that it defaults to the no-charge on start-up and may need to be told
to trickel charge after a complete battery drain or change of both
power supplies.
All the calculations for charging the Super Cap are on that sheet.
Dave
trickle charger. I assumed it had one as well but, check the datasheet. Not
a single peep about any form of charger on the vbat circuit.
Not really an issue for me since I'd intended to go with a 3v coin cell from
the start anyway.
>
Original Message
> From: Dave Mucha [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=MPYvBZnsZiEApcQCznMsQolkWfUyW5HeUGE0MjcUAdqsM46apm3Ye_XN7q8n3BEXhvbCs_uYTv8]davemucha@j...[/url
> Sent: March 15, 2004 3:17 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: DS1307 RTC and Supercap
>
> I dug a little deeper on the Dallas site and found the app note on
> enabling the trickle charger. It is shipped OFF and must be turned
> on.
>
> However, the note is written for the 1302, and does not explicitly
> list the 1307 chip, so I do not know if it works for that one.
>
> http://pdfserv.maxim-ic.com/en/an/app82.pdf
>
>
> Charging for a rechargable battery or SuperCap can be selected in
> software, but it is required that you do that.
>
> Also, I have not tried to use the trickle charger, but it appears
> that it defaults to the no-charge on start-up and may need to be told
> to trickel charge after a complete battery drain or change of both
> power supplies.
>
> All the calculations for charging the Super Cap are on that sheet.
>
> Dave
wrote:
> --- In basicstamps@yahoogroups.com, "erniem1957" <ernie@c...> wrote:
> > Dave,
> >
> > Hold up time is computed directly from I = C * dV / dT, solving
> for
> > dT. From the DS1307 spec sheet, I is 500nA. Range of Vbatt is 2
to
> > 3.5V, so let's assume we'll discharge from 3 to 2 volts for a dV
of
> > 1V. I'm picking supercaps capable of holding the full VCC of 5
> volts,
> > such as a Panasonic EEC-S0HD223H ($2.70 each, .91 in quantity)
> > with .022 *FARADS* of capacitance.
> >
> > This is the smallest supercap Digi-Key has in that series, and it
> > should give me a hold up time of 12 hours. For another 6 cents I
> can
> > get a full tenth of a farad (.1F) that brings the hold up time to
> > over 2 days.
> >
> > Of course, this ignores any self-discharge of the cap, and any
> > leakage back into the cap's recharging supply.
> >
> > The advantage of a SC is the device self-charges and should have
a
> > very long life. Of course, since even a 48mAhr battery is spec'ed
> for
> > 10 years of continious hold-up, I probably don't have much to
worry
> > about.
> >
> > I just don't like a limited shelf life that starts from the day a
> > product is assembled, not used.
>
>
>
> I dug a little deeper on the Dallas site and found the app note on
> enabling the trickle charger. It is shipped OFF and must be turned
> on.
>
> However, the note is written for the 1302, and does not explicitly
> list the 1307 chip, so I do not know if it works for that one.
>
> http://pdfserv.maxim-ic.com/en/an/app82.pdf
>
>
> Charging for a rechargable battery or SuperCap can be selected in
> software, but it is required that you do that.
>
> Also, I have not tried to use the trickle charger, but it appears
> that it defaults to the no-charge on start-up and may need to be
told
> to trickel charge after a complete battery drain or change of both
> power supplies.
>
> All the calculations for charging the Super Cap are on that sheet.
>
> Dave
Dave,
Awesome find, thanks. I must have read the DS1302 sheet and thought
it applied to the DS1307. I'll be switching to the '02 now.
Ernie