Automatic Car Gate
I choose to Build smart circuit for automatic car gate, which open the car gate when the car approaches the gate to control the entrance from strangers
Using an Arduino UNO which reads a signal from an input component (Sensor) to control an action component (Motor, Buzzer, LED)
Using thinker CAD to build and simulate the circuit
Using Arduino IED install coding to arduino board
Electronics I used in the Assignment
breadboard
ultrasonic sensor
arduino UNO
servo motor
buzzer
jumper wires
LED light
1st step building Circuit on Thinker CAD
Components Kit
input Devices : ultrasonic sensor
Output Devices : Lamp LED red _ Servo Motors _buzzer
brain : the Arduino UNO board
Power Management : from the Arduino
Building My Circuit on Thinker CAD
Connect ground and power (5v) from Arduino to breadboard
2. install Ultrasonic sensor ground and power (5v) from breadboard and connect (ECHO) to pin 6 and (TRIG) to pin 7 on Arduino board
3. install Servo motor to ground and power (5v) from breadboard and connect (signal) to pin 9 on Arduino board
4. install red LED to resistor 220 Ω then to ground and power to pin 8 on Arduino board
5. install RGP LED to resistor 220 Ω then to ground and green power to pin 2 on Arduino board
6. install BUZZER to ground on bread board and power to pin 3 on Arduino board
Start coding Arduino on Thinker CAD using blocks
OUTPUT : using print to serial monitor
2. INPUT : using read ultrasonic distance sensor and choose 7 for TRIGGER and 6 for ECHO
I want my device actions depends on ultrasonic distance sensor
3 . CONTROL : using a function IF ELSE
I want my device make 2 different actions
4 . MATH : using read ultrasonic distance sensor less than or equal to 10 cm
when a car get near 10 cm I want Ultra sensor read signal
5 . OUTPUT : using ( set pin to high/low ) for LED light ( put red light on pin 8 / put RGB light on pin 2 )
when a car get near 10 cm I want
open "RED light"
6 . OUTPUT : using ( rotate servo to degree ) for servo motor ( put on pin 9 ) and put 30 degree
when a car get near 10 cm I want
I want to rotate servo motor 30 degree to open the car gate
7 . OUTPUT : using ( set pin to number ) for BUZZER ( put on pin 3 ) duplicate it, giving two numbers for buzzer ( 255/170 ) and add control code ( wait 1 second )
when a car get near 10 cm I want
make sound with two different tones
7 . OUTPUT : using ( set pin to high/low ) for RGB light (put RGB light on pin 2 ) and choose high
make low for pin 8/3 and 0 degree for pin 9
when a car get far away 10 cm I want
"RGB light" open with green light
gate/red light close and buzzer stop
8. start to simulate the circuit with coding and check any troubleshooting
9. choose " blocks + text" to copy text code and paste on Arduino ide then upload the code after connecting Arduino board to laptop
10. Implement the electrical circuit using my electronic kit
The video shows how the device works
the machine works as follows:
green light working to give signal for drivers that the gate working
when the car get closing to the sensor ( red light working _ sound with tones working _ the gate open _ green light close )
I learned how to connect more than one input and output to the Arduino, and how to coding the Arduino using blocks, and upload them to it.
The challenge I faced was in working on the code on Thinker CAD Blocks and simulating the circuit
The outputs that occur when receiving sensor signals do not stop after the signals end
How I Faced Challenges 🧐
I discovered the problem when I simulated the electrical circuit on ThinkerCAD. Also when I made the real circuit and tested it practically.
I found the solution by applying the idea of designing codes. They are commands that work with code. The solution to the problem is to stop by also being
solving problem : I repeat the code in "ELSE" and determining what would happen to them if the sensor signal stopped
By watching videos explaining how to use the code block on Thinker, you can understand, comprehend and solve any problem or challenge that you may face during work.
This is a series of videos explaining different codes and how to run them on Arduino.
What I learned this week was very important as I was able to program the Arduino, which is what I needed to programing my project and how to control the sensors.
Building a Smart Waving Hand using Arduino. When you wave at the smart hand, it waves back at you with two modes
Manual Mode: using a single servo motor (One Hand) at the output is controlled manually by a human using a potentiometer (knob) at the input of an Arduino board
Automatic Mode: using a single servo motor (One Hand) connected at the output is controlled via signals received from an ultrasonic sensor at the input of the Arduino board