Monday, November 16, 2015

How to make Motion Security System With Arduino - Robomart

The project with the motion-sensitive sensor -based security system will do our Arduino. In  many ways, the security detection algorithms. What will our security system with sensors with Arduino are sensitive to the movement of the project . The system detects motion alarm circuit will inform us of entering.

 Step 1: Required ​Materials: 
  • Buzzer
  • Arduino
  • Led
  • PIR Motion Sensor 


    





Step 2: Diagram of Electronic Circuit:
Step 3: Description
After uploading the software our alarm system is ready.
Note :  While passive 'HIGH' case, while active 'LOW' What happens in case when Project actively used for buzzer. You are the exact opposite to be passive buzzer, the software in the 'HIGH' and 'LOW' to change the situation.
More information and arduino code


Arduino Software:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38





//Software development by Robomart
// Software license by Robomart
int inputPin = 2;
int pirState = LOW;
int val = 0;
int buzzerpin = 10;
int led = 13;
void setup() {
pinMode(inputPin, INPUT);
pinMode(buzzerpin, OUTPUT);
pinMode(led, OUTPUT);
Serial.begin(19200);
}

void loop(){
val = digitalRead(inputPin);
if (val == HIGH) {
beep(500);
digitalWrite(led, HIGH);
delay(500);

if (pirState == LOW) {

Serial.println("Hareket Algilandi!");

pirState = HIGH;
}
} else {
digitalWrite(buzzerpin, HIGH);
digitalWrite(led, LOW);
delay(150);
if (pirState == HIGH){
Serial.println("Hareket Algilanmadi!");

pirState = LOW;
}
}
}
void beep(unsigned char delayms){
analogWrite(10, 255);
delay(delayms);
analogWrite(10, 150);
delay(delayms);

}

 After the wiring and installing our software we have completed our alarm system.

No comments:

Post a Comment