I’m calling it MotionMote because it detects motion and because pretty much every type of wireless sensor or Moteino node name ends in “mote“. The possibilities for home security are endless, put this little guy in a corner near a door or on top of a cabinet somewhere and detect them intrudaz! Did I say there’s no wires?
Read on for details and source code and case design.
Nothing very complicated about it. I waited to post about it since I didn’t have any casing and I thought it would be nice to enclose it in a nice white acrylic case. I laser-cut a few at Techshop-Detroit using MakerCase. The inside case dimensions are: 59mm long, 29mm wide, 33mm deep, the PIR sensor diameter is 22.5mm. The tab size is maximum (5mm) and material thickness 3mm (1/8″). All other MakerCase settings are default. The laser cutter settings are speed:20, power:90, freq:5000. I started out with wood because there’s always plenty of scraps around and easy to find the right dimensions, then moved to acrylic:
The schematic/wiring is trivial. The PIR sensor has 3 pins – GND, VIN, and OUT. It can take anywhere from 5V to 9V or even more. I used a 9V battery since it’s pretty compact. Later I want to try using lipos with a Moteino shield I am working on, more about it in another post. The OUT pin goes high for a specific length of time when motion is detected (adjustable by side pot, I turned mine to minimum to limit LED power consumption). The sensitivity is also adjustable by another small side pot. The wonderful thing is that this PIR sensor is very cheap (commonly found on ebay for a few bucks) and uses about 60uA when idle and about 200uA when active! Coupled with a low power LED for visual indication the overall power consumption is very low. Of course the Moteino and everything on it has to be put to sleep. The OUT pin is connected to a low power 2mA red LED and to the hardware interrupt INT1 (digital pin D3 of Moteino). This way the sketch sleeps indefinitely, and when motion is detected the LED lights up and Moteino wakes up and quickly sends an ACK-ed “MOTION” alert message.
I made a small 3mm partial hole on the inside of the top plate, just below the PIR sensor cutout. I hot glued the LED in that little hole. So it gives a nice diffused glow when there’s motion. The PIR sensor is also hot glued on top of the Moteino so it would not move too much. I used clear tape to keep the case together and it works just fine. I also tried Weld-On acrylic solvent cement on another case and as it cures the tabs are obscured (acrylic melts from solvent and fills the gaps). Either way works well and I think I just prefer the tape since it’s very accessible.
The sensor is quite sensitive and sensitivity is adjustable. I believe there might be a threshold where pets and small animals can be ignored but I don’t have pets so I don’t care.
The low power Moteino sketch along with case plans are up on Github. If there’s interest I might offer this as a kit that includes the case, low power LED and PIR sensor.