Jump to content
 

Lets talk PWM controllers.


Bas Knippels
 Share

Recommended Posts

Hello all,

 

On the side I am slowly developing my own PWM controller. I already made a DIY tutorial with which you can buy components like an Arduino and H-bridge driver to make one yourself. It is however in Dutch and not yet translated, so unless you get Google translate active I would not click this link 

 

Anyways I thought also to make a ready 2 run version of the PWM controller.. you know just for the fun of it.

 

So I want to present my PWM controller design and ask for your input.

 

My bare mininum variant

 

afbeelding.png.07dea6b6024c2f4c8a76b0809654f40a.png

 

On the left you see the base plate. It houses the main electronics, 10 lever switches and 5 potentiometers for control. In the middle you see the front panel and than the sides remain. With a little imagination you should be able to see how it all fit togather 😉

 

My PWM controller design uses the 10 lever switch to power on sections of tracks.

I have potentiometers for mininum speed and maximum speed. These allow you to use the full range of the main throttle knob for all types of locomotives. It copes with different driving behaviour of trains. You do have to memorize your min and max settings per loco a little bit for it to be effective

 

afbeelding.png.636cdc6b4cb481351710ff9352ce9435.png

 

I have a potentiometer for acceleration and brake control.

And you can connect up to two sensors (IR sensors, current sense, LDR...) with which you can shuttle automatically. The delay time at station can also be set with one of the knobs.

 

And this is what I consider as 'bare mininum'. And I was wondering what you guys think of this design. And what you would like to see in a 'perfect' PWM controller.

 

The possibilties of a more elaborate system

 

When it comes to programmable devices like I build, there are really no limitations. I have for instance a technology ( -> just talking about a piece of software here) with which can capture and record your actions so it get to replay those actions for you. So instead of shuttling just one single train you get to create more elaborate pre-recorded programs. You can just manually control points, signals, relays and a PWM controller like you usually do and than 'it' can do it for you.

 

You can make the most elaborated shuttle service running with 10 trains or you can do something simples.

 

Instead of a fully automated service you can also think of just running around your loco and stop right there. Using an IR sluice you can stop directly above decouplers.

afbeelding.png.106319664c586d50f465252f726b7314.png

And this can be tought in by doing the actions first yourself. After the program is tought in, you press a button and you wait until your loco finishes running around.

 

I have figured out and designed such a system until last detail. I won't bother you with the details now 😉

 

But I wonder. Who would want such a system? I know I would.

 

So please let me know what you guys think of my 'bare mininum design' and the mentioned endless posibilities.

 

Kind regards,

 

Bas

  • Like 3
  • Informative/Useful 1
Link to post
Share on other sites

  • 4 weeks later...
  • RMweb Gold

This looks like a great piece of development.  Well done.

Did I read somewhere that PWM controllers dont work with coreless motors? Or did I imagine it? Certainly I think that PWM work best with certain types of motor. Can you elaborate?

Link to post
Share on other sites

15 hours ago, ikcdab said:

This looks like a great piece of development.  Well done.

Did I read somewhere that PWM controllers dont work with coreless motors? Or did I imagine it? Certainly I think that PWM work best with certain types of motor. Can you elaborate?

Every DCC decoder is a PWM controller, so PWM and coreless do mix, but...

 

You need a much higher frequency PWM than the typical old-school PWM controller which may have derived the frequency from the 50Hz mains supply. Modern DCC decoders can be 10s of kHz. How that would work on an analogue layout with a central controller, I can't answer.

 

  • Interesting/Thought-provoking 1
Link to post
Share on other sites

On 18/09/2023 at 19:59, Bas Knippels said:

H

 

The possibilties of a more elaborate system

 

When it comes to programmable devices like I build, there are really no limitations. I have for instance a technology ( -> just talking about a piece of software here) with which can capture and record your actions so

But I wonder. Who would want such a system? I know I would.

 

So please let me know what you guys think of my 'bare mininum design' and the mentioned endless posibilities.

 

Kind regards,

 

Bas

 

Is there any  benefit in being able to have a train shunt remotely?    What happens if a coupling  doesn't   hook up or if the power cuts half way through the move?

From attending many exhibitions  and watching hours of video it seems to be smooth starts which are beyond the capabilities of the controllers especially DCC controls. Smooth starts are not impossible,  a 1960s Hammant & Morgan variable Transformer and a 1960s K's GWR Mogul will do good smooth starts with practice. bring up the power to just the right position about 6 volts and flick  the boost button ( 13 volts )  and off she goes.      Stupidly slow running is not a problem but to my mind eliminating the sticktion effect is probably   a more useful avenue of research.

Link to post
Share on other sites

  • RMweb Gold
21 hours ago, Crosland said:

Every DCC decoder is a PWM controller, so PWM and coreless do mix, but...

 

You need a much higher frequency PWM than the typical old-school PWM controller which may have derived the frequency from the 50Hz mains supply. Modern DCC decoders can be 10s of kHz. How that would work on an analogue layout with a central controller, I can't answer.

 

Back in the 90s I built a PWM controller with a ‘variable’ frequency output (I used a preset in place of a set value resistor).  I ran that at probably 10kHz on a 16’ end to end with no apparent problems.  Only 1 train moving at a time though.


Is the problem with coreless motors that they cannot dissipate the extra heat compared to motion that a square wave gives because there is no core in which to dissipate it? If so, does a higher frequency help that much?  Alternatively I could be completely wrong about the mechanism!

 

Paul.

Link to post
Share on other sites

  • RMweb Premium
2 hours ago, 5BarVT said:

Back in the 90s I built a PWM controller with a ‘variable’ frequency output (I used a preset in place of a set value resistor).  I ran that at probably 10kHz on a 16’ end to end with no apparent problems.  Only 1 train moving at a time though.


Is the problem with coreless motors that they cannot dissipate the extra heat compared to motion that a square wave gives because there is no core in which to dissipate it? If so, does a higher frequency help that much?  Alternatively I could be completely wrong about the mechanism!

 

Paul.

It's partly to do with lack of mass, but partly because at low frequencies the motor follows the pulses, which is why higher frequencies helps because it can't follow the pulses. 

At least my understanding. 

  • Agree 1
  • Thanks 1
Link to post
Share on other sites

  • RMweb Gold
1 hour ago, kevinlms said:

It's partly to do with lack of mass, but partly because at low frequencies the motor follows the pulses, which is why higher frequencies helps because it can't follow the pulses. 

At least my understanding. 

And the lack of mass will make it less able to ignore the pulses.

That explanation works, thank you.

Paul.

Link to post
Share on other sites

7 hours ago, 5BarVT said:

Is the problem with coreless motors that they cannot dissipate the extra heat compared to motion that a square wave gives because there is no core in which to dissipate it? If so, does a higher frequency help that much?  

Yes. At low speed there's very little back-EMF being generated and the motor will draw close to it's stall current. PWM tends to use pulses of full voltage which exacerbates things. The more delicate brushes do not like the higher peak current at the start of each pulse, or so I have read, I believe, from one of the 4mm fine scale societies findings.

 

At higher frequencies, the motor inductance makes the supply look more like DC at a lower average voltage (same holds for core motors too).

  • Like 1
Link to post
Share on other sites

14 hours ago, DCB said:

From attending many exhibitions  and watching hours of video it seems to be smooth starts which are beyond the capabilities of the controllers especially DCC controls...

 

I don't know which exhibitions or videos that you have been watching but I think you have confused layouts that are running DC with those running DCC.

 

One of the major benefits coming from DCC is the ability to get incredibly smooth starts (and stopping). It s possible, though perhaps not desirable, to start the trains so slowly that you are not sure if the wheels are turning at all, indeed a complaint from many is how long it takes to accelerate a train out of station and also to bring it to a stop

  • Like 2
  • Agree 4
Link to post
Share on other sites

  • 3 months later...

I got the side panels and assembled the first prototype.

 

 

pQoMbqD.jpeg

 

9mkDrIH.jpeg

 

Back side (upside down)

w2p1HQc.jpeg

 

And lastly I have a video. I do recommend to mute the audio, something todo with.. different language ;-)

