Parsing PWM (DAC) performance: Part 2—Rail-to-rail outputs



Editor’s Note: This a four-part series of DIs proposing improvements in the performance of a “traditional” PWM—one whose output is a duty cycle-variable rectangular pulse which requires filtering by a low-pass analog filter to produce a DAC. This second part addresses the inability of “rail-to-rail” op amps’ output swing to encompass supply rail voltages.

Part 1 can be found here.

Recently, there has been a spate of design ideas (DIs) published that deal with microprocessor (µP)-generated pulse width modulators driving low-pass filters to produce DACs. Approaches have been introduced which address ripple attenuation, settling time minimization, and limitations in accuracy. This is the second in a series of DIs proposing improvements in PWM-based DAC performance. Each of the series’ part’s recommendations are, and will be, implementable independently of the others. This DI addresses the inability of “rail-to-rail” op amps’ output swings to encompass their supply rail voltages. Recognizing that an op amp is needed to buffer a filter from a DC load to prevent load-induced errors, and that these devices are useful in implementing more effective analog filters, there is a legitimate interest in mitigating or eliminating this imperfection.

Wow the engineering world with your unique design: Design Ideas Submission Guide

It don’t mean a thing if it ain’t got that swing (well, sort of…)

The common mode input voltages of many rail-to-rail op amps may be 100 mV above their positive and below their negative supply rails, but none have an output common mode voltage range which includes those rails. The OPA376, 2376, and 4376 rail-rail family with its excellent input offset voltage and bias current ratings are no different. The SC70-5, SOT23-5, and SO-8 package versions reach within 40 mV of the rails with a 10 kΩ load from -40°C to 125°C, and within 50 mV with a 2 kΩ load. There are various means of dealing with this limitation.

In the spirit of “Doctor, it hurts when I do this”, “Then don’t do that!”: software could simply prevent the setting of duty cycles which would drive the op amp too near a supply rail. This is rather unsatisfactory if the code which generates the duty cycle values expects that the values of zero and full scale (FS) will be executable. So, suppose an op amp can swing to within X mV of both its positive rail (VDD) and ground; instead of programing the PWM counter with a value of DC, program it with DC’ = DC · (1 – α) + α · FS/2, where α = X mV · 2 / VDD.

If that calculation imposes an unacceptable software burden, there is a related analog approach. In Figure 1, set R = r · α / (1 – α). The full range of DC values is now restricted to a range that the op amp output can replicate.

Figure 1 A purely analog means of avoiding op amp input voltages so close to the supply rails that the output cannot replicate them.

If the resistors have a 0.1% tolerance, the maximum offset error is a little greater than 2-15· VDD. The gain error is larger though: a little less than 2-10 · VDD. With adequate calculation resolution, the method of scaling the duty cycle count in software leads to smaller errors than the purely analog one.

In some applications, it is imperative that a DAC can swing to ground. In others, it must also be able to reach the µP’s positive rail, VDD. To accomplish this, voltage(s) beyond (a) supply rail(s) must be generated. But in no case can the supply voltages’ range exceed that recommended for the op amp, which is 5.5 V for the OPAx376 family. This necessitates different solutions for the common VDD supply values of 1.8, 2.5, 3.3 and 5.0 V. We will now follow with a series of schematics that contain solutions for each of these voltages…

The circuitry for the op amp positive rail (OP+) can be ignored in favor of VDD if the DAC needn’t swing to VDD. Texas Instruments’ LM7705 provides a complete and elegant means of generating a voltage that is only slightly more negative than ground, thereby allowing the op amp output to reach 0 V (Figure 2). This charge pump accepts a supply voltage of from 3 to 5.25 V and provides a regulated output of -230 mV at up to 20 mA. The LM7705 offer features beyond those of a simple charge pump inverter (which requires an external oscillator) in that:

  1. An inverter sets the negative rail supply voltage to be the negative of the positive supply voltage. At VDD = 3 V and above, 3 V – (-3 V) exceeds the OPAx376’s family’s maximum differential supply voltage VOpRange of 5.5 V. The LM7705 provides just enough negative voltage and no more than is needed.
  2. The LM7705 has a smaller footprint and incorporates an oscillator and a regulated DC output into a single IC.

Figure 2 This simple and inexpensive inverting charge pump provides a regulated -0.23 V for a rail-to-rail op amp’s negative supply so that the op amp output can swing to, and even below, ground.

But an application might also require swinging to the positive rail. The need to avoid supply voltage ranges exceeding 5.5 V for the OPAx376 leads to different solutions for different values of VDD (always assumed to be within +/- 5% of nominal value). The simplest solution is for the case of VDD equal to 1.8 V (Figure 3).

Figure 3 Solution for staying within the supply operating range for the OPAx376 where VDD = 1.8 V.

The LM2664 is a voltage inverter generating -VDD from + VDD. With the addition of D1, D2, C3 and C4, a voltage of 2 · VDD – 2 · Vd is generated where Vd is the voltage drop across the diodes. OA+ is enough above VDD to allow the op amp output to include the positive rail. The difference between OA+ and OA- is safely within supply operating range (VOpRange) for the OPAx376. If your VDD is between 1.8 and 5.5 V and is less than 1/3 of the VOpRange of your op amp, this simple and cheap circuit could be all you need. But if not…

As shown in Figure 4, the same circuit is the basis for operation from a 2.5V supply, but accommodations must be made to meet VOpRange for the OPAx376. This is accomplished by adding D3 and D4 to incur voltage drops.

Figure 4 Solution for staying within the supply operating range for the OPAx376 where VDD = 2.5 V.

Combinations of +/-5% variations in VDD, tolerances in diode voltage drops, and variations over temperature and load of the above circuit’s output voltages warn against applying the strategy of adding more diodes in series for the case where VDD increases to 3.3V (Figure 5).

Figure 5 Solution for staying within the supply operating range for the OPAx376 where VDD = 3.3 V.

Here the LM2664 performs the same function as it did for a VDD of 1.8 and 2.5 V. But it powers a cheap op amp IC which functions as a positive and a negative voltage regulator. The R6 / R7 divider ensures that the LM358BI operates within its common mode input range. (Its VOpRange is greater than 30 V!) OA+ and OA- voltages are approximately 100 mV beyond VDD = 3.3 V +/-5% and ground. Q1 and Q2 are placed in feedback loops to reduce the regulator output impedance. Since the op amp rails should be decoupled with ground-referenced .1 µF capacitors, this reduced impedance increases the loop’s high frequency break point. The result could be unstable were it not for the combination of C5 and R3 and that of C6 and R1. These pairs filter out the high phase-shift, high frequency feedback taken from the emitters and ensure that only mid frequencies down to DC are being regulated, thus establishing stability. In this circuit, the resistors are 1% tolerance parts.

As shown in Figure 6, the circuit for a 5 V VDD is similar to that for 3.3 V, but simpler. Here the higher Pump+ voltage means that there are no worries about input common mode operation, and we can dispense with R6 and R7. The passive components that make up the regulators are now identical.

Figure 6 Solution for staying within the supply operating range for the OPAx376 where VDD = 5 V.

Encompassing supply rail voltages

In this DI, several different approaches have been presented for producing DACs whose voltage swings encompass supply rails, or at least mitigate the problems associated with those that don’t. Hopefully, one or more are suitable for your application.

Christopher Paul has worked in various engineering positions in the communications industry for over 40 years.

Related Content

<!–
googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-native’); });
–>

The post Parsing PWM (DAC) performance: Part 2—Rail-to-rail outputs appeared first on EDN.



Source link