*Jordan Dimitrov*

This Design Idea describes a new 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 IC_{1}'s output goes high, switch S_{1} closes, and IC_{1}'s internal discharge, switch S_{2}, opens. Capacitor C_{1} charges through R_{1} and R_{2}. When IC_{1}'s output goes low, S_{1} opens, and S_{2} closes, discharging C_{1} through R_{2} and R_{3}.

**Figure 1** An external analog 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 R_{4} to the common junction of R_{1}, R_{2}, and R_{3}. The output waveform's duty cycle, D_{T}C, follows the equation:

D_{T}C=(R_{1}+R_{2}+R_{VAR})/(R_{1}+2R_{2}+R_{3}+R_{POT})

where R_{POT} is the potentiometer's end-to-end resistance, and R_{VAR} is the fraction of R_{POT} between the rotor and R_{1}. As the equation shows, D_{T}C depends linearly on R_{VAR}. Switch S_{1} comprises one section of a 4066 CMOS quad bilateral SPST switch, IC_{2}.

**Figure 2** Add a potentiometer, R_{4}, 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 10-kHz signal with nine discrete, equally spaced duty-cycle values ranging from 2 to 98%. For accurate results, use a 5½-digit multimeter to match the values of resistors R_{4} through R_{11} and a Tektronix 3012 oscilloscope or equivalent to gather D_{T}C 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:

D_{T}C=0.7565×R_{VAR}+2.1548; R_{2}=1.

The value of 1 for R_{2} as Excel calculates shows that the transfer function is perfectly linear. Switch S_{1}'s on-resistance and particularly its leakage current slightly affect the D_{T}C-versus-R_{VAR} equation's slope and intercept, but the equation remains strictly linear. Using only one of IC_{2}'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.