I've done a post about ways of saving power when programming your microprocessors.
Various techniques are explored (sleep mode, turning off the ADC, waking up etc.) and the effect of each one is measured.
I've done a post about ways of saving power when programming your microprocessors.
Various techniques are explored (sleep mode, turning off the ADC, waking up etc.) and the effect of each one is measured.
Interesting info Nick, Thanks.
Just an FYI. I added a power down mode to a program I wrote for my Duemilanove. It's an iambic morse code keyer.
When it is keying the radio with a string of dits or dahs it draws 33ma. If I put it into sleep IDLE mode it draws 10ma. I was hoping/expecting that a full-blown PWR_DOWN would be a lot less but it was actually 10ma as well, so I didn't bother to try out the other modes that are supposed to be intermediate between IDLE and PWR_DOWN.
Do you think a Nano, for example, would draw significantly less than 10ma in PWR_DOWN?
Pete
As I mentioned on my page, the voltage regulator is probably the culprit. The Nano uses a UA78M05 regulator which has a quiescent current of 6 mA, so there are 6 mA gone straight away.
And it wouldn't surprise me if the FT232RL chip drew 4 mA.
Your best bet for low current consumption is to get one of the "bare" boards (no voltage regulator, no FTDI chip) and do that externally (eg. use an FTDI cable for programming it, and run it off batteries, as long as the batteries are in range, like 3 x 1.5 v).
Thanks again
Pete
Excellent write up Nick! You just saved me several hours of research. By any chance did you do any experimenting with wake up on address acknowledge in I2C slave mode? It's something I'm going to incorporate in my next project.
Well done, thanks for sharing. Really comprehensive and clear.
wayneft:
By any chance did you do any experimenting with wake up on address acknowledge in I2C slave mode?
Not yet, although I am looking into it now...
So far the results are a bit disappointing. I have the concept working, sort-of. However so far it only works in "idle" sleep mode, which has the least power saving. The data sheet suggests it should work in all modes. I strongly suspect it is something to do with the wake-up time, and that by the time the processor wakes up, the master has given up.
My example sketch uses 8 mA when idle, compared to maybe 16 mA when not idle, which is OK, but I should be able to do better.
I'm going to try experimenting with fuse settings (to make it wake faster) and also maybe slowing down the I2C bus.
wayneft:
By any chance did you do any experimenting with wake up on address acknowledge in I2C slave mode?
I seem to have it working now. There were some slightly counter-intuitive parts to it. In the end I sent a "dummy" wake-up message, which was enough to kick the sleeping processor into life. Then the master waits 5 mS to give the slave a chance to wake up, then sends the "real" message.
I've added a new post to the link above.
The current drawn by the slave was around 71 uA. Changing the slave address stopped it waking at all, so it appears that it correctly decodes the address even when deeply asleep. Pretty cool.