Anti Theft Alarm system using Force sensor and Arduino

Anti Theft Alarm system using Force sensor and Arduino Anti Theft Alarm system using Force sensor and Arduino

Overview:

In this simple and interesting Arduino project you will learn how to make an Anti theft Alarm system by interfacing a simple Force sensor with Arduino and display the values on 16X2 LCD display module. So, first lets learn about the concept and working of the Force sensor and then interface it with Arduino to and program it to work as an anti theft system.

In present situation you cannot trust anyone, people are strengthening their security systems to reduce burglary and theft. The use for safes and lockers had increased with the increase in assets, previously there are manual safes with keys to unlock which were easy to steal and break them without knowing to anyone. But as the technology increased the safes where added with motion sensors, GPS tags so even if someone wants to steal it they are caught easily.

high security systems with technology

Suggested article: Password based solenoid door lock system

The core idea is elegantly simple: you place a valuable object — a laptop, a wallet, a bag, a safe, or any item — on top of a Force Sensor. As long as the object rests on the sensor, it applies a consistent pressure and the system stays quiet. The moment someone lifts or shifts the object, the force reading changes, and an alarm buzzer triggers immediately.

Working of Anti Theft Alarm system using Force sensor and Arduino

In this guide, you’ll learn everything you need to build this system from scratch — the electronics theory behind the FSR, step-by-step wiring, a fully annotated Arduino sketch, calibration techniques, and practical ideas to upgrade the project into something more advanced. You can even make this project IoT based or GSM based by adding notifications when the parameters are triggered. Lets see what are the required components for this project.

Who Should Build This? This project is ideal for engineering students, Arduino hobbyists, and anyone looking for a low-cost personal security solution. No prior electronics experience is required beyond knowing how to upload code to an Arduino.

Required components:

Here are the required components along with Amazon buying links at best prices.
Product NameQuantityamazon logoamazon logo india
Arduino microcontroller1https://amzn.to/3H4cKxZhttps://amzn.to/3638aTS
Force sensor(Force Sensitive Resistor)1https://amzn.to/3JoB2ULhttps://amzn.to/3uqA7i8
10k ohm resistor1https://amzn.to/3hBlqlqhttps://amzn.to/3sXBKmI
16x2 LCD display with I2C adapter1https://amzn.to/3I3Uaaxhttps://amzn.to/363ki7F
Tactile Push button1https://amzn.to/3uc4gRhhttps://amzn.to/3ubrLdc
1k ohm resistor1https://amzn.to/3hBlqlqhttps://amzn.to/3sXBKmI
Buzzer1https://amzn.to/3vAHi8Lhttps://amzn.to/3hQBwaP
Few connecting wireshttps://amzn.to/3H2BV4ehttps://amzn.to/3J0WVu2

Force sensitive Resistor Overview:

Force Sensing Resistor (FSR) — also called a Force Sensitive Resistor — is a passive sensor that changes its electrical resistance in response to physical pressure applied to its surface. Think of it as a smart resistor: the harder you push on it, the lower its resistance drops.

The technology was pioneered by Interlink Electronics since 1985, and the most widely used variants you’ll encounter in maker projects are the FSR-402 (round, ~12mm active area) and FSR-406 (larger rectangular form). In this project, the common 1.75 × 1.5 inch FSR is used, which can comfortably detect weights ranging from 100 grams up to 10 kilograms.

The Physics: How Does an FSR Change Resistance?

An FSR is constructed from two flexible membranes separated by a thin spacer with air gaps. One membrane carries two interdigitated (interlocked) conductive traces, while the opposing membrane is coated with a conductive ink. When no force is applied, the air gap keeps the two surfaces apart and resistance is enormous — greater than 1 MΩ (effectively an open circuit). When you press down, the conductive ink shorts the traces together, and resistance drops dramatically — down to roughly 200–250 Ω at maximum pressure.

force sensor FSR Force sensitive resistor product

