[Same Semi Beginner] Why is my MCU's power consumption so high in power-down? - Page 1
Forum section: electronics / general

author: microbug
author_rank: Frequent Contributor
timestamp: May 31, 2015, 11:46:11 am
content: 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.

author: Jeroen3
author_rank: Super Contributor
timestamp: May 31, 2015, 12:04:31 pm
content: You have the watchdog enabled.Spec says 7 uA in powerdown with watchdog.

author: nctnico
author_rank: Super Contributor
timestamp: May 31, 2015, 12:15:28 pm
content: 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).

author: microbug
author_rank: Frequent Contributor
timestamp: May 31, 2015, 01:08:41 pm
content: 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.

author: hans
author_rank: Super Contributor
timestamp: May 31, 2015, 04:08:37 pm
content: 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.

author: electr_peter
author_rank: Unknown
timestamp: May 31, 2015, 04:24:02 pm
content: Some hints on low power designs:http://www.ganssle.com/reports/ultra-low-power-design.html

author: nctnico
author_rank: Super Contributor
timestamp: May 31, 2015, 05:34:27 pm
content: Quote from: hans on May 31, 2015, 04:08:37 pmWhat 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.

author: Jeroen3
author_rank: Super Contributor
timestamp: June 01, 2015, 05:45:17 am
content: Do you own a uCurrent yet?http://eevblog.myshopify.com/products/ucurrentYou can use one to plot current on the oscilliscope. Way more accurate measuring on-time current vs off-time current than your multimeter.

author: con-f-use
author_rank: Unknown
timestamp: June 01, 2015, 10:48:30 am
content: Quote from: microbug on May 31, 2015, 11:46:11 amNo 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.

author: ralphd
author_rank: Frequent Contributor
timestamp: June 01, 2015, 11:38:18 am
content: Look at the Sparkfun tutorial and you'll see under 1ua is possible with a 32khz crystal on many of the 8-bit AVRs.

author: ralphd
author_rank: Frequent Contributor
timestamp: June 01, 2015, 11:43:16 am
content: 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.

author: ralphd
author_rank: Frequent Contributor
timestamp: June 01, 2015, 12:25:39 pm
content: Check out David Cook's leakage tests:http://www.robotroom.com/Capacitor-Self-Discharge-1.html

author: nctnico
author_rank: Super Contributor
timestamp: June 02, 2015, 10:35:00 am
content: Quote from: mojo-chan on June 02, 2015, 09:45:26 amAt 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.

author: microbug
author_rank: Frequent Contributor
timestamp: June 02, 2015, 11:25:49 am
content: 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.

author: microbug
author_rank: Frequent Contributor
timestamp: June 02, 2015, 09:42:26 pm
content: That's pretty impressive! I guess that, while it's not designedaroundlow-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!