RTC with Supercapacitor Recharge

Have questions about a SparkFun product or board? This is the place to be.

Moderators: phalanx, TS-Tim

UNTEngineer
Posts: 274
Joined: Thu Apr 07, 2011 11:08 am

RTC with Supercapacitor Recharge

Post by UNTEngineer » Thu Nov 15, 2012 9:16 pm

Im looking to implement an RTC with a Supercapacitor and a recharging circuit, instead of having a coin cell battery. Can anyone help with this? :)
Working on a Smart Home Controls System. Visit my blog: http://tae09.blogspot.com/ to find out more, and to keep track with the project.

MichaelN
Support Volunteer
Posts: 1191
Joined: Fri May 08, 2009 6:14 pm
Location: Australia

Re: RTC with Supercapacitor Recharge

Post by MichaelN » Thu Nov 15, 2012 10:27 pm

Typically you just use the regulated supply voltage with a resistor to limit the current and a diode to stop the capacitor discharging when power is removed.

UNTEngineer
Posts: 274
Joined: Thu Apr 07, 2011 11:08 am

Re: RTC with Supercapacitor Recharge

Post by UNTEngineer » Thu Nov 15, 2012 11:57 pm

MichaelN wrote:Typically you just use the regulated supply voltage with a resistor to limit the current and a diode to stop the capacitor discharging when power is removed.
So there isnt a special charging circuit like for charging Li-Ion Batteries (Im thinking of the Solar Charger from Adafruit)? Or is that overkill?

Is this what you are talking about?
Image
Working on a Smart Home Controls System. Visit my blog: http://tae09.blogspot.com/ to find out more, and to keep track with the project.

Mee_n_Mac
Support Volunteer
Posts: 5628
Joined: Thu Apr 28, 2011 4:10 pm

Re: RTC with Supercapacitor Recharge

Post by Mee_n_Mac » Fri Nov 16, 2012 1:34 am

The polarity on you cap is wrong but other than that, yup that's the concept. How long are you expecting the cap to run the RTC for ? Which RTC chip ?

MichaelN
Support Volunteer
Posts: 1191
Joined: Fri May 08, 2009 6:14 pm
Location: Australia

Re: RTC with Supercapacitor Recharge

Post by MichaelN » Fri Nov 16, 2012 4:07 am

Yes, that's the circuit I had in mind (with the polarity correction mentioned by Mee_n_Mac). Unlike LiPos etc, supercaps don't need special charge management, as long as you don't exceed the rated voltge or charge / discharge them faster than their rating.

User avatar
viskr
Posts: 263
Joined: Tue Jun 20, 2006 10:29 am
Location: Lake Tahoe, CA
Contact:

Re: RTC with Supercapacitor Recharge

Post by viskr » Fri Nov 16, 2012 9:30 am

I did some rough back of the envelope calculations, and the energy density of re-chargeable Li batteries is still about 100 times greater. When we've done lifetime calculations we often design for a 30 day or greater power off retention. The batteries usually easily do this, the supercaps might if your current draw is real small.

That same circuit will work for re-chargeable Li batteries like the Panasonic ML2020, with R1 of 180 ohms.

Some people put the load across the diode side of R1 and GND. The advantage of that is if your circuit fails R1 also acts to limit current draw from the battery.
reviving the BASIC stamp http://www.basicchip.com

UNTEngineer
Posts: 274
Joined: Thu Apr 07, 2011 11:08 am

Re: RTC with Supercapacitor Recharge

Post by UNTEngineer » Fri Nov 16, 2012 5:57 pm

Mee_n_Mac wrote:The polarity on you cap is wrong but other than that, yup that's the concept. How long are you expecting the cap to run the RTC for ? Which RTC chip ?
Just noticed the polarity issue. I did that last night while in a hurry.

The RTC is a DS1307. I would like the Cap run time to be 30 days as viskr suggested. The capacitor would only power the RTC when power is disconnected. It wouldnt act as a UPS supply for the entire circuit.
Working on a Smart Home Controls System. Visit my blog: http://tae09.blogspot.com/ to find out more, and to keep track with the project.

User avatar
viskr
Posts: 263
Joined: Tue Jun 20, 2006 10:29 am
Location: Lake Tahoe, CA
Contact:

Re: RTC with Supercapacitor Recharge

Post by viskr » Fri Nov 16, 2012 6:17 pm

500 nA worst case would run down a 1F cap to 0 in about 25 days, so probably useful life of 15-20 days. Your device may not be worst case, but it's easy to find sneak leakage paths, all it takes is some residual oil in a fingerprint.

500 nA worst case from an ML2020 (48 mAh battery) is about 10 years (3333 days)

