Author Topic: Getting the most out of a supercap and RTC  (Read 1445 times)

0 Members and 1 Guest are viewing this topic.

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Getting the most out of a supercap and RTC
« on: March 03, 2023, 03:38:40 pm »
Hi,

I've lashed together a circuit without really thinking about it and now I've got it running I've realised I'm not getting the most out of it.

I'm using the NXP PCF85063A RTC, but I'm powering it from a 3V3 rail through a BAV170VL diode - which also charges a 1F supercap.

 I've had that 'doh'  :palm: moment that I'm only managing to charge the supercap to ~2.7V due to the diode and it's rated to 5V, so I'm not getting the maximum energy stored in it.

The reason I've done this is because it's connected to a micro running on from the 3V3 and I have to admit I just didn't think abut it  ::)

So, I'm looking at ways to improve it. I suppose the real way to do it is to connect the anode of the diode to 5V (I have this available too) and levelshift the I2C which should be possible with a couple of fets. I could also potential divide the interupt out pin as that's only unidirectional. However this way I'll still only charge the supercap to ~4.4V.

Is my idea the best way? Are there any leakage paths that I haven't thought about that could cause trouble?
Or is there a more clever way?

Many thanks,

G
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2151
  • Country: us
Re: Getting the most out of a supercap and RTC
« Reply #1 on: March 03, 2023, 03:44:00 pm »
I'm not clear on what your circuit is.  Could you post a drawing?  Also, why do you need the diode?
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5140
  • Country: ro
  • .
Re: Getting the most out of a supercap and RTC
« Reply #2 on: March 03, 2023, 04:23:54 pm »
That NXP PCF85063A chip works with 0.9v .. .5.5v for clock, and at least 1.8v for i2c if I read the datasheet right.
If you insist on using the super capacitor .. consider switching to a 5v input (ex usb) ... add a small diode for reverse voltage protection and to protect the super capacitor if the voltage rating of the super capacitor is actually 5v.

If you need to have a guaranteed minimum voltage, look maybe at something like MCP16252 with input-output bypass : https://www.digikey.com/en/products/detail/microchip-technology/MCP16252T-I-MNY/4079880
As an example, keep it in bypass mode (input goes directly to output without regulation), check the voltage with an adc pin let's say once every 10-30s and if the voltage drops below some threshold (ex 3v or less), enable the regulator to boost the voltage to 3.3v or whatever level you want and keep it there.

There's also ideal diodes you can put after the super capacitor to have as little voltage drop as possible if you want to have dual voltage input  ex   

5v (usb )  ----- [ diode or ideal diode > ] -----------  (optional step-up regulator)-----  microcontroller / clock chip / whatever
   \ [ optional protection diode for overvoltage] ----------(supercapacitor)----[ ideal diode > ]---/


« Last Edit: March 03, 2023, 04:26:49 pm by mariush »
 

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Re: Getting the most out of a supercap and RTC
« Reply #3 on: March 03, 2023, 04:47:47 pm »
Here's a quick sketch of the circuit.

The RTC runs from the 3V3 when the unit has power, but then runs from the supercap when off.

G
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2151
  • Country: us
Re: Getting the most out of a supercap and RTC
« Reply #4 on: March 03, 2023, 06:14:41 pm »
An ideal diode should at least give you almost the full 3.3V.  But if the 5V and 3.3V rails turn on and off at the same time, I think you could also use an N-channel mosfet with low threshold voltage, with the gate connected to 5V, the source connected to 3.3V, and the drain connected to the RTC.  That seems upside down, but you need the mosfet's body diode oriented the right way to block reverse current when the mosfet is off.  But that still just gives you 3.3V.

Also, does the processor also have backup power for when the 3.3V rail goes down?  If not, then it will shut down, and will not be communicating over I2C.  So you wouldn't need to translate if the supercap supplied 5V to the RTC only when 3.3V is absent - if you could find a way to do that.

But I think the I2C lines might be a current leak if the RTC is up but the processor is down.  You would need to test that physically.
 

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Re: Getting the most out of a supercap and RTC
« Reply #5 on: March 04, 2023, 09:05:48 pm »
Hi,

Yes the processor shuts down too with the power off. All I need the RTC for is to keep the correct time while the unit is off, comms only happens when the whole unit is powered up.

I've never seen the ideal diodes, who makes those?

