| Electronics > Projects, Designs, and Technical Stuff |
| low pass filter for SPWM speech synthesiser |
| (1/3) > >> |
| hussamaldean:
Hi all, I am currently building arduino based speech synthesiser and the results are perfect. however, I am having issues with low pass filter for such application and designing class d audio amplifier which approach shall I use ? passive or active LPF ? DIY class D or just buy a pre-made one ? looking forward for your help :D |
| hussamaldean:
up up up |
| Buriedcode:
I think the reason you don't have any replies is lack of info. LPF for PWM - audio or otherwise generally depend on the requirements. Bit depth, sample rate, PWM frequency, "acceptable" noise, cost, PCB area etc... Simply saying "what LPF do I use?" is like asking "what circuit do I use for audio?". The first few hits from google: http://ww1.microchip.com/downloads/en/appnotes/00538c.pdf http://www.ti.com/lit/an/spraa88a/spraa88a.pdf https://www.allaboutcircuits.com/technical-articles/low-pass-filter-a-pwm-signal-into-an-analog-voltage/ Edit: I'll add that one trick I've used many times is to use two PWM modules (driven by the same counter, same resolution) to split the resolution across two waveforms and mix the two with resistors. This means you can get 12-bit resolution, with two 6-bit PWM's, meaning each can run 2^6 = 64 times faster. This pushes up the PWM frequency giving greater attenuation for a given filter - or relaxing the filter requirements meaning a 2nd order sallen key with a dual opamp is generally fine. |
| hussamaldean:
--- Quote from: Buriedcode on October 28, 2018, 06:01:48 pm ---I think the reason you don't have any replies is lack of info. LPF for PWM - audio or otherwise generally depend on the requirements. Bit depth, sample rate, PWM frequency, "acceptable" noise, cost, PCB area etc... Simply saying "what LPF do I use?" is like asking "what circuit do I use for audio?". The first few hits from google: http://ww1.microchip.com/downloads/en/appnotes/00538c.pdf http://www.ti.com/lit/an/spraa88a/spraa88a.pdf https://www.allaboutcircuits.com/technical-articles/low-pass-filter-a-pwm-signal-into-an-analog-voltage/ Edit: I'll add that one trick I've used many times is to use two PWM modules (driven by the same counter, same resolution) to split the resolution across two waveforms and mix the two with resistors. This means you can get 12-bit resolution, with two 6-bit PWM's, meaning each can run 2^6 = 64 times faster. This pushes up the PWM frequency giving greater attenuation for a given filter - or relaxing the filter requirements meaning a 2nd order sallen key with a dual opamp is generally fine. --- End quote --- thank you for ur feedback the SPWM frequency is about 64KHz and when I am using 20KHz LPF either RC or LC, the output remains zero and there is no analog value at all(Confirmed by oscilloscope and multimeter ) also, I tried active LPF with same results and I am feeling hopeless for this project despite when using loud speaker made by JBL the sound is perfect with little noise due to SPWM I am thinking about using it to validate the results before moving to create Class D audio Amplifier thx in advance |
| Buriedcode:
Post a schematic of what you're using. It's hard to know what you're doing or whats wrong without a schematic of your setup. |
| Navigation |
| Message Index |
| Next page |