I am comparing a hattons barclay 0-4-0 which has decent driving behaviour to one of those 10 buck Hornby contraption you find in starter sets. In order to use the main throttle knob for locomotives while retaining similar speeds I play around with the mininum and maximum speed settings. In the end I was somewhat content with the Hornby contraption. I don't think I can get it much better, especially the lower speeds are mediocre at best.

 

I don't have a real layout at this moment. I am working on a double tracked test track.
 

 

To react on the frequencies. I don't know much about coreless motors tbh and I don't own one. I do know that for brushed DC motors lower frequencies give a significant better performance.

Frequencies between 100Hz and 20kHz make a too much annoying noise IMO
Frequencies below 50Hz still drive well, but the LED blinking is really noticable at those low frequencies.
Frequencies greater than 20kHz are above our hearing limit. Decoders work with around 32kHz (is propably different per manufactor), this makes them silent as we can't hear those frequencies. But such high frequencies have god awfull  driving properties and especially at lower speeds. The reason why decoders still manage to get such great behaviour is the back EMF.

My controller controls both frequency as dutycycle. For a dutycycle of <10% I use 50Hz. At 100% I use 100Hz. Dutycycles between 10% and 100% is scaled linear from 50Hz to 100Hz.

When my test tracks are ready, I'll post another video.. in english this time. I am curious to how my Sd40-2 performs compared to the Hornby 0-4-0st

Kind regards,

Bas

  • Like 1
  • Informative/Useful 1
  • Craftsmanship/clever 1
Link to post
Share on other sites

Zimo decoders work at 20kHz (default) or 40kHz with bit 5 of CV112 set. The default will be used by almost everyone and all my locos run perfectly using the default value with 20kHz. I have a mix of iron core (3 and 5 pole) plus several coreless motors.

Link to post
Share on other sites

I 'made' this variable frequency PWM controller using one of those very cheap DC motor controllers you can get on ebay for a few quid. I have found that 15-20KHz seems to give the best result with my mostly Mashima powered loco's.

 

DSC_0055.JPG.cfd775588c6d118b5b86a3e7b7d75977.JPG

  • Like 3
  • Informative/Useful 1
  • Interesting/Thought-provoking 1
  • Craftsmanship/clever 1
Link to post
Share on other sites

  • 3 weeks later...
  • RMweb Premium

Hello there
 
The summing up of a dissertation given by Prof Jonathan Scott;
 
The large variation between DC controllers and locomotives was frankly surprising. Also surprising was the relative weakness of flagship feedback controllers epitomised by the HM 2000.
 
The extent to which mainstream controller manufacturers have failed to harness feedback in their designs suggests that they do not take the design of model railway controllers seriously.
 
The advice would be to employ or contract a professional engineer with experience in feedback control.
 
If you wish to read it all;
https://researchcommons.waikato.ac.nz/bitstream/handle/10289/14616/ModelRailwayControllersComparison_Scott2021_v4.pdf


My criteria for a DC controller;
 
1/. It must be easy to make i.e. on a breadboard
 
2/. The take off from standing must be imperceptibly smooth
 
3/. The ability to move a loco 1.0 millimetre first time everytime to aid coupling/uncoupling with a 'shunters pole'
 
4/. Feedback between pulses to enable constant speed slow running.
 
5/. The controller must make any loco start at exactly the same spot on the control knob.
 
6/. Short circuit indication by the most simple method 

All fulfilled easily by the Pulse/Feedback Gaugemaster UF Style as modernised by Jonathan. This is the simple circuit
53333960113_b04abba343_c.jpg

 

And this how 1t looks on a breadboard 
53513625154_6e303d989c_c.jpg

 

And to back up my words a video


 
Cheers - J

Edited by JimRead
  • Like 2
  • Thanks 1
  • Informative/Useful 3
  • Interesting/Thought-provoking 1
Link to post
Share on other sites

Given that so many modern RTR loco's seem to have coreless motors, perhaps the 'ultimate' DC controller would have feedback that could be switched in or out, and adjustable in terms of fierceness, together with PWM of adjustable frequency, with pure DC available as well? Perfect control for every type of motor.

  • Like 2
Link to post
Share on other sites

  • RMweb Premium
