SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By UNTEngineer
#151864
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? :)
By MichaelN
#151867
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.
By UNTEngineer
#151872
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
By Mee_n_Mac
#151876
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 ?
By MichaelN
#151881
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
By viskr
#151892
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.
By UNTEngineer
#151924
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.
User avatar
By viskr
#151926
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)
By UNTEngineer
#151929
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?
By UNTEngineer
#151959
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
User avatar
By viskr
#151962
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.
By MichaelN
#151966
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.