Create your very own bedroom alarm system!
BUILD TIME: 90 minutes | DIFFICULTY RATING: BEGINNER
This is a really fun project to create your very own bedroom alarm system to keep your brother or sister out!
There’s no complex arm and disarm mechanism such as a keypad, just a switch to turn it on and off. But that doesn’t really matter, because the buzzer is loud, and the flashing light is bright, and it’s sure to give any unwanted visitors a bit of a fright!
We’re assuming very little (or zero) electronics knowledge, and so will try to walk through everything carefully, in order to ensure your success. Basic computer skills are assumed (as is access to a computer, with internet connection, to use the software). If you have trouble following any of the software installation steps, then you may like to seek further assistance from a family member or friend. There are a few too many potential challenges for us to detail every possibility here.
We've detailed the project build into as many steps as possible. We recommend that you read all of the steps first before starting, and tick each step off as you go to make sure you don't miss one.
Craft materials & TOOLS Required: |
---|
1 × Computer running Windows, Mac, or Linux with connected A4 Printer |
1 × Bull Nose Pliers |
1 × Pair of Scissors / Artwork Knife |
1 × Glue Stick |
3 × A4 Sheets of Cardboard (Thick) |
1 × Pack Blu-Tack / Tape etc. |
Markers, Pencils or Crayons (if using outlined versions for colouring) |
Electronics PARTS Required: | Jaycar | ||
---|---|---|---|
1 × Arduino UNO or Equivalent | XC4410 | ||
1 × 3W LED Module | XC4468 | ||
1 × Servo Motor | YM2758 | ||
1 × PIR Sensor | XC4444 | ||
1 × Piezo Buzzer | AB3459 | ||
2 × 10kΩ ¼W Resistors* | RR0596 | ||
1 × SPST Tactile Switch | SP0601 |
You will also need a USB cable compatible with your Arduino UNO, which may or may not be supplied with the Arduino UNO itself. Power for the alarm will be from your computer. You could easily swap to a USB power supply once you have completed the project.
You’ll also need a breadboard and prototyping hardware.
* Quantity shown, may be sold in packs.
The first thing to do is to prepare all of the tools, craft items and electronics parts needed, which we've listed in the above parts lists.
Like you see on Masterchef (or most cooking shows), it's good practice to have a large and clean working area. You should also have all of your "ingredients" (in our case the electronics parts) ready on the bench.
You will also need a computer with the software installed to programme the Arduino. We've outlined the software prerequisites below.
SOFTWARE PREREQUISITES
You will need to have an Arduino UNO (or similar), and the Arduino IDE installed on your computer. You can download it for free, from www.arduino.cc/en/Main/Software. Follow the prompts to install it. This is where we will load code, and compile it onto the Arduino.
With your Arduino connected to your computer via USB, go to Tools › Board and ensure Arduino / Genuino UNO is selected, or the appropriate board for what you are using.
Then also select Tools › Port and click on the one that shows USB. The precise wording will depend on your operating system.
In order to load code onto your Arduino, open the Arduino IDE once installed. Go to File › Open and select the file noted at the end of this article.
COLOURING & PREPARATION
You will notice that there are printable parts. These can be printed on any home printer on an A4 sheet. While these are not critically essential, it helps make the builds more fun than simply something without any context.
We have provided coloured, and non-coloured illustrations for the projects. This is to allow you to either add-on the fun of colouring the interactive scene, or simply get on with the interactive portion. The choice is yours.
For the build, you’ll need to bond the backing card and interactive elements to some cardboard. This will help provide structural integrity to the overall project. The paper itself is too flexible and will simply bend. The cardboard should be thick enough to hold itself up, but not so thick you cannot easily cut it with scissors.
The Build:
We have split this build into construction and wiring portions, to better allow you to follow the steps regardless of your knowledge level.
In order to assist with successful wiring of this project, we have explained each wiring step in greater detail than the previous Kid's Basics projects. If this is your first project, you may also like to read Breadboard Basics" in this issue, to familiarise yourself with the breadboard before getting started.
Step 1:
Glue all three printouts onto backing cardboard and leave to dry for a few minutes.
Step 2:
Carefully cut out the security guard, guard dog, dog food, thief, and backing stands along the dotted line.
Step 3:
Mount the guard dog, food, and thief onto the main scene wherever you’d like, we recommend the lower left & right hand side.
Step 4:
On the main scene, cut out the hole indicated by the dotted line inside the safe, and trim away any excess paper. This is for our PIR. The PIR is what senses movement in the room (using body heat).
Step 5:
On the main scene, cut out the hole indicated inside the “security breach” alarm light, and trim away any excess paper. This is for our alarm light.
Step 6:
In the blue section, cut two holes. One is for the servo to go through, and the second is for the wire to poke through, since the servo is mounted on the front.
Step 7:
Connect red (+), black (-), and a coloured (signal) jumper wire to the pins on the PIR module.
Step 8:
Mount the PIR, which mounts from the back side of the card, through the hole in the centre.
Step 9:
Ensure the PIR protrudes through the hole as much as possible and there are no obstructions. Secure it from the back with tape or Blu-Tack.
Step 10:
Connect red (+), black (-), and a coloured (signal) jumper wire to the pins on the LED module.
Step 11:
Next we’ll mount the LED module from the back side of the card, through the hole in the top right. Secure it from the back with tape or Blu-Tack.
Step 12:
Next we’ll mount the servo. It mounts from the front side, since the actuator is on the back side, which will hold our security guard. Push the gear through the hole as far as possible.
Step 13:
Ensure the servo gear head is free from obstructions, and tape or Blu-Tack as neatly as possible since it’s seen on the front.
Step 14:
Make sure the remaining slot is wide enough to feed the servo's cable and plug through.
Step 15:
Slip the cable through the slot until it reaches the hole. Feed as much cable as you can through the hole so there’s minimal visible on the front.
Step 16:
Take your cut-out of the security guard and attach his feet / blue area to the servo horn as shown, with some Blu-Tack or tape. The image should face the flat side of the servo horn. If the backing card is not stiff enough to hold the security guard upright you could tape on a wooden craft stick.
Step 17:
Push the servo horn onto the servo gear head. You may need to adjust the positioning after the code is loaded.
Step 18:
Fold the stands along the dotted lines, and attach to the backing card so it stands upright on its own.
Now you’re ready to start wiring everything together!
Optional Step:
Find a piece of red cellophane or red paint, and put it on top of the security breach light. This will transform the light output from bright white to red.
Wiring:
Step 19:
Take your breadboard and Arduino, and connect a wire from GND on the Arduino to the negative / black (sometimes blue) power rail on the breadboard.
Step 20:
Do the same between 5V on the Arduino and the positive / red power rail on the breadboard as shown.
Step 21:
Take your pushbutton switch and insert it into the breadboard. Make sure the switch goes in like shown here.
Step 22:
Push the piezo buzzer into the breadboard as shown. If your buzzer has a + symbol marked on it, then the + symbol should point to the positive (red) power rail.
Step 23:
Connect a jumper wire from the bottom of the piezo buzzer to pin D9 on the Arduino.
Step 24:
Connect a jumper wire from the top of the piezo buzzer to the black / negative power rail on the breadboard.
Step 25:
Insert the two resistors into the breadboard as shown. They work in both directions, so orientation is not an issue.
Step 26:
Connect a jumper wire from A18 on the push-button switch to beneath the right-hand side resistor (D21).
Step 27:
Connect a jumper wire from A21 on the push-button switch to pin D7 on the Arduino.
Step 28:
On the breadboard, connect a red wire from pin A16 to the positive/ red power rail.
Step 29:
Connect the positive and negative wires from the LED to their appropriate power rails on the breadboard.
Step 30:
Connect the signal wire of the LED to pin D11 of the Arduino. It does not need to connect to the breadboard.
Step 31:
Connect the positive and negative wires from the PIR to their appropriate power rails on the breadboard.
Step 32:
Connect the data pin of the PIR to A13 on the breadboard. Also connect a jumper wire from B13 to pin 10 on the Arduino.
Step 33:
Connect a set of jumper wires to the servo’s socket. Red is positive, brown is negative, orange is signal.
Step 34:
Connect the positive and negative wires from the servo to their appropriate power rails on the breadboard. Connect the signal pin of the Servo directly to pin 8 of the Arduino. It does not go into the breadboard. Check over everything to ensure it all appears to be wired as per the illustrated wiring diagram.
THE CODE
We have provided “kids_basics_bedroom_alarm_1.ino” in the digital resources, on our website. Open this file in your Arduino IDE, and click “Upload”. This will load it into your Arduino UNO. If you receive errors doing so, ensure you followed the board setup steps on the second page under “Software prerequisites”. This will eliminate the majority of issues you may have, if you’re not familiar with the Arduino software.
Note: As soon as you click UPLOAD and the process has finished (only takes a few seconds), your alarm is ready to go!
Press and hold the button to activate. You'll have 15 seconds (and hear slow audible beeps) to exit the room before the alarm triggers!
Once movement is detected, the alarm will trigger the piezo buzzer and light, and the security guard will pop up from behind the scene! If he doesn't, you may have to adjust the servo-horn positioning so he shows and hides appropriately.