DIY : Arduino Home Security & Environment Monitoring System
The primary issue that I face is the lack of information regarding my apartment that I have access to when I am not home. Specifically, I live alone in an old apartment with no security system and no way of monitoring the environmental conditions in my room . Consequently, I have no way of knowing whether or not someone has entered my apartment when I am not home. Additionally, I have no way of knowing the room temperature, which often fluctuates drastically due to poor insulation, or the status of any of the other environmental parameters in my apartment.
Anyone who is interested in safeguarding their security and comfort and lives in an old, single apartment with neither a security system nor an indoor environment monitoring system is experiencing this problem. Furthermore, people who live in cold weather environments, such as Michigan, and areas with higher theft rates should be more concerned by these problems as they are more at risk of suffering losses if these problems are not solved.
The problem of home security is extremely important to solve because studies show that homes without a security system are 300% more likely to be burglarized¹ (Alarms.org). Furthermore, property crimes in 2015 resulted in losses estimated at $14.3 billion² (FBI). As someone who often leaves valuable property unattended in my apartment, I am very concerned about protecting myself from property losses.
The problem of not knowing my room temperature, or any of the other physical parameters in my room, is important to solve in order to have a comfortable home environment and lower utility costs through energy savings. To conclude, as Jay Darfler, a senior VP at ADT, told the New York Times, “ ‘You cannot overvalue the sense that comes with peace of mind’ “ ³(NYT). Here, the piece of mind for me is knowing that my apartment is safe and secure when I am far away from home.
Initially, I proposed developing a smart home system comprised of a computer, a micro-controller, and a combination of sensors in order to provide myself with the intelligence necessary to feel comfortable when I am far away from my apartment. The solution I chose was inspired by the research I conducted on the the Raspberry Pi and the Arduino Uno. Specifically, I referenced Andrew K. Dennis’ book Raspberry Pi Home Automation with Arduino and Nikhil Agrawal’s paper Smart Drip Irrigation System using Raspberry Pi and Arduino in deciding to interface a Raspberry Pi with an Arduino.
Ultimately, I broke the information issue into two smaller problems and developed two prototypes. First, I focused on creating an intrusion detection and alert system that sends an email notification when an event is detected (a door being opened)⁴. Second, I focused on developing a system to monitor environmental conditions and display the output on an LCD screen so that I can easily know the room temperature and other variables in my apartment⁵.
The design process for this project was inherently iterative. At the beginning of this course, I had no knowledge of electrical components, micro-controllers, or soldering. In fact, I had never even heard of the Maker Culture. Thus, I based most of my proposal off of class material and resources that I found online. Initially, I proposed creating a single smart home system comprised of a Raspberry Pi and an Arduino Uno. In the end, I created two different prototypes, neither using a Raspberry Pi, that each solved a single aspect of my complex information issue.
I began the design process with sketching what I imagined my final prototype might look like and determining what materials would be necessary to build it.
Through this process, I decided to make two different prototypes: one for security and one for environmental monitoring. My first priority was home security and thus I started with developing an intrusion detection system. Using materials from class, I was able to build a working model using an Arduino Uno and an ultrasonic sensor.
The sensor emits a high frequency sound wave that bounces off of an object (door knob) and can be used to determine the object’s distance from the sensor. If the object’s distance meets a certain threshold, an alarm is triggered. This early triumph led me to believe that the rest of my project was feasible.
Next, I focused on getting the Arduino to send myself an email when the alarm was triggered. Using a Python script with the Arduino connected to my laptop, I was able to accomplish this. However, because I wanted the system to be wireless, I had to purchase a PHPoC Shield in order to connect to the Arduino to the internet.
In order to assemble the Arduino and the breadboard into one fixture that I could mount to my wall, I downloaded a simple 3D model from thingiverse.
After assembling my prototype, it was time to mount it to my wall and test the alarm.
Once I completed the security system, building an environmental monitoring system was very easy as I did not have to learn any new skills. The only new materials I used were an LCD screen and a temperature sensor.
Once I got the LCD screen working, I followed the same steps I performed in building the door alarm in order get the Arduino to collect sensor data and output informative information, 3D print a plate, and solder a switch to a 9V battery holder.
In the end, I built a wireless, email sending door alarm that is mounted next to the point of entry in my apartment in addition to an LCD room temperature display, both of which can be turned on and off. Throughout the course of this project, I learned a a lot about electrical components, soldering, 3D printing, the Arduino Uno, the IoT, and computational thinking.
Computational Thinking Skills
Computational thinking allowed me to understand the complex problem that I was facing, develop possible solutions, and work through problems by breaking them down into simpler, manageable tasks. The first computational thinking skill that I employed during this project was decomposition. I broke down the complex issue I faced, a lack of information about my apartment when I am not home, into two different manageable tasks, each with their own sub-tasks.
In breaking my project into two different prototypes that both used an Arduino to collect data and provide informative output, I was also able to apply pattern recognition and abstraction to my project. Specifically, the door alarm and LCD monitor both require similar materials to build and both require an Arduino to read data from sensors.
In building my door alarm, I developed an algorithm to configure an Arduino to collect sensor data and handle an event based on readings from the sensor. Thus, I was able to apply this algorithm when building my environment monitoring system to collect temperature data.
In reflecting on the process of building my final project, there are many things that I learned as well as several things that I would do differently next time. As I stated earlier, I had limited knowledge at the beginning of the course of concepts and technologies that I decided to use in building my project. Thus, I began my project with learning more about the Arduino and working through online tutorials to build my competencies. Though an iterative design process, I gained hands on experience with electrical components, soldering, 3D printing, and programming an Arduino to collect data from sensors.
If I were to redo my project, I would try to simplify my methods. For example, using an ultrasonic sensor is neither the only nor the simplest way of determining the state of my door. Specifically, a magnetic reed switch can be used to accomplish the same task with much fewer lines of code. While I was ultimately triumphant, I encountered several unforeseen setbacks during the design process. One setback I encountered was the dimension limitations for 3D printing an object in the fabrication studio on North Campus. While using Cura, a 3D printing application, to slice the source code that I had found online for an Arduino and breadboard plate, I discovered that the dimensions for the plate were slightly too large for the tolerances of the printers. Thankfully, a staff member in the fabrication studio was able to help me edit the file and slightly reduce the plate’s dimensions.
Moving forward, my project is extensible and has to potential to include a plurality of sensors to output data to an application that I can view on my iPhone. In conclusion, I thoroughly enjoyed building my final project and learned a tremendous amount along the way.
¹According to the latest FBI Uniform Crime Reporti ng Statistics , property crime rates — including burglary, larceny, and motor vehicle theft — have seen a significant decline in the last few years:. (2015). Retrieved October 16, 2018, from https://www.alarms.org/burglary-statistics/
Ada, L. (2012, July 12). TMP36 Temperature Sensor. Retrieved October 29, 2018, from https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor
Agrawal, N., & Singhal, S. (2015). Smart drip irrigation system using raspberry pi and arduino. International Conference on Computing, Communication & Automation. doi:10.1109/ccaa.2015.7148526
Dennis, A. K. (2013). Raspberry Pi home automation with Arduino: Automate your home with a set of exciting projects for the Raspberry Pi. Birmingham (England): Packt Publ.
⁵S. (2017, August 17). “Hello World!” Retrieved November 5, 2018, from https://www.arduino.cc/en/Tutorial/HelloWorld
Introduction to computational thinking. (n.d.). Retrieved September 15, 2018, from https://www.bbc.com/bitesize/guides/zp92mp3/revision/1
³Kaysen, R. (2017, December 22). Do Security Systems Make Your Home Safer? Retrieved October 27, 2018, from https://www.nytimes.com/2017/12/22/realestate/do-security-systems-make-your-home-safer.html
⁴Monk, S. (2013, February 28). Arduino Lesson 17. Email Sending Movement Detector. Retrieved October 25, 2018, from https://learn.adafruit.com/arduino-lesson-17-email-sending-movement-detector/overview
²FBI. (2016, August 16). Property Crime. Retrieved from https://ucr.fbi.gov/crime-in-the-u.s/2015/crime-in-the-u.s.-2015/offenses-known-to-law-enforcement/property-crime
Thingiverse.com. (2018, February 10). Minimalistic Arduino Plate for UNO and Breadboard by jymdedde. Retrieved November 15, 2018, from https://www.thingiverse.com/thing:2788810