How to connect the audio output from the pi0 ?

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
Valadone
Posts: 53
Joined: Tue Feb 07, 2017 12:39 pm
Has thanked: 8 times
Been thanked: 5 times

How to connect the audio output from the pi0 ?

Post by Valadone » Mon Mar 27, 2017 5:40 am

Hi everyone,

I have a problem with the sound. I don't know how to recover it from the pi0( code and wiring diagram ).

I don't have helder's AIO on anything AIO. Just Pi0, audio amplifier, Jack plug, speaker and volume wheel.

I found that but i'm not sure if i need to do that with Recalbox OS : https://learn.adafruit.com/adding-basic ... -pwm-audio

If someone can help me ? I think this topic can help a lot of people :)

thanks !

Valadone
Posts: 53
Joined: Tue Feb 07, 2017 12:39 pm
Has thanked: 8 times
Been thanked: 5 times

Re: How to connect the audio output from the pi0 ?

Post by Valadone » Tue Mar 28, 2017 1:49 am

I found this video which seems pretty good to help us to configure the raspberry pi 0 without any AIO PCB.

https://www.youtube.com/watch?v=_MtN_s4tVK0
For the audio output configuration : 5.45 min
For the composite video configuration : 5.05 min

I try it soon for the audio, i'll receive my audio amplifier this week.

Valadone
Posts: 53
Joined: Tue Feb 07, 2017 12:39 pm
Has thanked: 8 times
Been thanked: 5 times

Re: How to connect the audio output from the pi0 ?

Post by Valadone » Thu Mar 30, 2017 4:32 pm

Hmm i have a problem...

The video have a module i don't have...

So i have an audio amplifier, a wheel with 3 pins, the rasp0, the speaker and the jack plug.

Someone have a wiring diagram to help me connect them together ? Because i didn't find anywhere a good wiring diagram which show us where to solder the wire at the right places...

Thanks :)

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

Re: How to connect the audio output from the pi0 ?

Post by rodocop » Mon Apr 03, 2017 9:48 am

What type of amplifier do you have? What kind of headphone jack are you using? You have added the proper lines to the config.txt to get PWM audio?

Wermy's guide shows how to do it, read through his guides. I used this setup on my first build, but I skipped the headphone jack.

Part 4 deals with wiring the speaker, headphone, and amp,
http://www.sudomod.com/game-boy-zero-guide-part-4/

part 5 shows how to add an low pass filter (optional), and where to wire the amp to on the pi zero, as well as the code that needs to be added to your config.txt.
http://www.sudomod.com/game-boy-zero-guide-part-5/

and part 6 shows how to add the volume wheel (he uses a 5 pin wheel though).
http://www.sudomod.com/game-boy-zero-guide-part-6/

Valadone
Posts: 53
Joined: Tue Feb 07, 2017 12:39 pm
Has thanked: 8 times
Been thanked: 5 times

Re: How to connect the audio output from the pi0 ?

Post by Valadone » Mon Apr 03, 2017 12:14 pm

Female audio jack :https://fr.aliexpress.com/item/10Pcs-PJ ... 56325.html

Audio amplifier :https://fr.aliexpress.com/item/5PCS-2-C ... 06d147a5d1

potentiometer wheel :https://fr.aliexpress.com/item/5PCS-LOT ... 3763.html

speaker : https://fr.aliexpress.com/item/MAHA-4P ... 44315.html

I saw the wermy's video a lot of time but it's not the exactly same parts as me so i'm completely lost --'

Thanks for your help :)

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

Re: How to connect the audio output from the pi0 ?

Post by rodocop » Mon Apr 03, 2017 1:15 pm

This topic shows the same amp you used, but he uses a USB sound card and a slightly different headphone port. Your amp, you would wire it to the pi's GPIO's using the L or R in (I think, GPIO 13 or 18 are the PWM ones you'll only need one for mono sound). then use the L or R out to the speaker/headphones/volume wheel (you only need to use L or R, no both, since you have one speaker.)
http://www.sudomod.com/forum/viewtopic. ... udio+guide

Here is some info on the different types of headphone jacks too.
http://www.sudomod.com/forum/viewtopic. ... +jack+type

See this topic to find out what the 3 pins do on a 3 pin volume wheel:
http://www.sudomod.com/forum/viewtopic. ... ume#p17614

Sorry I can't be much more help with the volume wheel, since i've only used the 5 pin ones.

User avatar
Lphillimore
Posts: 993
Joined: Sat Jan 07, 2017 7:03 pm
Location: Perth, WA
Has thanked: 796 times
Been thanked: 527 times

Re: How to connect the audio output from the pi0 ?

Post by Lphillimore » Mon Apr 03, 2017 6:06 pm

Post some pics of the setup so we can get a clearer idea :mrgreen:

Valadone
Posts: 53
Joined: Tue Feb 07, 2017 12:39 pm
Has thanked: 8 times
Been thanked: 5 times

Re: How to connect the audio output from the pi0 ?

Post by Valadone » Tue Apr 04, 2017 5:17 am

I'll take a photo of my setup this afternoon.

I found this tuto on 'make' but i don't know where to solder the wires on my female jack :/
http://makezine.com/projects/make-24/add-volume-jack/

I soldered a 220ohm resistor between first and third pin to grow up the resistance and it's not bad. The sound is clearer with it.

potentiometer wheel wire : left pin GND - middle pin audio in - right pin audio out

I did a lot of test and soldered everywhere. All some good but i have to solder the female audio jack now.
I think i'll soldered the audio in to left/right in and audio out to left/right out and the last to the GND. Is that correct or not for a mono speaker ?

And i have a tiny little last issue, i want to rotate my display but i don't know where to put this command in the config.txt file = > display_rotate=2 (for 180°). I tried 2 times but the OS don't want to boot after that ... One time at the beginning of the file and the second time at the end and on each try i fuck it --'

Thanks :)
Attachments
P_20170404_231721.jpg
P_20170404_231721.jpg (614.82 KiB) Viewed 11206 times
P_20170404_231654.jpg
P_20170404_231654.jpg (690.11 KiB) Viewed 11206 times

User avatar
Lphillimore
Posts: 993
Joined: Sat Jan 07, 2017 7:03 pm
Location: Perth, WA
Has thanked: 796 times
Been thanked: 527 times

Re: How to connect the audio output from the pi0 ?

Post by Lphillimore » Tue Apr 04, 2017 8:55 pm

So to confirm...audio works with this current setup?

You're just trying to add in the headphone jack?

Personally i would use a 5 pin volume pot.

2x PWM Outputs from pi would go to the 2x channel inputs on voulme pot.

2x volume pot outputs to the Amp inputs.

Voulme pot ground to PCB shared ground.

Then amp + and - to speaker.

I would then retest before adding the headphone jack into the mix.

Essentially if you see @wermy second build guide he uses the same headphone jack and advises what each pin is.

As for screen rotate, download the config file from @helder AIO Support thread in Lounge and simply add the rotate line as a new line at the bottom. This works for me.

User avatar
Lphillimore
Posts: 993
Joined: Sat Jan 07, 2017 7:03 pm
Location: Perth, WA
Has thanked: 796 times
Been thanked: 527 times

Re: How to connect the audio output from the pi0 ?

Post by Lphillimore » Tue Apr 04, 2017 8:57 pm

Also, if you're not using a filter, the audio quality wont be great!

Unless you really want Splashscreen audio, i'd go USB audio.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest