Non-OEM Audio Guide - No DMG Parts

Various user-contributed guides for hardware-related things
User avatar
Kilren
Posts: 574
Joined: Wed May 11, 2016 4:40 pm
Location: Washington, USA
Has thanked: 35 times
Been thanked: 84 times

Non-OEM Audio Guide - No DMG Parts

Post by Kilren » Fri Jun 10, 2016 1:24 pm

I bought a shell for my build. This means that I didn't have any of the parts to recycle for my project, so I have had to find alternatives to accomplish the same job. As for the audio, almost none of the ideas are original or my own, I've just taken what everyone else is done and figured out how to make it work for me. @chiz has been especially helpful with finding the Sabrent USB Audio card, and @cannikin for having a schema that got me going in the right direction, and then making a couple of parts in Fritzing for me.

Parts:
Sabrent USB
Uxcell Digital 3W Amp
Radioshack 5pin 10k Ohm Thumbwheel Potentiometer
5 pin Audio Jack
1W Laptop Speaker

There are cheaper alternatives for the speakers. I needed extra speakers for another project so it worked best for me.

This has crystal clear audio <85% volume with 128kbps. Above that, you'll start getting possible audio distortion. This has nothing to do with the wiring, shielding, or schematic. It has to do with quality of audio source, and the higher the quality, the closer you get to zero distortion. With that said, use good wires. If you experience audio distortion, turn down the volume either in emulationstation or in sudo (though, I've experienced very little so far).

Image
(The audio jack isn't exactly the same pin layout as the radioshack one, so if confused, refer to my picture in the breadboard section.

The only con that I experienced is that the pot gives the speakers only about 1/4 turn sensitivity. Meaning, you go from high to low in a quarter turn. I didn't mind this too much because I figured the speaker was an all or nothing approach. The reason this happens is because the speaker must have a certain wattage, and turning it lower than that turns off power (compared to turning down volume). The headphone jack has full pot control, and that is what I thought was most important.

If you have questions, fire away. It would be smart to first solder wires onto everything and then test on a breadboard before installing into GBZ.

Now onto proof, because 'pictures, or it didn't happen'.
BreadboardShow
I burnt out my 10k pot from constant soldering/desoldering trying new things until I figured out a schema I liked best. Burning my fingertips a few times, and throwing away a pot, I wised up and just connected everything to a breadboard until I finished.
Overview of Breadboard
Image
Audio jack working to disconnect! (Green and White-green are in, blue and white-blue are out)
Image
InstallationShow
I wanted it to be as low profile as possible, and I wanted the volume to be on the bottom instead of the traditional volume spot. The hardest part of using non-oem was figuring out how to install the pot. It is very small, and a real pain in general. I chose not to put it in the traditional spot because I have other plans for that, and I hate long wires. You can put it wherever the hell you want!

Looking on the right, I have the amp glued against the plastic shell, a layer of hot glue with the Sabrent USB, layer of hot glue and the pot sitting on top. It all fits real snug. I like it.

Almost there.
Image
Final resting place for the audio.
Image
You will need to program the RPi0 to default audio to the USB. Chiz made an awesome guide on that that I quoted here. If you use it, pop over there and say thanks.
chiz guideShow
Source: viewtopic.php?f=20&t=144
chiz wrote:For those who's considering to go the USB audio route (vs. the PWM method), I've prepared this guide to help anyone who's at a loss on how to configure their Retropie installation for USB audio use. Note you'll need a USB keyboard attached or you can SSH into your system assuming you have configured it already for access within your home network.

Steps:
1. Attach the USB audio dongle into one of the USB ports connected the RPi. Reboot the system.

2. Once EmulationStation has loaded, exit from it by pressing F4. This will take you to the terminal.

3. Check if your USB audio has been detected by Raspbian Jessie by typing the command below:

Code: Select all

pi@retropie:~ $ lsusb
Output should be:

Code: Select all

Bus 001 Device 007: ID 0d8c:0014 C-Media Electronics, Inc.
Bus 001 Device 004: ID 0424:2517 Standard Microsystems Corp. Hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The C-Media Electronics, Inc line shows that the USB audio device is detected.

4. Once we're sure the USB audio device is detected, let's check the order of priority of the sound cards being used by the system. Do so by typing this command:

Code: Select all

pi@retropie:~ $ cat /proc/asound/modules
Output should be:

Code: Select all

 0 snd_bcm2835
 1 snd_usb_audio
As you can see from the output above, the snd_bcm2835 is the built-in sound card but we want the system to use snd_usb_audio

5. We can change and force the system to load the sound cards in a different order by creating a sound configuration file. Create the file by using the command below:

Code: Select all

pi@retropie:~ $ sudo nano /etc/modprobe.d/alsa-base.conf
You will then enter the Nano editor environment and type the following lines:

Code: Select all

options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd-usb-audio,snd-bcm2835
Afterwards, press Ctrl+X to exit and answer Yes when prompted to save.

6. Reboot the system, exit EmulationStation once again to go to the terminal.

7. If you've successfully completed all the above steps, you should see the output below when you type the command:

Code: Select all

pi@retropie:~ $ cat /proc/asound/modules
Output should be:

Code: Select all

 0 snd_usb_audio
 1 snd_bcm2835
Notice that the order has changed and it's now the snd_usb_audio that's on top of the list with an index of 0

8. Test the sound by going to EmulationStation and playing a game. You should immediately hear EmulationStation sounds when you go select from the list of games.

Load EmulationStation by typing the following command:

Code: Select all

pi@retropie:~ $ emulationstation
Good luck!
Last edited by Kilren on Fri Jun 10, 2016 1:30 pm, edited 1 time in total.

User avatar
Kilren
Posts: 574
Joined: Wed May 11, 2016 4:40 pm
Location: Washington, USA
Has thanked: 35 times
Been thanked: 84 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by Kilren » Fri Jun 10, 2016 1:28 pm

@dirtybeagles I know you've been waiting for this.

User avatar
joe7dust
Posts: 218
Joined: Mon Jun 06, 2016 4:13 am
Has thanked: 23 times
Been thanked: 7 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by joe7dust » Fri Jun 10, 2016 2:44 pm

Kilren wrote:@dirtybeagles I know you've been waiting for this.
Me too <3 TY for this I can finally order the final bits for my build now. :) One slight disagreement with something you said. You can't get a better deal than that speaker :P I got 2x 1.5W laptop speakers for 99 cents w/ free shipping from a local US ebayer... and there was even another listing for the same price on a slightly different model. Laptop speaker = way to go for sure, not sure what you were referring to when you said there is a cheaper option, but gl getting better for 49.5 cent each after shipping! Oh and as a bonus? It comes with a ton of extra plastic bracing that can be used for random misc. needs elsewhere plus some extra wiring and connectors, screw holes, etc.
Last edited by joe7dust on Fri Jun 10, 2016 2:51 pm, edited 2 times in total.