The force sensitive resistor uses a polymer sandwiched between two plates with conductive materials suspended in a sort of regular formation. When pressure is applied, the conductive material moves closer together, resulting in less resistance. If the pressure is removed, the ability of the polymeric material to recover from temporary deformation will return the force sensing resistance to its initial state. This results in the rest position being high strength.

The FSR response is not linear — it follows a roughly logarithmic curve. A small initial force causes a dramatic resistance drop, while additional heavy force produces diminishing returns. This makes FSRs excellent for detecting presence vs. absence rather than precise weight measurement.

Related article : RFID based door lock system using Arduino

Reading an FSR with Arduino: The Voltage Divider

Arduino’s analog pins read voltage, not resistance. Since an FSR is just a variable resistor, we must convert the resistance change into a voltage change using a simple voltage divider circuit. A fixed 10kΩ pull-down resistor is placed between the FSR output and GND. As the FSR resistance decreases under load, more voltage appears at the junction — which Arduino reads on analog pin A0 as a value between 0 and 1023 (10-bit ADC).

At rest (no pressure), the FSR resistance is so high (~10 MΩ) that virtually no voltage appears — the reading approaches 0. Under moderate pressure, the reading climbs toward 500–700. Under maximum force, it approaches 1023. This predictable behavior is exactly what we exploit to detect whether an object is present.

Technical specifications:

  • Non-Actuated Resistance: 10M Ohm
  • Actuation Force: 0.1 Newtons
  • Force Sensitivity Range: 0.1-10 Newtons
  • Device Rise Time: <3 microseconds
  • 32 KB Flash Memory
  • 16MHz Clock Speed

Circuit Diagram for Anti-theft alarm system using Force sensor

Connect all the required components according to the below circuit diagram.

Circuit Diagram for Anti-theft alarm system using Force sensor and Arduino

As you can see from the above image force sensor has 2 pins one is for 5V and another is for the analog output, output pin also connected to GND in series with 10K ohm resistor which is used to create voltage divider.

The LCD display with I2C adapter has 4 pin, 2 pins for power supply VCC and GND which are connected to 5V and GND of Arduino and Another 2 pins for I2C communication SDA and SCL which are connected to A4 and A5 respectively.

A tactile Push button is connected to 5V and GND(with 1k ohm resistor) and the signal pin is connected to digital pin 4 of Arduino.

Buzzer has 2 wires one wire is connected to digital pin 6 of Arduino and other is connected to GND pin.

After connecting everything its time to upload the program code.


Build a Force-Sensing Anti-Theft Alarm with PCBWay—Custom PCBs & 3D-Printed Enclosures for Your Arduino Project

Create a discreet, pressure-activated security system that triggers an alarm when weight or force is detected. PCBWay’s integrated manufacturing services help you turn your Arduino force sensor prototype into a polished, reliable theft deterrent device.

Custom PCB Manufacturing for Sensitive Detection:
PCBWay manufactures high-quality custom PCBs that integrate your force sensor interface, Arduino, alarm driver, and battery management onto a single compact board. Their PCBs feature clean analog routing to preserve the force sensor’s millivolt signals, proper shielding to prevent false triggers, and robust power traces for the alarm output. Choose our professional SMT assembly to receive a fully populated, tested board ready for deployment.

Stealthy 3D-Printed Enclosures:
Protect and conceal your security device with a custom enclosure from PCBWay’s advanced 3D printing service. Design a low-profile housing using durable ABS or impact-resistant nylon, featuring sensor activation windows, hidden mounting points, and discreet cable exits. Add secure internal PCB bosses and battery compartments—all printed with precision to ensure reliable operation.

Upload your PCB design and enclosure model for instant quotes, DFM feedback, and professional manufacturing only at PCBWAY.com


Program code:

Connect the Arduino Uno board to the PC where Arduino IDE is installed through USB cable. Choose the correct port and board as Arduino UNO from Tools menu and install the required libraries from the Library manager or download from the below links and extract them in Arduino Libraries folder.

Required Libraries:

  • Download LiquidCrystal_I2C – Link

