Electronicdesign 28534 Ifdpromo

Simple Circuit Turns PWM Into A Digitally Adjustable Precision Reference

Feb. 10, 2012
The circuit uses the ubiquitous LM431 shunt regulator to implement a second-order Sallen-Key low pass filter together with a level shifter.

>> Electronic Design Resources
.. >> Library: Article Series
.. .. >> Series: Ideas for Design
.. .. .. >> Ideas for Design Vol. 1

Download this article as a PDF file

Designs frequently require the conversion of a microprocessor’s pulse width modulation (PWM) signal into an analog
voltage. Often a passive single-pole RC filter will satisfy design requirements, but this approach typically suffers from
several drawbacks including slow response time, noisy results, and having an unbuffered output.

The circuit described here uses the ubiquitous LM431 shunt regulator to implement a second-order Sallen-Key low pass
filter together with a level shifter (see the figure). Compared to the traditional approach, it provides a far sharper roll-off along with a low-impedance output, bipolar output. It will produce a –2.5- to +2.5-V output with a 0- to 5-V PWM signal input. The value of VOut is equal to (5 V × dc) – 2.5 V, where dc is the PWM duty from 0.0 to 1.0 (0% to 100%).

The component values depicted provide a flat response with a cutoff frequency around 2300 Hz, a –12-dB/octave roll-off, and drive capability of about 3 mA. You can easily change the cutoff frequency by adjusting R1 and R2 or C1 and C2, although it is important to keep R1 equal to R2 and C2 at about half the value of C1.

Doubling the resistor or capacitor values will cut the frequency in half. Halving either set of values will double the cutoff frequency. You can adjust R3 to provide more output current or to reduce power consumption. The 5-V rails depicted do not have to be precise and can be a higher voltage. Only the PWM input signal needs to be precisely 5 V.

Because it uses only six components, this circuit can be very cost effective. The LM431 can be purchased for as low as 10 cents in single-unit quantities, well below that of any op amp.

Editor’s Note: See Texas Instruments Application Report SLOA024B, “Analysis of the Sallen-Key Architecture,” for additional information on Sallen-Key filters.

Sponsored Recommendations

What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!