Battery powered door and window sensor with ultra low standby power. Arduino, ESP-12, Reed switch, ATtiny, LDO
Changes v0.3:
A Ultra Low Standby Power Project which pushes the state of a connected switch(reed/magnet or any other) every time it changes to one of 4 different services(you need to chooose and configure one).
Available(ready to use) services right now (can be easily expanded):
/3/4/5/6/7
The standby current consumption is about 330nA(Nanoampere) @3.8V.
The biggest current sucker in standby is the ATtiny in power-down sleep mode (~300nA).
Beside a few other tricks I’ve had to come up with to get the current consumption really that low, a in some of my usecases important one is to use a changover/SPDT (3pin) wakeup switch(the one with 3 pins). Using one of these I can get rid of the pullup resistor that is otherwise needed when using a normal (2pin) switch. This means that the current consumption is in both states(door/window is open AND door/window is closed) equaly low.
The ATtiny wakes up from power-down through a pin change interrupt triggered by opening or closing the window/door(pressing or releasing the switch). The ATtiny activates the LDO and therefore the ESP-12. The ESP connects to the wifi, optionaly collects some data(wifi signal strength, temperature, battery voltage), reads the state of the (wakeup) switch and sends it along with the other colleted data to the choosen service. After that the ESP signals the ATtiny to shutdown the LDO and the system goes into standby, waiting for the next pc interrupt.
Only two files must be edited.
Using one of my own Breakout Adapters:
I’ve also designed a small pcb for this project: (More about the pcb in the near futre.)
Services