Noise and dirty sound only on headphones [SOLVED]

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
Post Reply
sparkster
Posts: 5
Joined: Wed Jul 12, 2017 6:05 am
Has thanked: 4 times

Noise and dirty sound only on headphones [SOLVED]

Post by sparkster » Wed Jul 12, 2017 6:37 am

Hi guys. I hope you can give me a hand with a problem I am having with my first Gameboy Zero.

I am following both tutorials, with custom parts and with the original gameboy, since I found some of the custom parts, but not all of them.

I am having problems with the sound. It works, but not very well when connecting headphones. I am using the speaker and amplifier of the first tutorial:
https://www.amazon.es/gp/product/B00QIW ... UTF8&psc=1
https://www.amazon.es/gp/product/B00PY2 ... UTF8&psc=1

together with my own low pass filter and the headphones jack of the second tutorial:
https://www.amazon.es/gp/product/B00OK6 ... UTF8&psc=1

This is my config.txt configuration related to sound, as per the tutorial and some extra info I found in this forum:
dtoverlay=pwm,pin=18,func=2
disable_audio_dither=1


I tried to do the final wiring in a prototype board just to test it, as explained in the tutorial:
Image

With this design, the sound was quite low and very dirty and noisy. After some try and error I found out that if I removed the ground connection from the In- pin in the amplifier, it got quite louder, but still noisy. After that I tried going down to the basics and connecting the speaker directly to the amplifier, so I did it as in the next diagram:

Image

Notice the missing ground connection in the In- pin in the amplifier and the direct connection from the output of the amplifier to the speaker. As I say, with this configuration, the sound is very clear, so I decided to give it a go and apply it to the previous connection, so the final result is as shown in this diagram:

Image

Notice the missing ground connection in the In- pin in the amplifier and the connection to the O- pin in the amplifier to the speaker.

Again, with this configuration the sound in the speaker is loud and clear. However, when I connect headphones to the jack, the sound becomes dirty and very noisy. If I turn the volume down using the potentiometer, the noise in the headphones gets higher than the sound itself (it does not happen in the speaker).

Since the signal goes through the jack before going to the speaker, I got to the conclussion that there is a wiring problem in the jack, probably related to that change I made in the wiring of the amplifier to get a clearer sound. Anyway, I couldn't find a way to connect all these parts to make it sound better, which is quite annoying, as I'm sure you understand. I expected the headphones sound better than the speaker! Do you have any ideas about how to solve this mess?

Thank you very much!
Last edited by sparkster on Sat Jul 15, 2017 1:52 pm, edited 1 time in total.

crazyfrog
Posts: 13
Joined: Wed Jul 05, 2017 2:21 pm
Location: UK

Re: Noise and dirty sound only on headphones

Post by crazyfrog » Wed Jul 12, 2017 3:34 pm

This is exactly what I'm trying to figure out myself there doesnt seem to be much info.

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2887
Joined: Thu May 05, 2016 8:33 am
Location: Rogers, AR
Has thanked: 1436 times
Been thanked: 3096 times

Re: Noise and dirty sound only on headphones

Post by Helder » Thu Jul 13, 2017 1:57 am

The headphones get the audio then the wires that go to the speaker go to the amp which then connects to the speaker. You want the headphones before the amp along with the volume wheel.
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!

sparkster
Posts: 5
Joined: Wed Jul 12, 2017 6:05 am
Has thanked: 4 times

Re: Noise and dirty sound only on headphones

Post by sparkster » Thu Jul 13, 2017 2:14 pm

Helder wrote:
Thu Jul 13, 2017 1:57 am
The headphones get the audio then the wires that go to the speaker go to the amp which then connects to the speaker. You want the headphones before the amp along with the volume wheel.
I see... so the order would be RPi -> LPF -> Volume wheel -> Headphones -> Amp -> Speaker

I'll try that and let you know how it goes! Thank you!

McGyver
Posts: 220
Joined: Tue Jan 31, 2017 11:06 am
Location: Tianjin / China
Has thanked: 23 times
Been thanked: 51 times

Re: Noise and dirty sound only on headphones

Post by McGyver » Thu Jul 13, 2017 2:47 pm

Maybe not your issue but this is a good treat to post: the PWM output from raspberry and the often used digital amplifiers producing a lot of noise on active driven headphones! I have this issue using my Bose Quite Comfort 3! This headphone has an internal amplifier and plays very loud white noise connected on the headphone out of the gameboy. Why? Because the gameboy installed digital amp does not operates in the good impedance (external load resistor). A good load (lets say) 8-32 ohms is necessary for smoothing the switching frequency.

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2887
Joined: Thu May 05, 2016 8:33 am
Location: Rogers, AR
Has thanked: 1436 times
Been thanked: 3096 times

Re: Noise and dirty sound only on headphones

Post by Helder » Thu Jul 13, 2017 4:14 pm

There is a new PWM driver too for the Pi and it cleans audio immensely. Look for the audio_pwm_mode=2 on google for more info.

More info on it:
https://www.raspberrypi.org/forums/view ... &start=200
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!

sparkster
Posts: 5
Joined: Wed Jul 12, 2017 6:05 am
Has thanked: 4 times

Re: Noise and dirty sound only on headphones

Post by sparkster » Fri Jul 14, 2017 2:50 pm

Well, I tried the tip and there's good and bad news:

The good news is that with the new diagram the sound in both speaker and headphones is clean and awesome. New diagram included for future reference:
Image


Bad news have two parts: the first one, by connecting the jack before the amplifier as in the diagram, the potentiometer only works for headphones, i.e. it does not affect to the volume in the speaker, which is always the same. I solved this by using the second channel in the potentiometer to adjust the volume in the speaker.

The second part of bad news is slightly worse. With this new diagram, when connecting headphones, there's a very high pitch hissing noise. I think it might be because of the lack of insulation in the cables I'm using, even with ferrite beads. The headphones cable acts as an antenna picking whatever signal there's around. Actually something similar happens if I touch with my fingers in the output of the jack to the amplifier. Not much else I can do anyway...

Anyway, if I connect the In- pin to ground, sound switches off, so this pin is still not connected to anything.

As a funfact I found out that if I connect the screw in the amplifier (yes, the screw!) to ground, the sound boosts like a rocket, but there's a little distortion. If no one knows about the hissing sound problem, I think we can set this as solved.

crazyfrog
Posts: 13
Joined: Wed Jul 05, 2017 2:21 pm
Location: UK

Re: Noise and dirty sound only on headphones

Post by crazyfrog » Fri Jul 14, 2017 7:35 pm

Helder wrote:
Thu Jul 13, 2017 4:14 pm
There is a new PWM driver too for the Pi and it cleans audio immensely. Look for the audio_pwm_mode=2 on google for more info.

More info on it:
https://www.raspberrypi.org/forums/view ... &start=200
Has no one made a decent pwm amp yet that we can solder our audio wheel connectors directly to? I dont like the AIO boards I prefer to have the choice to mount and solder parts where I want them but audio has to be perfect.

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2887
Joined: Thu May 05, 2016 8:33 am
Location: Rogers, AR
Has thanked: 1436 times
Been thanked: 3096 times

Re: Noise and dirty sound only on headphones

Post by Helder » Fri Jul 14, 2017 9:16 pm

As mentioned all over the place especially in my support thread PWM needs shielding and to be away from any and all data and power lines so it doesn't pick up interference. Since the audio is analog just like your FM radio it is prone to interference so be mindful of that when you're thinking that it will always be hiss free and noise free, it likely won't but you can get it in a decent acceptable form.
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!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest