# issue with pwm duty cycle

Discussion in 'General Electronics Chat' started by simeonz11, May 30, 2009.

1. ### simeonz11 Thread Starter Active Member

Apr 29, 2008
98
0
So I have 50 % duty cycle signal that is driving an and gate , this signal is phase locked to another frequency via a frequency divider . This "other" faster frequency is always 50% duty cycle and that will never change

What I wish to do is control the duty cycle of this normally 50/50 duty cycle frequency . It will be opreating in the ranges of 1khz to 50 khz

I wish to control the duty cycle from a range to 0 to 100% so I can drive my and gate with this signal .

I am just not smart enough to figure out how I should do this , somebody plz help me .

File size:
15 KB
Views:
23
2. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
If your input time base is going to be continuously variable, it'll be tough to get an accurate PWM duty cycle out of it.

One rough way to approximate it could be to use a microcontroller, counting the uC's clock pulses between positive edge triggers, then multiplying that number times the desired percentage of ON time. However, this means you'll have to have at least two positive-going triggers before you'll start getting a PWM output, and the accuracy will suffer as a function of the rate of change of the input trigger time and the uC's clock frequency.

Also, as the input frequency goes up, the accuracy will decrease.

3. ### AdrianN Active Member

Apr 27, 2009
97
1
I would use a 555 in a monostable circuit. The only deviation from the classical monostable circuit is a differentiator circuit that needs to be connected in front of the monostable. This will help reduce the pulse width of the input signal, since the 555 monostable cannot output a pulse width smaller than the input pulse width, which, in your case is 50% of the signal period. The duty cycle can be varied with a potentiometer which acts as "R" in the monostable RC constant.

Here are some limitations though: The minimum dutycycle will be limited by the differentiator output pulse width. It cannot be zero. Also, I don't think you can cover the entire range of 1kHz to 50kHz with this circuit. 555 can cover the frequency range, but the time constant of the monostable, and the time constant of the differentiator might not cover it. You might need to split the range in two.

Jul 17, 2007
22,183
1,728