Go Down

Topic: Questions about PWM DAC Low-Pass Filtering (Read 634 times) previous topic - next topic

albertocarlassare

Hi everyone,

I already red many posts in this forum about RC filter applied to a PWM audio out to get an analog low-pass filtered signal.

Finally I have some confusion about values of components because in each post are suggested different values for them. I calculate Frecuency cut-off with this tool: http://sim.okawa-denshi.jp/en/CRtool.php
Is this tool good?

I find out that the best values for my RC is R=1k & C=10nF. This RC gives me a Frecuency Cut-Off ... Is it that ok?

In schematics of Groovesizer.com & http://www.instructables.com/id/Turn-your-Arduino-into-a-4-voice-wavetable-synth-w/
They set up filter like that:
                                                                                                  C2: 10uF
Arduino PWM Out ----------R:1k---------+---------||------Vout
                                                                                   |
                                                                                === 10nF (C1)
                                                                                   |
                                                                                GND

- What C2 condenser stands for? What is doing in the circuit? Is that value correct for my purpose?

- I was also looking to how change R value with a pot but I found out that with lesser R value in RC circuit, Freq.Cut value is highier. Which circuit invert the behaviour of resistances?

All material you can suggest me on web is welcome, also about designing more complex filters (2/4 poles - with adjustable resonance / analog filters driven by pwm arduino signals etc. etc.)

I'm sorry for being wide in my question!

Thanks in advance
Alberto
                                                                                 

DVDdoug

Quote
- What C2 condenser stands for? What is doing in the circuit? Is that value correct for my purpose?
It filters the DC out of the signal.   DC is zero Hertz, and this capacitor (along with the load resistance/impedance) actually forms a high-pass filter.    10uF is large enough that it should pass all audio frequencies with any reasonable load resistance.   

Quote
- I was also looking to how change R value with a pot but I found out that with lesser R value in RC circuit, Freq.Cut value is highier. Which circuit invert the behaviour of resistances?
You can't reverse the basic physics.

Quote
All material you can suggest me on web is welcome, also about designing more complex filters (2/4 poles - with adjustable resonance / analog filters driven by pwm arduino signals etc. etc.)
You'll need an active filter (with an op-amp).   In the old days, everybody used the Active Filter Cookbook, but I assume that information is available online now.  Or, you can use a switched capacitor filter which requires a special filter chip.

Realistically, if you are going to add a chip you might consider getting a proper (PCM) DAC, instead of using PWM.    You Should be able to fine a DAC with a built-n filter, but it will probably surface mount which makes it more difficult for hobbyist use.

CrossRoads

R1 & C1 form the filter.
C2 prevents DC from flowing thrru to the jack- the signal that comes out will be up to +/- 2.5V and look like AC to the following amplifier.
Read here http://en.wikipedia.org/wiki/Capacitive_coupling
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up