In this post I have explained how to build a simple yet a realistic model train controller circuit, which can be integrated with the rail tracks of an existing motorized train system and used for controlling its speed, acceleration, deceleration with original effects.
How the Circuit Works
A schematic diagram for the Train Controller can be witnessed Fig. 1 below. As demonstrated, a 555 timer (U1) is set up for an astable multivibrator (oscillator) having a duty cycle of 400:1 duty cycle and also a frequency of 40 Hz.
This frequency reduces flickering of the train headlight but yet makes it possible for the motor armature to get pulsed so that it is able to change over gradually for crawling and slow-speed control. As soon as power is given to the circuit, it discharges the capacitor C1 which can be seen connected to pin 6 of U1. The IC 555 output which is utilized to shunt current is held low. Capacitor C1 starts charging by means of R1 and R2 and gradually moves towards the positive supply level.
As soon as the charge across the C1 extends to around 2/3rd of the positive supply, the U1 555 output at pin 3 becomes high.
At this juncture C1 starts to discharge via R2. The moment the charge inside C1 drops to approximately 1/3rd of the supply voltage, the U1 555 output comes back to the low logic condition, and this high/low changeover cycle goes on repeating as long as power remains connected to the circuit.
When the U1 555 output goes low, C3 gets discharged via U1 pin3 transistor Q2. Next, as soon as U1 pin 3 turns high, C3 now charges by means of a current source which involves diodes D1, D2, resistors R3, R4, and transistor Q1.
The repetition of charge/discharge across the capacitor C3 causes the generation of a string of pulses which are applied to the inverting inputs of U2a and U2b which are the op amps from the IC LM358 dual op amp.
A couple of resistive potential divider circuits including resistors R7, R8, and R9, and resistors R10, R11, R12 establish the reference voltage which is given to the non-inverting pin3 and pin5 inputs of U1a and U1b. Variable resistors or pot controls R9 and R12 are used for adjusting the low DC duty cycle between 5 to 10 % of U1a and U1b.
The pots are adjusted to ensure that the headlights of the train illuminate optimally but with minimal humming noise on the train motors. Potentiometer R3 is used for setting up the C3 ramp rate for 100% duty cycle when the throttle adjust is set to maximum. A DPST switch (S1a snd S1b) is incorporated to include R3/C4 and R4/C5 into the circuit.
The network comprising of resistors and capacitors R5/C4 and R6/C5 force the reference voltages introduced to the non-inverting inputs to U2a and U2b to switch extremely slowly whenever the throttle is flipped upward and moved downward. Due to this action the train movement behaves as if it is making an attempt to counter a high level of inertia while it is just starting or stopping.
When the ACL/DCL button is switched off, the throttle-divider resistance networks tend to be a lot lesser compared to those of R5 and R6, therefore the reference voltages applied on C4, C5 adjust "quickly" for the fresh throttle setting. This allows steering clear of possible accidents or derailments while operating the model trains.
The model train output motor controllers incorporate resistors R13 to R15, and transistors Q3 and Q4 for energizing output "A;" and resistors R17 to R20, and transistors Q5 and Q6, for energizing output "B."
The parts that includes R13/R16/Q3 and R17/R20/ Q5 are configured to limit the Q4 and Q6 output drive currents to around three amperes each. Resistors R14/R15 and R18/R19 are used fir biasing and switching Q4 and Q5, respectively, just before the over voltage is reached to stop any harm to the output driver transistors and also neutralize the back EMF transients released from the inductive motor loads.
Power Supply
The power supply is configured to provide 18 volts to the model railway tracks, which is obtained from the points across C6. The voltage regulator U3 which is a IC 78L09 9 volt, 100 mA voltage regulator, is configured to provide the required regulated 9 V power to the control circuits, comprising of the op amps, transistors etc..
Construction
The author's model train controller circuit had been initially put together over a section of perfboard or strip board. A neat little PCB layout was subsequently developed for the proposed Train Controller circuit. The complete PCB layout (along with specified measurements) can be witnessed in Fig. 3 below.
It is possible to do the etching work of your own board or make to order from one of the relevant online suppliers. Once the PCB is obtained, it is just about fitting all the parts on the board and test the unit by doing the necessary connections with the railway tracks.
J1---J4 can be any suitable connectors, such as speaker connectors, which can be used for hooking up wires across train controller and the railway tracks.
Ken says
If I credit you and link your article can I build the controller and write an article about it on my page ?
Swagatam says
Yes, you can.
Ken says
I just finished drawing a PCB and a Gerber file. I added an LM317 to regulated the incoming voltage so you can power the board with wallwarts from 12v to 24v.
Swagatam says
Sounds great, all the best to you.
Bob says
Hi do you have a PCB layout for the components ? that would be appreciated!
Swagatam says
Hi, Sorry, I do not have the PCB component layout for the above project.
Ken says
I just drew a PCB and the Gerber files.
Mike says
Thanks for these great schematics.
On the first one, Q2 has its emitter connected to its base. Is this on purpose? I think it will act as a diode, not as a transistor, right?
Do you have the other side of the PCB so we know where each component goes?
Swagatam says
You are right, it seems Q2 is configured to work like a diode.
Sorry, I do not have the other side of the PCB layout.