User avatar
Kilren
Posts: 574
Joined: Wed May 11, 2016 4:40 pm
Location: Washington, USA
Has thanked: 35 times
Been thanked: 84 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by Kilren » Fri Jun 10, 2016 2:47 pm

joe7dust wrote:Me too <3 TY for this I can finally order the final bits for my build now. :)
Woot, real glad to hear man! My one word of advice, the solder connections have to be perfect for the audio or you'll get interference (different from distortion). So, test it often. I hooked it up to a speaker and ran audio through it after each new component to make sure it was working well. This is where the bread board comes in real handy. If you need a how-to breadboard connection, I have one. Just let me know.

Let me know if you have any questions.

User avatar
joe7dust
Posts: 218
Joined: Mon Jun 06, 2016 4:13 am
Has thanked: 23 times
Been thanked: 7 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by joe7dust » Fri Jun 10, 2016 2:49 pm

Kilren wrote:
joe7dust wrote:Me too <3 TY for this I can finally order the final bits for my build now. :)
Woot, real glad to hear man! My one word of advice, the solder connections have to be perfect for the audio or you'll get interference (different from distortion). So, test it often. I hooked it up to a speaker and ran audio through it after each new component to make sure it was working well. This is where the bread board comes in real handy. If you need a how-to breadboard connection, I have one. Just let me know.

Let me know if you have any questions.
I ninja'd edited a complaint about you saying there is a better speaker option than what you picked. :P

User avatar
Kilren
Posts: 574
Joined: Wed May 11, 2016 4:40 pm
Location: Washington, USA
Has thanked: 35 times
Been thanked: 84 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by Kilren » Fri Jun 10, 2016 2:55 pm

joe7dust wrote:I ninja'd edited a complaint about you saying there is a better speaker option than what you picked. :P
Gotcha. I was specifically referring to the source and the price I paid for my speakers. My point was that there were the same speakers I got that are cheaper elsewhere, your example is a highlight of this.

User avatar
Cannikin
Posts: 127
Joined: Wed May 11, 2016 3:10 pm
Has thanked: 4 times
Been thanked: 36 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by Cannikin » Fri Jun 10, 2016 3:14 pm

Fritzing diagram came out great!

User avatar
dirtybeagles
Posts: 386
Joined: Thu May 05, 2016 6:04 am
Has thanked: 34 times
Been thanked: 64 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by dirtybeagles » Fri Jun 10, 2016 4:58 pm

Kilren wrote:@dirtybeagles I know you've been waiting for this.
Thanks man for doing this. My question is what is the green line coming from the pot to the headphone jack? is that ground? If so, would that connect to switch A on the GB headphone jack or the ground where the GND speaker wire is soldered to?

User avatar
Kilren
Posts: 574
Joined: Wed May 11, 2016 4:40 pm
Location: Washington, USA
Has thanked: 35 times
Been thanked: 84 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by Kilren » Fri Jun 10, 2016 6:33 pm

dirtybeagles wrote:
Kilren wrote:@dirtybeagles I know you've been waiting for this.
Thanks man for doing this. My question is what is the green line coming from the pot to the headphone jack? is that ground? If so, would that connect to switch A on the GB headphone jack or the ground where the GND speaker wire is soldered to?
It is GND. It is actually not required but doesn't hurt. You do not want it to touch the same gnd as the amp though because the power introduces interference and static from the electricity. Get it hooked up to a breadboard and see what I am talking about it. It is night and day difference.

Villemus
Posts: 26
Joined: Wed Jun 22, 2016 7:22 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Non-OEM Audio Guide - No DMG Parts

Post by Villemus » Wed Jun 22, 2016 7:31 pm

How is the USB part wired to the Pi-zero? Can you still have an external USB connector for hubs and controllers?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest