Potentiometer Choice for a PWM

twein

Joined Dec 18, 2023
5
Hi All,
I have a question about a how to choose a potentiometer for a PWM speed controller which I’m using to control a DC treadmill motor.
I have built a speed controller based off a JD230EE speed controlled which had some shorted transistors see photos attached.
By switching out the control board with a 10K potentiometer across the three highlighted pins in blue (pic 3), I have managed to get variable speed control of my motor.
I was now wondering about playing around with potentiometer values, and in particular, using two potentiometers in series to get variable control of the max speed of the motor.
How does changing the overall potentiometer value (say from 10KOhms to 50KOhms) change the behaviour of a PWM. As far as I can tell, the potentiometer should just produce a variable voltage on the middle pin of the three highlighted pins between 0 and 8V independent of the overall value. Then the only other consideration is whether your pot has a good enough power rating to handle the 8V load?
Thanks in advance and thanks for everyone who’s posted all the helpful advice about using this board before me which has helped me get this far!

Attachments

• 2.3 MB Views: 13
• 262.9 KB Views: 16
• 226.5 KB Views: 15
• 1.5 MB Views: 14

ElectricSpidey

Joined Dec 2, 2017
2,781
It depends on the circuit.

I will give you one example:

In a simple 555 PWM circuit the value of the potentiometer and other resistors along with the value of the capacitor will determine the frequency of the PWM.

Last edited:

twein

Joined Dec 18, 2023
5
Hi both,
Thanks for the replies.
I suppose I should refine my question a bit.
I’ve attached a picture of the completed circuit here and an annotated diagram too from what people have previously determined. From what I understand the Speed and Amp trim pots (yellow and blue respectively) are 200KOhm and 10KOhm respectively. The Speed trim pot is also in series with a 470KOhm trim pot. The 10KOhm pot should just control the duty cycle and is sufficiently small that I imagine should not change the frequency much (compared to the fixed 470KOhms).
If this is the case, is there any sort of general relation about how changing the total value of the duty cycle potentiometer will change the overall behaviour of a PWM circuit? And more importantly, what’s the risk of sparks flying if I use a pot that is an order of magnitude bigger or smaller?

Attachments

• 1.4 MB Views: 10
• 156.9 KB Views: 9
Last edited:

MrChips

Joined Oct 2, 2009
30,815
In general, a variable resistor adjustment should have two limits, minimum resistance and maximum resistance.

If you insert a resistor Rs in series with the variable resistor then Rs establishes the minimum resistance. The maximum resistance will be Rs + VR1. If you want the variable resistor to be a FINE control adjustment, then the resistance of VR1 is a percentage of the fixed resistance Rs. By the same token you can have a COURSE control and a FINE control by using two variable resistors instead of one.

Note that all three terminals of the potentiometer are connected in the circuit. If you leave one terminal not connected then you run the risk of having an open circuit when the center wiper lifts off the resistance track.

twein

Joined Dec 18, 2023
5
Thanks for the advice MrChips. The final situation you described with one coarse control and one fine control potentiometer is pretty similar to what I’m trying to do!
My aim with this circuit to have the speed control performed with a foot pedal with a variable speed limit controlled by another potentiometer between the signal line and the 8V pin which I’ve set up by modifying an M-Audio expression pedal (circuit diagram attached).
I’ve already confirmed that I can control the speed of a motor using a 10KOhm potentiometer across the input pins highlighted earlier.
My concern now is that by using the current pots in the pedal I’m going from a 10KOhm total resistance in that portion of the circuit to a potentially a 60KOhm total resistance depending on how much of the total signal I throw to ground.
For whatever reason on these forums people seem to suggest using 5K-10KOhm pots for controlling the duty cycle of their PWMs and I’ve seen people saying that they’ve blown their PWMs/transistors using high value (550KOhm) pots which seems counterintuitive to me since this should result in a lower current flow in that part of the circuit and this is what I’m trying to understand - whether it is feasible that the circuit work with the pots I have in the pedal or whether I should replace the pots in the pedal with two 5K Ohm pots and if so, why a lower value of the resistance is beneficial?

Attachments

• 75.6 KB Views: 5

MrChips

Joined Oct 2, 2009
30,815
There are minimum and maximum limits to resistance values in a circuit. If you exceed those limits the circuit might fail.
Zero ohms is a short circuit. Infinite ohms is an open circuit. Circuits can easily stop working at those extremes.

Here is a simple example to make this clear.

The 9V battery supplies current in order to turn on the LED.
If the resistance value is too high, the LED does not turn on.
If the resistance value is too low, the LED gets blown.

It is valuable to know what are the extreme values allowed in any circuit.

twein

Joined Dec 18, 2023
5
Okay, that simple example has been very helpful in helping me get my head around potential choices of pot (at least I think).
Would I be correct in saying, for the duty cycle pot that, choosing a smaller pot will allow a larger current flow which in turn give me a lower signal voltage at which the circuit will turn on? In principle I could carry on reducing this pot to get greater sensitivity but at the risk that eventually I blow something.
Conversely, having too large a pot results in me losing sensitivity at the low end and that at some point I will have too low a current flow to even get the circuit to turn on?
Unfortunately the PWM unit on the circuit which I took from the original controller is very much a black box and is sealed in epoxy resin which means I can’t easily work out what the limits on these internal components should be so I guess to play is safe I should stick to keeping the total values of any pots I use for control in the region of 10KOhms.

k1ng 1337

Joined Sep 11, 2020
960
Okay, that simple example has been very helpful in helping me get my head around potential choices of pot (at least I think).
Would I be correct in saying, for the duty cycle pot that, choosing a smaller pot will allow a larger current flow which in turn give me a lower signal voltage at which the circuit will turn on? In principle I could carry on reducing this pot to get greater sensitivity but at the risk that eventually I blow something.
Conversely, having too large a pot results in me losing sensitivity at the low end and that at some point I will have too low a current flow to even get the circuit to turn on?
Unfortunately the PWM unit on the circuit which I took from the original controller is very much a black box and is sealed in epoxy resin which means I can’t easily work out what the limits on these internal components should be so I guess to play is safe I should stick to keeping the total values of any pots I use for control in the region of 10KOhms.
Hi, I think the parameter you are looking for is Output Impedance. From ATmega328p datasheet:

The maximum value should be no more than 10k to get effective readings with the default microcontroller settings. If it is larger than this, I believe two things can happen:

1) The Sample/Hold capacitor (Cs/h) will not have enough time to charge before the sampling period has elapsed. This may result in crosstalk between channels skewing the reading.

2) Iih and Iil are both given to be 1uA, this means if the output impedance is very large, these leakage currents will charge/discharge Cs/h and may introduce a voltage error skewing the reading.

There are ways around these problems but this requires digging into the datasheet and adjusting accordingly. Keep in mind the Output Impendence of a device is all the series / parallel impedance at the output node.

Since you are simply using a potentiometer connected to V+ and GND, the impendence of the voltage source can likely be considered to be zero so a 10k pot is sufficient. You can use a 2k or 5k or less etc. pot with no ill effects but a pot >10k may cause problems.

Also, be sure to verify what I said because I have limited experience in this area.