Tips to conserve battery

So I know i read along the site that the Imp has the capabilities to conserve a battery for years. I know this can be done with server.sleepfor(); but was wondering specifics on allotting this function. I know its kinda hard to gauge this especially with possibilities of other connected devices drawing current. I guess in regards to a simple LED and analog sensor outputting no more then 5v. 

So, the main thing is the average power draw. If, very roughly, you assume the imp takes 100mA when awake and 6uA when asleep, that means:


- Sleeping for a year will use 52mAh of battery capacity (0.000006 * 24 * 365)
- Every second the imp is awake, it takes ~28uAh of battery capacity (0.100 / 3600)

If you woke for two seconds, once an hour for a year, that’d be (365 * 24 * 2 * 0.000028) = 490mAh.

Adding this to the sleeping power (ok, you’re double counting but it’s a microscopic amount), you get to 542mAh per year.

It’s not quite so simple though - power supplies take power too. Depending on your power topology you could be taking more power to run the power supply than you take to run the sleeping imp. The nora reference design uses one of the imps features (being able to control an external supply) to eliminate this extra draw during sleep mode. Your mileage will vary, and you need to do some spreadsheet work to get a good idea of actual power draw.

Obviously, this is just to run the imp. If you have a sensor which can be turned off when the imp is asleep (hence taking zero power) then you can use one of the imp pins to do this power control. LEDs don’t take any power when they’re not lit, but on the other hand you can’t drive an LED from the imp when the imp is asleep so if you wanted an LED to stay on you’d need to add circuitry to latch the LED state.

I’ll try and convert one of my power estimation spreadsheets to a public google doc. That might help…

Great! Thanks as always Hugo.

…And a link when available to that spreadsheet. 


cheers!

Id like that too when you can. Save me from doing math!

Microchip has this spreadsheet