I made this project for detecting intruders on the entrance of my room.
Find a quiet and tidy place where you can work comfortably.
- Arduino UNO
- Ultrasonic Sensor (HC-SR04)
- Servo Motor 9g
- Piezo Buzzer (You can add a relay here instead of Piezo buzzer for setting of something.)
- Couple of jumper wires
- Ul Trigger on D3
- Ul Echo on D2
- Servo pin D9
- Buzzer Toggle D4
Don't forget to mount the sensor on top of the servo motor use glue gun or any type of glues for mounting it firmly (I used Glue Gun).
Upload the code to the Arduino board using Arduino IDE, then open processing. Download the code I provided. Don't forget to change the COM port that you use.
Connect the Arduino to your PC open processing run the code you can see the visualised data from the sensor.
If error occurs change the screen resolution in the processing code or change the com port I use Com 3. Fire it and rectify any issues.
Enclose your project into some boxes or jar (use creativity/imagination here). I used an ice cream jar and painted with black glued Arduino and breadboard using hot glue gun to inside of it and connected Arduino with external switch and battery.
If you need help, email me at firstname.lastname@example.org or leave a comment below.