4. Table of Contents:
Step1: Required Hardwares
Step2: Required Softwares
Step3: Schematic Circuit (OrCAD)
Step4: PCB Layout (OrCAD)
Step5: Artwork (OrCAD)
Step6: Board after Etching Process in PCB Fabrication
Step7: Board after Drilling in PCB Fabrication
Step8: Component Assembling and Soldering
Step9: Timing Table for Traffic Light Signal System
Step10: Stateflow Model (MATLAB)
Step11: Logic inside Stateflow Model (MATLAB)
Step12: Add Events and Outputs to Stateflow Chart (MATLAB)
Step13: Deploy to Hardware (MATLAB)
Step14: Experiment Results
5. Required Hardwares:
To run this example, you need the following hardwares:
- Arduino UNO
- Arduino USB Cable
- Jumper Wires (Male-Female)
- 4 Red LEDs
- 4 Green LEDs
- 4 Yellow LEDs
- 12 pin Connector
Go To Index Page
4
6. Required Softwares:
To run this example, you need the following softwares installed:
- MATLAB 2014
- Arduino Hardware Support Package
- OrCAD
Go To Index Page
5
18. Create a logic inside Stateflow Chart
as shown below:
Go To Index Page
17
19. Add event and output to Stateflow Chart:
Go To Index Page
18
Model Explorer Window Name: T
Scope: Input from Simulink
Trigger: Rising
Name: g1
Scope: Output
Name: y1
Scope: Output
Name: r1
Scope: Output
Name: g2
Scope: Output
Name: y2
Scope: Output
Name: r2
Scope: Output
Contd.,
20. Model Explorer Window Name: g3
Scope: Output
Name: y3
Scope: Output
Name: r3
Scope: Output
Name: g4
Scope: Output
Name: y4
Scope: Output
Name: r4
Scope: Output
Go To Index Page
19
21. Deploy to Hardware:
Click on ‘Tools’ -> Run on Target Hardware -> Prepare to Run
Target Hardware = Arduino Uno
Click ‘Deploy to Hardware’.
Go To Index Page
20