!!

Not Registered?

Welcome!  Please register to view all of the new posts and forum boards - some of which are hidden to guests.  After registering and gaining 10 posts you will be able to sell and buy items on our N'porium.

If you have any problems registering, then please check your spam filter before emailing us.  Hotmail users seem to find their emails in the Junk folder.


Thanks for reading,
The NGF Staff.

Author Topic: Need help with a custom controller.  (Read 179 times)

0 Members and 1 Guest are viewing this topic.

Offline Jayk

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 42
  • Country: gb
    • Awards
Need help with a custom controller.
« on: June 23, 2020, 10:29:00 PM »
   First of all, sorry that this is rather long. I want to outline my current understanding and thinking just in case I have fundamentally misunderstood something.

   I'm looking at creating something that I can build into my layout rather than using my Gaugemaster E. I was initially going to find a circuit online to copy, grab the components and then get to the soldering. However I found some interesting parts on ebay that seemed stuipdly cheap so I grabbed those instead. Shown below is the mock up of these items.



   From left to right I have: Full-wave bridge rectifier made from 2 half-wave bridge rectifiers, a buck converter with built in voltmeter, PWM module and finally the reversing switch.

   I got the buck converter as a way to adjust the voltage being pulsed to the motor both in order to limit the top speed (the layout is purely for shunting) and also because I didn't want to be throwing circa 14.5V at it in any case. It also handles smoothing so the output varies by +/- 30mV only.

   In testing the low speed control is not great. In fact it is worse than what I can achieve with the Gaugemaster E. However the PWM is being generated it seems to be somewhat current limiting at the lower ranges. I can drive a small bulb and see illumination all the way through, it just won't move a loco until the knob reaches a certain point. This point changes depending on the voltage set via the buck converter so it doesn't appear to be anything to do with generating the waveform.

   It's not terrible I just expect something better from a PWM controller. So with that in mind I'm looking at something more traditional. Below is what I believe to be a typical basic circuit. The 7.2V rail can be adjusted, it just happened to be the value I settled on in testing the above.



   The linear potentiometer is used as a voltage divider with both halves wired in parallel with a 2.7k ohm resistor. The point of these two resistors is to modify how the resistance changes as the knob on the potentiometer is turned. It gives a quick rise from zero to a low-middle point, then a slow rise to the high-middle point and finally a quick rise to maximum. The idea being that you get a finer control within the normal operating range. This then feeds a darlington-pair (both are intended to be N-P-N, sorry the arrows are a little dodgy on the diagram) so that a motor connected at Vout is not current limited by the potentiometer.

   Now, I think I should also be able to connect the base of the first transistor to the positive output of the PWM module (removing the potentiometer and other resistors) and hopefully see an increase in performance at lower speeds.

   So, at which point did you start screaming, "NO! That's not how this works!"? Is there anything else I should be considering? Should I just KISS and build the basic circuit?

Regards,
   -Jayk.

Offline stevewalker

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 556
  • Country: gb
  • Gender: Male
    • Awards
Re: Need help with a custom controller.
« Reply #1 on: June 24, 2020, 09:16:54 AM »
I'm not overly familiar with discrete electronics, but that looks like the two transistors are shorting the supply rails together when they are conducting, plus the output is connected directly to the 7.2V supply and can't vary?

Look up a Darlington Pair and how one is used.  You would probably want the NPN configuration and may need a resistor on the input side, depending upon the output characteristics of the driving circuit.

You can buy Darlington Pairs pre-packaged into a single device, with a heatsink for bolting them down and dissipating the heat - you'll also find the datasheets for them online.

You'd probably want a resistor between the supply rail and the device as well to limit current in the event of a short and a resettable circuit breaker.

Offline Steven B

  • Trade Count: (+2)
  • Full Member
  • ***
  • N Gauge Society Number: 12107
  • 2mm Association Number: 4196
  • Posts: 794
  • Country: gb
    • NGS Yorkshire Area Group
    • Awards
Re: Need help with a custom controller.
« Reply #2 on: June 24, 2020, 11:55:01 AM »
With your existing set-up you've got two conflicting settings, the lowish Voltage on the DC-DC converter and the pulsed output of the PWM board.

PWM motor controllers work by pulsing full supply Volts to the motor. For faster speeds, the power is turned on for longer. Over time this has the effect of varying the average voltage and hence controlling the speed. By applying full Voltage at low speeds it helps the motor overcome friction.

The PWM board can only output a max Voltage of what ever the DC-DC converter outputs minus any internal losses.

Don't use the DC-DC converter to control the speed - let the PWM board do that. Set the output of the DC-DC converter to at least 12V and see if it improves things.


Steven B.

Offline stevewalker

  • Trade Count: (0)
  • Full Member
  • ***
  • Posts: 556
  • Country: gb
  • Gender: Male
    • Awards
Re: Need help with a custom controller.
« Reply #3 on: June 24, 2020, 12:11:56 PM »
Further to Steven B's reply - once you have it running okay, you could replace the Pot on the existing PWM controller with a Log (logarithmic) Pot (assuming the current one is linear) to give better low-end control. Depending upon the way the circuit is designed, you may find that you end up with very poor control at the low end, but that would simply mean that you needed to reverse the connections to the Pot.
« Last Edit: June 24, 2020, 12:13:23 PM by stevewalker »

Offline gawain

  • Trade Count: (0)
  • Full Member
  • ***
  • N Gauge Society Number: 18681
  • Posts: 170
  • Gender: Male
    • Awards
Re: Need help with a custom controller.
« Reply #4 on: June 24, 2020, 01:29:55 PM »
I use one of these PWM controllers and had the same problem of not slow running. I checked the output with a meter and the meter did not start to read until the output was about 1.2 v. I put 2 diodes in series with the output, that drop 0.6 v each. I now get good slow running. But it has shown up the poor quality pick up of some locos.

Offline Platy767

  • Trade Count: (0)
  • Full Member
  • ***
  • N Gauge Society Number: 6332
  • Posts: 147
  • Country: au
    • Awards
Re: Need help with a custom controller.
« Reply #5 on: June 24, 2020, 02:52:24 PM »
I was initially going to find a circuit online to copy, grab the components and then get to the soldering.

Stop wasting your time and effort with stuff that is not model railway purposed. Have a look at this
http://www3.sympatico.ca/kstapleton3/851.HTM
or this
60% down the page a thyristor based controller
https://www.scottpages.net/ReviewOfControllers.html

I've made both, and they both have a place. I use the thyristor based design for 4.5V motors from a 6V ac supply, but the LM317 based controller is a beauty.

Sorry if I come across as cranky, but I am trying to to help.

Mark

Offline sprogman

  • Trade Count: (0)
  • Full Member
  • ***
  • N Gauge Society Number: 17786
  • 2mm Association Number: 4557
  • Posts: 391
  • Country: gb
    • Awards
Re: Need help with a custom controller.
« Reply #6 on: June 25, 2020, 09:45:03 AM »
The other issue with some of these PWM controllers is that they don't actually go all the way to zero.

For homebrew designs for all sorts of MR related stuff see Rob Paisley's site http://www.circuitous.ca/CircuitIndex.html

 

Please Support Us!
July Goal: £60.00
Due Date: Jul 31
Total Receipts: £25.00
Below Goal: £35.00
Site Currency: GBP
42% 
July Donations

anything
SimplePortal 2.3.5 © 2008-2012, SimplePortal