RTC + backup battery question...

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am currently designing a very small "stamp" board to fit any of the 64-pins QFP (and maybe also lesser pin-count chips via a superposed footprint) Mega chips that will contain the basic support circuitry and have all IO's routed to headers. This is part of a bigger project in which I will need to be able to swap out chips in a cartridge fashion. Part of this circuitry will be a 32KHz crystal and CR1025 10mm coin battery for backup.

I have done so before on ARM chips, but these had a dedicated VBAT pin for the RTC that used very little current. My question is in regards with the way Atmel recommends to connect the battery in such a setup. It goes straight to VCC through a schottky diode. I am wondering how to manage this. Won't the chip by default try to pull off the full current it needs to run its main program? How can I insure the module goes into low-power shutdown mode if no proper power source other than the battery is connected? For example, if I wanted to have the module keep it's time through shelf time?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Take an input pin to the unsupported VCC. When the AVR senses it low, it knows it's running on battery and can go into low power mode. When it goes high again the AVR knows main VCC is back on and it can wake up.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok that makes sense, but because the battery is just 30mAH, I am kinda wary that the accumulated time between shutdowns will be too high.

I read on another board and list, that the integrated RTC on AVRs isn't really one, but a jerry-rigged async timer. Also read that it uses a LOT more current than a standalone serial RTC. Most schematics (including devices from Atmel like the Butterfly!) uses a DS1307 or similar, so I guess I will do the same. It is a shame however that Atmel can't keep up with the competition in regards to this....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The butterfly doesn't use an external RTC.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oops right you are, Butterfly is the one with the reference design I spoke of in the first post. I looked at too many it seems... :)

But the question remains, is there any advantage apart from saving a dollar to using the internal RTC on an AVR? When I can use something like this for one dollar, at 0.25uA power usage?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gotta read that data sheet twice...

As I skimmed the S-35390A data sheet I saw a front page bullit item: Built-in 32.768 KHz crystal oscillator (Cd built in, Cg external).

Cool, I thought. No external Xtal required. . . . Huh? All the schematics show an external Xtal.

Oh... A clock chip with a built-in oscillator, but not including the Xtal. Nice marketing. Find me a RTC chip that doesn't have a built-in osc... That is, I thought, one of the key components to such a chip.

I have not explored this yet, but the XMegas have an internal 32 KHz osc. No Ext Xtal required, although you can put one on TOSC, if desired. It runs in low power while everything else is in sleep mode.

I don't know when the lower pin count XMegas are/will be readily available, or their cost, but it might be worth at least looking at.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My problem is not with the external crystal, it is with the much higher power consumption of the Mega in sleep mode than completely off with just the RTC running, like on most ARM and 8051 I believe. I do not want to go with a larger battery, the CR1025 is 10mm and 30mAH, and I fear 30mAH won't last long with an AVR in sleep mode and the funny Timer1 in asynchronous mode thing.

Atmel does the kind of thing you saw in this datasheet too; Mega's do NOT have a RTC, they have a timer you can configure AS a RTC. Not only does it use more power, but you also lose a timer to use elsewhere.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I understand the Xtal isn't an issue, I was just ranting and whinning about the RTC chip and data sheet's verbiage...

That said the XMega lists its current as 1.15 uA on 3V, 0.55 uA on 1.8V, running the RTC, (32 KHz), with an External Xtal. The current to be drawn with the internal 32 KHz source is listed as yet to be determined, but ought to be in the same general area.

In this case that current is your RTC and your uC, combined. The 0.25 uA external RTC chips needs to be added to whatever the uC's low power mode will be.

Quote:
Mega's do NOT have a RTC, they have a timer you can configure AS a RTC

OK, enlighten me. This sounds very much like more Marketing B.S., my chip is better than your chip because..., etc., etc.

How do you make an RTC? You make a 32 KHz osc and feed a bunch of counters, or feed a CPU and simulate the counters.

If you use the XMega you also don't lose a timer. The RTC is a separate module, with its own interrupt generating capabilities.

The Atmel AVR picopower series is listed as consuming 650 nA, (nano amps), with the RTC running. I can't even measure anything that low...!

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BTW, I'm not picking a fight...
Just thinking of options for you. !

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
In this case that current is your RTC and your uC, combined. The 0.25 uA external RTC chips needs to be added to whatever the uC's low power mode will be.

Not really, in this case if the power is cut, the 30mAH battery will feed ONLY the RTC chip, and nothing else. Even the pullups for the I2C lines will be fed by VCC. The uC will be completely off in this scheme, so real power consumption is 0.25uA.

I know this might all sound anal, but 30mAH goes out fast. In any case I resolved this issue, layout is almost all done... :)

Attachment(s):