PWM to voltage level

Thread Starter


Joined Apr 6, 2011
Hello All,

I'm working on a project for motor control using an A3979 Microstepping DMOS Driver from AllegroMicro. In order to minimize board size I will be using the output of a microchip microelectronic to set the voltages for current ref and stepping mode. So I'm thinking of anput of 5Khz 3.3V PWM signal, not sure about that yet, but I basically want to voltages from 200mV up to around 2.2V.

I'm trying to figure out how can I accomplish this? Low pass filter? Op-Amp?


Joined Mar 14, 2008
To get dc from a PWM output you run it through a low-pass filter. To minimize ripple it should be a least second-order or higher, which can be readily achieved with an op amp active-filter circuit. The cut-off frequency should be as low as possible which still give you the response time you need for the DC voltage changes.

A simple way to design active filters is the free filter design software from TI.


Joined Sep 9, 2010
A frequency-to-voltage circuit with a 555 is an option if you have control over the PWM frequency, not just its duty cycle.