170 likes | 182 Views
Webtrain Decoupling. Adam Kadolph EE451 Bradley University Advisors: Dr. Irwin, Dr. Schertz. Design Review Presentation - Week 12 Tuesday 3/6. Outline. Introduction Timeline Weeks 8-12 Sensor Test Programs Automatic Decoupling The Current Problem. Introduction.
E N D
Webtrain Decoupling Adam Kadolph EE451 Bradley University Advisors: Dr. Irwin, Dr. Schertz Design Review Presentation - Week 12 Tuesday 3/6
Outline • Introduction • Timeline • Weeks 8-12 • Sensor • Test Programs • Automatic Decoupling • The Current Problem
Introduction • The goal of this project is to design a system to automatically decouple cars from the train. • Recalling from last semester • I began to research sensors • Made a test program to decouple train cars with a few train controls
Week 8 • Test sensors and determine one most suitable for webtrain • Photocell • Pros: Small, simple to use, very sensitive to light • Cons: Slow switching time • Phototransistor • Pros: Efficient • Cons: Narrow angle of detection, difficult to use, would have to be mounted on the sides of track
Sensor • CdS Photocell • Resistance between 1k (light) and 100k (dark) Ohms • Fits nicely in the track (only 1 tie removed) • Simple to use • Determined voltages that correspond to different situations with a train car • Three states: nothing, coupler, and train
Week 9 Built Test Track with Sensor Designed circuit for Photocell
Week 9 • Determined voltage thresholds for three states (nothing, coupler, train) • Coded program to measure and display voltages from circuit
Voltage Thresholds Nothing State: 0-0.28 V and 0.52-0.84V
Voltage Thresholds Coupler State: 0.28-0.52 V
Voltage Thresholds Train State: 0.84 to 5.00 V
Test Programs • Sensorx (working) • Program to test one photocell • Display on LCD • Used with test track • Sensor4x (working) • Program to test four photocells • Display voltages on LCD
Week 10-12 • Coded a basic program to send DCC signals to the train depending on the measured voltages from the sensor • Coded another program to measure values from four photocells
Test Programs • Autodecouple (not working) • Exclusively for Automatic Decoupling • Voltage from photocell circuit will change train speed • Decouple (semi-working) • Manual Decoupling Testing • Automatic Decoupling Testing
The Current Problem • Timing issues with DCC signals being sent to the train • Test program is sending signal too fast causing the Microcontroller to reset itself • The problem may lie in the previous year’s code used to create the DCC signals
Fixing the Problem • The timing contraints of DCC signals • ‘1’ bit has 58 us low and high time • ‘0’ bit has >95 us low and high • Use of Timer 2 to fix problem • Pro: Advanced timing features allow faster more efficient timing • Previous Code uses Timer 0 • Con: Time spent setting up Timer
Questions? The End