This is a simple alarm system made with help of buzzer, LED and an Ultrasonic sensor also known as Proximity/Distance Sensor (HC-SR04). One can stop the buzzer by pressing the button.
Steps:- Connect the +5V and GND of Arduino UNO to the breadboard.
- For LED: Connect the cathode (Shorter pin of LED) to ground and the Anode (longer pin of LED) with a 330 or 220 ohm resistor. Connect the second pin of resistor with pin 6 of the Arduino as shows in schematics.
- For Buzzer: Connect the Positive terminal with pin 8 of Arduino and negative terminal to GND.
- For Ultrasonic Sensor: Connect the VCC and GND . Connect the Trigger pin to pin 12 and Echo pin to pin 13 of Arduino.
The setup is now ready. Now load the code in Arduino IDE and then Upload it to Arduino. Check the Serial Monitor readings.
Tip: You can fix this alarm near the door. The maximum distance measured by it 4 meters. So modify the code accordingly and keep it such that if anyone comes within 2 meters of the door, the buzzer should ring!
Comments
Please log in or sign up to comment.