Many of us want to feel safer leaving our homes empty, whether it be during the day or at night. There are roughly 1.65 million home break-ins that happen each year. The Selma Security System was created in order to combat intruders that attempt to break into the homes of others.

What it does

The Selma Security System is first armed using a potentiometer that behaves like a slideswitch. When it is dialed all the way to the left, the system is turned off and the text "System Offline" appears on the LCD display. When it is dialed to the right, the system is the online and the text "System Armed" appears on the LCD display. This is when the IR motion sensor becomes activated, which is tied to a green and a red LED. When no motion is detected, the red LED will be on. When motion is detected in front of the security system, the red LED will then turn off and the green LED will turn on. A piezo alarm will begin ringing and it will prompt the user for a passcode to bypass the security system. The keypad is connected to an RGB LED which will flash red if the user enters the wrong passcode and flash green if the user enters the correct passcode. If the passcode is entered incorrectly 3 times, the system will call the police, which is signified by the RGB LED flashing between red and blue consecutively.

How we built it

The Selma Security System was built using two Arduinos, two breadboards, an IR motion sensor, a potentiometer, a keypad, an LCD display, and a red LED, a green LED, and an RGB LED. The first Arduino is hooked up with the potentiometer, keypad, LCD display and the RGB LED. After mapping the potentiometer to the values "0" and "1," we coded the first Arduino to send a "0" and the "1" as a signal to the second Arduino, which was hooked up to the IR motion sensor, the piezo, and the two LEDs. If the potentiometer was in the "off" position, the LCD display would say "System Offline," and the first Arduino would send a "0" value to the second one. This kept the motion sensor and piezo alarm deactivated, and the red LED would stay lit. If the potentiometer on the first Arduino was on, it would then send a "1" value to the second Arduino, which activates the motion sensor and the piezo alarm, and it displays "System Armed" on the LCD display. If motion is detected, the piezo alarm begins ringing and the green LED turns on as the red LED turns off, which promts the user for a passcode. Using an incorrect passcode counter, the system signifies that it is calling the police if the counter reaches 3, meaning an incorrect passcode was entered 3 times. If the correct passcode is entered, the first Arduino once again sends a "0" to the second Arduino which resets the security system.

Challenges we ran into

There were 3 challenges that we face while creating the Selma Security System. The first problem was creating an arming/disarming mechanism for the security system. We did not have a slide switch to simply turn the system on or off, so we used a potentiometer and mapped the range of 0-1023 (range for the potentiometer's dial) to the values of "0" and "1." The second problem that we encountered was with the LCD display. Prior to this event we had little experience working with one and having outputs display correctly on the screen proved to be challenging. We overcame this problem by looking up simple codes and experimenting with different delays for the user to be able to read it better. The third challenge proved to be the most difficult and it involved communication between two Arduinos. Prior to this event we had some experience with getting Arduinos to communicate however, that was with slide switches which remained in a state, here, we were using a motion detector which changes states more frequently. The problem was the code would "break" when the motion detector detected no motion after the user was prompted for a passcode. Essentially, it would change too quickly. To solve this problem, we looked at documentation regarding serial communication between Arduinos and found that the best solution was to add a delay once the motion detector was set off. This would give ample time for the user to input a passcode.

Accomplishments that we're proud of

We're most proud of the challenges that we've had to overcome in order to get the Selma Security System working, because the problems that we fixed are what makes this security system different from a simple passcode validator. Making two Arduinos communicate with one another allowed us to implement more devices such as the motion sensor and the piezo alarm is what makes this more advanced, which we wouldn't be able to implement on to just one Arduino because the pins are limited.

What we learned

We learned how to display text on an LCD display, including inputted values from a keypad or buttons, and we learned how to use a piezo to output a siren-like sound by changing between frequencies. The most useful thing we learned was how to make multiple Arduinos communicate with each other, because this could open the door to multiple improvements to our system as well as designs for other projects.

What's next for Selma Security System

Improvements could be made upon the Selma Security System, such as the long delay between the motion detection and alarm ringing, as well as additional devices such as a camera that records when the motion sensor detects movement. This would call for additional Arduinos working in tandem.

Built With

Share this project: