Criteria 4: "Reliable track power to rails on both decks and power cutoff when gates are open."
Here is a graphic of the track wiring, with each horizontal black line depicting a rail.
Criteria 5: "Mechanical barriers that automatically close when the gate is opened and open when the gate is closed."
By removing the last component of the drive train, the "horizontal slider" mentioned above it is possible to drill a hole in the case of the Tortoise to permit a styrene tube to pass through and slide over the last drive shaft in the gear mechanism. By affixing the styrene tube to the shaft with epoxy it becomes an external shaft that can be used to create rotating motion. I also drill a small hole through the styrene tube and driveshaft to ensure that there is also a mechanical linkage because the Tortoise creates considerable torque. Note that opening the case and messing with the contents voids the warranty - so be it!
If the Tortoise is wired the usual way, using a double-pole double-throw switch the shaft will turn either clockwise or counterclockwise, depending on the position of the switch. I inserted a length of piano wire into the end of the styrene drive shaft described above (with a kink in the end so it would never come loose in the epoxy), passed the piano wire through the benchwork and up through the ballast between the rails where I fastened the piano wire to my barrier. I 3D printed a couple of end stops to ensure that the barrier stops in the desired position when open, out of the way of passing trains, and when closed, creating a barrier.
For my double-pole double-throw switch I used two micro switches, each of which is a double-pole single throw. When operated simultaneouslysly the two switches together become double-pole double-throw. I ran through a few blown fuses because it was very difficult to ensure that both switches always closed and opened at identical times. I got around this by wiring an automotive brake light bulb in series into the circuit. The bulb lights very briefly when the switches don't open or close at identical times, avoiding the blown fuse problem.
Here is a graphical view from the side of this contraption:
Here are views from the top:
Barrier closed |
Barrier open |
Criteria 6: "Warning lights to attract attention when the gate is open."
This was easily achieved through the use of one more microswitch. When the gate is open the microswitch closes, powering two bright red LED lights that are mounted adjacent to the opening of the top gate and positioned on either side of the tracks. Although not strictly necessary because the power is cut off and barriers block the track when the gates are opened, the red lights catch my eye and help me avoid this situation by reminding me to make sure the gates are closed when a train is running.
Continued in Part 4 of 4.