Train set controller with close to pure DC

Thread Starter

ChrisNUK

Joined Dec 29, 2020
6
Hello everyone and thanks for any advice.

This is my first post here so, a little background. I did some electronics training in the late seventies on my aerospace engineering apprenticeship but, apart from some vintage Hi-Fi rebuilds and the like, I haven't been particularly active in this field. Things have clearly moved on a lot but, I'm happy at reading specifications so, I can generally follow what's required. Apologies for any misunderstandings though. We moved back to UK a few years ago and I work part-time as a watchmaker now mainly servicing vintage watches. I have some electronic measuring equipment but here mainly, I'm using my Fluke 87V (RMS multimeter) and a cheap Chinese scope.

The project I'm working on is a model train set. I've put this up at head height around the dining room and this gives me some issues with noise that wouldn't usually be critical. I've also, possibly foolishly, decided to use the locos and carriages that my wife's late father bought for her in the early sixties - these were already secondhand so they are from the late fifties. I had the old loco motors rebuilt and rewound as they ran very hot and sparked terrifically. I have gone with a DC system so no digital control to integrate. I had no issues building the points CDU and setting up relays for the points. The system works fine and is two tracks at different levels, with sidings and points to change locos between the two tracks. I turned down the old loco wheels to suit the latest track design and the old locos run fine, as well as the couple of new locos. Everything works absolutely fine and it's a nice thing to have.

Because the track is high up, motor noise is the issue. The new locos run fairly quietly using the PWM controller (Hornby HM2000) but, the old locos are very noisy - not so much with the bodies off but with the plastic body fitted, the sound is not good as the body amplifies the noise. The HM2000 pulses are at 100 Hz and this seems to be making the noise. I tried running the trains using a 12V car battery and the locos are silent so, the issue in my opinion, was the PWM pulses. The PWM advantage is that it is good at overcoming stiction but the downside is that the motors run hotter and, in my situation, the noise is unacceptable. I then thought I would try to build a power controller that would suit for my odd situation but couldn't find any schematic that worked well. I need:

Close to a DC source for minimum noise and cool motors (long run times).
Two controllers as there are two tracks.
Variable output from 0V to 12.5V on each track - reversible as well.
Up to 0.5 amps at 12V per track to run the old locos. The new locos run under 0.2 amps.
The circuit I built is for one track and there will be another.

The HM2000 had an 18VAC output and I started with that and rectified it to 24V DC. In the end, the HM2000 won't be required at all so, I changed to a 24V DC, 18W brick (VET18US240C2-JA) and removed the rectifier diodes from my board. Considering this is a cheap supply, it has a stable output with a ripple of a few mV at about 200Hz. As this frequency is not too high and still in the audible spectrum, I thought I'd aim to get closer to pure DC. The brick will run both tracks.

I read around and it seemed the best way to achieve a close to pure DC source would be to use a step down switching regulator - there may be easier ways... I also realize you can buy a board for under £20 that will have this on there but, I fancied making a board of my own. I am using an LM2575-15 to take the 24V input and output 15V which has no ripple to speak of, about 1mV at 50kHz+. I could have used an adjustable LM2575 but the topology seemed too critical for my knowledge.

