Contact me
the inspiration for my assignment is very simple it's about making
a motion detection system
when detecting motion the alert starts to activate
both buzzer and red led light
I choose it so no one enters my room or come near my laptop when I'm sleeping
not practical , but privacy is privacy😡
I used tinkercad for simulating the circuit
and build the code blocks
Title of Media
and arduino IDE
to upload the code to my arduino
Electronic components
Buzzer
LED
Ultrasonic sensor
resistor 220 ohm
jumpers
breadboard
Arduino uno R3
input : the ultrasonic sensor takes the distance as the input
actions :
the blinking led
the baabing buzzer
Buzzer
LED
Ultrasonic sensor
Title of Media
the design starts with thinking about the purpose of the system
I need it to make an obvious signal
so I need the busser and the led to make pulses
so, I need to connect it with arduino to control it
first open tinker cad and get the arduino and breadboard and conect the 5v and ground
then we get our components
220 ohm resistor
1 red led
1 buzzer
an ultrasonic sensor
and put them on the bread board reasonably
then connect our components to the arduino
the code goes for 2 things
the if condition for the buzzer and the if
it takes input from the ultrasonic sensor as it reads the distance
then it compares the condition if the body is closer than 20cm
it activates the buzzer
the second condition reads the same
but it have a different output which is blinking the led
so it can have a sound and visual alarm
here is the simulation
after doing the simulation
I started the wiring as the simulation
the line on the right has the VCC and Ground
connected the ground and the vcc of the ultrasonic sensor
and the pins to the arduino
resistor from the ground to the cathode of the led
and connect the anode to the arduino pin
same for the buzzer connected it directly to the ground and the positive to the arduino
then copied the code into arduino IDE
and uploaded the code to the arduino
and voilà it worked
Title of Media
and this is the fianla outcome in work
Title of Media
I got stuck at first because the lm35 sensor in real life wasn't reading anything but -49
at first I wanted the project to be fire indicator .
I connected it wrongly which resulted in its malfunction
then to make sure I tested it with a multimeter.
but I learned how to test this sensor using the multimeter from the video
and discovered it was malfunctioning.
but ,you know plans change
so I decided to make it as motion detector
it will help me as use more than one input and output
it made me understand the dynamics between both of them ,and how to use it
mastering the ultrasonic usage and linking between the inputs and outputs
brief about input/output
Title of Media