PWM audio without RC low-pass filter

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
Post Reply
User avatar
Vitis
Posts: 24
Joined: Thu Jul 10, 2014 7:00 pm

PWM audio without RC low-pass filter

Post by Vitis »

I have been reading about audio signal generation with microcontrollers, and I've even done some experimentation myself with microcontroller-generated audio using nothing more than two resistors and a PWM output to generate a 1 volt peak-to-peak audio signal with pretty good results, but I do notice what sounds like high frequency harmonic noise when I try to generate a low frequency audio signal with a saw-tooth waveform. I have read from several sources that it is recommended to use an RC low-pass filter to filter out the PWM carrier frequency when generating audio with PWM; however, the Uzebox seems to generate audio perfectly well without an RC low-pass filter. Has anyone experienced any problems with the Uzebox audio that was rectified with an RC low-pass filter?
User avatar
uze6666
Site Admin
Posts: 4821
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: PWM audio without RC low-pass filter

Post by uze6666 »

While working on the original prototype I had a low-pass RC filter on the PWM audio output. While it helped somewhat and make sound a bit less harsh it was not that significant. I guess that's because there's already a filter in the TV for that. In any cases I removed it because it was causing some faint visible brightness artifacts in the background that were most visible when you had the same background color covering most of the screen. Removing the filter made that disappear so I didn't bother to investigate more since it could have been caused by a gazillion things and I was not analog guru. Could have been due to not enough decoupling on the mega, interference due to the wirewrap prototype, etc.
User avatar
Vitis
Posts: 24
Joined: Thu Jul 10, 2014 7:00 pm

Re: PWM audio without RC low-pass filter

Post by Vitis »

It's cool to hear the story behind the omission of a low pass filter in the Uzebox. I've seen so many circuit configurations for microcontroller PWM audio output in various projects: Uzebox, Craft by Lft, RetroWiz etc. It's really incredible what the Uzebox is able to do in terms of audio with only one pin and two resistors.
User avatar
uze6666
Site Admin
Posts: 4821
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: PWM audio without RC low-pass filter

Post by uze6666 »

Yeah, I'm still amazed at how good plain PWM can sound, even without a filter. :)
Post Reply