This is a Motion Sensor Alarm I made. It is super easy to make. The LED flashes, and the buzzer goes off when it detects motion. I will make a raspberry pi version soon, so look out for that one. Note dose not work well in the dark.
All of the materials I used came in this kit. https://www.amazon.com/Elegoo-Project-Starter-Tut...
I give credit to this Instructable https://www.instructables.com/id/SIMPLE-ARDUINO-UL...
I used some of his code and built upon it.
Step 1: Materials
10 Jumper Wires
1 Ultrasonic Sensor
1 Piezo, Speaker, or Buzzer
1 LED (3 or 5 mm)
1 220 resistor
Step 2: The Circuit
1) Connect the ultrasonic sensor to the breadboard.
2) Connect pin GND on the Arduino to ground on the breadboard.
3) Connect pin Vcc on the ultrasonic sensor to 5v on the Arduino.
4) Connect pin Trig on the ultrasonic sensor to pin 10 on the Arduino.
5) Connect pin Echo on the ultrasonic sensor to pin 12 on the Arduino.
6) Connect pin Gnd on the ultrasonic sensor to pin ground on the breadboard.
7) Connect the buzzer to the breadboard.
8) Connect the buzzer to ground on the breadboard.
9) Connect the + pin of the buzzer to pin 8 on the Arduino.
10) Connect LED to the breadboard.
11) Connect the shorter side of the LED to ground on the breadboard.
12) Connect the longer side of the LED to a 220 resistor.
13) Connect the 220 resistor to pin 9 on the Arduino.
Step 3: The Code
1) just add the code file form to top to the Arduino.
2) Test it out. Run your hand in front of the sensor. See the LED flash and hear the buzzer buzz. Send a comment if you have trouble.
resmitatil made it!