Author Topic: [Same Semi Beginner] Why is my MCU's power consumption so high in power-down?  (Read 4059 times)

0 Members and 1 Guest are viewing this topic.

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
It's me again. I got the watchdog & sleep mode working on my ATtiny10. The only problem is that the current is still too high. In power-down mode it draws 7.2uA (measured with a decent multimeter) as opposed to the <0.1uA claimed by the datasheet. I'm aware that the claimed consumption is at 1.8V (this is at 5V), but surely 7.2uA is still too high!

I have attached my testing code. AFAIK I have disabled everything I can (I need one of the DIDR0 pins for an interrupt; it's not programmed in yet). I have measured without the board connected to my programmer, with no change.

The MCU is already in the circuit. I have attached the schematic for it (the battery is not fitted at present), although the only things across the power rails are two ceramic caps.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
You have the watchdog enabled.
Spec says 7 uA in powerdown with watchdog.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
I doubt the <0.1uA figure is achievable in any real usage scenario. Better look at TI's MSP430 series if you want a device which really can achieve low power AND do something useful at the same time. 7uA while powered down is a complete joke in low power land! A couple of years ago I did a battery powered design using an MSP430. IIRC it drew 1.5uA from the battery while waking up several times per second from the RTC timer to scan the buttons (or do something else).
« Last Edit: May 31, 2015, 12:23:28 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
OK, that's fine. Since I've already got the boards & assembled them, I'll stick with the ATtiny10 for now (I've nearly finished the program for it anyway), but if I do a second design revision, I'll probably use an MSP430. I already have a programmer from the eZ430 Chronos (watch) kit so it should be minimal hassle.

TBH the vast majority of the power is coming from when it's awake and drawing ~30mA for the piezo.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1638
  • Country: nl
Low power land is all about trade-off between on-time x on-current and off-time x off-current.

If your product is awake (i.e. consuming power) for 10 seconds each day, that is only 10/86400 part.
The other 86390/86400 part is sleep current.

With a 30mA load x 10/86400 + 7uA x 86390/86400 = 10.7uA average.

If you're using a beeper, likely you will not shorten the awake time by much (even if you had a faster CPU). So a lower sleep current will make the batteries last longer.
Other applications (like Internet of Things stuff) may need to do some local processing, and benefit a CPU that is more energy efficient (mA/MHz).

A point in achieving low power consumption is also making sure I/O are set correctly.
I set all of them as outputs, so high-impedance nodes are not floating. Pull-ups must be disabled, because sometimes they are implemented as a current source.
Make sure to set up outputs at a level so they don't consume power.. like don't keep a LED turned on.
Also make measurements without any debug tools attached. Some tools may have I/O voltage sensing and draw some current.
 

Offline electr_peter

  • Supporter
  • ****
  • Posts: 1302
  • Country: lt
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Low power land is all about trade-off between on-time x on-current and off-time x off-current.
What also matters is the time between waking up and getting the oscillator going and the power drawn during that period. A poorly designed microcontroller can be eating up way more power than the spec advertises.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Do you own a uCurrent yet?
http://eevblog.myshopify.com/products/ucurrent

You can use one to plot current on the oscilliscope. Way more accurate measuring on-time current vs off-time current than your multimeter.
 

Offline con-f-use

  • Supporter
  • ****
  • Posts: 807
  • Country: at
I'm aware that the claimed consumption is at 1.8V (this is at 5V), but surely 7.2uA is still too high!

No it isn't. The voltage difference alone can account for the difference in sleep-mode drain, as does the clock speed. Also the specs are best case and almost every component has leakage. Even without the watchdog-timer being enabled. The ATTinies (except for the "V" versions maybe) are no true low-power controllers and no amount of good intentions and code tweaking will make a swine into a horse.
« Last Edit: June 01, 2015, 12:51:48 pm by con-f-use »
 

Offline ralphd

  • Frequent Contributor
  • **
  • Posts: 445
  • Country: ca
    • Nerd Ralph
Look at the Sparkfun tutorial and you'll see under 1ua is possible with a 32khz crystal on many of the 8-bit AVRs.
Unthinking respect for authority is the greatest enemy of truth. Einstein
 

Offline ralphd

  • Frequent Contributor
  • **
  • Posts: 445
  • Country: ca
    • Nerd Ralph
And below 1ua you'll be up against not just battery leakage but also capacitor leakage.  A 6.3v 47uf electrolytic biased at 3.3v could have over 1ua of leakage.
Unthinking respect for authority is the greatest enemy of truth. Einstein
 

Offline ralphd

  • Frequent Contributor
  • **
  • Posts: 445
  • Country: ca
    • Nerd Ralph
Unthinking respect for authority is the greatest enemy of truth. Einstein
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
I doubt the <0.1uA figure is achievable in any real usage scenario.

Ignore this; 0.1uA is perfectly possible in real life with this part. Texas are no better, you just need to understand the conditions required for such low power operation.
At 0.1uA a microcontroller (in general) can only wake-up from some external event. However in many cases you want a device to do some regular checks (for example testing whether the battery is low and make an alarm) which means leaving the RTC clock and a timer running. In theory you can achieve sub uA but for practical applications it is a nice number for the guys from marketing.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
The finished board runs at 3V from a CR2032 battery, rather than from my PC, so it will have a slightly lower power consumption. Cap leakage could also be contributing — there's a 4.7uF and a 100nF cap over the power rails. However, for my purposes, the difference between 7uA and 0.1uA is peanuts compared to the 30mA used while it's on for about 1.5 seconds every couple of minutes.

A 32kHz crystal would probably help, yes.
 

Offline microbugTopic starter

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
That's pretty impressive! I guess that, while it's not designed around low-power, AVR is still a low-power platform. As a side note, I just googled 'watchdog IC' and came up with the TPL5010 which can replace the functionality of the internal watchdog (put it on an interrupt pin) and runs at 35nA!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf