×

Zipplet Tech's video: How To: Get decent analog audio from your Raspberry Pi Zero PWM

@How To: Get decent analog audio from your Raspberry Pi Zero (PWM)
=== Please expand for links to the files you will need === If you enjoyed this video, please subscribe to keep up to date with my latest scammer encounters and tutorials! (Well OK, technically it is a 1-bit DIY DAC). I demonstrate my working prototype (and give hints on mounting your speaker!), and explain in detail how the other Raspberry Pi models generate analog audio. I then explain how you can add this capability to your Pi Zero including circuit schematics, and show you how to make it sound better than it does on the other models - along with some common pitfalls. === Required files === After you have built the circuit you will need the following: Settings for your config.txt file (/boot/config.txt): http://pastebin.com/84KbaZsk If you only want to use 1 speaker, mono downmix settings (save this as ~/.asoundrc in the home directory of any user account that plays sound, such as in /home/pi): http://pastebin.com/Zdnk0yEK === Links and other information === The chip part number on my class D amplifier is a PAM8403 - this is a very good class D amplifier for small applications (more than enough power to fill a room with the correct speakers!) The original PWM audio generation runs at 48kHz with 11-bit effective resolution. If you use sigma-delta modulation mode it is 7-bit 2nd-order sigma-delta modulated at 781.25kHz, with the sound quality approaching that of a CD player DAC which is excellent for general purpose applications and in my opinion even good enough for gaming / general music listening through speakers, such as if you are building a music streaming device. (More information can be found on the forum in the links below). Raspberry Pi forum post explaining the experimental sigma-delta setting: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=136445 Raspberry Pi forum post to discuss this project/video: https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=168084 Further reading for those interested in the signal generation: PWM (Pulse Width Modulation): https://en.wikipedia.org/wiki/Pulse-width_modulation Sigma-delta modulation: https://en.wikipedia.org/wiki/Delta-sigma_modulation

199

48
Zipplet Tech
Subscribers
7.3K
Total Post
22
Total Views
356.3K
Avg. Views
7.1K
View Profile
This video was published on 2016-12-10 23:22:25 GMT by @Zipplet-Tech on Youtube. Zipplet Tech has total 7.3K subscribers on Youtube and has a total of 22 video.This video has received 199 Likes which are higher than the average likes that Zipplet Tech gets . @Zipplet-Tech receives an average views of 7.1K per video on Youtube.This video has received 48 comments which are higher than the average comments that Zipplet Tech gets . Overall the views for this video was lower than the average for the profile.

Other post by @Zipplet Tech