Smart Motion Detector With sound and Light
Share
Function
The Motion Detector acts like a digital watchman. It sends out invisible sound waves to measure distance in real-time. We have programmed the logic to focus on a 50 cm radius.
-
Scanning: The sensor constantly calculates the distance of objects in front of it.
-
Decision Making: The code checks if the distance is less than 50 cm.
-
Reaction:
-
If an object is closer than 50 cm, the Arduino activates the Intruder Alarm (Red Light + Sound).
-
If the area is clear (distance > 50 cm), it maintains the All-Clear signal (Green Light).
-
Components
To build this Smart Motion Detector With sound and Light, we used the following parts from the Plzpapa Basic Robotic Kit:
- Arduino Uno
- BreadBoard
- Ultrasonic Sensor
- Buzzer (For Sound)
- 1 Green LED
- 1 Red LED
- 2 Resistor Blue (220 Ohm) (LED ke liye)
- Jumper Wires
Wiring (Taarein Jorna)
1. BreadBoard:
- + Connect with GND
2. Ultrasonic Sensor
-
VCC: Arduino 5V pin par.
-
GND: BreadBoard +.
-
Trig: Arduino Pin 9 par.
-
Echo: Arduino Pin 10 par.
3.Red LED Connections:
-
Bari Taang (+): Arduino Pin 2 par.
-
Choti Taang (-): Resistor laga kar BreadBoard +.
4.Green LED (Mehfooz/No Motion) Connections
-
Bari Taang (+): Arduino Pin 3 par.
-
Choti Taang (-): Resistor laga kar BreadBoard +.
5 .Buzzer Connections
-
Bari Taang (+): Arduino Pin 4 par.
- Choti Taang (-): BreadBoard +.
Code