📘 Motion Detector
1. Introduction 🌟
This project is a Motion Detector using Arduino. It detects movement using a PIR sensor and gives alert using LED and buzzer. It is useful in security systems.
Ye Arduino ka Motion Detector project hai. Ye PIR sensor se movement detect karta hai aur LED 💡 aur buzzer 🔔 se alert deta hai. Ye security ke liye useful hai.
2. Components 🧠
Arduino: Controls the whole project
PIR Sensor: Detects motion
LED: Shows light signal
Buzzer: Produces sound
Resistor: Controls current
Ohm: Unit of resistance
Arduino: Project ko control karta hai
PIR Sensor: Movement detect karta hai
LED: Light deti hai
Buzzer: Awaaz karta hai
Resistor: Current control karta hai
Ohm: Resistance ki unit
3. Connections 🔌
PIR → 5V, GND, D2
LED → D7 + Resistor → GND
Buzzer → D10 → GND
PIR → 5V, GND, D2
LED → D7 + Resistor → GND
Buzzer → D10 → GND
4. Arduino Code 💻
int pirSensor = 2; // PIR OUT pin D2 pe lagao
int redLED = 7;
int greenLED = 6;
int buzzer = 10;
void setup() {
pinMode(pirSensor, INPUT);
pinMode(redLED, OUTPUT);
pinMode(greenLED, OUTPUT);
pinMode(buzzer, OUTPUT);
Serial.begin(9600);
}
void loop() {
int motion = digitalRead(pirSensor);
Serial.println(motion);
if (motion == HIGH) {
digitalWrite(redLED, HIGH); // Red ON
digitalWrite(greenLED, LOW); // Green OFF
tone(buzzer, 1000); // Buzzer ON
}
else {
digitalWrite(redLED, LOW);
digitalWrite(greenLED, HIGH);
noTone(buzzer); // Buzzer OFF
}
delay(100);
}
5. Working ⚙️
PIR detects motion → sends signal → Arduino turns ON LED & buzzer.
PIR motion detect karta hai → signal bhejta hai → LED aur buzzer ON ho jate hain.
6. Demo ⚡
8. Questions ❓
- What is Arduino?
- What is PIR sensor?
- Why resistor is used?
- What is LED?
- Arduino kya hai?
- PIR sensor kya hai?
- Resistor kyun use hota hai?
- LED kya hoti hai?

Comments
Post a Comment