Laptop Anti Theft Alarm System

by TechMartian in Circuits > Assistive Tech

3538 Views, 5 Favorites, 0 Comments

Laptop Anti Theft Alarm System

UNADJUSTEDNONRAW_thumb_b6c.jpg
UNADJUSTEDNONRAW_thumb_b6d.jpg

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

IMG_20170827_203009.jpg
IMG_20170827_110228.jpg

* 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

IMG_20170827_110327.jpg
IMG_20170827_110850.jpg

Solder the voltage divider onto the LDR pins itself as shown in the picture above.

Photosensor Wiring

IMG_20170827_144508.jpg
IMG_20170827_144527.jpg
IMG_20170827_144424.jpg

Follow the table below for the connections between the I/Os and the Arduino

I/OI/O pinArduino Pin
Photosensor1A0
Photosensor2GND**
Buzzer*19
Buzzer*2GND**

* Order of pins do not matter for the buzzer

** The Arduino board has at least 3 GND pins

Arm and Disarm Button

IMG_20170827_203306.jpg
IMG_20170827_203323.jpg
IMG_20170827_144403.jpg
IMG_20170827_203255.jpg

Follow the table below for the connections needed for the arm and disarm button circuitry

I/OPin #Arduino Pin #


Switch - Blue 16
Switch - Blue2GND*
Switch - Green VCC 7
Switch - GreenGNDGND*

* There are multiple ground pins on the Arduino board

Code

Screen Shot 2017-08-30 at 7.34.49 PM.png
//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);  }
  }
    
}