Electronic Product Design

28/02/2012 - Advanced Model Railway Controller

Steam Engine

Complex motor control options

This week we have a challenge. We are charged with what might appear to be a simple task. In the process, we will come across a few “issues”. The aim of the exercise is to see into the world of design and the kind of processes that go on behind the scenes.

The scene

The enquiry is for an advanced model railway controller. You may remember the train sets of old where the train speed was controlled with a rotary control. It was a crude device in technical terms. The trains would run pretty much as desired until/unless they hiccuped on points or similar disruptions in the circuit. The circuit is a powered from the controller, through the track to the motor inside an engine that has conductive wheels/pick ups.

A more advanced version would use constant current control for the train motor. There are other features of this controller that add considerable interest to the railway modeller. However, we are just going to focus on the control that provides the power.

First approach

The first approach is the simple one. We create a simple “linear circuit” with an op-amp and a MOSFET (or bipolar transistor). These are relatively inexpensive parts and the design will not take too long. No problem. Job done then.

Just before we sign off on our amazing ability to solve this problem too quickly, we'd better just check that there are no other issues. We need to handle voltages above 12V and we'll say that our maximum (controlled) current is 1A. Under certain conditions, we will have a condition where there could be 12W (Watts) of power (heat) dissipated.

Even if we say that this condition is unlikely to happen frequently, the system would be prone to failure if we don't design for it. Commercially this omission is not acceptable. So we have to provide a heat-sink.

Step off the board

The heat-sink is an aluminium extrusion with fins, which usually have sharp edges. A look through the catalogue results in a variety of heat-sinks. The smallest of these is naturally the cheapest. Unfortunately they heat up more for a given amount of power (Watts). Now we have to start thinking about the maximum temperature that we can afford.

There are two constraints to our temperature rise. One of these is the temperature of the MOSFET that we used. It becomes “unhappy” when its internals go above 70 degrees centigrade but will continue to function above this. Given that the 12W number is a fault condition we might “do” various things circuit wise to limit the time or exposure to this extreme.

The second constraint is that of human contact. There are limits prescribed by international standards for the maximum surface temperature that users may be able to touch. Often these will be more of a constraint than the device temperature.

Now we have defined a larger heat-sink to fulfil the need. It works most effectively with airflow, which is why it is on the outside of the case which houses the remainder of the circuit. Only two more issues have arisen. The first is the sharp corners, which are also not permitted by standards. We could round off the corners by a machining process but before we go that far let's review costs. Our circuit costs are OK but the cost of making this viable has shot up substantially. The heat-sink has made it costly before adding a bespoke machining cost too.

On the way through

Please don't ask what's normal for a designer! The most thoughtful of designers will probe a number of avenues before reaching a final decision. In this design task, the impact of some other issues have changed the initial thoughts about the purely simple approach.

This railway controller will be expected to able to drive the train in both forward and reverse directions. This means reversing the polarity of the connections from the controller to the track. We can use a simple switch to do this job. Great. It's another instant success... or is it?

We will examine a situation where the train/motor is driven at half speed, forwards. Throw the reverse switch and instantly the circuit will reverse the polarity of the power applied to the motor. Apart form any lack of realism on the model railway, the electrical mayhem of this approach is very undesirable. For the moment we will assume that our circuit is sufficiently good to handle this (we can make it so). Where is the problem?

The task of a considered design has to go beyond the immediate circuit responsibility. In this instance, we would open the doors to a variety of complaints if the users burn out their motors due to inappropriate reverse/forward switching. We could, of course, just say that this is an issue that belongs in the user manual - that is a sort of “it's not my fault” approach.

“Proper” design

In the context of this project we must take responsibility for the user operations that we can foresee and protect. What we really need is a circuit or system that does not allow the change of direction to occur until the motor has come to rest or is, at worst, operating at very low power.

One of the thoughts is this process is the kind of thing that stems from experience more than any text book or web-search. It would be possible to conceive of a form of “twisted” audio amplifier. This has the ability to provide either “positive” power or “negative” power. It will never provide both at the same time. It has an elegance in that a move from positive to negative will be smooth and passes through zero (no power) before building in the newly desired direction.

The above approach is elegant and performs one of our target requirements. We could be very proud of this and think that such an intelligent approach is the mark of good design. However, we must (as designers) be prepared to be self critical and objective. Good design requires passion for the “good stuff” but not to be too precious about a concept.

It quickly turns out that the costs of this approach are in the form of more power devices. The doubling up of parts makes it less desirable than a relay. We can make low power (cheap) circuitry to detect the output. We can then arrange for a circuit to make a relay do the reverse switching when it is appropriate to do so. We have now protected the user and can use a single direction power control manage the power.

Final step (down)

The heat problem arises because a linear circuit has to deliver the desired energy to the load (motor/railway engine) and waste the excess energy (in the form of heat). A preferable approach would be more efficient. In being more efficient, we would claim to be more environmentally friendly too. Whilst ecological considerations were not in the stated requirements it is easy to see how a little more effort can deliver both commercial and environmental benefits.

There is a realm of circuitry known as switch mode. In this mode (method) a fast electronic switch applies power to a circuit made of an inductor and capacitor. It bases its function on the percentage of time that power is applied. Fixed voltage (from our supply) for a large percentage of time yields a “big” output whilst a small percentage of time reduces the voltage without adding heat. (For the technically minded we have to admit there is a small amount of wasted power but very much smaller than otherwise).

This type of circuitry still retains “disquiet” in many circles. It is less easy to design in the first place and designers without such experience are very likely to fall into the many traps that exist. It can also can produce electrical noise which pervades the surrounding circuitry and become apparent on the external circuit (railway track or motor). There are standards that control the emissions of electronic “naughtiness”. We have to adhere to these standards and design accordingly.

Our (railway) journey

We started with a requirement for an advanced model railway controller. It looked simple enough, especially compared with the distant memories of the train set device that night have existed in childhood. One of the challenges with design is that of expectation.

The distant memory creates a mental picture of simplicity. However, technology, efficiency, improved customer expectations and international standards have all had an impact on the real picture. The final circuit combines switch mode technology to control avoid heat build up and a linear circuit to ensure that the motor only “sees” pure DC.

The proposed project was deliberately chosen not to expose any real requirement of an existing client. However, the project has validity as a real one. If there are any railway modellers out there who would like such a device, then please contact us.

The proposed unit would:

  • Control HO/OO, N gauge and other popular scales
  • REAL drive experience (thrust/acceleration/coast/brake)
  • Controlled reverse direction
  • Protect from short circuits (with indication)
  • Provide smooth running even over points or dirty connections
  • Avoid heated motors through “Pure DC” output
  • Assure reliability

Posted by: Peter Hawkins on 28/02/12.

Image: Susie B / FreeDigitalPhotos.net.

Connect with us

Check us out:

More stuff

Contact Us

Hawkshead Designs Ltd
Unit 4 Penrose House
Treleigh Industrial Estate
TR16 4DE

T: 01209 216 878

E: info@hawksheaddesigns.co.uk

Electronic Design Solutions and Electronic Product Design

Read our Standard Terms & Conditions here.

This website is brought to you by Nicola Bathe.