The objective of week #7 was to upgrade week #6 circuit to mimic a buzzer electric circuit and a led equipped with an ultrasonic motion sensor. The circuit is smart and controlled by the human motion and a push button.
I got inspiration from Google as seen in the pics.
I used TinkerCad to build and simulate the electronic circuit. Then, I used the electronic kit to build the actual circuit. For the mounting of the electric components, I used the standard breadboard.
For the specific electric components, here they are:
Ardunio Uno
Ultrasonic Sensor
Push Buttton
Buzzer
Led
The designing process of the circuit
I opened TinkerCad and inserted the breadboard, first.
I connected the Arduino positive (5V) and negative (GND) terminals to the negative and positive lanes of breadboard.
Then, I placed the ultrasonic sensor in the breadboard and connected its positive and negative terminals to the corresponding lanes.
Then, I connected the TRIG terminal to node no. 6
Then, I connected the ECHO terminal to node no. 7
I placed a buzzer in the breadboard, connected the positive terminal to terminal no. 9 and the negative terminal to the second button.
I placed a led in the breadboard, connected the positive terminal to terminal no. 8 and the negative terminal to the third button connected to a 220 ohm resistor.
I placed a push button to control the buzzer (on/off), connected the positive terminal to terminal no. 10 and the negative terminal to the third button connected to a 220 ohm resistor.
I used code blocks to develop the logic of the Ardunio chip.
I matured the code using the text editor.
Input Components:
Ultrasonic Sensor
Push Button
Output Components:
Led
Buzzer
The implementation process:
I selected the components from the electronic kit.
I mounted all components as per the design.
Then, I connected the Arduino to the PC and downloaded the code.
I tested the circuit as in the video attached.
When first uploaded the code, the led in the Arduino board turned off and showed no response.
After investigation with one of my colleagues, through trial and error, we figured out that one of the positive/negative terminals of the breadboard were not functioning properly. Hence, after changing the connections and the common ground, the circuit worked properly.