Inspiration
This project was inspired by the number of expensive home security products with very little to offer in portability. I'm a student at the University of Waterloo and with our co-op program I move to new and unfamiliar places domestically and abroad every 4 months. Having a device that I could carry with me and place in a dorm room or a hotel room where I was staying passed my mind many times but I could never come up with a good solution. Existing products on the market were either too bulky, too expensive or required 120V line feeds. I wanted to build a device that was small and would cost under $50 in components making it affordable as well.
What it does
After setting out my goal I quickly began selecting components from parts I already had. I wanted the device to be able to detect intruders in a relatively sized area like an apartment living room or a dorm room (places where I usually live). I wanted the device to be small and battery operated so that it would be portable to carry with me.
In the end, this is almost the exact device I created. It connects to a local Wi-Fi network and makes itself a server. Other devices (like my phone or computer) would be the clients which request information from the server. I equipped the device with a door sensor (reed switch), motion sensor (passive infrared or PIR) and a 2 megapixel camera module. It also has some bells and whistles like a temperature sensor and a buzzer (alarm).
Essentially, the device is armed and then placed at the edge of a door. The two piece design (one magnet for the reed switch and then the rest of the device) is stuck with adhesive onto the frame to detect the door opening. A motion sensor scans the room for any motion. If the doors opens or motion occurs while the device is armed, the device sends an MMS and E-Mail to the user notifying of commotion in the living space and with a 640x480 sized image.
How I built it
After selecting the individual electronics components I wanted to design a professional looking enclosure to house all the components. I didn't want wires hanging off of a bread board with sensors dangling all over the place; I wanted to make something that could be put on a store shelf (or Kickstarter!).
The main component of my device is an ESP8266 Wi-Fi microcontroller which retails for approximately $10 in breakout form. This would definitely help me in my quest for creating an affordable portable security device.
I designed the enclosure in SolidWorks and then 3D printed it on a Formlabs Form 2 SLA printer. I then finished the enclosure off by spray painting it.
Next I started to prototype the electronics on a breadboard to figure out any circuit design that I would need. In the end, I avoided all of the transistor based logic gates I was building by employing features that were available on the ESP8266 microcontroller.
I programmed the ESP8266 through the Arduino IDE and had to do a lot of low level firmware-like development to get all of the sensors interfacing together (especially the camera module).
Challenges I ran into
As I said above, I had to figure out some register patterns and entries to properly trigger the camera module. There were existing libraries available but the ones I found produced corrupted images. Much of my time was spent troubleshooting issues with the camera module but in the end I got it working to my need.
I also underestimated the fact that I didn't have any partners with me to split the workload. I designed, built, soldered and programmed the device on my own.
Since this was an IoT (internet of things) project I decided to use a popular framework Node-RED which is an abstraction layer on top of node.js. It was very useful in quickly getting a back end going for my project.
Accomplishments that I'm proud of
I am very proud on the amount of work I accomplished this weekend. I didn't think I had it in me to complete the whole device but I did and that in itself is a big accomplishment for me. Maybe I'll do Hackathons by myself every weekend.
I also learned to use the microcontrollers "deep sleep" option effectively to make the device up time around 14 days based on normal usage.
What I learned
However, I learned that having a good group would have definitely benefited me and I will make sure to create them in the future.
What's next for PortaSecure
I really wanted to do some image processing on my images to detect a person in the frame but I ran out of time for this feature. Maybe it'll show up in a potential Kickstarter campaign :)
Log in or sign up for Devpost to join the conversation.