Close

Prototyping stage one.

A project log for Garage Door Left Open Detector

A simple device to notify me when I leave my garage door open.

thinklearndoThinkLearnDo 02/10/2021 at 00:390 Comments

I've gotten to the age where I'm forgetting things more often. And one thing that I kept forgetting was to close the garage door. This project was an attempt to make something that would remind me to close the garage door.

While trying to solve the problem, I had a simple idea. By using a ball tilt switch, ie poor mans accelerometer, I could detect what orientation the garage door was in. Then by using a nodemcu I could periodically check the state of the tilt switch and then send a message to myself if it was in the wrong position.

Writing the nodemcu code was simple enough. I set a pin to input pullup, and then every minute I would check its state. If the value read low, it meant the switch was closed and that the garage door was also closed. If the value read high, it was open.

My first test seemed to go well enough. You can see here my program thinks the door is closed.

Then with the tilt switch in a upside down orientation, it detects the door open.

On the other side, I just had a simple nodejs server running to receive the alert.

The next part I needed to figure out was power. I was planning on just hooking it up to some AA batteries but from previous projects I'd done with nodemcu's, the idle current from the nodemcu would be too high. I checked it by putting the nodemcu into deep sleep and measuring the current draw.

And I was right. Even in deep sleep its drawing ~9ma, AA batteries won't last long at that draw.

Discussions