3
\$\begingroup\$

I am using atxmega8e5 in a design and also utilizing its Real-Time Counter to act as a Real-Time Clock.

A lot of RT-Clock ICs can use a SuperCap to have backup power incase the device is unplugged or incase of power outage. Backup time requirement isn't huge: just a min. of 10 hours.

Is it possible to utilize a SuperCap to provide backup power to my MCU? If so, how would one go about it—what is the required circuity to switch from mains power to backup capacitor, and how would one charge it safely? The xmega8e5 does not have a dedicated pin for backup power and also lacks the 'Trickle Charge' capability of many RTCs.

Note: I am not asking about the various sleep modes. I am aware of them and will use them when the chip is using backup power.

If the required circuity costs as much as a RT-Clock IC, then might as well use that?

\$\endgroup\$
4
\$\begingroup\$

I believe that your best bet is to use a dedicated RTC chip for the clock function. These can connect to your microcontroller via an I2C bus and thus take very few I.O pins to support. If fact if you have already deployed the the I2C bus for other purposes then supporting the RTC chip takes no additional pins.

The reason for using an RTC chip over trying to backup your microcontroller is the difference in achievable standby operating current. RTC chips are optimized for extremely low power operation, particularly if you deploy them with their own attached 32.768 KHz crystal.

I have also found that the external RTC chips with crystal can achieve far better long term accuracy. In fact, if you select the right RTC chip you can use internal registers to trim in the oscillator to get even less clock drift over time.

The use of super capacitors is OK but in my experience, with a very low power RTC chip, that it may very well be cheaper and take less board space to use a small coin cell to power the RTC chip. A soldered in battery holder for a BR1225 coin cell will let you slide in the cell and take board space less than .5x.5". Such cell with 48mAH capacity will keep the RTC supported for years. Even better, with the proper RTC chip selection, is that the chip provides a separate pin for the battery connection so it provides all the regular VCC rail to battery switch over circuitry on die.

\$\endgroup\$
  • \$\begingroup\$ I would go for a battery but the application is such that the device will have live (240VAC) inside it at all times and it won't be unplugged - the cap is primary for power outages. \$\endgroup\$ – Saad Sep 24 '14 at 17:17
  • \$\begingroup\$ Some RTC chips are designed to charge a cap while powered by their regular supply, and when regular supply goes away they will draw power from the cap to keep the clock running. \$\endgroup\$ – jwygralak67 Sep 24 '14 at 21:22

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.