Backpack Anti-Theft Alarm using Arduino

Backpack Anti Theft Alarm

If you’re a student, like me, then you have heard of all the theft that occurs on campuses today. I can’t even leave my backpack alone for five minutes without worrying about it getting stolen. To ease my mind and to help fellow students, I’ve designed a backpack ant-theft alarm. When activated, this device senses when a backpack is picked up and sounds an alarm to draw attention to the thief. The alarm is perfect for quiet places such as libraries or classrooms where a buzzer would be heard clearly. It is a great project for beginners and experienced electronics hobbyists alike!

Backpack Anti Theft Alarm

The backpack anti-theft alarm is powered by an ATtiny85 and functions using an ultrasonic range sensor (HC-SR04) to calculate distance from the backpack to the ground and a 5V buzzer to produce an alarm. Once the backpack is above a certain distance, the buzzer sounds and does not stop until the device is turned off. To provide the most security, you must enter a 5-bit binary code to turn the device off. This code is made using 5 SPDT switches, (by connecting them in a way that only one combination connects the circuit to ground). If mounted to a backpack correctly, this device can provide excellent security against backpack theft!

Throughout this instructable, you will learn an innovative way of protecting your circuits using binary code, how to interact with the HC-SR04, how to use ATtiny85s, and you’ll have a more secure anti-theft backpack! Let’s get started with our parts list!

Step 1: Get Parts!

You’ll need these parts:

-Project Box (3.34″L x 1.96″W x 0.83″H)

-10K Ohm Resistor

-330 Ohm Resistor

-Green 5mm LED

-HC-SR04

-Two CR2032s

-Coin-cell Battery Holder

-SPDT Slide Switches

-Perfboard

-ATtiny85 (with socket)

-5V Buzzer

-1N4007 Diode

-2N3904 Transistor (NPN general purpose)

-2.54mm Connectors

You’ll need these tools:

-Computer

-Wire Stripper

-Dremel

-Soldering Iron (with rosin)

-Hot Glue Gun (with sticks)

-Multimeter (optional)

-Arduino (for programming ATtiny85)

Step 2: Solder Main Components

Let’s begin by soldering our main components to our perfboard. Before you solder, make sure you map out which holes in your perfboard will line up correctly with the project box. Check that the HC-SR04 and buzzer are positioned correctly so that they will be able to protrude from the enclosure later on.

Now that you have an idea of what goes where, heat up your soldering iron and solder the HC-SR04, coin-cell holder, buzzer, female 2.54mm connector, and 8-pin DIP socket to the perfboard.

When all your major components are soldered in the correct positions on your perfboard, we can start making our 5-bit security switch!

Step 3: Make Security Switch

Backpack Anti Theft Alarm

Our security switch is going to ensure that only the owner of the backpack alarm can turn it off. Using 5 SPDT switches, we can make a single 5-bit security switch which is off only when one combination of 0s and 1s are entered.

To start the switch, use your wire cutter (or metal cutter) to snip any excess metal on your switches (see pictures). Then hot glue each switch to the last. Make sure you hot glue both sides to make a firm bond. Continue these steps until all 5 switches are straightly and strongly bonded together.

To get our security switch working we will have to move on to the next step to wire our switches!

Step 4: Wire Security Switch

To wire the switch requires a little knowledge about SPDT switches. Single Pole Double Throw switches have two positions and connects the center terminal to either the upper or lower terminal. This switch is perfect for our purposes. We can treat the upper terminals as 1, and lower as 0s.

We will use two wires that we can name: GND and OUT. First, connect all the center terminals to OUT. To make the switches code, connect GND to either the upper or lower terminal on each switch and randomly alternate to create a pattern. Each terminal that is left with no connection will be the correct code to turn off our switch. This is because if any switch is not in the correct position, it will connect the circuit. You have to have all 5 switches in the correct position to turn the device off. Finally, connect our GND and OUT wires to a 2.54mm two pin male connector. To protect your switch, use hot glue to hold all loose wires in place.

When your security switch is connected properly, and you have wired your 2.54mm male connector, we can finish soldering the main perfboard.

Read more: Backpack Anti-Theft Alarm using Arduino

Leave a Comment

Your email address will not be published. Required fields are marked *