G
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2151
  • Country: us
Re: Getting the most out of a supercap and RTC
« Reply #6 on: March 05, 2023, 01:39:59 am »
Texas Instruments and Analog Devices make them.  But I don't know if any come in hobbyist-friendly packages.  There are cheap ideal diode modules on Ebay  that are made of discrete components.  I don't know if they are any good.

Edit: But I wonder if you could power the RTC and supercap from the 5V rail, but have the pullup resistors on SDA and SCL connected to the 3.3V rail.  I don't think you would need any translation as long as the RTC would interpret 3.3V as high.
« Last Edit: March 05, 2023, 01:49:59 am by Peabody »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Getting the most out of a supercap and RTC
« Reply #7 on: March 05, 2023, 02:01:51 am »
Just use a 78xx 3.3v equivilant for charging and you get a 1amp constant current curve.
Just use a 78Mxx 3.3v equivilant for charging and you get a 500ma constant current curve.
Just use a 78Lxx 3.3v equivilant for charging and you get a 100ma constant current curve.

Other linear regulators exist with built in 1.5 amp current limiting like the LM317 series as well as 250ma current limiting on some sot223 variants.  You choose what you like as this will be a single 3pin IC solution.  Add 2 resistors with an adjustable regulator will allow you to charge the cap to any specific value you like.

Though be warned of the heat and you will need 1 diode to feed your clock from the 1f cap and another from an auxiliary 3.3v for instant power-up on a totally dead 1f cap.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5140
  • Country: ro
  • .
Re: Getting the most out of a supercap and RTC
« Reply #8 on: March 05, 2023, 06:31:10 am »
I was thinking something along the line...

3.3v -> regulator to 1.25v (the built in reference voltage) -> regulator in current limit mode, to maybe 1-10mA -> a single AA rechargeable ->  step-up regulator 3.3v or whatever is needed.
 

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Re: Getting the most out of a supercap and RTC
« Reply #9 on: March 05, 2023, 10:15:58 am »
Hi all,

Thanks for all the replies, but I'm not sure why I would need a separate regulator when I've already got some appropriate power rails available?

G
 

Offline BadeBhaiya

  • Contributor
  • Posts: 49
  • Country: in
Re: Getting the most out of a supercap and RTC
« Reply #10 on: March 05, 2023, 10:43:37 am »
I think a suitable PFET should do the job well. Even a low forward voltage diode should, imo. The forward voltage is dependant on the current, so as the capacitor charges, it would reduce the current and as a result the forward drop of the diode would be less as well
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2151
  • Country: us
Re: Getting the most out of a supercap and RTC
« Reply #11 on: March 05, 2023, 03:42:48 pm »
The RTC datasheet says input high must be a minimum of 0.7VDD.  So you could power the supercap and RTC from the 5V rail through a diode, which would give you about 4.5V, and the minimum input high voltage would be 3.15V.  Then the pullups on SDA and SCL would be to the 3.3V rail, which satisfies the minimum. The diode cathode could be as high as 4.72V and still satisfy the minimum.  So you wouldn't need to translate.

To get the full 5V, you could use an ideal diode, but then you would need to translate SDA and SCL.  And remember that an ideal diode is an active circuit that will be powered from the supercap when the main power goes down, and may use more current than your RTC.

 

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Re: Getting the most out of a supercap and RTC
« Reply #12 on: March 06, 2023, 04:44:00 pm »
I think you might have nailed it there, I'd been totally overthinking it and hadn't thought about it like that.

I'm reluctant to add more parts into the circuit if I can as I'm sure they'll just add leakage that will kill any benefits.

Thanks,

G
 

Online Terry Bites

  • Super Contributor
  • ***
  • Posts: 2517
  • Country: gb
  • Recovering Electrical Engineer
Re: Getting the most out of a supercap and RTC
« Reply #13 on: March 07, 2023, 04:18:29 pm »
dont ignore fet and diode leakage, its a real thing.
 

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Re: Getting the most out of a supercap and RTC
« Reply #14 on: March 07, 2023, 08:38:59 pm »
Hi,

Yeah, I don't think I need a fet now, the supercap seems to charge to 4.2V which is a big improvement and should increase off time significantly.

I *think* I've chosen a fairly good diode, are there any that are proven to be lower leakage?

Thanks,

G
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf