PWM motor controller Frequency adjustment formula

Thread Starter

dlatch

Joined May 15, 2016
84
pwm3a.jpg

I know the 10nF at the top and the 47Kohm, center left, set the frequency (about 470 hz) but, what is the formula and suggestions for varying them. This is being used to speed control relatively high current, iron core 3 pole, 12volt brushed motors. (1/24 scale slot car motors) I want to experiment with frequencies around 1-20 khz. Im using a SUP 90P06 pfet for the output. I'll post the data sheet next time.
 

Sensacell

Joined Jun 19, 2012
2,450
The LM324 is a really poor gate driver, you will never get anything near 20 Khz with this circuit.


1) The output current of the LM324 is too low to drive the gate rapidly, 20 mA - source / sink.
2) The output voltage does not go all the way to the positive rail, this leaves the potential for current flow in the off, state, due to non-zero Vgs.

Using the SUP 90P06 part with a lower gate threshold than the one specified, some might not turn off at all, depending on the manufacturing spread.

I would abandon that sketchy circuit.
 

Thread Starter

dlatch

Joined May 15, 2016
84
The LM324 is a really poor gate driver, you will never get anything near 20 Khz with this circuit.


1) The output current of the LM324 is too low to drive the gate rapidly, 20 mA - source / sink.
2) The output voltage does not go all the way to the positive rail, this leaves the potential for current flow in the off, state, due to non-zero Vgs.

Using the SUP 90P06 part with a lower gate threshold than the one specified, some might not turn off at all, depending on the manufacturing spread.

I would abandon that sketchy circuit.

I am a novice. This circuit works pretty well as it is but, I want to learn how to improve it. Please suggest a better circuit of similar complexity. And a better IC. I have some LM339s handy. can you suggest a circuit using that complete with output.
 

danadak

Joined Mar 10, 2018
3,578
As your skills evolve consider learning basic microprocessors. Here is an
example of what can be done, all onchip except pot and MOSFET driver,
that accomplishes the same thing., Takes ~ 10 lines of code, leaves much of
the chip resources for other tasks. In fact there are approaches that will do
this all in HW using DMA, so only 2 lines of code would be needed. A tad more
indepth knowledge to use DMA.

The way this works is SAR converts pot voltage to a digital value, that is scaled
and then written to PWM duty cycle register. Thats it. PSOC UP.

upload_2018-11-4_7-17-16.png


You can also do this in ATTINY85, writing Basic code, compiler from Bascom,

https://www.mcselec.com/index.php?Itemid=41&id=14&option=com_content&task=view

But not a GUI tool and not as many other capabilities as PSOC.


Regards, Dana.
 

Thread Starter

dlatch

Joined May 15, 2016
84
Thanks danadak and sensacell. I have moved on to the LM339 with a circuit found on these forums posted by sargent wookie. I have also figured out how to adjust the frequency.

I am now learning about gate drivers. I didn't need one at the low frequency in the original circuit (470Hz)
 

Thread Starter

dlatch

Joined May 15, 2016
84
Good link, post 5, thank you dana. With that information I will use 2 comparators for the tri wave and still get the 2 outputs I need. I don't need perfect symmetry in the tri wave but I understand it's best not to leave any amps un terminated.

Now I am learning about the gate drive. Totem pole or an IC?. I am using a PFET (SUP90 P06) as the motor is grounded. I would like to go with an NFET and a high side driver but I have limited space in the hand held enclosure. So the simplest solution is all I need

As for gate driver IC, I have an IR2110 handy.
 

Thread Starter

dlatch

Joined May 15, 2016
84
Thanks dana, good suggestion on the LTC16935. I think it is within my comprehension level.

I also need a low side driver. This motor controller also has an NFET for the brake function.

Looking around at mouser I don't see one. I will keep looking but if you have a ready suggestion that would be appreciated.

This unit is like a half bridge only the bottom half is just for PWM variable brake function.
 

danadak

Joined Mar 10, 2018
3,578
You might look for 1/2 bridge driver where source of PFET separately pinned
out, same for drain of NFET. Kill two birds with one stone (ugly expression I
learned as a kid).

Regards, Dana.
 
Top