DIY PWM Questions

The place for general discussions and requests for help on all matters relating to T gauge.
Post Reply
martink
Posts: 259
Joined: Sun Feb 09, 2014 3:13 am
Location: Melbourne, Australia
Contact:

DIY PWM Questions

Post by martink »

I'll be building my own PWM controller for my T gauge layout sometime in the not too distant future, and I was just wondering what traps and pitfalls others have run into doing this for T gauge. I am not particularly happy with the standard commercial controller - it is not a bad unit, but runs at a very low frequency (only 100Hz), which I feel is way too low for such small models. I'd be reluctant to go below 200Hz even in N. Watching back EMF with a 'scope, you can actually see the motor decelerating by about 50% after each pulse, which explains why I get jerky running at very low speeds.

So, to avoid reinventing the wheel...

What PWM frequencies have other people used, and how did they work out?
Has anyone tried designs with modified waveforms to reduce the motor growl?
What overload current limits have people used?
Any other caveats?

User avatar
dkightley
Posts: 1247
Joined: Wed Nov 13, 2013 9:43 pm
Location: Nottingham, UK

Re: DIY PWM Questions

Post by dkightley »

Hi Martin

First of all....welcome to the forum. Its nice to get new blood! ;)

I've only experimented briefly in PWM...but didn't have time to get too involved...and ended up buying the stock PWM controller.

Re frequencies, take a look at this thread I found in a Google search:
http://community.silabs.com/t5/8-Bit-Di ... 577#M35111
Doug Kightley
Webmaster here and volunteer at the National Tramway Museum http://www.tramway.co.uk

martink
Posts: 259
Joined: Sun Feb 09, 2014 3:13 am
Location: Melbourne, Australia
Contact:

Re: DIY PWM Questions

Post by martink »

I've just packed Sarum Bridge away for a few months while I get on with some other stuff, but I sneaked in a few quick experiments with PWM first. I built a simple circuit around a 555 timer that duplicated the behaviour of the current Eishindo controller, then started playing with frequencies and voltage. The results were interesting.

The T gauge motors are very small with almost no momentum (no flywheels there!). Looking at the back EMF on the oscilloscope, I can actually see the motor slowing down after each power pulse - surging 100 times a second. At low speeds the motor actually stops. I had expected that this was the cause of the observed jerky running at very low speeds, so anticipated that boosting the frequency to something more like 200-300 Hz would fix this.

In practice, the low speed performance worked out to be about the same for any frequency between 100Hz and 250Hz or so, with about the same amount of jerkiness. It turns out that unlike larger scales, the major influence appears to be relatively poor electrical pickups, even with freshly cleaned rails and wheels. At very low frequency settings the jerkiness is from a combination of poor pickups and the slow pulses (the motor literally stopping after each pulse); at higher frequencies the pickup issues become dominant since each pulse contains less energy and cannot kick the train as far along the track. The two effects basically cancel out and give much the same result - maybe just a bit smoother at 200-250Hz. As expected, at still higher frequencies the pulses become so short that the motor effectively sees them as a steady voltage so the good low speed running characteristics are lost.

The two other classic issues with PWM designs are motor heating and noisy running. Heating doesn't seem to be a problem since the peak output voltage is about 4.2V (when running on batteries) - comfortably below the rated 4.5V. In larger scales the PWM voltage is normally more like 15-20V but only turned on for less than 100% of the time (averaging out to 12-13V or so), but heating is proportional to the square of the peak voltage so is typically about 2x worse than other controller types.

Noisy running is always a problem with PWM - the sharp pulses really rattle the armature, so the loco growls, sings or whines. While it is possible to raise the frequency above the audible range, the low-speed benefits are lost (so-called silent-PWM). Since for T there seems to be little functional difference between 100Hz and 250Hz, I would guess that the Eishindo people deliberately chose the bottom end of the effective range to simulate a diesel's growl.

For my layout's forthcoming automation, I'll be using three separate PWM controllers manually set for slow, medium and fast speeds (switched by relays so that trains accelerate from and decelerate to stops). I now intend to configure them with different frequencies (probably 100, 150 and 200Hz) so that the engine pitch increases as the train accelerates (notching up!). I also intend to use a slightly higher voltage (5V) for the slow controller to give it an extra kick. This should be safe enough since the speed setting (pulse width) will be low and trains will not stay at that speed for long.

martink
Posts: 259
Joined: Sun Feb 09, 2014 3:13 am
Location: Melbourne, Australia
Contact:

Re: DIY PWM Questions

Post by martink »

Here is the circuit diagram for my attempt at a T Gauge PWM controller. It is basically a standard 555 timer PWM circuit with a second 555 used for overload protection. The overload protection is quite rigorous and is set for a 250mA threshold - enough to run at least 8 locos. If you don't want the overload feature, simply omit everything to the right of the IC and use a single 555 instead of the 556 dual chip.

Performance is comparable to the Eishindo product, except that I use a frequency of about 180Hz instead of 100Hz.

Image]

Post Reply