Manish Kumar Yadav
Published

ATM Security System

The system detects the presence of anyone inside the ATM room and then it closes the door and raises the alarm.

IntermediateFull instructions provided5 hours415
ATM Security System

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DHT11 Temperature & Humidity Sensor (3 pins)
DHT11 Temperature & Humidity Sensor (3 pins)
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Buzzer
Buzzer
×1
LED (generic)
LED (generic)
×1
Grove - Vibration Sensor (SW-420)
Seeed Studio Grove - Vibration Sensor (SW-420)
×1
IR Range Sensor
Digilent IR Range Sensor
×1
9V battery (generic)
9V battery (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

ATM security system

Arduino
#include <dht11.h>
#include<Servo.h>
#define DHT11PIN 4
Servo myservo;
int test_led = 11;

int vibration_sensor =10;

int buzzer_pin = 9;
int pirSensor = 8;
dht11 DHT11;

void setup() {
pinMode(test_led,OUTPUT);
pinMode(pirSensor, INPUT);
pinMode(buzzer_pin, OUTPUT);
pinMode(vibration_sensor,INPUT);
myservo.attach(6);
Serial.begin(9600);

}

int dht_data()
{
Serial.println();

int chk = DHT11.read(DHT11PIN);

Serial.print("Humidity (%): ");
Serial.println((float)DHT11.humidity, 2);

Serial.print("Temperature (C): ");
Serial.println((float)DHT11.temperature, 2);

delay(100);

}

void loop()
{
int sensorValue = digitalRead(pirSensor);
Serial.print("Sensor value:");
Serial.println(sensorValue);
int vibrationValue = digitalRead(vibration_sensor);
Serial.print("Vibrator Value:");
Serial.println(vibrationValue);
// Serial.print("chapri ayush 1");

// Serial.print("chapri ayush 2");
if( sensorValue==1 && vibrationValue==0 )
{
dht_data();
Serial.println("NO Motion detcted\n");
digitalWrite(buzzer_pin,LOW);
digitalWrite(test_led,LOW);
// myservo.write(0);
delay(100);
Serial.println("Motor is stop\n");
delay(100);

}
else if( sensorValue==0 || vibrationValue==1 )
{
dht_data();
Serial.println("Motion detcted \n"); // for motion detect
digitalWrite(buzzer_pin,HIGH); // for buzzer
digitalWrite(test_led,HIGH);
myservo.write(200);
delay(100);
Serial.println("Motor is running\n");
delay(100);

}
}

Credits

Manish Kumar Yadav
11 projects • 17 followers
Highly skilled Electronics and Communication Engineer, adept Programmer, and creative PCB Designer.
Contact

Comments

Please log in or sign up to comment.