181 Model Railway turntable polarity controller

181 : Model Railway turntable polarity controller

How it works

A controller that automatically switches the polarity of DC-type turntables, to prevent short-circuits when rotating the turntable along DC-powered tracks. Every track that connects the turntable to the main tracks must include a short, isolated ‘sensing track’ between the normal tracks and the turntable. When the turntable rotates and makes contact with any of the tracks, it powers the sensing element. If the polarity does not match that of the main tracks, the turntable polarity controller will invert it.

This controller is designed to work with a Fleischmann 6152 turntable, using the connecting elements 6153 as sensing elements. The sensing elements must be isolated from the main tracks.

The polarity controller assumes that every sensing element has two tracks. Both are connected with a high-impedance resistor to the main track they respectively connect to. e.g.

---<MAIN L>---[ISOLATOR]---<SENS L>---[CONTACT]---<TURNTABLE L>---  
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |     
---<MAIN R>---[ISOLATOR]---<SENS R>---[CONTACT]---<TURNTABLE R>---  
  
                          ___  
MAIN TRACK R/L    -------|    \  
                   |     |     \   
                High R   | XOR  |-----Polarity switch signal  
                   |     |     /   
SENSING TRACK R/L--------|___/   
  • Every track and corresponding sensing element form two inputs for an external XOR port. when polarity is not equal, the XOR output will go from 0 -> 1, which is fed into the polarity controller [IN0-IN7, D1-D4]. Any of the XOR ports can command a change in polarity.
  • The tracks are suitably connected through resistors and (zener) diodes to the XOR ports, to convert to digital signals and prevent an overvoltage on its inputs
  • If the polarity controller receives a high input for prolonged periods of time, it assumes an error state where the turntable is not powered. To this end, connect [OUT6], the change-polarity control signal through a suitable RC delay to [D0] to trigger an error.
  • The turntable polarity controller controls a full-bridge driver on [OUT2] and [OUT3] that connects the turntable to the main tracks.
  • In the original design, the polarity controller uses digital control signals to control the full-bridge driver. The setup uses N-channel mosfets, where the gate voltage supply is generated by boosting the track voltage.
  • XOR input circuitry, XOR ports, full bridge driver, mosfets and gate-voltage supply are all external to the polarity controller, but must be implemented if this design is to be used.
  • The clock signal can be generated by the controller. Connect IO port [D6] and [D7] using an RC network to tune the frequency.
  • The controller assumes a reset signal is always activated before the controller is used. An RC network to VCC can keep the reset signal active while powering up. Make sure to connect a switch that can ground the reset input to be able to activate the controller after an error.

POLARITY CONTROLLER
The inputs that can trigger a polarity change are connected through OR ports, hence every input can trigger a polarity change.

The trigger is used to drive a binary counter that counts down from 3..0 on the clock signal, which in turn generates signals for the full bridge driver, which is controlled by OUT2 and OUT3. To avoid shoot-through while switching in the FETs that connect tracks to either polarity, the outputs are only enabled on counts 1 and 3, using counts 0 and 2 to turn all FETS off. The counter generates a trigger when at value 0 and 2, so as to always end up in count 1 or 3. For miscellaneous purposes, the counter signal is provided on [OUT0] and [OUT1].
The counter trigger signal is provided on output OUT6, which can be connected through an RC delay on D0 to trigger an error when the trigger is active for an unusually long period of time. This may happen in case of short circuits at the tracks or other electrical issues. All driver outputs are disabled while an error is active.

The reset signal removes errors and disables the counter and bridge driver outputs.

An inverter network can be used to generate a clock by the IC. To this end, connect D6 and D7 through an RC network. The delay will tune the clock frequency.

How to test

Always reset the controller before using it. After a reset, provide a HIGH polarity switch trigger signal on IN0..IN7 or D1..D4 and provide a clock signal on CLK. The counter output must count down between 3..0 on the clock frequency while the trigger signal is HIGH. Also, OUT4 and OUT6 must be HIGH while the trigger is provided.

Remove the trigger signal. OUT4 must immediately output a LOW.
The counter must now stop at either 1 or 3 but never at 0 or 2. OUT6 will remain HIGH while counting, but must be LOW when the counter has stopped.

If a particular track polarity is A and its inverse is B, the following conditions must be met:

COUNT = 3, polarity A is active. OUT2 = HIGH, OUT3 = LOW  
COUNT = 2, tracks are disabled.  OUT2 = LOW,  OUT3 = LOW  
COUNT = 1, polarity B is active. OUT2 = LOW,  OUT3 = HIGH  
COUNT = 0, tracks are disabled.  OUT2 = LOW,  OUT3 = LOW  

Outputs OUT0..OUT3 must be LOW when a LOW->HIGH pulse is provided on D0, triggering an error which is indicated by a HIGH on OUT7.
Apply a reset signal to enable the outputs again, and ensure OUT7 is LOW.

Connect D6 and D7 through an RC network. Verify a self-oscillation is observed at output D7

IO

# Input Output Bidirectional
0 IN0: trigger signal to change polarity OUT0: counter signal D0: error input. Use to activate an error and disable outputs.
1 IN1: trigger signal to change polarity OUT1: counter signal D1: trigger signal to change polarity
2 IN2: trigger signal to change polarity OUT2: full bridge control signal for polarity A D2: trigger signal to change polarity
3 IN3: trigger signal to change polarity OUT3: full bridge control signal for polarity B D3: trigger signal to change polarity
4 IN4: trigger signal to change polarity OUT4: indicates a polarity switch trigger is active on one of the inputs D4: trigger signal to change polarity
5 IN5: trigger signal to change polarity OUT5: VCC D5: not used
6 IN6: trigger signal to change polarity OUT6: counter enabled signal D6: oscillator input
7 IN7: trigger signal to change polarity OUT7: active error signal D7: oscillator output