The best bet would be a battery, though you can go with a smaller one (hooked up as you've drawn, with correct polarity)
reviving the BASIC stamp http://www.basicchip.com

User avatar
viskr
Posts: 263
Joined: Tue Jun 20, 2006 10:29 am
Location: Lake Tahoe, CA
Contact:

Re: RTC with Supercapacitor Recharge

Post by viskr » Fri Nov 16, 2012 6:29 pm

FYI here is the spec on the charging circuit for these rechargeable Li batteries, ML621 available at Digikey

http://industrial.panasonic.com/www-dat ... 00PE17.pdf
reviving the BASIC stamp http://www.basicchip.com

Mee_n_Mac
Support Volunteer
Posts: 5628
Joined: Thu Apr 28, 2011 4:10 pm

Re: RTC with Supercapacitor Recharge

Post by Mee_n_Mac » Fri Nov 16, 2012 6:36 pm

Here's a tool you mat find useful and instructive.

http://www.maximintegrated.com/design/t ... percap.cfm

30 days isn't going to happen. At least not in size smaller than a battery and it's circuitry.

UNTEngineer
Posts: 274
Joined: Thu Apr 07, 2011 11:08 am

Re: RTC with Supercapacitor Recharge

Post by UNTEngineer » Sat Nov 17, 2012 4:51 pm

Based on the DS1307 datasheet, I estimate between 300 - 480nA, at 3v. I think I'd be using between a 1F and a 5F, maybe a 3.3F if I could find it in an SMD footprint.

For a 1F capacitor running at 3.3V, Q = CV = 3.3 Coulombs. Since 1mAh = 3.6 Coulombs, I estimate it would be equivalent to 0.916 mAh, which is just barely at 1mAh. I calculate that it would have a life of about 12 days. Im not sure if this is correct.
viskr wrote:500 nA worst case would run down a 1F cap to 0 in about 25 days, so probably useful life of 15-20 days.
Viskr what calculation did you use to find the length of the charge?
Working on a Smart Home Controls System. Visit my blog: http://tae09.blogspot.com/ to find out more, and to keep track with the project.

UNTEngineer
Posts: 274
Joined: Thu Apr 07, 2011 11:08 am

Re: RTC with Supercapacitor Recharge

Post by UNTEngineer » Sat Nov 17, 2012 4:58 pm

Mee_n_Mac wrote: 30 days isn't going to happen. At least not in size smaller than a battery and it's circuitry.
Thanks for the link. According to that calculator, a 3.3V capacitor at 1F would potentially run for about 39 days.

On a side note, I discovered that the DS1307 cant handle recharging a capacitor, but the DS1302 can. Link: http://forums.parallax.com/showthread.p ... d-Supercap
Working on a Smart Home Controls System. Visit my blog: http://tae09.blogspot.com/ to find out more, and to keep track with the project.

User avatar
viskr
Posts: 263
Joined: Tue Jun 20, 2006 10:29 am
Location: Lake Tahoe, CA
Contact:

Re: RTC with Supercapacitor Recharge

Post by viskr » Sat Nov 17, 2012 5:45 pm

Viskr what calculation did you use to find the length of the charge?
Basically i=C*dV/dt, yes I know the current into a device won't normally be a current source, but we're doing back of the envelope calculations here, and it won't look like a resistor either

Assuming C = 1F, 500nA, gives you 1V decrease every 2,000,000 seconds. That's 23 days, to 2V, another 1/2V to 35 days. Pretty close to the calculator mentioned above, but this is just a rough number.

Personally I'd use a rechargeable Li (actually we routinely do). They are reasonably cheap, and the charging circuit is a diode and resistor to the 3.3V supply.

For the battery calculation it's the battery rating in mAh (mA hours) divided by the current. The ML2020 is a 48 mAh battery, so 48/0.0005 which is the 10 year number in the TI spec for that part.
reviving the BASIC stamp http://www.basicchip.com

MichaelN
Support Volunteer
Posts: 1191
Joined: Fri May 08, 2009 6:14 pm
Location: Australia

Re: RTC with Supercapacitor Recharge

Post by MichaelN » Sat Nov 17, 2012 7:30 pm

viskr wrote:Assuming C = 1F, 500nA, gives you 1V decrease every 2,000,000 seconds. That's 23 days, to 2V, another 1/2V to 35 days. Pretty close to the calculator mentioned above, but this is just a rough number.
You won't get anywhere near that in practice, as the leakage current will be MUCH higher than 500nA. Manufacturers rarely seem to quote it, but leakage current for supercaps can be tens or even hundreds of microamps.

Mee_n_Mac
Support Volunteer
Posts: 5628
Joined: Thu Apr 28, 2011 4:10 pm

Re: RTC with Supercapacitor Recharge

Post by Mee_n_Mac » Sat Nov 17, 2012 9:13 pm

Can you find a 1F supercap in SMT at that voltage rating (w/margin) ? I didn't think you could do even 50% of that.

Post Reply