User:Xeo Ann/ENES-100/Project 1: Model Railroad

Problem Statement
Railroad yards are a very complex series of railroad tracks that are used to store, sort, load and unload rail cars and locomotives. The team is given a model rail yard and tasked to have it so the rail yard automatically sorts all the cars and sets it to the locomotive. More information can be found here.

Team Members
Jovy Batong

James Sheehan Cin Khai William King

Week0 Preferences
Professor Plotnick asked me to take the lead on this project. As such, I did not rank any projects that I preferred to work on.

Week1 Narrative
Week 1 required a lot of research on both Raspberry Pi and railroad yards. The idea is to have Raspberry Pi be the "brains" of the railroad yard. The Pi would be in charge of switching the tracks in order to sort the cabs. Raspberry Pi is a very basic computer. A Unix operating system is loaded into an SD card, which serves as the hard drive. Researching online shows that most of the projects made with the Raspberry Pi, so I decided to learn Python through the free e-book Learn Python The Hard Way. I also went ahead and re-formatted the SD card and installed the Raspbian as the operating system. Research on the rail yard was a little different. There are a many different ways for rail yards to sort through all the rail cars. One [article] that I read was about a hump yard, which is touted as a more efficient way of sorting than a normal 'flat yard.' Though interesting, this won't be feasible and is more complicate than a regular rail yard. The basics are similar though. A train arrives to the tracks, the cars are uncoupled, the cars get sorted, the cars get assembled, and the cars then connect to the proper locomotive and departs. Prior to designing a solution, a list of issues has been requested of the team. The client also asked that the sorting on the model train tracks be as realistic as possible. The client mentioned the Kar-Trak color barcode systems. More research should be done on this system. After some research, the team met together and identified a list of issues. My list included the following: Will there be more than one locomotive? How can the track be "reset" after completing the sort? Will this even be an issue? What budget will the project be subject to? (This would be important in order to make the decision on what sensor we should use. How do the rail switches work?  How do we uncouple the cars? And how do we re-couple them?  Can the cars be sorted as they come into the yard instead of sorting it while in the yard?  Is there going to be enough tracks in the rail yard?  How should the cars be identified? Next week, the tracks and all the cars will be available for us to use. Our objective is to make the tracks operational. Some of the tracks are already wired and ready to go, but the others are not. My goal is to find information about the double-slip switch that the model yard has installed. I will also look through the manuals that William King has provided on the Tortoise 800-6000 Slow Motion Switch Machine. This will give me an idea of how to program the switches to change the rail where the locomotive is going.

Week2 Narrative
The left-side tracks are labelled a-h. Switches are labelled by where they are located (i.e. Switch 2a is located in track a), as well as grouped by whether or not they need to work together (i.e. Switches 2a, 2b, 2c, and 2d need to be set together in order for the train to move from track a to track d).

Here is a table for the switches:

Switch 7 is located between switch 3f and 3h Switch 4.1 and 4.2 is a double slip switch. In the following image, 4.1 is switch 1 and 4.2 is switch 2. The normal position sends locomotives from track e to track D. Changing 4.1 to the alternate position lets locomotives go straight through track E. Changing 4.2 to the alternative position allows the locomotive to go from track g to track D. Finally, changing both 4.1 and 4.2 to the alternate position allows the locomotive to move from track f to track E. The track itself requires more work. I went ahead and measured the amount of railing required to bridge both sides of the model track and came up with roughly 20 inches of track (total of 40 inches of rail). The request was sent to the professor. I also started labeling the wiring under the tracks. The following table shows what wires go to which track. The table is not completed (seeJames and Cin's pages for the rest of the information). Attaching voltages to these wires will power the rails that they are connected to. In addition, I went ahead and got the measurements to create a scale diagram of the left module.

Week3 Narrative
This weeks task was to find out what was necessary to finish wiring the second module. the length of module 2 is 48 inches, and 5 track pieces were not wired. The total wires required should be roughly 150 inches due to the double-slip switch. We received some wire from Professor Plotnick, so we will be learning to solder those on next week. I also read chapter 6 on the Electrical Handbook for Model Railroads to learn more about common rail wiring. The common rail (the bottom rail in our modules) is grounded and does not have any gaps. According to the handbook, more than one power supply must be used for the common rail, but we are only using one locomotive, so it should not be a problem that we only have one power supply. There is also guidance on how to create a wiring diagram. The south rail in should be represented as a heavy line, while the rails connected to frogs are dashed. This allows the builder to see where frogs, which requires gaps, and eliminate unnecessary gaps. Chapter 7 in the handbook talks about turnouts and other special trackwork and is important in order to wire the track switches correctly. In addition, I also gathered the dimensions for Module 2 and finished diagramming it. I am currently in the middle of creating a wiring diagram for the module. This will be more detailed than the module diagrams and should be as detailed as possible. James Sheeham and I met up to start wiring the tracks under the right module. In the meantime, the team is trying to figure out how to bridge the two modules together:

Week4 Narrative
The team was able to wire Module A together and have it running on one power supply.

Week 5 Narrative
Not all track switches are wired together, so I researched how to wire the switches to the tortoise switch modules. The board on the switch controllers have eight holes to solder wires into. There are two Single Pole Double Throw switches connected to the board. I also attempted to make sure that all the gaps on the tracks are correct by drawing out how the power will go to the tracks when the switches are on the normal and alternate position. Using this method, it appears as though the switches on Module A are correctly gapped. The switches on Module B will need to be gapped as well.

Decision List

 * 1) What are the preliminary list of issues (what should the group do first?)
 * 2) The first item is to finish wiring the railroad. Some of the switches are wired, some are not.
 * 3) In order to do this, the team has to first find out which rails are wired, which switches are wired, and what must be done to finish wiring it.
 * 4) What is the end goal?
 * 5) To make the railroad look as realistic as possible.

Material List
Wires Coupler Magnets Rail (HO scale) Rail Spikes Solder

Software List
Inkscape Gimp

Next Steps
The next steps would be to wire the TORTOISE SLOW MOTION SWITCH MACHINE correctly and solder the leads onto the tracks. The group should work on Module A, since Module B's wiring and soldering is not completed yet.  After completing Module A, Module B should be wired properly, and the switches should be connected to the Tortoise.  Completing that, bridging the two modules together would be the next step.