Page 1 of 1
Tutorial for PWM and GPIO sound
Posted: Sat Feb 17, 2018 9:51 am
by Marty33
Hello all
Sorry for my bad english, i search tips but with bad english, complicated to found good results.
For small project, i search to gain the maximum place.
I use the GPIO for the buttons :
https://www.sudomod.com/forum/viewtopic.php?f=22&t=57
I know it's possible to use the GPIO for the sound, but is it a conflict to use buttons + sound on GPIO?
And.... i search explanations and/or diagram for sound on GPIO (buttons+sound on GPIO diagram it's fantastic).
And last question, the performance of the sound on gpio ?
Big thanks for your help
Re: Tutorial for PWN and GPIO sound
Posted: Sat Feb 17, 2018 10:16 am
by rodocop
The guide you linked for gpio controls does not conflict with pwm audio. Pwm audio will use bcm 13 and 18 from the diagram.
Pwm audio is decent, but it is a little staticy. It's not bad though. I always use pwm.
Here's a diagram use for mono audio
Re: Tutorial for PWM and GPIO sound
Posted: Sat Feb 17, 2018 10:49 am
by Marty33
It's perfect. Thanks @rodocop
Alternative of adafruit pam8302a ?
Re: Tutorial for PWM and GPIO sound
Posted: Sat Feb 17, 2018 11:45 am
by rodocop
Marty33 wrote: ↑Sat Feb 17, 2018 10:49 am
It's perfect. Thanks @rodocop
Alternative of adafruit pam8302a ?
I use these ones lately instead of the adafruit ones.
https://m.banggood.com/3Pcs-PAM8403-Min ... s=myorders
Re: Tutorial for PWM and GPIO sound
Posted: Sun Feb 25, 2018 5:20 pm
by Marty33
For my uses, this components is usefull ?
Gameboy Zero PWM Audio SMD :
https://oshpark.com/shared_projects/qUEOjE0n
Re: Tutorial for PWM and GPIO sound
Posted: Sun Feb 25, 2018 9:58 pm
by rodocop
One of those will help with static a bit. You will still need the amp. You can also build yourself too:
https://sudomod.com/forum/viewtopic.php?t=480
Re: Tutorial for PWM and GPIO sound
Posted: Mon Feb 26, 2018 4:37 pm
by Marty33
I make this diagram. I'm in the good way ?
Your suggestions are welcome (you or other member) to add good options with minimal elements (to stay in the compact mod).
Big thanks

Re: Tutorial for PWM and GPIO sound
Posted: Mon Feb 26, 2018 5:34 pm
by rodocop
Look like a good diagram! Just make sure the v+ and v- on the powerboost are wired to the proper pads. Your diagram shows then attached to the usb retainer clips.
Re: Tutorial for PWM and GPIO sound
Posted: Tue Feb 27, 2018 4:09 am
by Marty33
Haha exact !!
I have 30awg, 24awg and 26awg electrical wire. Any advice for sound ?