You are on page 1of 7

A PWM Circuit using Operational Amplifiers

A very simple circuit based upon Schmidt trigger circuit can be used for pulse width
modulation purposes. The two operational amplifier A and B operate as a triangular wave
generator whose frequency depends upon the values of R and C. The triangular output
voltage is then compared with a reference voltage to obtain a rectangular pulse which is
on for some time and off for the remainder of the time period. Operational amplifier C is
used as a comparator.

Figure 1: PWM circuit

The circuit operation can be explained as follows using ideal operational


amplifiers. Let us assume that all the operational amplifiers are operating from a single-
ended dc supply. The positive supply terminal of each operational amplifier is connected
to Vs while the negative terminal is grounded. Resistors R 3 and R 4 determine the dc
voltage that is applied to the inverting terminal of operational amplifier A and the
noninverting terminal of operational amplifier B. We will refer to the dc voltage as Vdc .
The presence of feedback at the inverting terminal of B ensures that its voltage is nearly
equal to Vdc . The voltage at the noninverting terminal of A determines whether the output

voltage of A is high at its maximum value of Vs or zero.

GURU/PEDC2DC/OAPWM/ February 19, 2007 1 PWM using Op Amps


We begin our analysis assuming that the voltage at the noninverting terminal of A
is less than Vdc so that the output voltage of A is zero. That is, v oa ( t = 0) = 0. The
current through R can now be computed as
Vdc
i( t ) = (1)
R
The constant (dc) current through R maintains its continuity through the capacitor
C and charges the capacitor. The voltage across C, with the polarity as marked, is
Vdc
v( t ) = t + VC ,min (2)
RC
where VC,min is the voltage across C from the prior operation. This analysis assumes that

the circuit has been operating for a long time. We have labeled the voltage as VC,min

because the voltage across the capacitor is increasing due to the charging process.
The charging process will continue until the voltage at the noninverting terminal
is just above the voltage at its inverting terminal ( Vdc ). At that instant, the voltage across
the capacitor will be at its maximum and so will be the output voltage of B. Let us
assume that the time taken for the voltage across the capacitor to reach its maximum
value is TC , where the subscript C stands for the charging time.

Setting v a ( t ) = Vdc , we can write the following equation in terms of the maximum
value of the output voltage of B as
R2
Vdc = Vob ,max (3)
R1 + R 2
The maximum output voltage of B is
 R 
Vob, max = Vdc 1 + 1  (4)
 R2 
Thus, the maximum voltage across the capacitor is
R 
VC,max = Vob,max − Vdc = Vdc  1  (5)
 R2 
Note that the maximum voltage across the capacitor depends upon the circuit elements
R 1 and R 2 once the dc reference level for Vdc is chosen.

GURU/PEDC2DC/OAPWM/ February 19, 2007 2 PWM using Op Amps


From (2), at t = TC , v(TC ) = VC ,max , the change in the voltage can be expressed as

Vdc
VC,max − VC ,min = TC (6)
RC
We will use (6) to compute the charging time once the minimum voltage across
the capacitor is known.
Once the output voltage at the output of B tends to go beyond Vob. max , it makes the
differential voltage at the input terminals of A greater than zero, which in turn switches
the output of A to high. Under the ideal condition, the output voltage is as high as the dc
supply voltage Vs . In reality, however, this voltage is bound to be less than Vs owing to
the voltage drop across the internal circuitry of the operational amplifier.
In our analysis, let us assume that the high voltage of A is equal to the dc supply
voltage Vs . The case when it is less than the dc supply voltage will be analyzed later with

the help of an example. Since Vs is greater than Vdc , the current reverses its direction
through R and C. This reversal of the current begins to discharge the capacitor form its
maximum value to its minimum value and takes TD seconds to do so. In this case, the
subscript D stands for the discharge time. The discharging process continues until the
output voltage of B reaches its minimum value of Vob, min . As it tends to go below its

minimum value, the differential voltage at the input terminals of A reverses and its output
voltage becomes zero again. The cycle begins all over again.
The expression for the minimum voltage of B can be written as
 R2   R1 
Vdc = Vob ,min   + Voa , max  
 R1 + R 2  R
 1 + R 2 

where Voa , max = Vs for the ideal operational amplifier. It may in fact be one or two volts

less than Vs for a practical operational amplifier.


This equation yields the minimum value of the output voltage of B as
 R  R 
Vob,min = Vdc 1 + 1  − Voa ,max  1  (7)
 R2   R2 

GURU/PEDC2DC/OAPWM/ February 19, 2007 3 PWM using Op Amps


Therefore, the minimum value of the capacitor voltage, with the polarity as indicated, is
R 
VC,min = Vob,min − Vdc = (Vdc − Voa ,max ) 1  (8)
 R2 
Let us now obtain expression for the discharge time TD . During the discharge cycle, the
current through R is
Vdc − Voa ,max
i( t ) =
R
which, once again, is a constant current less than zero because Vdc < V0a ,max .

Consequently, the capacitor discharges linearly as


