  3 July 2009
Author: Giorgos Lazaridis
Voltage Controlled PWM Generator

From time to time, i have use many circuits that generates PWM pulses. Most of them will translate a resistor value into duty cycle change. Although that is handy and easy, sometimes a voltage controlled PWM generator is needed. There are of course those micro-controllers that could make almost any kind of PWM signal translation, but i preferred to study and create a circuit without the use of such chips. I tried to keep it as easy as can be, but without this reflecting to the accuracy and integrity of the output pulses.

The following video demonstrates this circuit in operation:

The theory of this circuit

The operation is similar to the digital signal transmission using PWM signals. The DC input level voltage is compared to the current voltage of the triangular waveform. Every time those two levels have the same value, the output will change state. If the triangular waveform was on the rising edge, the output will go HIGH, otherwise the output will go LOW.

Look at those waveforms: Figure 1 Figure 2

The green waveforms are the triangular signals. The brown line is the DC voltage level. Finally, the red pulses are the output PWM. You can see how these pulses changes the duty cycle as the DC input level changes.

The circuit

Following is the schematic of the Voltage controlled PWM generator: You can find complete theory, details and drawing for the triangle wave oscillator in our relevant circuit. I have used the first circuit and i added the same transistor with a slightly changed resistors. My goal was to amplify the circuit but shift it a little bit, to help the circuit achieve duty cycles from 0 to 100%. You could as well use another circuit for generating a triangular waveform. The oscillation frequency in our circuit is around 1.5 KHz at the time, but this is not a critical value. You should keep in mind thought that the frequency of this triangle waveform will determine the PWM frequency.

To test the circuit, i needed a DC reference level. I used a simple 5K potentiometer implementing a voltage divider and i added a 1.5K resistor as shown in the schematic. This resistor will prevent the DC voltage to fall too much under the bottom edge of the shifted triangle waveform. Therefore, the whole range of the potentiometer will have active influence on the PWM duty cycle. That is the most important characteristic of this circuit.

You an use any kind of DC voltage level as input, as long as it remains equal or less than the power supply of this circuit. The circuit is tested from 3.3 to 12 volts, but i am sure that it an operate in much higher voltages. Actually, the transistor and the selected OP-AMP will put the final frontiers.

Oscilloscope results - from theory to reality

I'm always impressed from applied theory! I love to see the results. Following, i have include some photos of the oscilloscope monitor, while i am changing the DC level. Three waveforms are shown. The green is the triangular waveform and the blue is the DC voltage level. I have put them one over the other with common ground. The bottom yellow waveform is the result of the voltage comparison from the two above lines... Minimum input voltageMax duty cycle output The input voltage risesThe duty cycle is decreased The duty cycle changesaccording to the slope Duty cycle can gobelow 50% easily Maximum input voltageZero duty cycle output

Relative pages
• Learn how RC Servos work
• PWM signal theory
• The transistor theory of operation
• Triangle wave generator
• How to make a PWM fan controller / LED dimmer using a 555
• Dr.Calculus: Op-Amp inverting amplifier calculator
• Dr.Calculus: Voltage divider calculator
• Op-Amp IC Pinouts
• A 2-speed PWM temperature fan controller
• An intelligent self-tunned fan PWM controller

 Name  Email (shall not be published)  Website Notify me of new posts via emailWrite your comments below:BEFORE you post a comment:You are welcome to comment for corrections and suggestions on this page. But if you have questions please use the forum instead to post it. Thank you.  HOT in heaven!  NEW in heaven! New Theory: AC electric motor working principle