PWM to Analog IC

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
Just looking for IC make/model suggestions.

An IC to convert PWM signal (low frequency, 5kHz or less) to an analog output voltage, something like PWM 0-100% with analog out 0-supply V (in my case 0-12vdc). Analog output needs to be rather flat (no ripple) for any given PWM %, I am using this output as a REF voltage to opamp. I acn't really cap the output because the opamp needs to have good dynamic response as PWM changes quickly.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,386
You can't get "no ripple" so how much can you tolerate?
What is the lowest PWM frequency?

Since you want a fast update with PWM duty-cycle change, you likely need use a circuit that directly measures duty-cycle and converts it analog such as this.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
I might be able to achieve what I need using an MC that has DAC. I still looking into this.
The LTC2644 looks like it may work for me, need to check if 5.5v output is high enough for my REF voltage on opamp.
The 2644 accepts 30-6.25kHz (12bit), so that's ok for me.

MC DAC vs LTC2644 output ripple is something I would also look at. The 2644 is a dedicated DAC so it might be better than most low cost MC's have to offer.

This piece of ckt is to be the adjustable REF voltage to opamp in a CC PSU. The "adjusting" part is in the form of MC code.
 

crutschow

Joined Mar 14, 2008
38,386
Just use an RCRC filter.
RC filters of any form have a slow response time to a change in PWM duty-cycle
The TS stated he wanted a good response with low ripple, which why I suggested a circuit that directly measures the PWM duty-cycle, which is much faster with a low output ripple.
 
Last edited:

panic mode

Joined Oct 10, 2011
4,902
LTC2644 looks like a nice solution. and it is dial channel. all that is left is scale input and output and that is straight forward.
 

Ian0

Joined Aug 7, 2020
13,109
RC filters of any form have a slow response time to a change in PWM duty-cycle
The TS stated he wanted a good response with low ripple, which why I suggested a circuit that directly measures the PWM duty-cycle, which is much faster with a low output ripple.
If he had put some number to those requirements it would have been rather easier to advise. . .
One important point about active filters is that the response does not decrease continuously with frequency. Due to the phase shifts in the op-amp the response starts to rise again, so the ripple is not reduced as much as one would expect from a simple 12dB/octave calculation.
RCRC filter also does 12dB/octave without that problem. Its only problem is its low Q.

As an example, if the PWM encodes a sinewave, then an LTC2644 would output a steppy sinewave, an RCRC filter would output a smooth sinewave.
 

crutschow

Joined Mar 14, 2008
38,386
an LTC2644 would output a steppy sinewave, an RCRC filter would output a smooth sinewave.
But the steppy output can be easily filtered to significantly smooth the steps without compromising the instant response to a duty-cycle change that the LTC2644 has.
 

Ian0

Joined Aug 7, 2020
13,109
But the steppy output can be easily filtered to significantly smooth the steps without compromising the instant response to a duty-cycle change that the LTC2644 has.
And the odds are that that filter would perfectly demodulate the PWM as well, without the LTC2644. (But it all depends on the PWM frequency, and the signal frequencies of interest)
 

MisterBill2

Joined Jan 23, 2018
27,258
It seems a bit like a pulse-counting FM discriminator, which I have read about but not seen the circuit. And it might be similar to the digital audio amplifiers.
BUT, really, an appropriate low pass filter will do it. But the filter needs to be constantly adjustable. That part gets tricky.
 

crutschow

Joined Mar 14, 2008
38,386
And the odds are that that filter would perfectly demodulate the PWM as well,
Odds?
The TS stated:
Analog output needs to be rather flat (no ripple) for any given PWM % ---
opamp needs to have good dynamic response as PWM changes quickly.
An analog filter has the conflicting requirements of minimizing the PWM frequency ripple while still recovering an apparently high PWM modulation frequency.
The analog filter recovery is also sensitive to any amplitude variations or noise on the PWM waveform.

The LTC2644 settles to its stated 8, 10, or 12 bit accuracy within 8µs in a step fashion, which only occurs during a PWM duty-cycle change, so only needs a filter to smooth the lowest PWM modulation frequency without concern for the PWM frequency.

From that I think the odds of an analog filter being sufficient to meet the TS's needs are low.
And the LTC2644 is an inexpensive solution to the problem.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,258
The very effective scheme will be to use every PWM pulse to gate a really fast counter and then a fast D/A converter to provide an analog output based on the precisely measured pulse width. That will reproduce the original modulating signal at a 5 kilohertz sample rate, which will have no ripple at all, but only a 5 KHZ noise level that can be removed with a low pass filter.
Or maybe that has been proposed already, using part numbers and not functional descriptions. Certainly my scheme is complex and will not have any ripple at all. Just a fixed frequency noise component.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
Just adding some clarity.
1) I am basically seeking a DAC. I can do it a few ways. Some/many MC's have DAC built-in, but I have yet to study the dynamics of these DAC's in MC's. With these DAC's I can code output directly and not even use PWM.
2) PWM frequency will be fixed, I am only changing % PWM. I do need to verify the bit width of PWM control I can get (steps). I can code 0-100% but I just not sure yet if I can code 1.105%, as example. I'll be programming CC profiles and for some applications the code will step through those profiles in a timed sequence.
3) The dedicated 2644 IC has some nice specs, 12bit being one of them. Surely there's better than 12bit to be had, but that's good enough for my needs. Response time is very fast in the 2644, must be magnitudes faster than RCRC filter. I also suspect 2644 is a lot more stable and "flat" vs RCRC. I still need my MC to create PWM profiles (if I use 2644), so the 2644 becomes another IC in the schematic, aka "more complex", etc.

Thanks for the replies.
 

schmitt trigger

Joined Jul 12, 2010
2,047
I am always amazed at the capabilities and flexibility of the LTC’s line of analog building blocks. No discrete circuit comes close, unless it is quite complex.
Having said that, they are always a little pricey and are many times only offered in small SMT packages which are a challenge to solder by hand.
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
1,242
As an example, if the PWM encodes a sinewave, then an LTC2644 would output a steppy sinewave, an RCRC filter would output a smooth sinewave.
PWM encoded to map a sinewave output would be steppy matching that of the PWM "steps". That's a good point to know, and for some applications that could be an issue to be noted and dealt with. For my needs though the 2644 would be operating kinda like this pic from the datasheet. Fast change in % PWM, but then it stays there for msec's or sec's. My CC profiles in code would be the output steps like in the pic. LED drives, reflow oven, etc.

My ckt is the CC version of driving LED with CV and PWM on the gate of FET or the like. The latter means the LED flickers on/off at PWM drive freq, and limited to rise & fall times of the load (LED, other, etc). I can do the same dimming control using CC mode. Pros & Cons to each, but #1 factor in life of a part, heat cycling. There's no heat cycling in CC mode.



2644.png
 
Last edited:

Shadow123

Joined Jul 25, 2024
14
Just looking for IC make/model suggestions.

An IC to convert PWM signal (low frequency, 5kHz or less) to an analog output voltage, something like PWM 0-100% with analog out 0-supply V (in my case 0-12vdc). Analog output needs to be rather flat (no ripple) for any given PWM %, I am using this output as a REF voltage to opamp. I acn't really cap the output because the opamp needs to have good dynamic response as PWM changes quickly.
The LTC2644 and LTC2645 are good options. The TIPD127 is another one providing 12-bit resolution with low ripple. General-purpose op-amps like the LM358 and LM324 can be used with low-pass filters to smooth PWM signals although they may introduce some limitations in response time and ripple compared to dedicated DACs.
 
Top