Next copy the below code and paste it in IDE workspace and press upload button. That’s it the code will be uploaded.

//Arduino project from Circuit Schools www.circuitschools.com
//Force Sensor Anti-Theft Alarm System using Arduino
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // LCD I2C address 0x27
 
int Force_VAL = 0;
int temp = 0;
int btn = 0;
int buzz = 6;
void setup()
{
  pinMode(A0, INPUT);
  pinMode(4, INPUT);
  pinMode(buzz, OUTPUT);
  Serial.begin(9600);
  lcd.init();  
  lcd.setCursor(0,0);
  lcd.print("Force Sensor");
  digitalWrite(buzz, LOW); 
}

void loop()
{
  Force_VAL = analogRead(A0);
  btn = digitalRead(4);
  Serial.println(btn);
  lcd.setCursor(0,1);
  lcd.print("Value:");
  lcd.setCursor(7,1);
  lcd.print(Force_VAL);

 if ((Force_VAL < 550) || (Force_VAL > 650))  //Enter Force Value Range according to the item
 {
    temp=1;
  } 

 if (btn == 1)
 {
    temp=0;
  } 

 if (temp == 1)
 {
    digitalWrite(buzz, HIGH);
  }

 if (temp == 0)
 {
    digitalWrite(buzz, LOW);
  }
  delay(10);
}

After uploading the code place the item on the force sensor and note the force vales range from the LCD display. Now change the Force values range in the code and upload the code again.

force sensor security alarm no item placed


Working of Anti theft Alarm System using Force sensor with Arduino

The logic behind this project is straightforward, which is part of what makes it so reliable. Here’s the complete sequence of operation:

Object Placed on Sensor

The item (bag, laptop, phone, etc.) rests on the FSR. Its weight applies constant pressure, driving the analog reading into a specific range — say 550 to 650 on the ADC scale. The system reads this as “object present.” Buzzer stays OFF.

Object Removed or Disturbed

If a thief lifts the item or slides it off the sensor, the force suddenly changes. The ADC reading drops below 550 or shoots outside the calibrated range, and the Arduino sets a flag (temp = 1). The alarm is triggered.

Buzzer Sounds the Alarm

A digital pin drives the buzzer HIGH, producing a loud, continuous alert. The LCD simultaneously displays live sensor values, giving you visual feedback during setup or debugging.

Reset via Push Button

The authorized user presses the push button (connected to digital pin 4). This pulls the temp flag back to 0, cutting the alarm. The system immediately re-arms itself — no manual reset needed.

force sensor security alarm item status on lcd display

Latching Alarm Design The alarm uses a latching behavior: once triggered, it keeps sounding even if the thief puts the object back. Only pressing the authorized reset button will silence it. This is intentional — it prevents a thief from quickly replacing the item to kill the alarm.

Calibrating the Force Threshold

Getting the threshold range right is the most important step. Too narrow a range and the alarm will false-trigger from vibrations. Too wide and it won’t detect a theft. Follow this calibration process for best results:

Upload and Open Serial Monitor

Upload the code with broad default thresholds (e.g. FORCE_MIN = 0, FORCE_MAX = 1023) so the alarm never triggers during this phase.

Place Your Object on the FSR

Set the item you want to protect on top of the sensor. Watch the Serial Monitor. Note the stable ADC reading — it might be something like 580–620 for a medium-weight phone.

Record the Resting Value Range

Observe for 30 seconds. Note the minimum and maximum values the reading fluctuates between (e.g., 565 to 635). Small fluctuations are normal — the sensor is analog.

Set Thresholds with Buffer

Set FORCE_MIN = (observed_min - 30) and FORCE_MAX = (observed_max + 30). In the example above: FORCE_MIN = 535, FORCE_MAX = 665. This 30-point buffer absorbs normal table vibrations without false alarms.

Test Arming and Theft Scenario

Re-upload with the new values. Verify the buzzer stays silent with the object present, then lift the object — the alarm should sound within ~10ms. Press the button to reset.


Real-World Applications

