Learn how an integrated CMOS switch enhances a PWM oscillator.
This article describes an approach to producing a variable-duty-cycle waveform from a 555-based free-running oscillator. The circuit's wide modulation range, highly linear control over a wide range of duty-cycle values, and excellent linearity make it ideal for PWM (pulse-width-modulation)-based control applications. Figure 1 shows the basic circuit, which works as follows: When IC1's output goes high, switch S1 closes, and IC1's internal discharge, switch S2, opens. Capacitor C1 charges through R1 and R2. When IC1's output goes low, S1 opens, and S2 closes, discharging C1 through R2 and R3.
Figure 1: An external analogue switch and a 555 timer provide a free-running oscillator with a fixed duty cycle.
The generic configuration works well for producing a fixed-value duty cycle. To obtain a continuously variable duty cycle, figure 2 shows how to connect potentiometer R4 to the common junction of R1, R2, and R3. The output waveform's duty cycle, DTC, follows the equation: DTC=(R1+R2+RVAR)/(R1+2R2+R3+RPOT), where RPOT is the potentiometer's end-to-end resistance, and RVAR is the fraction of RPOT between the rotor and R1. As the equation shows, DTC depends linearly on RVAR. Switch S1 comprises one section of a 4066 CMOS quad bilateral SPST switch, IC2.
Figure 2: Add a potentiometer, R4, to produce an output pulse that has a manually variable duty cycle.
You can use the circuit in figure 3 to evaluate duty-cycle linearity. A rotary switch and a tapped series string of 16-kΩ resistors provide a 10kHz signal with nine discrete, equally spaced duty-cycle values ranging from 2 to 98%. For accurate results, use a 5½-digit multi-meter to match the values of resistors R4 through R11 and a Tektronix 3012 oscilloscope or equivalent to gather DTC data.
Figure 3: To obtain fixed-duty-cycle values for linearity evaluation, you can replace the potentiometer with a rotary switch and a series-connected string of precision resistors.
Microsoft's Excel-spreadsheet software includes a linearity analysis that returns the following trend line for the duty-cycle measurements: DTC=0.7565×RVAR+2.1548; R2=1. The value of 1 for R2 as Excel calculates shows that the transfer function is perfectly linear. Switch S1's on-resistance and particularly its leakage current slightly affect the DTC-versus-RVAR equation's slope and intercept, but the equation remains strictly linear. Using only one of IC2's four switches eliminates leakage effects and crosstalk that would occur if other circuits used the remaining switches. In addition, using moderately low values for the resistor network further reduces leakage-current effects on circuit performance.
This article is a Design Idea selected for re-publication by the editors. It was first published on February 15, 2007 in EDN.com.