All of the main components have some form of low power mode that I’m using to reduce power usage.
The ESP8266 has “Deep Sleep that allows it to use approximately 20 micro-amps. Deep sleep timer only lets you sleep for just over an hour at a time so I keep track of how much mode sleeping is needed and set deep sleep to wake without the radio turned on, saving power, if mode sleep is needed. During these intermediate wake-ups I apply drift compensation if its been computed.
- Deep sleep: ~20 uA
- Radio off: ~15 mA
- Radio on: ~ 80mA
The ATTiny85 has a “power down” mode where interrupts will wake it back up. Its woken on the falling edge of the 1Hz signal from the RTC and powers back down after the tick has been completed. An “idle” mode is also used during the “tick” processing while timers are used to wake from idle.
- Power down: 0.2mA
- Idle: 0.8 mA
- Awake: 3mA
The DRV8838 has a sleep pin that the ATTiny85 activates after the tick has been completed. There is a delay after the tick is completed that is needed because while the DRV8838 is active it cancels any inductance caused spikes form the motor. If its put to sleep immediately after the tick finishes then there is a huge spike that causes the tick to mis-fire.
- Sleeping: 25 nA
- Awake: 1 mA
I measured the overall power usage and found the following: (these were measured before I added hourly drift compensation)
- NTP Request: 70 mA for 10 seconds
- Hourly Wakeup between NTP requests 21 mA for 1 second
- normal ticking: 0.75 mA
Measurements were taken with an INA219 current sensor module attached to a Raspberry PI and graphed using gluplot: