Barrier Gate
The idea for this project was to create an automatic barrier gate system, commonly used in parking lots and security checkpoints. The inspiration came from observing how manual gates often lead to delays and inefficiency. By automating the process, access control becomes faster and more reliable.
electronics tools
aurduino
Jumper wires
Red LED
Resistor
adaptor
servo motor
breadboard
Ultrasonic sensor
on & off switch
cardboard tools
cardboard
pencil
ruler
tape
scissor
I began by assembling the components on Tinkercad to simulate the circuit before building it in real life.
I used the ultrasonic sensor as an input to sense the proximity of objects to it, and I used servo motor and LED indicator as an output to express the proximity of the car to the gate
This Arduino code controls a barrier gate using an ultrasonic sensor, servo motor, and a mode selector. In automatic mode, the ultrasonic sensor measures the distance of an approaching object, and if it's within 10 cm, the servo rotates to open the gate while turning on an LED. If no object is detected, the gate closes, and the LED turns off. In manual mode, pressing a push button opens the gate, and releasing it closes the gate. The serial monitor displays the measured distance for debugging, with a 500 ms delay between readings.
we connected an ultrasonic sensor to an Arduino Uno to measure distance. The trigger pin and echo pin of the sensor are connected to the Arduino's digital pins. an LED is also connected to the circuit through a breadboard. A servo motor is connected to another power source ( adaptor)
The Arduino reads the distance from the ultrasonic sensor, and if an object is detected within a certain range, the LED lights up and the servo motor rotates . The circuit is powered by the Arduino and the adaptor 5 v
The servo motor was not working,
I asked Menna, she said that it needed to be connected to a 5 volt adapter and then it worked efficiently.
Title of Media