The Kato 20-283 turntable and the roundhouse bring iconic railway structures to the N Gauge Kato UNITRACK system! Featuring a modular design that allows the easy addition and movement of up to 36 tracks, a sophisticated dual-motor driven indexing system that guarantees proper alignment, and an easy to use Turntable power system that takes full advantage of the power routing functions of Kato UNITRACK so that you can move and park locomotives onto parking tracks or in a roundhouse with minimal additional wiring, the Kato N Gauge Modular Turntable is perfect for modelers looking to add something special to both their tabletop and their scenic layouts!
It is however manual controlled and DCC naive. Just the kind of challenge I was looking for. Fortunately Clement Chan had done some of the work to make a digital controller for the turntable using Arduino as the brains. I modified his design and added DCC interpretation to it. Here are the details.
Indexed Controller
The indexed controller drives the turntable’s two motors using a H bridge driver. The keypad allows entry of track numbers from 1 to 36 directly. Additionally there is a Homing button to return the turntable to track 1 with a single button push. There is also the opportunity to drive the turntable CW or CCW one track at a time. The controller features a non-volatile memory that remembers the track position at power off or reset and allows maintaining sync with the DCC display between power off-on cycles.
Understanding the DCC command structure for Turntables on ESU ECoS
In order to interface the indexer to the ESU command station, it was necessary to understand the commands issued by the station. I did this by using Iowa Scaled Engineering’s DCC shield for Arduino. The DCC packet analyzer yielded the following output when the ESU was set to DCC mode (LokPilot DCC).
DCC Packet Analyzer v0.1
----------------------------
Iowa Scaled Engineering
https://github.com/IowaScaledEngineering/DCCPacketAnalyzer
Loco 283 (Turntable) – Headlights ON
L:0283 FL:1 F1-F4:0000
Move CW Command sequence:
L:0283 F-18/28 09/14 FL=0
L:0283 FL:1 F1-F4:1000
L:0283 FL:1 F1-F4:0000
L:0283 F-ESP FL=0
L:0283 F-STP FL=0
Now Turntable is at Track 2
Next Direct entry command to goto Track 5
Results in three CW commands issued one after the other.
L:0283 F-18/28 09/14 FL=0
L:0283 FL:1 F1-F4:1000
L:0283 FL:1 F1-F4:0000
L:0283 F-ESP FL=0
L:0283 F-STP FL=0
L:0283 F-18/28 09/14 FL=0
L:0283 FL:1 F1-F4:1000
L:0283 FL:1 F1-F4:0000
L:0283 F-ESP FL=0
L:0283 F-STP FL=0
L:0283 F-18/28 09/14 FL=0
L:0283 FL:1 F1-F4:1000
L:0283 FL:1 F1-F4:0000
L:0283 F-ESP FL=0
L:0283 F-STP FL=0
Next Direct Entry to return to Track 1
L:0283 R-18/28 09/14 FL=0
L:0283 FL:1 F1-F4:1000
L:0283 FL:1 F1-F4:0000
L:0283 F-ESP FL=0
L:0283 F-STP FL=0
L:0283 R-18/28 09/14 FL=0
L:0283 FL:1 F1-F4:1000
L:0283 FL:1 F1-F4:0000
L:0283 F-ESP FL=0
L:0283 F-STP FL=0
L:0283 R-18/28 09/14 FL=0
L:0283 FL:1 F1-F4:1000
L:0283 FL:1 F1-F4:0000
L:0283 F-ESP FL=0
L:0283 F-STP FL=0
L:0283 R-18/28 09/14 FL=0
L:0283 FL:1 F1-F4:1000
L:0283 FL:1 F1-F4:0000
L:0283 F-ESP FL=0
L:0283 F-STP FL=0
Designing the decoder & Command Interpreter
Although my first impulse was to design a decoder from scratch, I realized that a factory decoder would be the most efficient way to parse the DCC signal. In order to interact with the DCC signal I used a LokPilot 4 DCC as the decoder. Through an opto-isolator the DCC signal was passed to an Arduino. This is simply to safeguard against the large voltage difference and accidental ground loops.
An ascilloscope connected to the Opto-isolator input shows that the output from the LokPilot has an amplitude of 18 V
After the necessary voltage division the output at the optoisolator is a 5V digital pulse that can be connected to an Arduino input.
Fairly straightforward code then interprets the status of the F1 pin and the Reversing Light (RL) pin to send serial commands to the indexer.
The breadboarding and testing now here is the board that I have designed.