DIY Controller by Anthony New
This text and circuit diagrams for the controller may be downloaded in Adobe Acrobat format <100Kb> ,
or in Word97 format <30Kb>. The files require the use of WinZip to expand them after download.
Copy the downloaded zip file to your computer, then run WinZip to expand the files into a single folder/directory.
The images with the Word document are in GIF format., and will require suitable software installed to view and print.
For those with the Adobe reader software, the Acrobat format provides a better document resolution, and is recommended
Introduction
Due to popular request I will present a design for a model railway controller. I've tried to keep it as simple as practicable
consistent with what I consider to be an adequate level of performance and reasonable level of protection for itself and its
surroundings. The design is not quite modular but is a "building block" to which can be added various options as the user desires.
The basic controller design is one which has evolved over many years, and produces a medium level of pulse power. It produces more 100Hz
pulse power at low speeds than a variable-resistance or simple transistorised controller but a lot less than thyrister-based feedback controllers.
The amount has been chosen to allow most ready-to-run (rtr) motors to turn slowly enough for the loco to crawl acceptably, without risking
damage due to overheating ore creating excessive noise and roughness (if you're using Portescap-type motors I can't recommend it for them,
but you probably have a variable dc-controller already!) For those with long memories the basic waveform produced is similar to that of the
"Scalespeed" controllers of the 1960s and 1970's, though the circuitry is quite different.
How slowly will locos crawl? This depends on the loco of course, but well-maintained Triang/Hornby locos with the old X04 motor will run
smoothly down to a few seconds per inch, at which the armature is just visibly turning. The practical limitation is usually stiction in the wheels
and valve motion which vary with wheel position and stop it unless the speed is turned up much higher. Maintenance usually remedies this
but otherwise only feedback-control will help disguise it.
A few sophistications have been added that I find so valuable I wouldn't do without. The first is a reliable form of current limiting which
can protect both the controller, its power supply, the layout wiring and (to some extent) the loco itself, from the worst effects of short-circuits.
The current is limited to around 1 Amp but can be altered by changing a single resistor for use with either 2mm locos (lower limit?) or
double-headed 4mm locos (higher). A red LED indicates when the current limit is in operation. Note that the current limit operates instantly
and preserves control, rather than waiting for ten seconds and then shutting down completely, so you get a flashing indication of intermittent
shorts while the loco is running.
A green LED is also provided which lights when the track becomes open-circuit. You'd be surprised how many locos go momentarily open-circuit
while running slowly, due (usually) to lack of maintenance - the LED shows this quickly. The two LEDs together provide an automatic
indication of the amount of attention needed to loco and track, helping both to be optimised for smooth control. It is possible to use a single
bi-colour LED instead (the two-lead type) if preferred. Note that the green LED and R6 are optional but the red LED is necessary for current
limiting.
I have included a basic inertia simulation circuit, which is both adjustable and switchable. It can be deleted or improved but is a start for those
who like it; if you don't, miss out C2 and R8 and replace SW1 with a wire link.
Circuit Description - Basic Version
The rectified AC supply to the collector of a 2N3055/TIP3055 transistor TR1 is rectified again to charge a 220uF capacitor to about 20V, which supplies an LM358 dual op-amp IC1 and a speed control potentiometer. The voltage from this speed control is delayed by a switchable inertia simulation network and buffered by IC1a; it is then subtracted from the +20V rail by a differential amplifier IC1b and the difference used to drive the base of TR1 relative to its collector, giving a pulse output of the same shape as the rectified supply but with a variable dc level to provide a variable motor speed.
A 1( series resistor in the output and a parallel red LED limit the current output to about 1 Amp and give visual indication of a short-circuit or overload. A 1k resistor connected across TR1 has no effect when a motor is connected, but when the output goes open-circuit the current it passes flows through a green LED, indicating the open circuit state.
Construction:
Fairly simple. I generally use copper-clad printed-circuit board as front panel with switches and LEDs protruding through holes but all the other components soldered on to sticky strip or pads on the copper (back) side. However a pcb may be available at some point . . .
A Heatsink will be needed for TR1, and should be one rated at 10C/W or less, or if you're making one yourself it should be aluminium at least three square inches (20 sq.cm).
Circuit Diagram - Click to view fig 1.
Components for Simple Circuit (fig.1):
- IC1: LM358P
- TR1: 2N3055, TIP3055, or other 5A plastic power NPN transistor with heatsink
- D1 - D6: 1N4001
- LED1,2: green and red LEDs (40mA max current preferred)
- C1: 220uF 35V electrolytic
- C2: 10uF 35V electrolytic or tantalum
- C3, C4: 22nF poly or ceramic.
- R1 - R4: 33k(
- R5: 1( 2.5W wirewound
- R6: 1k( 0.5W
- R7: 10k potentiometer
- R8: small 200k trimmer potentiometer; multi-turn ones are best.
DIY Controller - Variations
When the original DIY circuit was described it included a few features which are useful but not strictly necessary, like the inertia simulation and the LEDs. However a number of other variations are also possible on the basic controller design including:
- Regulated supply for speed control;
- Non-linear speed control
- Increased output power;
- Negative Feedback
- Reduced pulse output
- Better inertia simulation
- Remote control from a walk-around handset
- Automatic control from signals/etc.
A second circuit diagram is provided which for convenience shows some of these additions, but it isn't actually
necessary to implement them all so they will be described separately.
Regulated Supply
A small improvement in speed control can be obtained by using a regulated supply for the speed control. This is most useful where several controllers are fed from a single transformer and otherwise heavy loads on one controller would reduce the supply voltage and slow down the other locomotive. The regulated supply is particularly desirable if negative feedback is added. The extra components needed are R10 and D8 (a 3k3 resistor and a 5V1 zener diode). The zener ensures that a constant voltage is obtained at the speed control R7 (a 10k potentiometer) irrespective of supply voltage, and at speeds below maximum the differential amplifier IC1B helps to maintain a constant output voltage too.
Non-Linear Speed Control
This very east to implement after the regulated supply - just one more resistor R12 - but why would anyone want it? Well, it is a fact of life on most layouts that much of the time the locomotive is moving is spent starting and stopping, yet the portion of the control knob movement which covers this regime is usually tiny, and the rest is taken up with small variations in high speeds which may be rarely used and are usually imperceptible. If we can make the control range deliberately non-linear we can expand the bottom "slow-speed" half of the knob movement and contract the upper "high-speed" half, and thus improve the controllability at slow speeds.
In technical terms we have altered the "control gain" across the control range, and in order to cope with various different locomotives the change must be done smoothly. R12 does exactly that, with a response which is almost logarithmic like the volume control on a radio. When feedback is used an additional non-linearity can be added also and this is described later.
Increased Output Power
Reference has already been made to the output current limit and the possibility of increasing this by changing R15 to a lower value. If this is done it will be necessary to ensure that TR1 has a good heatsink; if the effective current limit is then a couple of Amps or more it might also be a good idea to add a thermal cut-out to limit damage if a continuous short-circuit should occur.
If the available AC supply is rather low or the locomotives are very inefficient or perhaps low-geared, it is possible they might not run quite fast enough for some users. Although it is inevitable that the controller "wastes" some of the supply due to its inherent voltage drop, this drop can be reduced at the cost of a few more components. First is the altered connection to C1, with D5 and a new diode D7 connected to the AC supply instead of the rectified dc. This gains about half a volt on heavy loads, but a further improvement is possible. Adding R9 (=33k) and altering R4 to 15k reduces the voltage drop for part of each mains cycle; the two together give about a volt improvement overall at full throttle.
Negative Feedback
This is the big one - the one that separates the men from the boys!
To many people the phrase "feedback controller" implies a certain type of controller using a thyrister which varies its conduction phase-angle
and as a result produces a very high pulse-effect which is reputed to be harmful to some motors. This type of controller was popularised in
a small hand-controller of one leading manufacturer due to its inherently low dissipation but goes back much further than that - indeed so far
as I know I may even have been the first to make controllers for model railways using this concept in the early 1970's. However this type of
circuit is not necessary for feedback and the circuit proposed produces no more pulse energy than the non-feedback design and can be
arranged to produce less.
What is feedback? Well as far as model railway controllers are concerned "negative feedback" means precisely one thing - instead of setting
the voltage applied to the loco and allowing it find its own speed, a feedback controller selects a speed, compares it with the actual measured
speed of the loco, and uses the difference to control the voltage applied to the motor. The speed of the loco is "fed back" to the controller my
measuring the back-emf (the "dynamo effect") produced by the motor when the power is briefly interrupted every mains half-cycle.
The consequence is that the controller tries to keep the motor speed constant despite variations in load or friction caused by, for example,
sticky valve motion or varying gradients.
What are the snags? Well the main one is that feedback systems can oscillate if not well designed, and in designs such as this one the
time-constants have to be chosen very carefully to make the resulting control smooth and fuss-free rather than aggressive and jerky.
For this reason it is a good idea to stick to the component values I have indicated unless you know exactly what you are doing and are
prepared to spend a lot of time redeveloping the circuit!
The actual feedback components are D9, D10, R11, R14, R15, C5 and C6, but a new switch is also shown to allow the controller
to be switched to non-feedback operation for comparison purposes. The switch isn't really necessary since the feedback control is
so good you probably won't ever want to run with it off, but switching it off does show up how bad some locos have become with lack
of maintenance, since a good feedback system tends to disguise this. However to ensure the feedback works correctly it is advisable to
keep C3 to 22nF. R15 and D9, incidentally, allow the circuit to have a high loop-gain at low speeds for effective crawl performance while
reducing gain at high speeds where it can lead to instability. If it is desired to reduce the gain (for example to prevent very small light-weight
motors from "surging"), both R14 and R15 should be increased by a factor of two or so.
Note that for the feedback system to work properly the voltage regulator and inertia components are necessary. Inertia simulation can
be set to a low value, but must not removed completely or surging may occur if the speed control is altered suddenly and the feedback
tries to make the loco change speed instantly.
Reduced Pulse Output
Some people running high-precision motors in good-quality chassis may not need pulse energy to run smoothly at crawl speeds and may prefer not to expose their motors to it. In this case they have a choice - use a pure dc controller or modify an ordinary one to reduce the pulse output. The basic controller can be modified for a pure dc output but NOT the version with feedback; for pure dc, replace D5 in fig.1 with a short-circuit link and change C1 to 2000uF 35V wkg or higher.
For reduced pulse output with feedback, simply increase C4 to 100nF or more. Some pulse effect will still be present but less than before.
Inertia Simulation
This is already present in the basic circuit but can be altered and improved slightly. One thing I hate about inertia simulation is the long time it takes for the loco to start moving, which usually ends up with it either not moving at all when I think it will or bounding off at high speed despite frantic attempts to stop it! I also feel that real locos - particularly those moving light - often start moving very quickly - it's actually quite difficult to get a smooth slow start on some full-size locos! D11 simulates this by shorting the inertia simulation resistor R8 when the throttle is opened rapidly while allowing it to be effective on coasting and braking. I generally adjust R8 to let the loco follow the speed control fairly quickly when it is turned gently but still prevent the loco from stopping on a sixpence. Once you have found a suitable adjustment you can measure the value with a DVM and replace the potentiometer with a fixed resistor.
Inertia simulation for automatic control is of course another problem, and this is discussed later.
Circuit Diagram - Click to view fig 2.
Components for Enhanced Circuit (fig 2):
- IC1: LM358P
- TR1: 2N3055, TIP3055, or other 5A plastic power NPN transistor with heatsink
- D1 - D7: 1N4001 or similar 1Amp power diode. (1N5401 3A diodes will also do)
- D8: 5V1 zener, 400mW.
- D9 - 11: 1N4148 or similar small silicon diode
- LED1, 2: green and red LEDs (40mA max current preferred)
- C1: 220uF 35V electrolytic
- C2: 10uF 35V electrolytic or tantalum
- C3, C4: 22nF poly or ceramic.
- C5: 220nF poly or ceramic.
- R1 - R3: 33k
- R4: 15k
- R5: 1R 2.5W wirewound
- R6: 1k 0.5W
- R7: 10k potentiometer
- R8: small 200k trimmer potentiometer; multi-turn ones are best.
- R9: 33k
- R10 : 3k3
- R11: 560k
- R12: 3k3
- R13: 100k
- R14,15: 4k7
Comments on this controller are best posted on the newsgroup uk.rec.models.rail for the benefit
of other model railway enthusiasts.
The above information is provided by Anthony New. and this page is hosted by Web Technology Ltd.