Wednesday, August 14, 2013

Variable PWM Generator


I had to solve the problem of generating a PWM signal with a duty cycle variable. The most useful block I found for this issue was PWM Generator (DC-DC) where the PWM frequency is fixed but you can modify the duty cycle from an input.
It seems easy, but when I firts tried, I didn't get the result I expected.
Finally I realized that the problem was in the characteristics of the display. So here you can find an example of the block running as it's expected.
PWM signal generator circuit. Variable duty Cycle

Stair Generator Parameters
 In order to have a good representation of the different duty cycles the scope must be configured in continuous mode (sample time = 0) and the appropiate time range (In this case t = 0.001)
Display parameters
 Here you can find the simulation result:
Simulation result
Notice that the duty cycle follows the input signal.



Licencia Creative Commons


No comments :

Post a Comment