5
\$\begingroup\$

I'm asking for a reliable/simple/cheap circuit for the VBAT section of a STM32 design, powered at VDD=3.3V, that will safeguard the built-in RTC (based on 32768 Hz Xtall) for like 10 days.

Based on C = t⋅I/ΔU, its looks like a 1F supercap will do (I'm taking t = 864000s, I = 1.2uA, ΔU = 1.1V, see below). I need a charging circuit that

  • does not fry the supercap;
  • does not fry the STM32 or prevent it from starting-up reliably (in particular: I do not see a specification for what happens when VDD=3.3V, VBAT<2V)
  • does not add significantly to the STM32 power drain on VBAT;
  • delivers proper VBAT quickly (0.2 s) including after full discharge, so that the RTC is always available soon after power-on reset;
  • brings the supercap to near full charge soon enough after VDD is applied (perhaps 80% after 50 s), so that testing leaves a decent reserve.

The simplest I can think of is

CircuitLab Schematic au8j24

Any criticism? Suggestion on the diode (perhaps a Schottky would be better) or other component? Alternative?

A most relevant section of the STM32(F100) data sheet is:

STM32(F100) data sheet extract

\$\endgroup\$
  • 1
    \$\begingroup\$ Can the MCU accept the slow rise time on VBAT? \$\endgroup\$ – Lior Bilia Sep 16 '14 at 10:52
  • \$\begingroup\$ @Lior Bilia: That's part of the question ! See my does not fry the STM32 requirement. As far as I can tell, VBAT low while VDD at 3.3V is within the Absolute Maximum Ratings of the STM32, and will even let it operate reliably except for the RTC and perhaps some of the RAM; but I could be wrong. \$\endgroup\$ – fgrieu Sep 16 '14 at 10:55
  • 1
    \$\begingroup\$ use a simple reset-monitor with a 3V threshold, which will hold the STM32 in reset until the VBAT line gets above 3V? \$\endgroup\$ – KyranF Sep 16 '14 at 11:11
  • 1
    \$\begingroup\$ @fgrieu here is one by ON Semi which has typical 1.6uA quiescent current onsemi.com/pub_link/Collateral/NCP308-D.PDF EDIT: I found one for 150nA from TI ti.com/product/tps3839a09 \$\endgroup\$ – KyranF Sep 16 '14 at 11:50
  • 1
    \$\begingroup\$ That's pretty much exactly the circuit that I use for STM32F407 RTC's Vbat. A 2K2 resistor works fine. I built the first one about 12 months ago, it has seen regular usage, and haven't had any problems with it or several others since. \$\endgroup\$ – markt Sep 17 '14 at 6:43
2
\$\begingroup\$

I find the circuit proposed in the picture perfectly fine.

Your worry about VBAT being lower than VCC is mostly mitigated by your diode right across those two rails. The power-on delay introduced by this diode would be so minuscule, that it is not worth considering.

Also, frying the supercap mostly depends on a particular type. Some of these have rather low allowed currents. This is mainly due to their high ESR. During current flow, this causes heating and damages the part. Some types don't have their maximum currents explicitly stated. In such case you need to rely on the ESR value and a wattage the package can reasonably deal with (sometimes also given in datasheets).

In the end, you adjust your \$R_1\$ to be a compromise between charging time and charging current. \$22\Omega\$ sounds good for starters. Keep in mind that you will almost never discharge to 0 volts. Also, charging current in this case drops exponentially, so you will only draw \$100\tilde- 200 mA\$ for a few seconds.

\$\endgroup\$
2
\$\begingroup\$

I've put together a circuit very similar to this in the past and I think, based on that, you'll be just fine with something like this, especially if it's not a critical application.

A couple of considerations: Check out your specific supercap to see how best to charge it. You'll want to avoid charging to too quickly if it has a high ESR. Also, certain types of supercaps hold more charge if you charge them slowly (I'm thinking of Panasonic's "Gold" electric double layer supercaps). Although you'll be losing more as you discharge your capacitor, these two considerations could mean it's worth increasing the value of R1. For maximum lifetime you'll have to balance these factors.

Also, I think a Schottky is a great idea if you're looking to get a little more charge out of your cap. The one thing I'd look out for there is that Schottky's can have horrendous reverse leakage current at high temperatures, so if this would be in an environment that gets toasty you could lose a lot of battery life.

\$\endgroup\$
1
\$\begingroup\$

does not fry the STM32 or prevent it from starting-up reliably (in particular: I do not see a specification for what happens when VDD=3.3V, VBAT<2V)

Looking at the Device power supply scheme of STM32F3XX you can see there is a power switch. I guess it's all the same for all the ST32 families, but you better check It's controlled by Vdd, if it's present Vbat is only "monitorable" with ADC but does not take any action for what concerns RTC etc. So just for this question, I think with your circuit you can play safe

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.