The goal of the kinetic functionality of the Oasis Palms project was to represent the town of Oasis Palms allowing up to three trains to be circumnavigating the town simultaneously. We also wanted to facilitate the manual operation of the trains or to allow a microprocessor to control autonomous operations. To achieve these goals, the layout was built using O-Guage 3-rail Lionel Fastrack using power blocks and isolated rails. The Oasis Palms layout has been wired into seven (7) separate power blocks and twelve (12) isolated rail sections. The isolated rail sections are monitored by JWA Insulated Rail Signal Drivers that feed signals to lighting, crossing gates, and an Optocoupler connected to an Arduino.
O-Guage 3-rail Power Blocks
Since the 1930’s Lionel has used 3-rail AC power to operate its O-Guage trains. In conventional operation, the engines are controlled by powering the track. If you apply power to the track the electricity goes into the locomotive through a center rail pickup and the wheels complete the circuit on the common rail and the train starts moving. In order to allow operators to run more than one train at a time layouts are typically split into power ‘blocks’.
Power blocks are created by creating gaps in the center rail of 3-rail tracks. You can then power each section individually to control a train to move over the block. Power block A and the train moves until it gets to block B, power block B and the train continues, stop a different train on block C and it will sit while the first train laps it on blocks A&B. Using this functionality with logic allows an operator to control multiple conventional trains. Lionel & MTH trains built since 2010 use Bluetooth and other technology to allow the operator to control the actual train. Track power is left on high (18VAC) and the trains move based on the Bluetooth instructions sent to the engine. This control is great for manual operations but does not allow for the autonomous operation of multiple engines that is desired for this installation.
O-Guage 3-rail Isolated Rail Blocks
Isolated Rail Blocks are unique to O-Guage 3-rail operations. This allows the use of the third (typically the outside) rail to detect the presence of a train in the Isolated Rail Block. When a train is present, the wheels and axle transfer the 18VAC common [-] signal from the inner rail to the outer rail. Monitoring the outer rail allows devices to be switched when a train is present in the block. Items that can be controlled included crossing gates, lights, and signals. Typically when the train is in the block the device is turned on, when the train exits the block the device is turned off.
JWA Insulated Rail Signal Drivers
For the Oasis Palms layout, Isolated Rail Blocks are also used to communicate the presence of a train to the microprocessor. We are using an isolated outside rail block that is being monitored by a JWA Insulated Rail Signal Driver to communicate with an Optocoupler connected to an Arduino microprocessor. For gate crossings, we are using an isolated outside rail ‘sub-block’ with a JWA Insulated Rail Signal Driver to tell our Optocoupler and Arduino when a train is at a gate crossing.
Custom DC Relays
The challenge with using sub-blocks is to pass the block signal from the block to the sub-block and then back to the block when the crossing is cleared. The solution to this challenge was to use “DC and a Diode” to power our block signals and crossing gates. The JWA Insulated Rail Signal Driver is monitoring the AC current on the isolated outside rail block and they operate relays that are turning on and off DC power to a Optocoupler feeding the Arduino, the block signals, and the crossing gates.
Optocoupler and Arduino
The Al-zard Optocoupler takes the 12VDC ground signal from the relay and sends an Arduino-friendly 5VDC hi/lo signal to the Arduino. The Arduino uses this information to determine what blocks are occupied with trains and then applies logic to power specific blocks and switches to release and hold trains around the layout. The Arduino is programmed with multiple scenarios to change the sequence of the trains to keep the activity interesting to the casual observer.
Leave a Reply