Laptop Anti Theft Alarm System
by TechMartian in Circuits > Assistive Tech
3612 Views, 5 Favorites, 0 Comments
Laptop Anti Theft Alarm System
This is an anti-theft alarm system that is mounted on the bottom of your laptop to prevent thefts, especially in public places. It uses a hidden photosensor on the bottom of the laptop such that when it receives sufficient light from picking it up while armed, it will ring a loud alarm!
As a university student, stories of laptop thefts are sadly all too common among university students, especially at libraries. It's hard to lug around your belongings with you everytime you have to go to the washroom, especially if you had too much coffee or tea to drink.
Most of us probably left our laptops to be watched by a stranger. But with this anti-theft system, you can leave it on the table and it'll ring an alarm when your laptop is removed from it.
BoM
* Arduino
* Push Buttons
* Photosensor
*
Design Considerations
There are a few ways of going about detecting if a laptop has been removed from it's place.
1. Ultrasonic Distance Sensor
2. Force Plate
3.Photosensor
I chose Option 3 because it is the one with the smallest form factor and will not interfere with daily use of the laptop unlike a Force plate. And the Ultrasonic Sensor would not be able to sense it as accurately as it needs to be mounted externally,
Soldering
Solder the voltage divider onto the LDR pins itself as shown in the picture above.
Photosensor Wiring
Follow the table below for the connections between the I/Os and the Arduino
I/O | I/O pin | Arduino Pin |
---|---|---|
Photosensor | 1 | A0 |
Photosensor | 2 | GND** |
Buzzer* | 1 | 9 |
Buzzer* | 2 | GND** |
* Order of pins do not matter for the buzzer
** The Arduino board has at least 3 GND pins
Arm and Disarm Button
Follow the table below for the connections needed for the arm and disarm button circuitry
I/O | Pin # | Arduino Pin # |
---|---|---|
Switch - Blue | 1 | 6 |
Switch - Blue | 2 | GND* |
Switch - Green | VCC | 7 |
Switch - Green | GND | GND* |
* There are multiple ground pins on the Arduino board
Code
//cosntants for the pins where sensors are plugged into.
const int sensorPin = 0; const int buzzPin = 9;
unsigned long minute1; float time1;
//Set up some global variables for the light level an initial value. int dark; // initial value int lightVal; // light reading
void setup() { // We'll set up the LED pin to be an output. dark = 300; //we will take a single reading from the light sensor and store it in the lightCal //variable. This will give us a prelinary value to compare against in the loop }
void loop() {
lightVal = analogRead(sensorPin); // read the current light levels
//if lightVal is less than our initial reading withing a threshold then it is dark.
while (lightVal > dark) { // still sitting tone (buzzPin, 1000, 100); delay (100); noTone(buzzPin); } }
}