Electronics - DC Controllers
There are many circuits for DC controllers and throttles for model railways on the Web and in books, but they are usually variations on a few basic themes. The book "Electrical Handbook for Model Railroads Part 2, by Paul Mallery" includes a very thorough survey of different types of controllers - well worth a read if you are thinking of designing your own.
These two designs were the final candidates for running my current layout Plymouth Citadel. I eventually selected the more complex PWM feedback design because I needed feedback's ability to run many different locomotives on the main line without changing the controller setting.
These two designs were the final candidates for running my current layout Plymouth Citadel. I eventually selected the more complex PWM feedback design because I needed feedback's ability to run many different locomotives on the main line without changing the controller setting.
Simple Controller
The first very simple design generates a good waveform for N gauge motors, chopping out the middle portion of the 12V full wave DC. This leaves four triangular pulses per mains cycle (effectively 200Hz or 240Hz), and provides excellent low speed control with a only moderate amount of motor noise. The main drawback is the poor sensitivity of the speed control potentiometer. This has been partially alleviated by adding two 2K7 resistors to change the linear pot to what amounts to a log/log pot.
The transistor runs cool since it is always fully saturated (fully on/fully off). However, when handling an overload it can generate a bit of heat. If using the suggested overload circuit, this should not be problem. If using a lamp or nothing at all, then it needs to be mounted on a sizable heat sink.
This design is loosely based on a circuit in Mallery (see Links).
The first very simple design generates a good waveform for N gauge motors, chopping out the middle portion of the 12V full wave DC. This leaves four triangular pulses per mains cycle (effectively 200Hz or 240Hz), and provides excellent low speed control with a only moderate amount of motor noise. The main drawback is the poor sensitivity of the speed control potentiometer. This has been partially alleviated by adding two 2K7 resistors to change the linear pot to what amounts to a log/log pot.
The transistor runs cool since it is always fully saturated (fully on/fully off). However, when handling an overload it can generate a bit of heat. If using the suggested overload circuit, this should not be problem. If using a lamp or nothing at all, then it needs to be mounted on a sizable heat sink.
This design is loosely based on a circuit in Mallery (see Links).
Overload Protection (Both Controller Designs)
There are two basic fault conditions a DC controller needs to cope with: simple short circuits and when two controllers are connected together (often with reversed voltages when a loco overruns its section and bridges a rail gap). The reversed voltage case is usually the worst one, and can do very unpleasant things to unprotected controllers.
There are three parts to the overload protection circuitry.
The first part is the 3A reverse-biased diode across the controller output. This is mainly there to convert the two-controller reverse voltage fault into a plain short circuit. It basically creates a simple short circuit for the other controller, so protecting it. One hopes that the other controller also has such a diode to return the favour.
The second part is the 220 ohm current-limiting resistor on the base of the output transistor. This limits the absolute maximum output current to about 2A. This should be plenty even when double-heading HO/OO locos, and is generally too much for N gauge, so 330 or 390 might be more suitable (I chose this to allow running multiple trains on my main line).
The third part is the extra circuit shown above. This is based on a design by Roger Amos (see Links), but I use it in what he considers to be a fault mode. The original circuit was designed to latch and disable the controller until the fault is cleared and the controller was manually reset. I have modified it to disable the controller output only for the rest of the current power pulse, so in overload mode the controller outputs a series of very short, low voltage 1A pulses until the fault is cleared. This should not be enough to cause damage or significant controller heating. The key part is the current sense resistors - I have used three 1.8 ohm 0.5W resistors in parallel (effectively 0.6 ohm 1.5W) , so the power cuts out and the LED illuminates at about 1A. My main line controllers have to handle multiple N gauge locos, so I use three 1.2 ohm resistors giving a limit of 1.5A.
An old fashioned quick and dirty alternative for the third part circuit is to wire a 12V incandescent automotive lamp between the controller track output and the track. This acts as a variable resistance - when the current is low, its resistance in negligible and it has no significant effect on running. If there is a short circuit, a high current flows and its resistance increases, providing a dummy load for the controller (and generating a lot of light!). The wattage of the lamp should be chosen based on the expected load. 18W is generally suitable for N gauge, but you would probably need 24W or so for OO. Note that this will cause the output transistor to generate a lot of heat during a fault, so it will then need to be mounted on a hefty heat sink. Also note that the transistor case will be live at 15-20VDC, so this needs to be a fully insulated or protected heat sink.
There are two basic fault conditions a DC controller needs to cope with: simple short circuits and when two controllers are connected together (often with reversed voltages when a loco overruns its section and bridges a rail gap). The reversed voltage case is usually the worst one, and can do very unpleasant things to unprotected controllers.
There are three parts to the overload protection circuitry.
The first part is the 3A reverse-biased diode across the controller output. This is mainly there to convert the two-controller reverse voltage fault into a plain short circuit. It basically creates a simple short circuit for the other controller, so protecting it. One hopes that the other controller also has such a diode to return the favour.
The second part is the 220 ohm current-limiting resistor on the base of the output transistor. This limits the absolute maximum output current to about 2A. This should be plenty even when double-heading HO/OO locos, and is generally too much for N gauge, so 330 or 390 might be more suitable (I chose this to allow running multiple trains on my main line).
The third part is the extra circuit shown above. This is based on a design by Roger Amos (see Links), but I use it in what he considers to be a fault mode. The original circuit was designed to latch and disable the controller until the fault is cleared and the controller was manually reset. I have modified it to disable the controller output only for the rest of the current power pulse, so in overload mode the controller outputs a series of very short, low voltage 1A pulses until the fault is cleared. This should not be enough to cause damage or significant controller heating. The key part is the current sense resistors - I have used three 1.8 ohm 0.5W resistors in parallel (effectively 0.6 ohm 1.5W) , so the power cuts out and the LED illuminates at about 1A. My main line controllers have to handle multiple N gauge locos, so I use three 1.2 ohm resistors giving a limit of 1.5A.
An old fashioned quick and dirty alternative for the third part circuit is to wire a 12V incandescent automotive lamp between the controller track output and the track. This acts as a variable resistance - when the current is low, its resistance in negligible and it has no significant effect on running. If there is a short circuit, a high current flows and its resistance increases, providing a dummy load for the controller (and generating a lot of light!). The wattage of the lamp should be chosen based on the expected load. 18W is generally suitable for N gauge, but you would probably need 24W or so for OO. Note that this will cause the output transistor to generate a lot of heat during a fault, so it will then need to be mounted on a hefty heat sink. Also note that the transistor case will be live at 15-20VDC, so this needs to be a fully insulated or protected heat sink.
Complex PWM Controller with Feedback and Rounded Pulses
This controller is a square wave Pulse Width Modulation (PWM) design with feedback, modified to generate a rounded output pulse to be gentler and quieter with N gauge locos. At low speeds (or with low power locos), the output voltage is also reduced from the maximum peak of about 17V. The low speed control is excellent, and it is not too noisy (unfortunately, good low speed control and noisy running generally go together).
This design is based on a circuit originally published by Electronics Australia and later by Silicon Chip (the Railpower Mark 1, dating back to 1984).
The output transistor will generate some heat due to the way the leading and trailing edges of each power pulse are generated, but not too much - a small heatsink is adequate.
The feedback voltage is measured based on the original square wave output, so the rounded tail of each pulse slightly corrupts the reading, but this tends to be a fixed distortion and so cancels out.
This circuit uses the same overload protection logic as the simpler controller, so the overload circuit is not shown below.
This controller is a square wave Pulse Width Modulation (PWM) design with feedback, modified to generate a rounded output pulse to be gentler and quieter with N gauge locos. At low speeds (or with low power locos), the output voltage is also reduced from the maximum peak of about 17V. The low speed control is excellent, and it is not too noisy (unfortunately, good low speed control and noisy running generally go together).
This design is based on a circuit originally published by Electronics Australia and later by Silicon Chip (the Railpower Mark 1, dating back to 1984).
The output transistor will generate some heat due to the way the leading and trailing edges of each power pulse are generated, but not too much - a small heatsink is adequate.
The feedback voltage is measured based on the original square wave output, so the rounded tail of each pulse slightly corrupts the reading, but this tends to be a fixed distortion and so cancels out.
This circuit uses the same overload protection logic as the simpler controller, so the overload circuit is not shown below.
Construction, Installation and Panel Wiring
Each controller is built on a long, narrow strip of Veroboard (sized to fit under the control panels) with a standardized 9-pin D type connector. The panel has the potentiometer, overload LED and reversing switch. This allows me to easily swap out and experiment with different controller designs.
The controllers on the main driving panels also have a simple unidirectional track circuit before the reversing switch (from Amos, see Links), with an LED that illuminates whenever a loco is on the track attached to that controller.
Each controller is built on a long, narrow strip of Veroboard (sized to fit under the control panels) with a standardized 9-pin D type connector. The panel has the potentiometer, overload LED and reversing switch. This allows me to easily swap out and experiment with different controller designs.
The controllers on the main driving panels also have a simple unidirectional track circuit before the reversing switch (from Amos, see Links), with an LED that illuminates whenever a loco is on the track attached to that controller.