Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This task will complete the traffic light system you began in part 1 of this project and will incorporate a pedestrian crossing button / switch

This task will complete the traffic light system you began in part 1 of this project and will
incorporate a pedestrian crossing button/switch into the system (rather than the system
automatically transitioning) and will include a Stateflow Chart block in the model.
A Stateflow Chart is a block in Simulink that allows us to implement finite state-machines
(FSMs) which are systems that can be described as a
set of states that transition depending on certain
conditions being met. Traffic lights are ideal
examples of FSMs; we can consider this system as
being made up of Three (3) states;
1) cars go (green light) and pedestrians stop (red
light),
2) cars given caution signal (yellow light) and
pedestrians stop (red light), and
3) Cars stop (red light) and pedestrians go (green light).
Part A
Modify the basic structure of the traffic light system you built for part 1 of this project to
simulate (use Dashboard components) a FSM version of this system that behaves as follows:
- The system must still consist of Three (3) traffic lights (red,
yellow and green) and Two (2) pedestrian lights (red and green).
- The system must also have a pedestrian button (a Dashboard
push button) that detects when a person wants to cross the road.
- The FSM must be defined as having Three (3) states only.
- State 1 allows the traffic to go (the green traffic and red
pedestrian lights will both be on, all other lights will be off) and
this state will remain active until the pedestrian button is pushed.
- After the pedestrian button is pushed, the system will transition
to state 2 where the traffic is cautioned for Three (3) seconds (the yellow/amber traffic
and red pedestrian lights will both be on, all other lights will be off).
- Finally, state 3 allows the pedestrian to cross the road for Six (6) seconds (the red
traffic and green pedestrian lights will be on, all other lights will be off).
- The system must then reset back to state 1 and repeat this process.
For your design methodology, ensure you use an algorithmic state diagram and state
transition table to show how the system should work.
Part B
Once youre happy your simulation is working, and youve troubleshot anything that needs
fixing, replace the simulation blocks (Lamps and Pushbutton) with the appropriate Arduino
inputs/outputs and deploy this system to the Arduino Uno hardware. The system should
behave the same as before, but red, green, and yellow LEDs should light up instead of the
simulated lamps, and youll use a momentary switch on your breadboard to act as the
pedestrian button.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

4. Explain how to price managerial and professional jobs.pg 87

Answered: 1 week ago