Vdc − Voa . max
v( t ) = t + VC ,max
RC
The capacitor voltage attains its minimum value when t → TD > Thus, the minimum
value of the capacitor voltage is
Vdc − Voa ,max
VC,min = VC ,max + TD (9)
RC
The differential voltage change across the capacitor is
Voa ,max − Vdc
VC,max − VC ,min = TD (10)
RC
In summary, we use equations (5) and (8) to determine VC,max and VC. min .

Equations (6) and (10) helps us determine the charging and discharging times. The time
period and the frequency of the triangular wave is
T = TC + TD (11)

1
f= (12)
T
The triangular output voltage is applied at the noninverting terminal of
comparator C where it is compared with the variable reference voltage Vref , which is

expected to be greater than minimum output voltage of B, Vob, min .The output of the

comparator is a rectangular pulse whose duration depends upon the reference voltage
Vref as shown below. The lower the reference voltage, the wider the pulse width of the
output voltage of comparator C.

GURU/PEDC2DC/OAPWM/ February 19, 2007 4 PWM using Op Amps


Figure 2: Output voltages of operational amplifiers B and C.

Example :_____________________________________________________________
The PWM circuit of Figure-1 is operated from a 12-V dc supply. The various circuit
elements are as follows: R 1 = 33 kΩ , R 2 = 100 kΩ , R 3 = 20 kΩ , R 4 = 10 kΩ ,

R = 10 kΩ , and C = 1µ F. if Vref = 4 V, determine (a) the maximum and minimum values


of the voltage across the capacitor, (b) maximum and minimum values of the output
voltage, (c) the charging time and discharging times, (e) the time period and frequency,
(f) the on and off times of the output voltage of comparator C, and (g) the duty cycle
(ratio).
Solution:
The controlling dc voltage is
Vs R 4 12 × 10
Vdc = = = 4V
R3 + R4 30

GURU/PEDC2DC/OAPWM/ February 19, 2007 5 PWM using Op Amps


(a) The maximum and minimum voltages across the capacitor, from (5) and (8),
respectively, are
R  4 × 33
VC,max = Vdc  1  = = 1.32 V
 R2  100

R  33
VC,min = (Vdc − Voa ,max ) 1  = (4 − 12) = −2.64 V
 R2  100

Note that we have assumed that Voa ,max = Vs = 12 V.

(b) The maximum and minimum output voltages at the output of operational
amplifier B are
Vob, max = Vdc + VC,max = 4 + 1.32 = 5.32 V

Vob,min = Vdc + VC ,min = 4 − 2.64 = 1.36 V

(c) The charging and discharging times form (6) and (12), respectively, are
VC, max − VC ,min  1.32 + 2.64 
TC = RC =  (
3
)
−6
 10 × 10 (1 × 10 ) = 9.9 ms
Vdc  4 
VC,max − VC ,min  1.32 + 2.64 
TD = RC =  (
3
)
−6
 10 × 10 (1 × 10 ) = 4.95 ms
Voa ,max − Vdc  12 − 4 
(d) The time period and frequency are
T = TC + TD = 9.9 + 4.95 = 14.85 ms

1 1
f= = = 67.34 Hz
T 14.85 × 10 −3
(e) From Figure 2, the equation for the charging time may be written as
Vob, max − Vob ,min
v ob ( t ) = Vob ,min + t
TC

When t → t 1 , v ob ( t 1 ) → Vref = 4 V, and the output of comparative becomes

nearly equal to Vs . The above equation yields the expression for t 1 as

Vref − Vob ,min 4 − 1.36


t1 = TC = (9.9 × 10 −3 ) = 6.6 ms
Vob max − Vob min 5.32 − 1.36

GURU/PEDC2DC/OAPWM/ February 19, 2007 6 PWM using Op Amps


An equation for the discharging cycle may be written as
Vob ,max − Vob,min
v ob ( t ) = Vob ,max − t
TD
Note that the reference has been moved to the point when the capacitor begins the
discharge cycle.
When t → t 2 , v ob ( t 2 ) → Vref = 4 V, and the output of comparative becomes

nearly zero. The above equation yields the expression for t 1 as

Vref − Vob ,max 4 − 5.32


t2 = TD = (4.95 × 10 −3 ) = 1.65 ms
Vob min − Vob max 1.36 − 5.32
(f) The on and off times of the output waveform of operational amplifier C are
TON = TC − t 1 + t 2 = 9.9 − 6.6 + 1.65 = 4.95 ms

TOFF = T − TON = 14.85 − 4.95 = 9.9 ms


(g) The duty cycle (ratio) is
TON 4.95
D= = = 0.3333 (or 33.33%)
T 14.85
Problems: ______________________________________________________________
1. Repeat the example if R 1 = 56 kΩ , R 2 = 120 kΩ , R 3 = 20 kΩ , R 4 = 20 kΩ ,

R = 20 kΩ C = 1µ F and Vref = 5 V.

2. In the above example, select R and C so that the time period is 100ms. What must
be the setting of the 100 kΩ potentiometer to obtain a duty cycle of 75%?

3. For the two topologies shown above using a single operational amplifier, compute
the on-time, off-time, and the duty cycle. Sketch the output voltage and the
voltage across the capacitor for each circuit.

GURU/PEDC2DC/OAPWM/ February 19, 2007 7 PWM using Op Amps

You might also like