Tutorial for PWM and GPIO sound

Having trouble with your GBZ build? Ask your questions here!
Post Reply
User avatar
Marty33
Posts: 145
Joined: Wed Feb 22, 2017 4:55 pm
Has thanked: 19 times
Been thanked: 13 times

Tutorial for PWM and GPIO sound

Post by Marty33 » Sat Feb 17, 2018 9:51 am

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
Last edited by Marty33 on Sat Feb 17, 2018 10:32 am, edited 1 time in total.

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Tutorial for PWN and GPIO sound

Post by rodocop » Sat Feb 17, 2018 10:16 am

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
SpoilerShow
Image

User avatar
Marty33
Posts: 145
Joined: Wed Feb 22, 2017 4:55 pm
Has thanked: 19 times
Been thanked: 13 times

Re: Tutorial for PWM and GPIO sound

Post by Marty33 » Sat Feb 17, 2018 10:49 am

It's perfect. Thanks @rodocop

Alternative of adafruit pam8302a ?

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Tutorial for PWM and GPIO sound

Post by rodocop » Sat Feb 17, 2018 11:45 am

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

User avatar
Marty33
Posts: 145
Joined: Wed Feb 22, 2017 4:55 pm
Has thanked: 19 times
Been thanked: 13 times

Re: Tutorial for PWM and GPIO sound

Post by Marty33 » Sun Feb 25, 2018 5:20 pm

For my uses, this components is usefull ?

Gameboy Zero PWM Audio SMD : https://oshpark.com/shared_projects/qUEOjE0n

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Tutorial for PWM and GPIO sound

Post by rodocop » Sun Feb 25, 2018 9:58 pm

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

User avatar
Marty33
Posts: 145
Joined: Wed Feb 22, 2017 4:55 pm
Has thanked: 19 times
Been thanked: 13 times

Re: Tutorial for PWM and GPIO sound

Post by Marty33 » Mon Feb 26, 2018 4:37 pm

I make this diagram. I'm in the good way ?

Image

Your suggestions are welcome (you or other member) to add good options with minimal elements (to stay in the compact mod).

Big thanks :P

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Tutorial for PWM and GPIO sound

Post by rodocop » Mon Feb 26, 2018 5:34 pm

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.

User avatar
Marty33
Posts: 145
Joined: Wed Feb 22, 2017 4:55 pm
Has thanked: 19 times
Been thanked: 13 times

Re: Tutorial for PWM and GPIO sound

Post by Marty33 » Tue Feb 27, 2018 4:09 am

Haha exact !! :-)

I have 30awg, 24awg and 26awg electrical wire. Any advice for sound ?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest