Arduino traffic light system
Budget: $30 – $50 USD
Using an Arduino Uno board on TinkerCAD, design, implement and test a Traffic Light Controller for the junction of two roads (Road 1 and Road 2) with two traffic sets of lights as shown in Figure 1. Each road has a corresponding vehicle sensor (Road 1/2 Sensor) that needs to be triggered (I suggest a simple push button) before the traffic lights for that road change state (otherwise they will stay at RED).
The Traffic Light Controller is a sequential system. The recommended architecture is a state machine where each state represents a particular configuration of the traffic lights ON/OFF values.
Each traffic light sequences through the standard UK configurations RED, RED+AMBER, GREEN, AMBER, and then back to RED), and it is the job of the controller to co-ordinate the sequences of each of the two traffic lights safely, such that both lights can never be at GREEN at the same time. The sequence should not proceed past RED for either road unless the corresponding sensor has been triggered (pressed) at least once since the last GREEN light was active on that road.
State changes occur after a 2 second interval whenever any AMBER light is active or at least a 10 second interval whenever RED and GREEN lights are active together. Hence the cycle time of the entire sequence is 28 seconds, assuming that the road sensors on both roads have been triggered by the user at the appropriate times to allow state changes.
Create a report including the following:
• A description of the architecture (a flow chart will help here).
• The code including suitable comments.
• An image of the circuit with a brief explanation of components selected.
• Discussion, focused on the how you tested and confirmed the controller met the task brief.
• The link to your TinkerCAD design OR an image of your hardware.
• No more than 8 pages.
The Traffic Light Controller is a sequential system. The recommended architecture is a state machine where each state represents a particular configuration of the traffic lights ON/OFF values.
Each traffic light sequences through the standard UK configurations RED, RED+AMBER, GREEN, AMBER, and then back to RED), and it is the job of the controller to co-ordinate the sequences of each of the two traffic lights safely, such that both lights can never be at GREEN at the same time. The sequence should not proceed past RED for either road unless the corresponding sensor has been triggered (pressed) at least once since the last GREEN light was active on that road.
State changes occur after a 2 second interval whenever any AMBER light is active or at least a 10 second interval whenever RED and GREEN lights are active together. Hence the cycle time of the entire sequence is 28 seconds, assuming that the road sensors on both roads have been triggered by the user at the appropriate times to allow state changes.
Create a report including the following:
• A description of the architecture (a flow chart will help here).
• The code including suitable comments.
• An image of the circuit with a brief explanation of components selected.
• Discussion, focused on the how you tested and confirmed the controller met the task brief.
• The link to your TinkerCAD design OR an image of your hardware.
• No more than 8 pages.