Included among the many applications for pulse-width modulation (PWM) are voltage regulation, power-level control, and fan-speed control. A PWM circuit for such systems can be implemented with three op amps on a single quad-op-amp chip (Fig. 1).
Because op amps are used for the modulator, it's suited for a wide variety of applications. For example, low-power op amps can be used in a low-power system, and high-frequency op amps can be used for a high-frequency PWM. The circuit in Figure 1 also generates a triangular wave.
The circuit consists of a triangular-wave generator (U1a and U1b) and a comparator (U1c). U1a is configured as an integrator (or de-integrator) and U1b as a comparator with hysteresis. At power-up, the comparator's output voltage is assumed to be zero.
U1a's noninverting input is biased at VCC/2. A virtual connection between the inverting and noninverting inputs allows a constant current through R equal to I = VCC/2R, which charges capacitor C. Thus, the U1A integrator output increases linearly with time. When it reaches 0.75 VCC, the comparator output (U1b) changes to its maximum output voltage (VCC). At that point, the integrator begins to de-integrate, causing the output voltage to decrease linearly. When it reaches 0.25 VCC, the comparator output voltage changes to zero, and the cycle repeats. Thus, the integrator output is a triangular wave that swings between the levels of 0.25 VCC and 0.75 VCC.