[TriEmbed] PWM to Analog 0 to 5 VDC?

Martin Brooke martin.brooke at duke.edu
Tue Jun 30 11:27:24 CDT 2020


Use this website to design an active filter
http://sim.okawa-denshi.jp/en/OPstool.php

Here is what I would use unless you need fast response

 Sallen-Key Low-pass Filter Design Tool - Result...
<https://drive.google.com/file/d/1Tqvi3fRPWzvwn_f6gx6AD3zccl_0SlH6/view?usp=drive_web>

Uses 2 x 1 Megohm resistors and 2 x 0.1 uF capacitors

Super stable output probably from most normal PWM, but not very fast.  The
signal stable in about a second after the PWM changes.

Use this opamp:

https://www.digikey.com/product-detail/en/MCP6002-I%2FP/MCP6002-I%2FP-ND/

it is $0.33  for 1 they have thousands in stock today.  Digikey ships fast
by low cost USPS to RDU area, typically 2-day to my home!

The DIP package makes it easy to use with a protoboard.

But any CMOS opamp with Rail to rail input and output performance and 5V
single supply operation should work.

There are other circuits that are similar

https://www.electronics-tutorials.ws/filter/second-order-filters.html

that let you adjust performance more but probably not worth it.

If you do not have a 5V power supply you might try this

https://www.circuitlab.com/circuit/75p326/basic-peak-detector-01/

to generate close to 5V power from your incoming PWM signal.  With a large
enough capacitor it probably will work if the PWM source is strong.

Best

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20200630/169f0f5e/attachment.htm>


More information about the TriEmbed mailing list