Ultra Low Power Trigger Sensor Using ESP8266 (Version 2/S)

by MrDIYLab in Circuits > Sensors

600 Views, 1 Favorites, 0 Comments

Ultra Low Power Trigger Sensor Using ESP8266 (Version 2/S)

ulp intro.png

*** UPDATE: Version 3 is out here ****

This is an overview article about version 2.5 of my ultra-low power battery-based door/window sensor. I kept the schematics, design and code but made a change in the components to make it more practical.

New to ESP8266? Watch my Introduction to ESP8266 video.

Watch the Video

My DIY Ultra Low Power Door Sensor Version 2 (UPDATED)

The video walks through the changes from version 2. Feel free to add your questions in the comment section of the YouTube video if you need any futher assistance.

The Components

Get the Mico-Switch

Amazon.com - https://amzn.to/3qcnxSd

Amazon.ca - https://amzn.to/3BRC5bZ

AliExpress - https://s.click.aliexpress.com/e/_ApUPbj


-- LINKS -- (When available, I use affiliate links and may earn a commission)

Changes

ver2S.png

To the left is the original version 2 and on the right is the revised version. I already talked about version 2 in a previous video. So here I will only talk about the changes. And if you haven't seen my version 2 video, I recommend you stop here and watch that one first. So what didn't change: the design, the schematics and the code. This revised version is mainly about the choices I made in the components. Mainly the switch and battery.

The Battery

LIR.png
batteries.png

Let's start with the battery. Originally, I used a coin battery, the LIR2450. It worked great but there was a small limitation. It was part of the sensor design and was built right in the PCB itself. But soon I started experimenting with different variations. So I created a motion sensor and a temperature sensor. The coin battery can be sufficient for doors in low traffic rooms with its limited 100mAh capacity. It definitely became an issue with more demanding sensors like the temperature sensor.

So I thought it would be a good idea to decouple the battery from the sensor. This gives me the flexibility to pair the sensor with the properly sized battery for the application. So instead of housing the battery on the PCB, I simply added connectors for battery. And that is what you see on the side here.

The Switch

reed.png
microswitch.png

The second change I made was the input switch. This switch determines the door status. I originally used a reed switch. Technically it was fully functional and did what it supposed to do. In practice, It wasn't great. Let's start with the housing. It is made out of glass. Very thin glass. This thing broke easily. I don’t even remember how many I destroyed when soldering them to the PCB. The glass shatters the moment you bend the legs.

Second, for the reed switch to work, it needs a magnet to go along with it. And I have to pay attention to the alignment and orientation of that magnet. Another thing I have to worry about is the adhesive. Usually I put the magnet on the door and if it is not fixed properly it can easily fly off if the door slammed by accident.

The new switch I picked fixes those two issues. It is called a micro switch. You might recognize it from 3D printers. Actually, this is where I got the idea. These micro switched are robust and don’t require any extra components. Eliminating the magnet and the issues that come with it. Also since it is part of the sensor, it is fixed the door frame not the door itself.

PCBWay

pcbway.png

A shoutout to PCBWay for sponsoring this article. If you are a hobbyist and in the market for PCBs, I highly encourage you to give them a visit. Get 10 PCBs for $5 USD at https://www.pcbway.com

Conclusion

case.png

I also made a very basic 3d printed case for it. It has a small opening to let micro switch arm stick out. When the door is closed it compresses the arm connecting the signal pin to ground and when it is open it connects it to Vcc. … just like the reed switch. And this is how the sensor looks like installed.

I've had it running for almost a month now. And it looks like this battery should last over a year with the current usage. It is using very few uA-s in stand by.

So that was a quick summary of the revised version 2. And as usual, I will link to the schematics, source code and everything else in the YouTube video description.

If you found this useful, maybe consider visiting my YouTube channel and say hello. I will be posting future updates about this project.