I had a need for this a while ago, so I soldered up two cables. this worked but it was bulkier than I would like. This adapter fits great & is easy to use. Fast easy solder job; feels robust enough to stand up to abuse.
A neighbor recently ask for my help with his Christmas Lionel Train set up. This year he wanted two separately operated trains to share a track crossing. This means, whatever train arrives at the crossing first can continue it travel while the late arriving train must wait until the crossing is clear. So the project is essentially two sensors one each to detect the arrive of a train at the crossing and two relays one each to remove power for the late arriving train until the crossing is clear.
Background: Lionel Trains use three rail tracks, the center rail is considered the power rail. The trains operate from a transformer (typically 0 to 18 volts AC), one terminal connect to the center rail and the other terminal (considered Neutral on Lionel Transformers) connected to the outside rails.
Moreover, in the Lionel Train world an activation section of track is referred to as a Block Track Section. A block permits the isolation of individual rails, for example an automobile road crossing gate is activated when current is permitted to flow from the center rail through the solenoid of the gate to an isolated outside rail which is electrical connected to the other outside rail by a passing train’s wheels and axial.
As such for this project the center rail can be isolated and subsequently power applied to the center rail via a relay. This permits the holding of a late arriving train by removing power until the track is clear. Further an outside rail can be isolated and serve as a train’s ‘present sensor’ via conduction from the other outside rail through the train’s wheels and axial. At first a solution using two DPDT relays would do the job until one examines the electrical continuity of the conductions using moving wheel on the rails. To say the least, moving train wheels on tracks designed 60 plus years ago does not provide good continuity. The project then becomes, insure reliable activation of the relays by insuring an appropriate de-bounce and holding period from the ‘present sensor’ detection of the train wheels.
The Atmel ATtiny13A is an excellent part to provide de-bounce and the timing required to hold a relay open… It’s a complete microprocessor in an 8 pin Dip package. The development software (AVR Studio) is free from Atmel and the part’s programming tool (AVR AVRISP mkII) is low cost ($39) too. The part can be programmed in either an easy to learn assemble language or in C. The ‘AVR ATtiny85 Development Board Kit’ available from tindie ( https://www.tindie.com/products/gzip/avr-attiny85-development-board-kit/ ), make the job of bread-boarding easy too. The development board is cost effective ($8.50), it includes an ATtiny13A part and a connector for direct connection to the AVR AVRISP mkII programming tool. Plus other connectors that permit full access to the all the processor’s I/O pins. The only other portion of the project was bread-boarding the relay control transistors with diode protection and the rail block ‘present sensor’ input circuitry, an RC filter and some diode clamps to protect the processor from transients from the trains power system. Powering the bread-board and relays was provided from a cell phone charger (+5 volts with 500 ma capability).
I documented the project with a schematic, pictorials of connections, flowchart and source code should anyone want to review the complete design…. MikeWHeslop@gmail.com