It's been a long time since my last post but I thought I would write up about my latest project - a door/window sensor using an ESP 8266.
I've bought a few door sensors in the past from Tuya and a Hive one (load of rubbish) but I came across a brilliant YouTube video from a gent called MakerMeik who used a logic toggle circuit to wake up the ESP from sleep mode when a reed switch is opened or closed (https://youtu.be/vxbuO1zWo3w).
Using the two XOR logic gates alowed both the door open and door closed to wake up the ESP by toggling the Enable pin whilst also passing the reed switch state to the ESP to publish.
Mike used the ESP to connect to the router via DHCP (or fixed IP) which took a few seconds to establish before then logging onto your MQTT server and publishing the door status.
So I downloaded Kicad and gave it a try, I had tried Kicad a few years ago and was a bit disappointed but the latest version was streets ahead of what I remembered and I soon had a PCB ready to send off for fabrication.
Having finished this version of the sensor I've been investigating ways to increase the battery life and reducing the overall size.
- Smaller size
- Longer battery life and/or smaller battery
- Add voltage divider to monitor actual battery voltage
- Have a dual supply solution to use 1.5V AA cell with booster or single 3.6V Lipo cell without booster
- Learn about ESP-NOW