Converting square-waves into saw-teeth

Texas Instruments CD74HC4053 TLV2371

Generating analog sawtooth waveforms (linear ramp followed by a quick reset to zero) from digital timing signals is a common function. It usually requires a negative supply as sketched in Figure 1, where

Negative current through R1 ramps up inverting integrator A1’s output until switch U1 resets it to zero. This topology is simple and works well, but it has the disadvantage of needing a separate negative rail so the integrator can be referenced to ground. Also, the RC network in front of U1, which needs to differentiate the positive edge of the square wave, is kind of messy and less than precise.

The usual topology for converting digital square waves to analog sawtooth requires a negative rail.
Figure 1. The usual topology for converting digital square waves to analog
sawtooth requires a negative rail.

Figure 2 shows an alternative sawtooth topology that employs flying capacitor C2 to reset A1. This allows it to be referenced to the positive rail instead of ground, eliminating the need for Figure 1’s negative rail and pulse differentiation. Here’s how it works.

Flying capacitor C2 resets the RRIO ramp to zero volts, allowing it to be referenced to the positive rail instead of ground.
Figure 2. Flying capacitor C2 resets the RRIO ramp to zero volts, allowing it to
be referenced to the positive rail instead of ground.

RRIO op-amp A1’s positive input being tied to the VL positive rail allows R1 to act as a current sink between ground and A1’s summing point. This ramps A1’s output positively to:

Simultaneously, flying capacitor C2 charges to VSAW via its connection to A1’s output through U1a. Then, on the positive-going edge of “Square In,” the bottom end of C2 is connected to A1 summing point while its top end switches from ground to VL. This dumps a quantum of charge into C1:

Given that C1 = C2, this resets “Saw Out” to ground as shown in Figure 3.

Flying capacitor C2 resets the RRIO ramp to zero volts, allowing it to be referenced to the positive rail instead of ground.
Figure 3. “Square In” and “Saw Out” voltage waveforms where VSAW = VL T/(R1C1).

For best accuracy, R1, C1 and C2 should be precision types.

Materials on the topic

  1. Datasheet Texas Instruments CD74HC4053
  2. Datasheet Texas Instruments TLV2371

EDN