0.2 uA sleep with external watchdog wakeup

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

Hi!

IIRC I read about a thread about low power sleeping with timekeeping. I want to share something:

It's not precise timekeeping, but it's pretty low power and periodic wake up from power-down sleep mode.

I made an RC oscillator from an HEF40106 hex inverter with schmitt trigger by charging and discharging a timing capacitor through a 1N4148 diode. Charging with reverse leakage current, discharging with forward current. I found with a potentiometer voltage divider for Vdd that the oscillator uses very low current/power at low Vdd, probably sub threshold. In the finished circuit the oscillator is powered by the PORTB4 pull up resistor via a 10 M resistor and the uC turns the oscillator on/off as needed. Only one oscillation is used until wakeup.

At 3.3 V the whole circuit uses about 0.2 uA during power-down sleep. It drained an 0.33 F EDLC from 3.32 V to 3.18 V in 11:20 h with flipping PB0 at each wake up as its only action. Sleep time is 5-6 s, possibly getting longer as Vdd drops. A comparison with a smaller electrolytic suggests 34 days run (sleep) time with the 0.33 F EDLC! I'm not sure I'll wait that long.

There are probably better parts than the HEF40106 and IRL2703 MOSFET, but these are what I had at hand and they worked. A lower threshold voltage for both parts are probably better.

You may need to be logged in to see the schematic/source code.

Have fun :)

Bernhard

Attachment(s): 

Last Edited: Fri. Sep 13, 2013 - 10:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For comparison, the ATtiny45 data sheet indicates 4 uA power down current with internal watchdog, about 20 times as much, albeit with greater accuracy, probably.

Yu-Shiang Lin, Dennis Sylvester and David Blaauw created "A sub-pW timer using gate leakage for ultra low-power sub-Hz monitoring systems":

blaauw.eecs.umich.edu/getFile.php?id=300&sid=vphhtlpalaybt‎

I'd love to see that as wake up source in avrs, instead of my clumsy hack. Do you think atmel would do that if we asked them?

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

Quote:
Do you think atmel would do that if we asked them?
Certainly sir, how many millions of chips a year would you like? :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Pretty impressive.

And your 40106 hex inverter doesn't draw any more current than that?

A while ago, I used the internal watchdog timer to wake up a tiny 10 once every minute or so. I got it down to a couple uA. I wanted to know how long my avr "firefly" would work outside on 2 AA batteries "flashing" an led every minute or so only when dark. Turns out, about a month before a storm knocks it off the porch rail and the jar shatters on the patio below and the landlady sweeps it up and throws it away.

I wonder if you can do it without the inverter. You're using your diode as a huge value resistor.

Use the AVR pin to pull the cap to ground. Then put it as an input with no pullup and let the cap slowly charge till the pin change interrupt wakes the processor. I haven't tried this.

Attachment(s): 

The largest known prime number: 282589933-1

In my humble opinion, I'm always right. 

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

Torby wrote:
A while ago, I used the internal watchdog timer to wake up a tiny 10 once every minute or so. I got it down to a couple uA. I wanted to know how long my avr "firefly" would work outside on 2 AA batteries "flashing" an led every minute or so only when dark. Turns out, about a month before a storm knocks it off the porch rail and the jar shatters on the patio below and the landlady sweeps it up and throws it away.
Sadness.

Torby wrote:
I wonder if you can do it without the inverter. You're using your diode as a huge value resistor.

Use the AVR pin to pull the cap to ground. Then put it as an input with no pullup and let the cap slowly charge till the pin change interrupt wakes the processor. I haven't tried this.

As the voltage slowly approaches and passes Vcc/2, would this not cause excessive current consumption?
In the ATtiny25/45/85 datasheet Atmel wrote:
7.4.6 Port Pins
    When entering a sleep mode, all port pins should be configured to use minimum power. The most important thing is then to ensure that no pins drive resistive loads. In sleep modes where both the I/O clock (clkI/O) and the ADC clock (clkADC) are stopped, the input buffers of the device will be disabled. This ensures that no power is consumed by the input logic when not needed. In some cases, the input logic is needed for detecting wake-up conditions, and it will then be enabled. Refer to the section “Digital Input Enable and Sleep Modes” on page 56 for details on which pins are enabled. If the input buffer is enabled and the input signal is left floating or has an analog signal level close to VCC/2, the input buffer will use excessive power.

    For analog input pins, the digital input buffer should be disabled at all times. An analog signal level close to VCC/2 on an input pin can cause significant current even in active mode. Digital input buffers can be disabled by writing to the Digital Input Disable Register (DIDR0). Refer to “DIDR0 – Digital Input Disable Register 0” on page 120 for details.

10.2.5 Digital Input Enable and Sleep Modes

    As shown in Figure 10-2, the digital input signal can be clamped to ground at the input of the schmitt-trigger. The signal denoted SLEEP in the figure, is set by the MCU Sleep Controller in Power-down mode to avoid high power consumption if some input signals are left floating, or have an analog signal level close to VCC/2.

    SLEEP is overridden for port pins enabled as external interrupt pins. If the external interrupt request is not enabled, SLEEP is active also for these pins. SLEEP is also overridden by various other alternate functions as described in “Alternate Port Functions” on page 56.

The use of the inverter ensures fast transitions.

JJ

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Torby wrote:
Pretty impressive.

And your 40106 hex inverter doesn't draw any more current than that?

The hex inverter alone used "0.0 uA" when I set the supply voltage very low but still sufficient for oscillation. 1.6 V seemed like a good supply voltage. It was about 0.1 uA then, IIRC.

If there were 1.6 V for the inverter, then it would be (3.3 - 1.6)/10M = 0.12 uA.

The combined current for the ATtiny45 and the inverter oscillator was 0.2 uA, sometimes flashing 0.3, so the inverter must draw less than that.

Torby wrote:
I wonder if you can do it without the inverter. You're using your diode as a huge value resistor.

Use the AVR pin to pull the cap to ground. Then put it as an input with no pullup and let the cap slowly charge till the pin change interrupt wakes the processor. I haven't tried this.

IIRC I already tried this and the current with a medium voltage at the input pin was in the low mA range.

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

Hmm.

You get unexpected results sometimes when looking at computers and micro amps;)

The largest known prime number: 282589933-1

In my humble opinion, I'm always right.