MODEL TRAIN CONTROLLER.pptx

2,778 views 16 slides Dec 16, 2023
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

ERT LECTURE SLIDE


Slide Content

Embedded system design process Example : model train controller

Model train setup console power supply rcvr motor ECC address header command

Requirements Console can control 8 trains on 1 track. Throttle has at least 63 levels. Inertia control adjusts responsiveness with at least 8 levels. Emergency stop button. Error detection scheme on messages.

Requirements form

Conceptual specification The Digital Command Control (DCC) standard was created by the National Model Railroad Association to support interoperable digitally-controlled model trains. Digital Command Control specifies some important aspects of the system, particularly those that allow equipment to interoperate. We need to round out our specification with details that complement the DCC spec. A conceptual specification allows us to understand the system a little better . We will use the experience gained by writing the conceptual specification to help us write a detailed specification to be given to a system architect .

Subsystem collaboration diagram Shows relationship between console and receiver (ignores role of track): : console : receiver 1..n: command

Basic system commands

Typical control sequence : console : train_rcvr set-inertia set-speed set-speed set-speed estop

Class diagram for the train controller Message command set-inertia value: unsigned- integer set-speed value: integer estop

Major subsystem roles Console : read state of front panel. format messages. transmit messages. Train Receiver : receive message. interpret message. control the train.

Console system classes console panel formatter transmitter Knobs * sender * 1 1 1 1 1 1 1 1 1 1

Console class roles P anel : describes analog knobs and hardware to interface to the digital parts of the system. Knobs : describes the actual analog knobs, buttons and levers on the control panel. F ormatter : turns knob settings into bit streams for the required message. Transmitter : to sends the message along the track.

Train system classes train set train receiver controller motor interface detector * pulser * 1 1..t 1 1 1 1 1 1 1 1 1 1

Train class roles R eceiver : receive the digitizes signal from detector. Detector : detects analog signals on the track and converts them into digital form . C ontroller : interprets received commands and makes decisions how to control the motor. M otor interface : how to generate the analog signals required to control the motor . Pulser : turns digital commands into the analog signals required to control the motor speed.

sequence diagram for transmitting Control input : knobs : panel : formatter : transmitter change in speed/ inertia/estop change in train number change in control settings read panel panel settings panel-active send-command send-speed, send-inertia. send-estop read panel panel settings read panel panel settings change in train number set-knobs new-settings

Sequence diagram for set-speed command : receiver : controller : motor-interface : pulser* new-cmd cmd-type rcv-speed set-speed set-pulse set-pulse set-pulse set-pulse set-pulse
Tags