Creation of Traffic Light Circuit

Introduction

Traffic signals or traffic alerts is used to regulate the traffic and supervised motorist and pedestrians. The equipment and lighting alternate accorded to users by showing "green" for go, "yellow" transmission that the light changes to red and "red" for stop. Without traffic lights there will be a great deal of road injuries and traffic congestion. This experiment shows how traffic lamps work using Arduino.

Materials with Description

  1. 5 MM LED (5)

Used as an result in the circuit and to know if the code is working.

  1. Resistor (220 ohms) (6)

An electronic device used to regulate the existing in the circuit.

  1. Jumper Cables M/M (13)

Used as the connector to different pins in the prototyping panel.

  1. USB wire (1)

Used as the connector from computer to DFRArduino Uno R3.

  1. DFRArduino Uno R3 (1)

A programmable circuit table. This hardware reads the code published in the computer.

  1. Computer (1)

Used to write, compile and upload the code to the circuit.

Procedure (self-explained)

  1. Place the LEDs to the plank. Traffic lighting for pedestrians, green(1) positive pin at pin J17 and negative pin to pin J16, red(1) positive pin at pin J14 and negative pin to pin J13.

2. Traffic lamps for motorist, green(2) positive pin at pin J8 and negative pin to pin J7, yellowish positive pin at pin J5 and negative pin to pin J4. red(2) positive pin at pin J2 and negative pin to pin J1.

3. Storyline the force button switcher at pin E10, E12, F10 and F12.

  1. Place the resistor(1) from D2 to G2, resistor(2) from D5 to G5, resistor(3) from D8 to G8, resistor(4) from D14 to G14, resistor(5) from D17 to G17, resistor(6) from C7 to C10
  1. Connect the jumper cables, line(1) from A2 to DP 12, line(2) from A5 to DP 11, wire(3) from A7 to GND, wire(4) from A8 to DP 10, cable(5) from A10 to DP 9, cable(6) from A14 to DP 8, line(7) from A17 to DP7, cable(8) from C12 to PP 5V, line(9) from I1 to I4, cable(10) from H4 to H7, cable(11) from I7 to I13, wire(12) from H13 to H16, and cable(13) from I16 to GND.

6. Hook up the USB wire to the computer and the circuit, compile the code then upload.

Circuit Diagram

 

Code

 

 

Code Research

""int carRed = 12;, int carYellow = 11;, int carGreen = 10;" this is the initialization of pins for motorists traffic lights.

"int button = 9;" the initialization of the pushbutton linked to the Arduino.

"int pedRed = 8;, int pedGreen = 7;" the initialization of pins for pedestrian lights.

"int crossTime = 5000;" units 5 seconds for the pedestrian Resulted in lit.

"pinMode(pinType, OUTPUT);" pinType models what pin to make use of, LEDs in this circuit provides as output.

"pinMode(button, INPUT);" the suggestions in the circuit came from the push button switcher.

"int point out = digitalRead(button);" reads if the press button switcher is forced/pressed or not.

"if (state == HIGH) && (millis() - changeTime) > 5000)" a problem that checks if the thrust button switchern was pressed 5 seconds and then call the technique changeLights().

"void changeLights()" in this technique, this implies the sequence signals when it will lit and shows how car/motorist and pedestrian traffic lights work.

"delay(2000);" delays for 2 mere seconds before it the green light changes to yellow light and "delay(1000);" hold off for a second before it will go red.

"changeTime = millis();" this stores the existing time in milliseconds to changeTime by getting in touch with millis().

Comparison of Code vs. Hardware Output

The code manipulate, manages and provides the productivity for the hardware. Within this experiment if you drive or press the push button switcher it changes its lights in a of placed time and this shows how traffic equipment and lighting works.

Recommendation/Enhancement

We may use this traffic light test to create minuscule traffic lights inside the car or motor. In that case the motorist further on the traffic light will also know the transmission.


  • More than 7,000 students prefer us to work on their projects
  • 90% of customers trust us with more than 5 assignments
Special
price
£5
/page
submit a project

Latest posts

Read more informative topics on our blog
Shiseido Company Limited Is A Japanese Makeup Company Marketing Essay
Marketing Strength: Among the main talents of Shiseido is its high quality products. To be able to satisfy customers, the company invested a great deal...
Fail To Plan You Plan To Fail Management Essay
Management This report will concentrate on two aspects of project management, their importance within the overall project management process. The report...
Waste To Prosperity Program Environmental Sciences Essay
Environmental Sciences Urban and rural regions of India produce very much garbage daily and hurting by various kinds of pollutions which are increasing...
Water POLLUTING OF THE ENVIRONMENT | Analysis
Environmental Studies Pollution Introduction Many people across the world can remember having walked on the street and seen smoke cigars in the air or...
Soft System Methodology
Information Technology Andrzej Werner Soft System Methodology can be described as a 7-step process aimed to help provide a solution to true to life...
Strategic and Coherent methods to Recruiting management
Business Traditionally HRM has been regarded as the tactical and coherent method of the management of the organizations most appreciated assets - the...
Enterprise Rent AN AUTOMOBILE Case Analysis Business Essay
Commerce With a massive network of over 6,000 local rental locations and 850,000 automobiles, Organization Rent-A-Car is the greatest rental car company...
The Work OF ANY Hotels Front Office Staff Travel and leisure Essay
Tourism When in a hotel there are careers for everyone levels where in fact the front office manager job and responsibilities,assistant professionals...
Strategy and international procedures on the Hershey Company
Marketing The Hershey Company was incorporated on October 24, 1927 as an heir to an industry founded in 1894 by Milton S. Hershey fiscal interest. The...
Check the price
for your project
we accept
Money back
guarantee
100% quality