Mobile Alarm Security System (The Sound Sleeper)

by katiesternkopf in Circuits > Arduino

227 Views, 1 Favorites, 0 Comments

Mobile Alarm Security System (The Sound Sleeper)

IMG_7029.PNG

The Sound Sleeper is a mobile alarm device meant to provide peace of mind and safety to people who are sleeping on the go. It utilizes a RCWL-0516 motion detection sensor to alert the user of any movement within 5 meters. The alarm system is contained in a box with the sensor, Arduino, battery pack and breadboard inside, and a DC motor, LED lights, button and call bell resting on top. When motion is detected, the DC motor starts spinning and the LEDs flash to both wake up the user and scare off any potential threat. Attached to the end of the motor's shaft is a bent 3D-printed sleeve that extends to the side and hits the bell, creating a ringing sound until motion is no longer detected or until the user presses the button. The button turns the alarm off entirely for the next ten seconds, meaning it remains dormant even if motion is detected within those ten seconds. Once that period has passed, the alarm goes back to its normal operating state in which it does nothing until motion is detected again. The motor is powered by a 6V battery pack inside the box, while the Arduino provides 5 volts of power to the other components and is responsible for all of the computing in the system. The Arduino runs on code programmed in C. The code is essentially a series of if statements that commands different behavior depending on the digital readout of the sensor (1 or 0 corresponding to motion or no motion).

3D Print the Motor Sleeve

Screen Shot 2021-11-22 at 1.23.39 AM.png
Screen Shot 2021-11-22 at 1.23.46 AM.png

The piece that attaches to the DC motor to hit the bell is 3D printed. Attached are images and drawings of the CAD as well as the CAD file itself as a .STEP.

Program the Arduino

Attached is the Arduino file of the code needed. It is written in C using Arduino commands.

Downloads

Mechanical Assembly

Screen Shot 2021-11-22 at 1.18.54 AM.png
Screen Shot 2021-11-22 at 1.19.21 AM.png
  1. First assemble the circuit as described by the circuit diagram below, Figure 1. Note that the LEDs, button, and motor necessitate alligator clips or female-to-female jumper wires to attach to the breadboard so that these components can sit atop the box while the breadboard rests on the bottom. 
  2. Power the Arduino and ensure that the code runs as expected, and then unattach the DC motor, button, and LEDs (the components that sit on top of the box) from the breadboard, but leave their wires in-tact. This will make the assembly process easier. 
  3. Next, cut the six cardboard pieces to size, as shown in Figure 2 below. Reference this figure for the rest of these instructions. Ensure that the side pieces will fit together such that they rest on top of the bottom piece, not around the edges. This is to make sure the top piece will sit on the other pieces sturdily. 
  4. Cut the proper holes in the top piece for the motor, button, and LEDs. Phillips-head screwdrivers and box cutters work well on the material—these were my two cutting tools.  
  5. Cut the specified hole in side 4 to allow for the power cable to extend out of the Arduino. Feed the wire through this hole before proceeding to the next step.
  6. Use Elmer’s Glue to secure side 4 to the bottom piece. Apply pressure for about one minute and then glue sides 1 and 2 onto the assembly. Put glue on each contacting surface and spread it along interior edges of the box using a stick or the tip of the glue bottle. Now let those three pieces sit for a half hour. It is crucial you do not yet assemble the fourth piece so you can easily work around the circuit.
  7. Place your completed circuit onto the base of the box, and make sure everything fits. 
  8. Begin assembling the top piece with the components that attach to it. The DC motor should be a tight slip fit into its mounting hole on the cardboard. Push the motor through the top until the bracket that holds the two wires is above the surface. Then attach the 3D-printed sleeve by simply pushing the short side onto the motor. This should also be a tight slip fit.
  9. Next, glue and/or tape the bell onto the board in the designated position, and snake the wires up through their respective slots so they are through the top of the box. The components that sit atop the box should not be attached to the circuit at this point (so that you can move more freely), but the wires should be in place for when you are ready to attach them. 
  10. Now ensure that the circuit is entirely inside the confines of the box and glue on the final side piece (side 3) using the same method as described earlier.  
  11. If any pieces seem insecure, use masking tape along the interior edges between pieces to strengthen the box. 
  12.  Finally, attach the LEDs, motor, and button to their designated wires and put the top cardboard piece in place, using tape to secure it instead of glue so that the system can be serviced more easily. Plug the Arduino into power, and enjoy your Sound Sleeper!