# Variable frequency PWM

Discussion in 'Embedded Systems and Microcontrollers' started by hssiu, Aug 3, 2012.

1. ### hssiu Thread Starter New Member

Nov 13, 2011
4
0
I am now working with a project which need a variable frequency and output PWM to control a 24V motor.
Since I am new to electronics, could anyone give me some advice on it?
Thanks

2. ### BillO Distinguished Member

Nov 24, 2008
994
139
There are many different ways this could be done. I feel there is more information such as a frequency range, or a specific on-time or a specific off-time or some other restraint. Failing that, there is no one way to answer your question.

3. ### hssiu Thread Starter New Member

Nov 13, 2011
4
0
Actually my project is to investigate whether the impedance of the motor would change according to the PWM's frequency, and I am now designing the PWM in which its frequency range is around 500Hz to 500kHz, and to control a 24V DC motor.

4. ### WBahn Moderator

Mar 31, 2012
23,223
7,003
Assuming you had a box that would deliver the PWM waveform you want, how would you use it to conduct you investigation? What kind of currents are we talking about?

My first recommendation is to use an off-the-shelf function generator that supports a square wave output over that frequency range and that has variable duty cycle. Then just buid a suitable driver circuit. If all you need is to be able to apply the PWM for motion in one direction, then you could use just a single drive transistor as a power switch.

5. ### BillO Distinguished Member

Nov 24, 2008
994
139
Yeah, ditto on WBahn's reply. Waveform as well as frequency will both be critical to what impedance you see.

You either need to do some experimentation or place a stick in the ground.

For example, if you fixed the 'on' duration to 1us and varied the 'off' duration from 1us to 2ms, you would get 500KHz to 500Hz. However, if you fixed the 'off' duration to 1us and varied the 'on' duration for 1us to 2ms, you'd also get frequencies from 500KHz to 500Hz, but i suspect you'd see very different impedance and current functions.