PWM Audio Guide

Various user-contributed guides for hardware-related things
User avatar
winnetouch
Posts: 152
Joined: Mon Jul 11, 2016 10:56 am
Has thanked: 2 times
Been thanked: 30 times

Re: PWM Audio Guide

Post by winnetouch » Wed Dec 14, 2016 11:32 am

No one has any ideas?

User avatar
johweb
Posts: 61
Joined: Sun Aug 21, 2016 10:28 pm
Has thanked: 9 times
Been thanked: 7 times

Re: PWM Audio Guide

Post by johweb » Tue Dec 20, 2016 9:45 pm

Hi everyone.

I followed this guide and sounds through the command line are working fine. I tried with a gameboy classic rom but I can't hear anything... How do you setup retropie to have sound ? I don't use a headphone jack connector, speaker is directly connected to the amp.

Thanks !

GameDragon
Posts: 4
Joined: Tue Dec 27, 2016 11:07 am

Re: PWM Audio Guide

Post by GameDragon » Tue Dec 27, 2016 11:17 am

Is it possible to use GPIO 12 rather than GPIO 18 for PWM audio?

If so, how would I go about doing it? Is it as simple as changing "pin=18" to "pin=12"?

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2740
Joined: Thu May 05, 2016 8:33 am
Location: Fall River, MA
Has thanked: 1399 times
Been thanked: 3066 times

Re: PWM Audio Guide

Post by Helder » Thu Dec 29, 2016 12:59 pm

GameDragon wrote:Is it possible to use GPIO 12 rather than GPIO 18 for PWM audio?

If so, how would I go about doing it? Is it as simple as changing "pin=18" to "pin=12"?
There are a few other alternative pins but you must use the PWM pins as seen in this image:

Image
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

User avatar
144TECH
Posts: 325
Joined: Fri Jan 06, 2017 7:30 am
Location: Amsterdam
Has thanked: 256 times
Been thanked: 71 times

Re: PWM Audio Guide

Post by 144TECH » Mon Jan 16, 2017 12:14 pm

* Very Rare * GBZ 640x480 v3 Stock Looks 6000MAH
http://www.sudomod.com/forum/viewtopic.php?f=43&t=4863

gamedude13
Posts: 10
Joined: Thu Aug 03, 2017 6:41 am
Has thanked: 1 time
Been thanked: 1 time

Re: PWM Audio Guide

Post by gamedude13 » Thu Aug 03, 2017 6:46 am

Hi,

I followed the instructions in this thread and setup a mono GPIO PWN output which is fed through the filter circuit to a class D amplifier from adafruit (https://www.adafruit.com/product/2130). Audio output form the command line works (aplay), however, there is quite some noise. Anybody got experience with this?

I am using BCM12 for the audio out. The amplifier is hooked up to GND and PIN2 (5V power supply).

Thanks!

darthwolf
Posts: 9
Joined: Fri Aug 18, 2017 2:29 pm
Has thanked: 5 times
Been thanked: 4 times

Re: PWM Audio Guide

Post by darthwolf » Sat Sep 02, 2017 3:32 pm

Hey there,
before installing it into my pi0 I just want to confirm that this how the low pass filter is supposed to look like. This is my freeform soldering attempt, will enclose in heat shrink tubing before installing.
SpoilerShow
Image

shesaysidontlisten
Posts: 104
Joined: Wed Sep 13, 2017 5:24 pm
Has thanked: 19 times
Been thanked: 8 times

Re: PWM Audio Guide

Post by shesaysidontlisten » Fri Nov 03, 2017 3:48 pm

Going to tackle audio testing/building next. Can a resident expert tell me if the attached diagram (not created by me, found it somewhere on the forums) will work, while substituting the left and right out from the display board in the pic for GPIO 13 and 18 respectively?
lPHZrd9.jpg
lPHZrd9.jpg (983.45 KiB) Viewed 3118 times
I also thought the headphone left and right out are supposed to be combined (each with a 10 ohm resistor) to the speaker positive. This has the left out on positive and right out on negative. If you combine (to not lose those sounds that oscillate) where does the speaker negative go?

There was also some discussion on if the low pass filter is best placed between Pi and PAM8403 or between PAM8403 and volume wheel. I'm wondering if there's a consensus on that.

Thanks all!

emaborsa
Posts: 27
Joined: Sun Oct 02, 2016 1:58 am
Has thanked: 4 times
Been thanked: 1 time

Re: PWM Audio Guide

Post by emaborsa » Tue Nov 07, 2017 11:46 pm

This schema is wrong. From the amply you connect + and - L to the poty-wheel, you should connect +L and +R. And yes, the - of the speaker should go to ground.
Take a look here

shesaysidontlisten
Posts: 104
Joined: Wed Sep 13, 2017 5:24 pm
Has thanked: 19 times
Been thanked: 8 times

Re: PWM Audio Guide

Post by shesaysidontlisten » Fri Nov 10, 2017 11:54 am

emaborsa wrote:
Tue Nov 07, 2017 11:46 pm
This schema is wrong. From the amply you connect + and - L to the poty-wheel, you should connect +L and +R. And yes, the - of the speaker should go to ground.
Take a look here
Thanks! That makes a lot more sense!

Any ideas about where the low pass filter should be? I don't know if it goes before or after the amp.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests