Single IC forms precision triangular-wave generator
Generate a triangular wave for testing other circuits.
Akshay Bhat, Maxim Integrated Products Inc, Sunnyvale, CA; Edited by Martin Rowe and Fran Granville -- EDN, April 8, 2010
The linearity of triangular waveforms makes the triangular-wave generator useful in sweep circuits and test equipment. For example, switched-mode power supplies and induction motor-control circuits often include a triangular-wave oscillator as part of their PWM (pulse-width-modulation) circuit.
The basic triangular-wave generator includes an integrator for generating the triangular-wave output and a comparator with external hysteresis, such as a Schmitt trigger, for setting the output amplitude (
). You can implement these components with a Maxim MAX9000 IC, which includes a high-speed operational amplifier, a 185-nsec comparator, and a precision 1.23V bandgap reference.
|
The integration of a constant current, which you obtain by applying constant voltage across a resistor, produces a linear ramp at the op amp’s output. This output feeds a Schmitt trigger whose output feeds back to the integrator resistor. Abrupt state changes in the Schmitt trigger’s output determine the peak voltages for the triangular-wave output. These changes in turn depend on the input threshold voltages you set for the Schmitt trigger.
Unfortunately for this circuit, the triangular-wave peaks must be symmetrical about the reference voltage you apply to the comparator’s inverting input. To generate a triangular wave from 0.5 to 4.5V, for example, you must provide a reference voltage of (0.5V+4.5V)/2=2.5V.
It would be preferable to set this voltage range independently of the standard bandgap-reference voltage available, 1.23V. You can achieve this flexibility by adding resistor R3 to the hysteresis network in a single-IC version of the circuit (
). R3 lets you set the triangular-wave peaks independently of the reference voltage.
To build the Schmitt-trigger comparator, you first select R2. The comparator’s input-bias current at CIN+ is less than 80 nA. To minimize the error this current causes, the current through R2, [(VREF–VOUT)/R2], should be at least 8 µA. R2 requires two equations, corresponding to the two possible comparator-output states: R2=VREF/IR2, and R2=(VDD–VREF)/IR2.
Use the smaller of the two resulting resistor values. For example, if the supply voltage is 5V, the reference voltage is 1.23V, and the reference current is 8 µA, the two R2 values are 471.25 and 153.75 kΩ, so this circuit uses the standard value of 154 kΩ.
Next, select R1 and R3. During a rising ramp, the comparator output is logic low (VSS). Similarly, the comparator output is at logic high (VDD) during a falling ramp. Thus, the comparator must change state according to the required peak and valley points of the triangular wave.
Two simultaneous equations result when you apply nodal analysis at the noninverting input of the comparator and solve for these two thresholds:
and
In this example, the voltage range of the triangular wave is 0.5 to 4.5V. You therefore substitute a value for VIH of 4.5V, VIL of 0.5V, VDD of 5V, and VREF of 1.23V into the above equations to obtain a value of 124 kΩ for R1 and 66.5 kΩ for R3.
You can now design the integrator. Considering the comparator’s two possible output states, the magnitude of current flowing through R4 is: IR4=(VDD–VREF)/R4, or IR4=VREF/R4. The op amp’s maximum input-bias current is 2 nA. To minimize error, therefore, the current through R4 must always be greater than 0.2 µA. This constraint implies that R4’s value is less than 6.12 MΩ.
The triangular-waveform frequency is:
For this example, the frequency is 25 kHz, the output voltage is 4V p-p, or 0.5 to 4.5V for a triangular wave, and the reference voltage is 1.23V. Solving for the resulting time constant, R4C=9.27 µsec. Select a capacitance of 220 pF and a value of 42.2 kΩ for R4.
The resulting output should match the desired frequency, provided that the op amp is not slew-limited. Because the feedback capacitor charges or discharges with a constant current, the output signal’s maximum rate of change is:
To provide a margin against process variations, the op amp’s typical slew rate should be 40% higher than the maximum rate of change of the output signal—0.56V/µsec or greater in this case. The op amp’s slew rate is 0.85V/µsec, which is therefore adequate for this 25-kHz waveform (
).
| Reference |
|
-
Hai,
I just want to ask you about your circuit.I construct your circuit and do the simulation by using proteus software. But,i did not get the triangular wave.I get the straight line. Why?. I hope you can give feedback to me.
Thanks for your info.
Edward - 2010-7-6 22:47:12 PDT -
Good article. I've been using a very similar circuit for a few years to generate a bipolar 2MHz triangle with a DC offset.
While Mr. Lecher is correct in his statement that “a constant voltage through a resistor across a capacitor does not create a linear ramp”, he misinterprets the operation of the circuit. Op-amps react to the difference between the two inputs. In an op-amp circuit with feedback the op-amp reacts in a way to keep the two inputs at the same voltage.
In this circuit the op-amp works to keep its two input voltages equal by adjusting its output voltage to the level necessary to keep the current flowing into its inverting input, Ain-, flowing back out of the same pin through its feedback element, C. The non-inverting input to the op-amp, Ain+, is held at a constant voltage equal to the reference voltage, Vref. As long the op-amp is working normally we can say the inverting input, Ain-, is also equal to Vref. Therefore the current into the inverting pin is (Cout-Vref)/R4, which is a constant current. The op-amp adjusts its output to draw the same current through C. Because the current being drawn through C is constant, the voltage at the output of the op-amp is a linear ramp.
Tim Rushlow - 2010-2-6 07:41:43 PDT -
Well written, useful, article.
One comment: R3 does not make Schmitt trigger trip points (VIH and VIL) independent of the reference voltage. Instead, R3 makes VIH and VIL configurable over a wider range for any specific reference voltage.
Not a huge deal, but confused me for some time.
Regards,
Abdul
Abdul Nizar - 2010-22-4 16:52:00 PDT -
I'm sorry, a constant voltage through a resistor across a capacitor does NOT create a linear ramp; Far from it. A constant CURRENT across a capacitor creates a linear ramp. It wouldn't affect a closed loop switching regulator all that much but it's still completely incorrect. I still remember the textbook I read at AGE 12 ! that showed the 5 time periods to a charged capacitor.I'm 52 now. The capacitor truly never achieves the same voltage as the supplied voltage its like 99.7 percent at time period 5. It's a logarithmic function. As the capacitor gets charged the voltage (therefore the current) across the resistor drops.
I do remember also that if the voltage across the resistor is very high (>10*) compared to the desired maximum charge voltage the graph will appear nearly linear although it still is not truly a linear ramp.
I'm a technician and technicians are here to remember what engineers forget.
Charles Lecher III - 2010-9-4 12:07:00 PDT





















