Designing and Crafting Alarm Systems

30-60 min

Ages 8+

What Will You Make?

You will learn to code an alarm that will sound when you press the paperclip to the brass fastener.

Note: This is a project for students who’ve finished the Beginner Level Makey Makey class or makers who already have basic knowledge about Makey Makey. 

You may want to try these projects first:

This project also uses elements from:

What Will You Learn?

You’ll learn to code alarms with the Makey Makey, and be challenged to design your own alarm system. 

Coding an Alarm System- Momentary Switch

Step 1

Grab your paper clip push button switch, and let’s learn how to code it in Scratch!

Step 2

You need to code an alarm that will sound when you press the paperclip to the brass fastener. It isn’t too difficult, but you will need a quick trick to make sure the alarm only sounds when you complete the circuit! 

To trigger your alarm sound, it’s really pretty easy to code! You need an if/else statement nestled into a forever loop that will sound the alarm when the up arrow is pressed. Otherwise, you want the alarm sound to stop. 

Step 3

Since this code is in s forever-loop that reads from the top down, this is how Scratch is running the code:

  • Check to see if up arrow is pressed

  • If yes: play sound until it’s done

  • Go through the loop again

  • If no: (Or if up arrow isn’t pressed anymore) trigger code for else: to stop all sounds

This if/else statement works great for changing costumes, broadcasting messages, etc. However, it is trickier with sound as the code will never get to the else statement while the sound is playing, so if you want to stop the sound as soon as key is not pressed, you’ll have to add another script.

Step 4

You need the reporting block “Not” from the Operator Palette. This code will be under a separate “When Flag Clicked” so that it will always be running and checking to see “if the up arrow is not pressed.

  • Check to see if up arrow is not pressed

  • If it is not pressed, stop all sounds in the project.

Now your code will only be triggered when the circuit is closed. If the two conductive touch points do not touch then the alarm will be silenced!

And that’s really all you need to code for your alarm! You might want to add more effects, so check out this coding video walkthrough of using your momentary push button alarm from the first project in this series. Follow along to code your own Scratch project. Then design your own push-button alarm! 

Brainstorming and Testing Alarm Systems

Design considerations:

  • Your first design consideration is to think about where you want to place your momentary alarm.

  • How will you place two conductive items so that some movement triggers your alarm? 

  • What items will you use in crafting your alarm system? What items work well?

  • How can you ensure the alarm is triggered without bringing the system crashing down? 

In this video below, you can see how you could wire up your momentary push button as a doorbell outside your door. I used a phone with an adapter so I could leave the Makey Makey behind the door. To transform the doorbell into an alarm, I used a wire coat hanger (make sure you sand off coating to expose the metal if you use a coat hanger) hung it above a door and connected the coat hanger to the “Up arrow” on Makey Makey. On the door, I placed a strip of HVAC tape connected to “EARTH” on the Makey Makey. This alarm is triggered when someone opens the door as the coat hanger closes the circuit when it touches the aluminum foil strip. Also, the coat hanger is held with a binder clip to allow for movement! (Make sure to ask your parents before using any thumbtacks or applying tape to walls or doors in your room! )

Coding an Always-on Alarm System- Non-momentary /Toggle Switch

Step 1

Now that you’ve coded a push button alarm, how about coding an alarm that is always set and will blast when someone opens the box that holds your precious goods?

Step 2

Grab your binder clip switch from the first project in this series and let’s learn how to code it really quick! This switch is more like a light switch (which is a toggle switch) it comes on when you flip it and off when you turn the switch to “off.” That means a light switch works by closing a circuit to turn on the light when you flip the switch one way, and turns it off (opens the circuit) when you flip the switch the other way.

Step 3

The coding for this project might look similar to the other alarm, but we need to switch things up a bit! (Get it? Switch???)

With the changes below, you will start a sound by releasing a key press, and stop the sound by pressing the key! 

You can use if/else statements to add interesting visuals to go with your alarm. This code will change the background based on a key press (or not.)

Brainstorming and Testing Always-on Alarm Systems

Design considerations:

You might want to add more effects, so watch this coding video walkthrough of using your non-momentary binder clip switch from the first project in this series. Follow along to code your own Scratch project and view the bonus feature with a real toy box alarm. Then design your own “Always – on alarm.” 

  • Your first design consideration is to think about what you want to protect and what container you will use to create your “toy box alarm!”

  • How will you place two conductive items so that they are always touching unless someone is trying to access what your alarm is protecting?

  • What items will you use in crafting your alarm system? What items will work well and can be secured to a box, lid, etc.?

  • How can you ensure the alarm is set and no one can see the wires or Makey Makey?

We want to see your inventions! Ask your parents to share them with us on social media and we will highlight your inventions in this spot! 

What Is Happening Here?

Switches

When you play the drawing piano you are the EARTH connection that closes the circuit as you press on each drawing to make each piano key sound.

Now let’s learn how to create your own switch that doesn’t require bare skin to complete the circuit.

Vocabulary: A switch is a component that requires a physical action to close a circuit. Just like the keys on your keyboard! A Switch can be momentary or maintained.

Let’s make a momentary switch first. This means the switch will only be “on” as long as the switch is actuated. Normally a switch is an open circuit until it is actuated. Meaning the circuit is open until you push the switch to activate it. Just like a keyboard button, or a calculator button. Did you know that you can draw a momentary switch?

You can also easily make a maintained switch with office supplies. A maintained switch remains on once you turn it on or off once you turn it off. Just like a light switch in your house.

The best way to learn about switches to make a few different types. 

This craft along video will show you four different ways to craft your switches! 

What Is Next?

Try an Advanced Switch

Learn how to create a tilt sensor with everyday household materials and code Scratch cat to move based on your real physical movements! Or combine conductive touch points on a coordinate plane and code pixel art finger paint in Scratch

Makey Makey Classic Inventor's Kit

The original Makey Makey Classic – Named one of Consumer Reports’ “Best Tech Toys of 2014,” “Best of Toy Fair 2014” by Popular Science, and a finalist for Toy of the Year 2016.

Makes STEM Education fun! Start out easy with a banana piano. First setup takes seconds. Then make game controllers, musical instruments, and countless inventions. Advance to additional inputs and multi-key remapping up to 18 keys. Ages 8 to infinity. 

  • Turn everyday objects like bananas into touchpads!

  • Connect the world around you to your computer! Setup takes just seconds.

  • Just plug, clip, and play! No programing knowledge needed. No software to install. Works with Mac and Windows.

  • 1000s of possibilities! Draw your own game controller, sneak a cat selfie, and dance like never before.

  • Ages 8 to infinity.

Visit the Makey Makey website for tons of projects, educator resources, apps and more.

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK