I'm working on a design for a battery-powered, AVR-based clock. It's my first battery-powered project so I'm drilling down into power consumption more than I usually do. My understanding was that different clocking approaches can effect power consumption (e.g. using an external oscillator causes the MCU to draw more current than using a crystal and the MCU's oscillator), though I can't track down evidence for that belief at the moment, so any pointers for that issue would be appreciated. I didn't try especially hard, though, because that's not my main question. What I'd really like to know is if a crystal itself draws power that needs to be added to the power budget, or if its consumption is rolled into the MCU's power consumption number. The few crystal datasheets I've perused don't provide any power info, leading me to believe I can ignore it, but it seems a little counterintuitive, so I decided to check here. Thanks for your help.
Do crystals consume power?
I've nev er seen this discussed, but I'm sure that they do -- althogh I'll bet it's nearly unmeasureable. When you drive a crystal with a little input, I can only imagine that some or all of the quartz structure vibrates -- that will take energy. But it's just a tiny bit of quartz and I can't imagine that it requires very much.
hj
Yes, crystals require power. Normally the power is measured as part of an oscillator rather than just the crystal itself. How much? That's a tricky question.
For low power, one would normally use a 32.768kHz watch crystal as that's what rtc chips use (as well as watches). Many AVRs have timer2 that can be clocked by a 32kHz crystal in lower power modes.
> Many AVRs have timer2 that can be clocked by a 32kHz crystal in lower power modes.
That’s my plan, to keep the MCU in power save mode and have timer2 wake it up periodically to update the clock. During the updates I’d have it run off the on-chip resonator. This approach seems to be lower power, less expensive, and simpler than using a separate RTC chip, but I’m trying to make sure that’s the case.
Most likely less expensive, but probably not as low power as a RTC.
Note - there's no such thing as 'the on-chip resonator' - the AVR has an internal RC oscillator.
Those 32kHz crystals are ... very low power.
I had a casio wristwatch once. I lost it after 7 or 8 years :( but it still ran on the original battery (small coin cell).
Good low power design however covers the whole circut. A leaky elco or the wrong lineair voltage regulator or a single misplaced resitor can ruin your battery life.
Also experiment with different oscillator speeds. It is often better to run the AVR on a relative high clock frequency ( 8MHz RC oscillator) with the goal to put it to sleep faster.
Jeelabs has done a bunch of blogs about reducing power consumption.
On what kind of battery do you want to run your clock?
RC oscillator is "not advised" for uart or other timing sensitive stuff.
You can overcome that by callibrating the RC oscillator regularly from the 32kHz crystal.
(watch out for wearing out the callibration bytes Edit: Brainfart. See #17. )
Running the main AVR clock from a high frequency oscillator requires long startup times which is bad for battery life.
(Are there AVR's witth a PLL which runs from the 32kHz oscillator ? ).
You can also deduce Crystal oscillator power consumption from the diffence in power supply current between the different sleep modes.
Crystals don't really consume power, but the oscillator that makes them run does. (so do PLLs and other clock circuitry that may be associated with the oscillator.)
Amounts vary, and are probably listed in the datasheet.
One particular thing to watch out for is those "crystal oscillator modules" that include both crystal and oscillator circuitry:
While these are very convenient in some circumstances, they tend to have really high current consumption compared to most microcontrollers. (ie 30mA. Just for the module.)
For lower power a common solution is to run on the lower power int RC but use a 32.768k on T2 clockedasync and used to calibrate. This has the further advantage of not wasting the SUT every time the device starts and it waits for resonance.
What I'd really like to know is if a crystal itself draws power that needs to be added to the power budget, ...
... or if its consumption is rolled into the MCU's power consumption number.
http://ww1.microchip.com/downloads/en/AppNotes/doc8333.pdf
(page 6)
2.4 Equivalent series resistance (ESR)
(page 8)
3 PCB layout and design considerations
...
Ultra low power 32kHz oscillators typically dissipate significantly below 1µW, and ...
via
Microchip
AN_8333
AVR4100: Selecting and testing 32kHz crystal oscillators for AVR microcontrollers
http://www.microchip.com//wwwAppNotes/AppNotes.aspx?appnote=en592059
An ideal crystal resonating is like a frictionless ideal pendulum: it doesn't consume any power to keep moving, but it doesn't really exist, it's just a theoretical construct. Even moons and planets orbits decay very slowly.
So in practice, the crystal itself will consume a bit of power, but probably insignificant compared to the auxiliary circuitry.
You can overcome that by callibrating the RC oscillator regularly from the 32kHz crystal.
(Are there AVR's witth a PLL which runs from the 32kHz oscillator ? ).
Microchip
AN_8002
AVR055: Using a 32kHz XTAL for run-time calibration of the internal RC
http://www.microchip.com//wwwAppNotes/AppNotes.aspx?appnote=en591195
(ie 30mA. Just for the module.)
Some Linear Technology silicon oscillators have reasonable current consumption :
- LTC6900, 2mA typ at 5V and 10MHz
- LTC1799, 3.3mA typ at 5V and 20MHz
- LTC6905, approx 5mA typ at 5V and 20MHz
- LTC6930, approx 0.25mA typ at 5V and 8MHz
http://www.microchip.com/wwwproducts/en/DSC6000
http://www.linear.com/products/silicon_oscillators
Most likely less expensive, but probably not as low power as a RTC.
http://www.abracon.com/products.php?search=rtc&type=RTC%20IC%20-%20Ultra%20Low%20Power
Edit: polarity
SiTime have some "ultra-low power" oscillators:
The SiT1533 is an ultra-small and ultra-low power 32.768 kHz oscillator optimized for mobile and other battery-powered applications. The SiT1533 is pin-compatible and footprint-compatible to existing 2012 XTALs when using the SiTime solder-pad layout (SPL). And unlike standard oscillators, the SiT1533 features NanoDrive™, a factory-programmable output that reduces the voltage swing to minimize power. The 1.2 V to 3.63 V operating supply voltage range makes it an ideal solution for mobile applications that incorporate a low-voltage, battery-backup source, such as a coin cell or supercap.
likewise at Abracon for a bit more current and an order of magnitude better in frequency stability :
http://www.abracon.com/Oscillators/ASTMTXK.pdf
via http://www.abracon.com/products.php?search=osc&type=MEMS&subtype=kHz%20SMD
https://www.mouser.com/Search/Refine.aspx?Keyword=astmtxk-32.768khz-lg
We need to clarify some things here:
1. Crystals, all crystals, of any frequency, "consume" power. The consumed power is smaller as the crystal Q increases. Thus, ceramic resonators, with relatively low Q (in the low thousands, probably) take more power than a crystal (with Q in the 10-thousands to 100-thousands or more).
2. When the power consumption of a crystal OSCILLATOR is quoted in an AVR spec sheet, the OSCILLATOR power includes the power consumed by the crystal. That said, the power consumed by the crystal is a very small fraction of the total oscillator power, for either a crystal or a ceramic resonator.
Power consumption by an EXTERNAL OSCILLATOR is a totally different issue and is a red-herring if you are talking about microcontroller built-in oscillators.
Jim
(watch out for wearing out the callibration bytes)
Huh? Calibration doesn't affect the calibration byte in any way. OSCCAL is effectively an SRAM register.
If you want to go low power it's probably best to use a internal RC oscillator for your AVR and keep it almost always in the best sleep mode you can afford.
You have to use an external RTC chip for the timekeeping then.
You can use the alarm function of that chip to wakup the AVR if you want.
Real low power design is a challenge though...
The Butterfly board uses a crystal and its RTC will run for several years on a coin cell.
With proper use of a externally clocked (e.g. 32KHz crystal) counter/timer and sleep and power management, you can get the average current down to very low values. No external RTC required.
Pointing to the original subject line, yes crystals "use" power, but that power is part of the quoted power for the oscillator.
Jim
Came across the same question, then measured an ATtiny24A.
I set up a 10MHz crystal, with two 22pF capacitors to ground, then by software divided clock by 256 (gives ca. 39kHz), set power reduction register "PRR" to only supply timer 1, and idled the CPU 99.983% of time. The datasheet is not very clear of what supply current is to expect then, but should be less than 10µA (if I unterstand correctly...). Real-world measured:
243µA at 1.8V,
273µA at 2.7V,
0.39mA at 5.0V.
Most of the current is for the oscillator driving the crystal, I think.
Best regards
Tobias
The real power consumer is the oscillator, not the crystal.
The amount of power the oscillator consumes goes up with the peak-peak swing at the oscillator's output pin. Hence, it goes up as you increase the supply voltage.
Jim