My idea for this week is to make an alarm using ultrasonic and buzzer with Arduino and LED
It can be used to protect against theft, warn of someone approaching your home late at night, or protect your backyard or garage.
Arduino is the brain in this project, of course, it receives the distance from the ultrasonic, which we will determine the safe distance that we want, and then compares whether the distance that it receives is safe, and this means that no one is near you or unsafe, and this means that then a person or something approached the area prohibited, so it sends a signal to the buzzer to emit successive sounds such as the siren of police vehicles as an audio warning, and this may scare the thief or wake you up and alert you. There is also a led that lights up in red as a visual warning
To Design the Circuit
Screen Recording
Ultrasonic Sensor
Wires
Arduino UNO
220 Ohm Resistance
Small Breadboard
Red Led
Buzzer
Here I have included the Components that I mentioned above
1- The Arduino and the breadboard to connect the components on
2- The ultrasonic to sense the distance, and I connected the trigger and the echo between 9 and 10 respectively.
3- The buzzer, which is the sound alert on the pin 11, and it will take a high signal from the Arduino if there is an intruder
4- The lamp, which is the visual alert, I connected it to Pin No. 5, and it will also take a high signal if there is an intruder
Here in the blocks of the code
I told him to calculate the distance that returns from the trigger and the echo receives it, and check if it is smaller than 10 cm. turns on the buzzer and the LED to alert, But if it is greater than 10 cm, it turns off the both
Here I converted the block code to text code and to upload it to arduino
In the video here, I connected the ultrasonic, the buzzer, and the LED with wires on the breadboard and Arduino, just as I did in Tinkercad.
Then I converted the block code to the text code and put it in the IDE application and uploaded it to the Arduino
I brought a ruler to ensure the accuracy of the ultrasonic measurement of the forbidden distance (10 cm)
This week, the problem was in the activity that we did in the lab, which is a hand waving through the servo motor
There was difficulty fixing the hand with the servo motor because the servo fan is somewhat small, but at the end I inserted the fan between the two layers of the cardboard and it did not fall
But I advise you not to try to do that. I installed it with wooden sticks better
We learned this week how to use the ultrasonic sensor with a servo motor to make a waving hand
my partner for this week was Hend Atef
Manual Waving Hand with potentiometer
Automatic Waving Hand With ultrasonic sensor