The applications of an FSR-based anti-theft alarm go well beyond simple object protection. Here are practical use cases you can adapt this project for:

Laptop Protection

Place under a laptop at a café or library. Any lift triggers the alarm.

Bag / Backpack Guard

Embed inside or under a bag on a desk or overhead rack.

Safe & Locker

Mount under a small home safe — alerts if someone moves it.

Key Holder

Protect keys placed on a tray — know instantly if someone takes them.

Retail Anti-Theft

Protect display products from being picked up without authorization.


Upgrades & Enhancements

Once you have the base project working, there are many ways to make it significantly more powerful:

1. Add a Password Reset (Keypad Module)

Replace the simple push button with a 4×4 membrane keypad. Program a 4-digit PIN that must be entered to disarm the alarm. This prevents an intruder from simply pressing a button on the device to kill the alarm.

2. SMS/Email Alert via GSM or Wi-Fi

Integrate an SIM800L GSM module or replace the Arduino UNO with an ESP8266/ESP32 (which has built-in Wi-Fi). When the alarm triggers, the device sends you an SMS or email notification — so you know even when you’re across town.

3. Multi-Sensor Array

The Arduino UNO has 6 analog pins (A0–A5), meaning you can connect up to 6 FSR sensors simultaneously and protect multiple objects. Beyond 6, use an I/O expander module.

4. Camera Trigger

Connect the Arduino’s output to a relay module wired to a security camera’s external trigger input. When the alarm fires, it simultaneously snaps a photo of whoever lifted the object.

5. Battery + Compact PCB

Once you’ve validated the prototype on a breadboard, design a custom PCB using KiCad or EasyEDA and power it from a rechargeable LiPo battery with a TP4056 charging module. This makes the system truly portable and wireless.

Pro Tip: Use a mmWave Radar for Advanced Detection If you want to protect an entire room rather than a single object, consider upgrading to an RD-03 mmWave radar sensor. Unlike PIR sensors, mmWave radar detects human presence even from completely stationary intruders — detecting micro-movements like breathing.

Troubleshooting Tips

  • LCD shows nothing / blank screen: Check if the I²C address matches (0x27 vs 0x3F). Run an I²C scanner sketch. Also ensure the contrast potentiometer on the backpack is adjusted.
  • Alarm triggers immediately even with object placed: Your threshold range is too narrow. Open Serial Monitor, read the actual resting values, and widen your FORCE_MIN / FORCE_MAX window.
  • Alarm doesn’t trigger when object is removed: Your threshold range is too wide. Narrow it toward the actual resting values.
  • False alarms from table vibrations: Add a delay(50) before setting alarmFlag = 1, or require the reading to be out of range for 3 consecutive loops before flagging.
  • Buzzer makes no sound: Confirm it’s an active buzzer (has an internal oscillator — triggered by DC HIGH). A passive buzzer requires a tone() PWM signal instead.
  • Reset button not working: Ensure the button is wired with a pull-down resistor (or use INPUT_PULLUP mode and invert the logic to detect LOW on press).

Conclusion

Building an anti-theft alarm system with a Force Sensing Resistor and Arduino is one of those projects that perfectly balances simplicity with practical usefulness. The physics is intuitive — a change in weight means a change in resistance, which triggers an alarm — yet the end product is a genuinely usable security tool.

You’ve now learned how FSRs work at the component level, how to wire a voltage divider for analog reading, how to write a latching alarm in Arduino C++, and how to calibrate the system for real-world reliability. Whether you’re a student submitting a school project, a maker tinkering on weekends, or someone who genuinely wants to protect valuables at a desk — this project delivers.

From here, the logical next step is to swap the reset button for a 4-digit keypad and add an ESP32 for Wi-Fi alerting. Once you go wireless, you’ve essentially built a functional IoT security device. Happy building.

If you like this project please subscribe to our YouTube Channel “Circuit Schools to encourage us to publish more interesting projects. If you have any doubts write to us from below comment section.

Add a Comment

Leave a Reply

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