Introduction: Smart Traffic Junction
In the recent years, the number of cars on roads are rising at an exponential rate. This increase is accompanied by fatal road accidents and jumping red lights has been one of the major causes. This project showcases a novel way to largely reduce the road accidents that occur through jumping of red light. The concept is that each incoming road in a traffic junction is equipped with a retractable barrier. When the traffic signal becomes red, the barrier rises and comprehensively blocks the incoming vehicles and when the signal becomes green, the barrier retracts.
Step 1: Components Required:
- Arduino UNO Board x 1
- USB cable x1
- 180 degrees Servo motor x 2
- RGB LED x 2
- 470Ω Resistor x 2
- Breadboard x 1
- Connecting Wires (Male to Male) x 40
- Connecting Wires (Male to Female) x 40
Step 2: Interfacing RGB LED With Arduino UNO
There are two types of RGB LED.
1. Common Anode RGB LED: All the anodes are tied together
2. Common Cathode RGB LED: All the cathodes are tied together.
We are using is the CommonCathode RGB LED. It means that the Negative terminal of all the LED’s is common. The longest Leg of the RGB LED is the negative terminal.
- Take one 470Ω resistor and place it on the Breadboard.
- The Negative Terminal of both the LEDs i.e. the longest leg of the LED will be connected to two separate 470Ω Resistor which are placed on the Breadboard.
- The other terminal of the resistor will go to the GND Pin of the Arduino Board.
- The RED Colour terminal of one LED i.e. the left most terminal will be connected to Digital Pin 2 of the Arduino Board using Male to Female Connecting Wire.
- The RED Colour terminal of the other LED will be connected to Digital Pin 5 of the Arduino Board using Male to Female Connecting Wire.
The Green Colour terminal of the LED i.e. the one on the right side of negative terminal will be connected to Digital Pin 4 of the Arduino Board using Male to Female Connecting Wire.
The Green Colour terminal of the other LED will be connected to Digital Pin 7 of the Arduino Board using Male to Female Connecting Wire.
Step 3: Interfacing Servo Motor With Arduino UNO
A servo motor is a rotary actuator that allows for precise control of angular position. It consists of a motor coupled to a sensor for position feedback. By varying the pulse width of the output voltage to a servo, you can move a servo to a specific position.
There are 3 wires coming out from a Servo motor (brown, red and orange)
• Brown wire is GND.
• Red wire is +5v.
• Orange wire is a Signal wire
- The Orange wire of the Servo Motor 1 is the signal Wire which will be connected to Digital PWM Pin 10 on the Arduino.
- The Orange wire of the Servo Motor 2 is the signal Wire which will be connected to Digital PWM Pin 11 on the Arduino.
- The Brown wire of both the Servo Motors are connected to GND available on Breadboard.
- The Red wire of both the Servo Motors are connected to the 5v pin available on Breadboard.
- The connections of the Servo Motor will be done using Male to Male connecting wire.