1 hour ago, Barclay said:

Given that so many modern RTR loco's seem to have coreless motors, perhaps the 'ultimate' DC controller would have feedback that could be switched in or out, and adjustable in terms of fierceness, together with PWM of adjustable frequency, with pure DC available as well? Perfect control for every type of motor.

Hello Barcley,

 

Good ideas but a bit of a pipe dream I fear any controller with adjustment knobs is going to burn out motors because the owners a/. don't know which knob to use and b/. forget the settings.  And no feedback = no slow running, please read Prof Scott's dissertation.

 

There are loads of beautifully made Coreless Motors for sale on Aliexpress starting at £2.40 because they are so very easy to make. Once again the model railway fraternity are being ripped off by the manufacturers who will always buy the cheapest motors. Sad innit.

 

Cheers - Jim

  • Like 1
  • Agree 1
  • Friendly/supportive 1
Link to post
Share on other sites

  • 1 month later...
On 06/02/2024 at 21:41, JimRead said:

[...]


My criteria for a DC controller;
 
1/. It must be easy to make i.e. on a breadboard
 
2/. The take off from standing must be imperceptibly smooth
 
3/. The ability to move a loco 1.0 millimetre first time everytime to aid coupling/uncoupling with a 'shunters pole'
 
4/. Feedback between pulses to enable constant speed slow running.
 
5/. The controller must make any loco start at exactly the same spot on the control knob.
 
6/. Short circuit indication by the most simple method 

All fulfilled easily by the Pulse/Feedback Gaugemaster UF Style as modernised by Jonathan. This is the simple circuit
53333960113_b04abba343_c.jpg

 

[...]

 

Could I ask the assorted electronic wizards here for some advice?

 

Inspired by Jim Read's enthusiasm I built the modernized Gaugemaster UF/Jonathan Scott controller. I followed the diagram shown in Jim's post quoted above.

 

The good news is that it works: locos with simple 3-pole ironcore motors, 12V rated, are very controllable, with more hauling power at low speeds, and moving at constant speed through curves. Long live PWM and feedback.

 

However, with the 10k pot turned all the way down, I can still hear the 100Hz pulse in the loco, so there is some residual power going to the motor. I could live with that, but at least one engine's motor keeps running, very slowly, with the 10k pot in the 0 position. The loco is creeping ahead; the LED on the controller blinks. Apparently this motor is very energy-efficient.


When I fly-lead connect an open frame motor to the controller, the anchor, happily humming along, visibly makes small steps despite the controller pot being at zero. It appears that the pulses are still too wide.

 

You may need more information, so:

  • I am feeding the controller at 16V AC.
  • I do not have an oscilloscope to view the output voltage of the pulses.
  • I am not using coreless motors.
  • I used a linear 10k pot.
  • For the C106D, which I could not find anywhere, I substituted a TIC106N.

So, my question to the collective forum brain: what do you think is causing the power output to be too high with the controller knob set at zero?
And what can I do about it?

Thank you for any pointers you may have.

Link to post
Share on other sites

On 08/02/2024 at 08:40, Barclay said:

Given that so many modern RTR loco's seem to have coreless motors, perhaps the 'ultimate' DC controller would have feedback that could be switched in or out

 

The later versions of the AMR Handheld from Len Rich had such a switch. And that was getting on for 40 years ago.

 

  • Informative/Useful 1
Link to post
Share on other sites

  • RMweb Premium
On 09/03/2024 at 20:29, RobClogs said:

 

Could I ask the assorted electronic wizards here for some advice?

 

Hello Rob,

This happened to me with the original UF circuit. Using the same idea try changing the 680R resistor to 2K, I suspect that will wprk for you.

Cheers - Jim

  • Thanks 1
Link to post
Share on other sites

Replacing the 680Ω resistor with a 2K did have an effect, but in the opposite direction: It caused all motors to be running even with the controller pot at 0. So I tried the opposite, and fitted a 470Ω resistor instead. Bingo! Now everything is quiet until I turn up the power, and all my engines are well-behaved.

 

Solved! Thank you very much for pointing me in the right direction, @JimRead!

 

Cheers,

Rob

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...