The 15V then feeds an adjustable LM317 and the rotary pot (2k) includes a detent which I use to switch the whole circuit off at the 24V input. This gives me 0V to 12.5V at the output and easily supplies 0.5 amps (actually, the LM317 always has 1.25V when the circuit is on but that's fine as I use the pot detent to turn off the circuit).

That output goes through a resettable fuse (holding 750mA and trips at 1.5A) intended to protect the circuit from short circuits which are typical on model railways.

Then a DPDT power relay so that the railways tracks can be +ve on either side and ground on the other, to allow backward running - this is typical motor control so nothing special.

This may not have been the easiest way to do this but, I've found it interesting to do and have learnt a few things. There is a little heat generated but I have a decent heatsink on the LM317 as this is the one generating heat. With the trains running at 0.50A and about 10-11V (say 5-6 watts), the brick is outputting about 0.35-0.40A at 24V (say 9W) so there is significant heat to be dissipated of about 3W, most of that on the LM317 (about 4V at 0.5A = 2W in this case). The LM2575 heatsink is smaller.

Schematic as below:
controller schematic.jpg

This circuit works fine on one track and the locos run silently with linear control. I am sure this is not the easiest way to achieve this but, I can easily make the other controller for the outer track now and should have a complete controller. Before that, though, I'd appreciate a little help for anyone that has followed this long text...

1. When I short the output, the resettable fuse never comes into play as the brick has short circuit protection as "Continuous, trip and restart (hiccup mode) with auto recovery" and this works instantly, dropping the 24V input. I suspect it is not good design to rely on the brick to resolve short circuit issues so, would it be better to use a holding = 400mA, trip = 800mA resettable fuse at the fuse location shown directly after the 24V imput? Something like a Bourns MF-R040? Even then, it seems likely that the brick will trip first as these resettable fuses take a few seconds to kick in. Or, is there a better way?

2. The bigger question is how to deal with the situation where the tracks are connected by the points and the controls are not aligned - I am trying to work out a way to explain that and this is already very long so will save this for later.

Thanks for any help and comments in general.

Regards, Chris
 

Deleted member 440916

Joined Dec 31, 1969
0
2. The bigger question is how to deal with the situation where the tracks are connected by the points and the controls are not aligned - I am trying to work out a way to explain that and this is already very long so will save this for later.
The answer is you need multiple isolated transformer secondaries.

An improvement to your 1st solution would be to use a more suitable transformer rather than the 24Vac you have presently, for example a dual 15Vrms would help with 1 and solve 2
 

djsfantasi

Joined Apr 11, 2010
9,163
What scale is this and is the track two-rail?

As far as potential shorts when the points are set for a crossover, what electrical type of turnout do you have? Powered frog, power routing or through power? And how are the turnout throw activated? Manual throw, solenoid, slo-motion, servo? Are additional contacts available on the turnout machine?

The basic approach is to use insulating track joiners in the crossover. Then, you need an automatic polarity alignment circuit or manually ensure that polarities match.

Do you intend to switch the power source between the loops or permanently assign each loop its own power supply?

In the former case, each loop would have a DPDT (or greater) switch to select the appropriate power source.

As a side note, how many trains do you want to run at the same time? If more than one, you should really look into block control. Try to find a copy of “Wiring Your Model Railroad” by Kalmbach publishing.
 

Thread Starter

ChrisNUK

Joined Dec 29, 2020
6
Many thanks for the immediate responses.

It's been a long time since I've looked into things like this and I hadn't realised I could just buy a linear supply that will emulate DC.

The reason for starting with 24V DC is that's really what's needed by the 2575 to generate 15V, at 0.5A or so. I then need 15V to run the LM317 as it runs with Vin-Vout of at least 2.5V.

It sounds like I can skip both of these with a linear supply.

I see what you mean about the dual power supply as well.

It's OO scale, 2 track, with insulated frogs (Hornby standard with the plastic insert) and solenoid activated points. I was mainly concerned about the situation where one track is set to run clockwise and the other anti-clockwise as then throwing the points could connect the +ve rail on one directly to the earth rail on the other. I've not had a train layout before so, there has been a bit to learn and I've used just Hornby track.

Each circuit has it's own supply but, when the points are thrown, the inner controller will also control the outer, temporarily. I only intend to run one train on each track at a time. The HM2000 behaves absolutely fine with the layout, excluding the noise.

As I say, many thanks for the replies and I will look into your suggestions. I suspected I had overcomplicated things ...

Cheers, Chris
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
I would assume that the early model was the SCR version, GE experimenters manual showed a RR control circuit such as this back in 80's.
You should have no issue with PMW if you go with a great deal higher frequency, e.g. 5khz and above.
Most DC controller such as T.M.s are done this way and are super silent in operation.
You also do not have to worry about precise power supply voltage.
Max.
 

Thread Starter

ChrisNUK

Joined Dec 29, 2020
6
I meant to say that I could have started with 18V and a different inductor for the LM2575 but I think, from the datasheet, that I need some headroom above the 15V output.

Thanks Max. That's interesting as I struggled to find anything that was close to what I wanted. I will have a look at what you're referring to.

Cheers, Chris
 

djsfantasi

Joined Apr 11, 2010
9,163
It's OO scale, 2 track, with insulated frogs (Hornby standard with the plastic insert) and solenoid activated points. I was mainly concerned about the situation where one track is set to run clockwise and the other anti-clockwise as then throwing the points could connect the +ve rail on one directly to the earth rail on the other. I've not had a train layout before so, there has been a bit to learn and I've used just Hornby track.
Without insulated rail joiners at the crossover, if the directions are different on each loop, one of two things will happen. If the turnouts are of the “power routing” type, when you set then for the crossover, you will have a short. If they aren’t power routing, then you’ll always have a short. You need to learn the specifics of wiring model railroads and that’s why I recommended that book.

Without additional switches/wiring, the inner loop won’t be able to control the outer loop. Just saying.

There are two issues here. One is the electronics of a model railroad power supply. The other is the special requirements of wiring two-rail model railroad track.
 

Thread Starter

ChrisNUK

Joined Dec 29, 2020
6
Thanks djs. I will have a look for that book.

At the moment, the track circuis are complete and wired to the HM2000, which has two controls- one for the inner circuit and one for the outer. Each control has a reverse switch. I positioned the power entry points to suit the track layout. With the points set straight, each control works one circuit. Let's say I set both controls to run clockwise at position 7, if I activate one of the two circuit joining points pairs, it works like this:

Inner control set to run clockwise at position 7, outer control set to run clockwise at 7, there is no fighting as expected. Loco runs as if one control is set to 7.

Increase one control and the loco (whichever circuit it is on) will go faster. Both controls drive both tracks and, as one control has a higher voltage, that controls the speed.

If you switch direction on one control with both at 7, it cancels the other and the train stops. Reduce or increase one and the loco starts to move in the expected direction.

This is what I expected but, I know there are different ways to achieve this. I take your point though that although this works with the HM2000, it may give issues with my homebuilt controller and that's what I was trying to think through. As the HM2000 will do what I expect, that's what I will aim for. When I set up the circuit, I just put parts together and checked continuity with points on or off and everything made sense. I didn't think too deeply about it because it was as I expected.

Thanks, Chris
 

Dodgydave

Joined Jun 22, 2012
11,303
A simple car battery charger transformer and bridge rectifier smoothing circuit with the LM317 will do, if you need more current, use a PNP pass transistor..
 

BobaMosfet

Joined Jul 1, 2009
2,113
Hello everyone and thanks for any advice.

This is my first post here so, a little background. I did some electronics training in the late seventies on my aerospace engineering apprenticeship but, apart from some vintage Hi-Fi rebuilds and the like, I haven't been particularly active in this field. Things have clearly moved on a lot but, I'm happy at reading specifications so, I can generally follow what's required. Apologies for any misunderstandings though. We moved back to UK a few years ago and I work part-time as a watchmaker now mainly servicing vintage watches. I have some electronic measuring equipment but here mainly, I'm using my Fluke 87V (RMS multimeter) and a cheap Chinese scope.

The project I'm working on is a model train set. I've put this up at head height around the dining room and this gives me some issues with noise that wouldn't usually be critical. I've also, possibly foolishly, decided to use the locos and carriages that my wife's late father bought for her in the early sixties - these were already secondhand so they are from the late fifties. I had the old loco motors rebuilt and rewound as they ran very hot and sparked terrifically. I have gone with a DC system so no digital control to integrate. I had no issues building the points CDU and setting up relays for the points. The system works fine and is two tracks at different levels, with sidings and points to change locos between the two tracks. I turned down the old loco wheels to suit the latest track design and the old locos run fine, as well as the couple of new locos. Everything works absolutely fine and it's a nice thing to have.

Because the track is high up, motor noise is the issue. The new locos run fairly quietly using the PWM controller (Hornby HM2000) but, the old locos are very noisy - not so much with the bodies off but with the plastic body fitted, the sound is not good as the body amplifies the noise. The HM2000 pulses are at 100 Hz and this seems to be making the noise. I tried running the trains using a 12V car battery and the locos are silent so, the issue in my opinion, was the PWM pulses. The PWM advantage is that it is good at overcoming stiction but the downside is that the motors run hotter and, in my situation, the noise is unacceptable. I then thought I would try to build a power controller that would suit for my odd situation but couldn't find any schematic that worked well. I need:

Close to a DC source for minimum noise and cool motors (long run times).
Two controllers as there are two tracks.
Variable output from 0V to 12.5V on each track - reversible as well.
Up to 0.5 amps at 12V per track to run the old locos. The new locos run under 0.2 amps.
The circuit I built is for one track and there will be another.

The HM2000 had an 18VAC output and I started with that and rectified it to 24V DC. In the end, the HM2000 won't be required at all so, I changed to a 24V DC, 18W brick (VET18US240C2-JA) and removed the rectifier diodes from my board. Considering this is a cheap supply, it has a stable output with a ripple of a few mV at about 200Hz. As this frequency is not too high and still in the audible spectrum, I thought I'd aim to get closer to pure DC. The brick will run both tracks.

I read around and it seemed the best way to achieve a close to pure DC source would be to use a step down switching regulator - there may be easier ways... I also realize you can buy a board for under £20 that will have this on there but, I fancied making a board of my own. I am using an LM2575-15 to take the 24V input and output 15V which has no ripple to speak of, about 1mV at 50kHz+. I could have used an adjustable LM2575 but the topology seemed too critical for my knowledge.

The 15V then feeds an adjustable LM317 and the rotary pot (2k) includes a detent which I use to switch the whole circuit off at the 24V input. This gives me 0V to 12.5V at the output and easily supplies 0.5 amps (actually, the LM317 always has 1.25V when the circuit is on but that's fine as I use the pot detent to turn off the circuit).

That output goes through a resettable fuse (holding 750mA and trips at 1.5A) intended to protect the circuit from short circuits which are typical on model railways.

Then a DPDT power relay so that the railways tracks can be +ve on either side and ground on the other, to allow backward running - this is typical motor control so nothing special.

This may not have been the easiest way to do this but, I've found it interesting to do and have learnt a few things. There is a little heat generated but I have a decent heatsink on the LM317 as this is the one generating heat. With the trains running at 0.50A and about 10-11V (say 5-6 watts), the brick is outputting about 0.35-0.40A at 24V (say 9W) so there is significant heat to be dissipated of about 3W, most of that on the LM317 (about 4V at 0.5A = 2W in this case). The LM2575 heatsink is smaller.

Schematic as below:
View attachment 226742

This circuit works fine on one track and the locos run silently with linear control. I am sure this is not the easiest way to achieve this but, I can easily make the other controller for the outer track now and should have a complete controller. Before that, though, I'd appreciate a little help for anyone that has followed this long text...

1. When I short the output, the resettable fuse never comes into play as the brick has short circuit protection as "Continuous, trip and restart (hiccup mode) with auto recovery" and this works instantly, dropping the 24V input. I suspect it is not good design to rely on the brick to resolve short circuit issues so, would it be better to use a holding = 400mA, trip = 800mA resettable fuse at the fuse location shown directly after the 24V imput? Something like a Bourns MF-R040? Even then, it seems likely that the brick will trip first as these resettable fuses take a few seconds to kick in. Or, is there a better way?

2. The bigger question is how to deal with the situation where the tracks are connected by the points and the controls are not aligned - I am trying to work out a way to explain that and this is already very long so will save this for later.

Thanks for any help and comments in general.

Regards, Chris
The original DC transformers for model railroads for the era you're talking about use rheostats to control the DC after rectification from AC fuse, and so forth.
 

djsfantasi

Joined Apr 11, 2010
9,163
Thanks djs. I will have a look for that book.

At the moment, the track circuis are complete and wired to the HM2000, which has two controls- one for the inner circuit and one for the outer. Each control has a reverse switch. I positioned the power entry points to suit the track layout. With the points set straight, each control works one circuit. Let's say I set both controls to run clockwise at position 7, if I activate one of the two circuit joining points pairs, it works like this:

Inner control set to run clockwise at position 7, outer control set to run clockwise at 7, there is no fighting as expected. Loco runs as if one control is set to 7.

Increase one control and the loco (whichever circuit it is on) will go faster. Both controls drive both tracks and, as one control has a higher voltage, that controls the speed.

If you switch direction on one control with both at 7, it cancels the other and the train stops. Reduce or increase one and the loco starts to move in the expected direction.

This is what I expected but, I know there are different ways to achieve this. I take your point though that although this works with the HM2000, it may give issues with my homebuilt controller and that's what I was trying to think through. As the HM2000 will do what I expect, that's what I will aim for. When I set up the circuit, I just put parts together and checked continuity with points on or off and everything made sense. I didn't think too deeply about it because it was as I expected.

Thanks, Chris
What’s happening is that the voltages from each controller are cancelling each other out. I would expect this in isolated supplies, but didn’t mention it because it made an explanation even more confusing. The book will explain better than I can, as there’s a lot to consider.

The downside is that there is a combination of settings and turnout* positions could possibly apply 24V to your 12V engines and their motors could burn out. You don’t want that.

If you like to experiment, draw a crossover on paper with both rails. Make a few copies. Then, using different colors for each controller and each polarity, trace out how the current flows. You’ll see what I mean.

Good luck.

* in model railroading, track switches are referred to as turnouts so as not to be confused with electrical switches. Even more confusing is that power routing turnouts are both track switches and electrical switches.
 

Thread Starter

ChrisNUK

Joined Dec 29, 2020
6
What’s happening is that the voltages from each controller are cancelling each other out. I would expect this in isolated supplies, but didn’t mention it because it made an explanation even more confusing. The book will explain better than I can, as there’s a lot to consider.

The downside is that there is a combination of settings and turnout* positions could possibly apply 24V to your 12V engines and their motors could burn out. You don’t want that.

If you like to experiment, draw a crossover on paper with both rails. Make a few copies. Then, using different colors for each controller and each polarity, trace out how the current flows. You’ll see what I mean.

Good luck.

* in model railroading, track switches are referred to as turnouts so as not to be confused with electrical switches. Even more confusing is that power routing turnouts are both track switches and electrical switches.
Thanks again and apologies for my lack of train terminology. The voltage cancelling is exactly what I was seeing.

It was the 24V on the motors that was also concerning me but I couldn't easily demonstrate that may happen. I'll look for that book and draw out some crossovers as well. It's not easy to see as I was never pulling any rail lower than the ground rail. Writing the combinations wasn't clear. The HM2000 has isolated supplies and there is clearly a reason for that.

Enjoy your evening and thanks to everyone for the suggestions and ideas. I will look into them.

Chris
 
Top