| FSC Senior Project 2001 | |||||||||||
![]() |
My Senior Project actually consists of 3 projects that all tie together. I wrote/designed a computer program which uses two different languages (C++ and Visual Basic ) that will analyze and control three trains on a 'HO' scale train set. The Program, via the I/O interface, "reads" where the trains are (or are not) and using that input information, runs the trains so that they never collide. It also will determine the number of cars and calculate the speed of the trains. 1) Computer Programming: The Visual Basic software allows the user to incorporates graphical images. The C++ program is actually a dll (Dynamically Linked Library) file which allows Visual basic to read and write to the parallel port. 2) Computer I/O Interface: I built an I/O (input output) interface that communicates information between the computer and the train set. The I/O interface is basically a box of switches (similar to a PLC) that are controlled by the computer. I built the interface so that it can be used to control anything electrical; it is not specific to the train set. Using any computer, the interface can control different devices such as a light bulb, a motor or basically anything that uses electricity to operate. 3) The Train Set: I had to come up with a train set layout that would allow me to run many different trains in a very limited amount of space. I also had to come up with a layout that had three loops and only one crossing. I equipped the train set with infrared emitters and detectors that can detect the position, speed , and number of cars of the each train. |
||||||||||
![]() |
|||||||||||
![]() |
|||||||||||
| Challenges Included: A) IR detectors are very sensitive to incandescent light (room light from a light bulb; not florescent). B) The IR sensors are activated when the light beam is broken. Therefore windows on the train cars would misinform the computer program. C) IR sensors each returned a different voltage that would also fluctuate. Solutions: A) I placed sensors at the end of a tube. This shieds all ambient light and only allows the direct transmitter light to be seen. B) I covered the windows with black electrical tape. C) I fed the fluctuating voltages into a quad comparator chip which allows only +5V or 0V output and provides hysteresis. |
|||||||||||
| Back to Home | |||||||||||