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 Vsaw = -(-V) Tsq/(R1C1).
Figure 1 The usual topology for converting digital square waves to analog sawtooth requires a negative rail.
Wow the engineering world with your unique design: Design Ideas Submission Guide
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.
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.
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:
Vsaw = VL Tsq / (R1C1)
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:
(VL + (Vsaw – VL))C2 = VsawC2
Given that C1 = C2, this resets “Saw Out” to ground as shown in Figure 3.
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.
Stephen Woodward’s relationship with EDN’s DI column goes back quite a long way. Over 100 submissions have been accepted since his first contribution back in 1974.
Related Content
- Dual RRIO op amp makes buffered and adjustable triangles and square waves
- DAC (PWM) Controlled Triangle/Sawtooth Generator
- Voltage-controlled triangle wave generator
- 555 triangle generator with adjustable frequency, waveshape, and amplitude; and more!
- Adjustable triangle/sawtooth wave generator using 555 timer
- Squashed triangles: sines, but with teeth?
- Sawtooth Generator Circuit with 741 IC
The post Converting square-waves into saw-teeth appeared first on EDN.