Download presentation
Presentation is loading. Please wait.
1
Computerized Train Control System by: Shawn Lord Christian Thompson Advisor: Dr. Schertz
2
Presentation Outline Project Overview Digital Train Control System Components –Local Controller –DCC Format –DCC Encoder –Switch Controller –Sensor Controller Train Layout Design Implementation Results Future Work
3
Project Overview Digital Train Control System –Digital Control of Model Trains –Control of Track Equipment –Computer Interface Goals –Fully control a digitally equipped locomotive –Control of switches and layout features –Sense train locations and layout state –Link all control to a central computer –Provide a train layout for future use –Provide supporting documentation
4
Digital Train Control How Digital Control Works –Command Station Takes User Input Sends a command signal on rails of layout –Decoder Card Resides in each locomotive Derives power and data from signal on rails Powers locomotives lights and motor
5
Digital Train Control Standards –National Model Railroad Association (NMRA) Sets Industry standards for model railroading Recently incorporated standards for digital control –Digital Command Control (DCC) NMRA standard for digital train control Provides standards for communication with compatible Decoder Cards Advantages Locomotives are individually addressable One signal to all rails on layout Existing industry standards
6
System Components Block Diagram and Data Flow UpstreamDownstream Locomotives Track Accessories Train Layout Track Sensors Controller Application Local Controller DCC Encoder
7
Local Controller Handles low level control of train layout –Receives commands over serial link with PC –Creates serial packet for control of locomotives –Controls switches and accessories –Polls track sensors for position reporting Implementation –8051 microprocessor –Programmable Logic Device (FPGA) –Signal buffering circuitry
8
Local Controller Command List –Local Controller Commands –Reset All –Locomotive Commands –Send Override Packet –Send Service Mode Packet –Send From Command List –Add to Command List –Remove from Command List –Clear Command List
9
Local Controller Command List (contd.) –Switch/Accessory Commands –Set one output –Clear one output –Pulse one output –Reset all outputs –Sensor Commands –Reset sensor timer –Return one sensor –Return all sensors
10
Program Flow Command Processing Command from PC Continuously write commands out to Encoder Poll sensor(s) Add command to queue Write command out to controller Transmit sensor reading(s) to PC Locomotive Accessory or Switch Sensor
11
Local Controller Memory Allocation (Memory Mapped IO) –0x00 – 0x07 DCC Encoder –0x08 – 0x7F Output space –0x80 – 0x8F Sensor space
12
DCC Format Transition based serial encoding Bit times –232us – ‘0’ bit –116us – ‘1’ bit Fully rectified signal provides power for trains
13
DCC Format Basic Packet Format –Preamble – ten ones followed by a zero –Address – eight bits followed by a zero –Data – eight bits followed by a zero –Error Check – eight bits followed by a one {preamble}0{address}0{data}0{error check}1 Speed Packet –01DCSSSS Other Packet Types
14
DCC Encoder Receives data from Local Controller Transmits data in DCC format Connected to external bus of Local Controller Interrupts Local Controller upon completion Implemented in VHDL Registers –0x00Command byte –0x00 – 0x07DCC Packet to transmit
15
DCC Encoder Software Flow check command byte command byte empty transmit idle packet transmit data bytes Interrupt processor on last bit transmit preamble command byte present
16
System Components Block Diagram and Data Flow UpstreamDownstream Locomotives Track Accessories Train Layout Track Sensors Controller Application Local Controller DCC Encoder
17
Track Switches Allow locomotives to change paths Solenoid Controlled –Double throw solenoid –Requires 12v 5ms pulse Motor Controlled –Small gear motor –Requires 12v signal –Motor stalls upon end of travel
18
Switch / Accessory Controller Connected to external bus of Local Controller Latches data from Local Controller 16 outputs total –8 switches –16 accessories –Sinks 600mA continuous or 3A pulsed Addresses –Address + 0Latch A –Address + 1Latch B
19
Sensors Allow Location of locomotive on layout –Layout divided into 21 blocks –Current sensor on each block Current sensing –1ohm current sense resistor –Differential voltage amplifier
20
Sensor Controller Connected to A/D input of Local Controller Data Latched from External Bus –000C 0DDD C – enables controller DDD – selects 1 of 8 analog inputs 8 inputs –Selected by analog switch –Inputs filtered using an RC filter
21
Train Layout
22
Designed for future use –2 separate loops –2 loopbacks –1 crossover –5 single ended sidings –4 track train yard –1 pass through siding
23
Train Layout
24
XS-40 Implementation of Design XS-40 FPGA Prototyping Board –Manufactured by XESS Corporation –Xilinx 4005E-pc84 FPGA chip –8031 uC –128byte SRAM Used to implement Design –Local Controller uses 8031 –DCC Encoder implemented on FPGA –Interface Board Designed A to D converter 256byte EEprom Memory External Bus
25
Results Hardware –Train Layout Built and Wired –Two DCC Compatible Locomotives –Local Controller Designed and Implemented –Sensors Designed and Tested –Switches Designed and Tested –Controller Boards (Main, Switch, Sensor) Design and Layout complete Not manufactured
26
Results Software –Serial interface designed and Implemented –Train control designed and implemented –Switch control designed –No software support for sensors –No support for service mode packets
27
Future Work Manufacture and Build Controller Boards Software –Sensor polling –Service mode packets Decoupling and Crash prevention
28
Questions ?
29
Web-based Control Interface For a model train control system By: Kevin Sendra Advisors: Dr. Schertz Dr. Malinowski
30
Presentation Outline Overview of the Project Project Description Results –Problems –Future work
31
Project Overview Add-on to the Local Control System Allows control and/or view of the layout from the internet
32
Project Description Block Diagram Server and Serial Interface
33
Client Description Allows the user to control the speed and direction of multiple trains Displays connection information and command status (from server) Image Map for switch control (no switch control currently)
34
Client Flowchart Start Create GUI Elements Connect to Server Start Threads Event Handling Thread Delay Close socket End threads Send Command To Server Wait.5s Thread Receive From Server Append to Text Area Get Parameters
35
Current GUI
36
Local Computer Server –Waits for a connection –Logs connections –Receives commands and sends them to the serial port –Acknowledges commands –Sets session length to 10 minutes Webcam Software –Dorgem
37
Server Flowchart Server Start Wait For A Connection Log Connection Store Time +10m Start Thread Wait For A Command Acknowledge Close Connection Thread Timeout Compare Stored Time To Current Time Disconnect If Equal
38
Webcam Viewer
39
Results Working graphical user interface –Allows locomotive speed and direction controls –Displays command status Working Server Viewable webcam stream
40
Problems The computer –Speed –Security and Software Java versions and Internet Exploreror Netscape
41
Future Work to be Completed –Implement switch control –Allow a configuration file to set up certain elements of the interface
42
Train Control Train Control 800x600
43
Questions
44
Local Computer Interface By: Zachary Kirkpatrick Advisor: Dr. Schertz For A Digital Train Controller
45
Presentation Overview Introduction Block Diagram Functional Description Design Accomplishments Complications Conclusion
46
Introduction Digital Train Controller Local Computer Interface User Input Instruction Send Out Instruction Train Moves
47
Block Diagram Instruction User Input Computer Local Altered Input Instruction
48
Functional Description Input User Instructions Decipher User Instructions Alter Code Of Instructions Send Out Instructions To Microprocessor
49
Design Flow Chart PowerSwitchSpeedMovement User Input OnOff Track UpDown ForwardReverse Train Go Back To User Input
50
Design Write Software To Draw Control Buttons Output The Appropriate Information For The Corresponding Button Pressed Use MFC Library of C++
51
Design Control Buttons User Buttons –Power On –Power Off –Switch Tracks –Speed Up –Speed Down –Move Forward –Move In Reverse
52
Accomplishments Buttons Were Created Buttons Are Active Buttons Are Either –Functional –Personal Constructors
53
Accomplishments
61
Complications Sickness The First Several Weeks Slider Buttons Auto-creation Of Files In MFC
62
Auto-creation Example
63
Conclusion Buttons Are Created Basis For Button Implementation Created Need To Finish Button Implementation
64
Questions
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.