Solar Powered Door Sensor

by rfiorenza80 in Circuits > Sensors

756 Views, 7 Favorites, 0 Comments

Solar Powered Door Sensor

IMG_20210714_164748.jpg

I had created this solar powered door sensor in order to ensure that the door on my Garden was kept close. My fear was that one of the kids or myself would leave the door open overnight, allowing animals to get into the garden and allow them to eat my plants. I had used a door sensor in the past with batteries but the batteries would drain rather fast due to the fluctuation in temperature and the power required for the sensor to be polled by SmartThings.

Supplies

  1. Z-Wave or Z-Wave Plus Door Sensor (I used a Monoprice Z-Wave Plus sensor) (https://bit.ly/3BUengy)
  2. Adafruit USB/DC/Solar Lithium Ion/Polymer Charger (https://amzn.to/3fbfLBP)
  3. Lithium Ion Polymer Battery 3.7v 1200mAh (https://amzn.to/3iZAv0l)
  4. 6v 2w Mini Solar Panel (https://amzn.to/3fawJQO)
  5. Solar Panel Mounting Bracket (https://amzn.to/3zOp2r9)
  6. Contact Magnetic Reed Switch (e.g. https://amzn.to/3zQ1pyx)
  7. Male Barrel Connector (e.g. https://amzn.to/3zMksd5)
  8. Waterproof Junction Box (https://amzn.to/2Vf0Yie)
  9. PG 7 Cable Glands (qty 2)
  10. 2 Wire Wago Wire Connectors (qty 4) (you can use other types of connectors, I found these to be the easiest to use in order to pass wires through the glands)

Setting Up the Z-Wave Door Sensor

IMG_20210611_115638.jpg
IMG_20210611_115609.jpg
IMG_20210611_115732.jpg

1 - First step is to disassemble your z-wave door sensor. For the Monoprice one that I had linked, it was a matter of opening the back, using a small slotted screwdriver, pry the shell off in order to expose the board and to remove the screws holding the board in place.

2 - Once done, I took about a 6 inch 18 gauge wire (white in the picture and soldered it to both sides of the black bar. This is the magnetic sensor to tell if the door is open or closed. Though after doing this, I suggest giving yourself a longer piece of wire to make it easier to hook up the external magnetic sensor.

3 - Then making 2 holes in the inner portion of the housing as seen in the second picture, I passed the wires that came with the Adafruit charger through the housing. I unsoldered the battery points from the z-wave sensor and replaced it with the wire that came with the Adafruit Charger. Ensuring that the red wire was soldered to the B+ terminal and the black was soldered to B- terminal.

4 - At this point drill a hole in the outer portion of the housing so you can pass the sensor wire through the house and put everything back together. It should look similar to the third picture.

Assembly of the Electronics

IMG_20210611_122825.jpg
IMG_20210611_122956.jpg
IMG_20210714_164806.jpg

1 - Before actually putting all the electronics into the junction box, I tested everything on my desk. I connected the battery and sensor into the Adafruit Charger. The battery will go into the bottom left side and the sensor will go into the bottom right as shown in the first picture for this step.

2 - In order to connect the solar panel, I first had to cut the end off of it as it wouldn't work with the charger. I then stripped the wire back and then used the barrel connector and 2 of the Wago wire connectors ensure I connected positive to positive and negative to negative.

3 - I then stuck the panel against my office window and the charge light started glowing on the Adafruit charger.

4 - I proceeded to pair the sensor to SmartThings and tested it using the magnetic bar that came with the sensor to ensure everything was working.

5 - Then using a step bit, I drilled out 2 holes in the bottom of the project box large enough to accept the PG 7 glands.

6 - Lastly I end up designing and 3d printing a board that I could mount everything to in the box. You could also hot glue everything in place.

You can see in the 3rd pic you can see what everything looked like installed in the box.

Installation

IMG_20210714_164800.jpg

1 - I went out to my garden and installed the solar panel on the door using the solar panel's bracket which I opted to bend to give me better angle with the sun.

2 - I connected the wired part of the reed switch to the frame of the door and the magnet to the door itself, as shown on the picture included with this step.

3 - I passed the wires for the reed switch into one of the glands and the solar panel into another.

4 - Using the wago connectors I connected all the wires, closed the box and this project was done.

NOTE: If your reed switch has 3 wires, you want to use the Normal Open wires. This way when the magnet is aligned with the reed switch, it closes the circuit and SmartThings or whichever home automation hub you are using detects the door as closed.

Conclussion

This setup has ensured that the battery never runs out for this sensor. You can go further with this setup by adding rules to the sensor to notify you if the door is left open.

This is my first Instructable and I hope people like it. If there is any additional information you need, please let me know. Thanks for reading.