If you've been following along with the Adafruit IO Home Series, you should have already built and wired the house's lighting system.
A PIR sensor will be used to detect motion in front of the home. PIR sensors can detect motion from about twenty feet away.
- Interested in learning more about PIR Sensors? We have a full tutorial with information about these Pyroelectric InfraRed Sensors.
We're going to mount it on the front-face of the home. The PIR sensor used for this guide has a lens with a square base of 23mm x 23mm.
Measure and mark a 24mm x 24mm square on the front face of the home. We'll leave a little bit of room to push the sensor's lens through the home.
Using an X-Acto knife or a box cutter, make small scores on each side of the rectangle, one-by-one, until you have a rectangular hole.
Test-fit the sensor through the hole. The lens should poke through.
Before pushing the PIR sensor through the hole we created, ensure the 3-pin cable is properly connected to the ground, signal, and power pins.
Then, push it through the hole we cut in the cardboard.
Next, we're going to add a door and a sensor to detect when the door is either open or closed. We'll be using a reed switch to accomplish this. These super simple sensors operate on the principle that when a magnet is less than 0.5" away, the reed switch internally closes. We'll detect this change with the Feather HUZZAH and send the value to the Adafruit IO Dashboard's Door Status Indicator.
These switches aren't just for an IO Cardboard Home, they've been used in real-world Adafruit Learning Guides such as the IO Door Detector.
Using a hot glue gun, glue the reed switch to the side of the door-frame.
If you don't have a hot glue gun handy, you can substitute a piece of double-sided tape instead.
Oh no...our house does not have a door. But we can build one out of CARDBOARD!
First, take measurements of the doorframe using a ruler or pair of digital calipers. We measured ours to be 58mm tall and 28.6mm wide, but rounded down for cutting out the door.
Next, grab the closest empty Adafruit/Amazon/DigiKey box (We know you have some around, we do!).
Using a ruler, sketch a door on a this piece of cardboard. Then, cut it out using a pair of scissors or a knife.
We'll want a a way for the door to open and close. To create the door hinge, use a Bamboo skewer and poke it through the corrugated cardboard's fluting.
Test-fit the hinge and make sure the door doesn't catch on the either the sensor or the frame.
Also - make sure the magnet passes the reed switch when it's opened.
To finish off the assembly, we'll use transparent tape to affix the PIR sensor and the top of the door skewer to the front face of the home.
Next, we'll wire up our hardware!
Text editor powered by tinymce.