Raspigamer
Posts: 53
Joined: Thu Nov 05, 2015 3:48 am

Class D amp not loud enough

Sat May 14, 2016 3:38 pm

https://www.adafruit.com/products/987
This is the amp that I'm using and I don't know why but its not very loud. I have alasmixer turned up to 100% and I tested the audio jack on my pi and it played really loud through headphones.
I have it wired like this:
5V ----- VDD
GND ----- GND
SDWN ----- Nothing I have no idea what this port is for
L+ ----- Left sound output
L- ----- GND
R+ ------ Right sound output
R- ------ GND
G+ ------ Nothing I don't know what this if for
G' ------- Nothing I don't know what this port is for

I am using a raspberry pi 2 and my OS is Retropie 3.7 if someone could please help I would be very thankful

User avatar
Burngate
Posts: 6191
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Class D amp not loud enough

Sat May 14, 2016 4:42 pm

First off, to get that out of the way, SDWN is "Shutdown" - if you connect it to ground it powers down the chip. Leaving it unconnected is ok, since there's a resistor on the board pulling it up to 5v.

G and G' control the gain of the chip. There's a resistor on the board connecting them, so you can do really funky things, such as turning the gain to maximum when your PIR sensor detects a mouse close by.
But it's easier to control the gain with the pins at the bottom edge of the board.

Headphones can sound really loud in your ears, but speakers need to put out a bit of power to sound the same.
If you haven't connected anything to G, G', or any of the 18-15-12-9 pins, the gain is set by default to 6dB - doubling the voltage.

So try connecting in turn, G or G' to 5v or ground, and see if you get an improvement

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Class D amp not loud enough

Sun May 15, 2016 4:44 am

I've got this amp too. I use the jumper on the gain pins to increase the volume as, without it, the amp seems quite quiet.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

IanS
Posts: 238
Joined: Wed Jun 20, 2012 2:51 pm
Location: Southampton, England

Re: Class D amp not loud enough

Wed May 18, 2016 12:23 pm

HI again,
See my reply on your earlier thread.
The problem is you connecting L- and R- to ground. On a class D amp they are reversed voltage outputs of L+ and R+, not ground, and so double the output voltage difference between L+ and L- compared with L+ and ground. Connecting any output of a class D output to any other, or to ground, can damage the amp.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Class D amp not loud enough

Wed May 18, 2016 2:12 pm

IanS wrote:HI again,
See my reply on your earlier thread.
The problem is you connecting L- and R- to ground. On a class D amp they are reversed voltage outputs of L+ and R+, not ground, and so double the output voltage difference between L+ and L- compared with L+ and ground. Connecting any output of a class D output to any other, or to ground, can damage the amp.
That's interesting. Both Adafruit and Pimoroni say this:
The inputs of the amplifier go through 1.0uF capacitors, so they are fully 'differential' - if you don't have differential outputs, simply tie the R- and L- to ground.
Are we confusing inputs and outputs here? I don't think anyone is suggesting that the outputs have been tied to ground. I think the "Sound output" reference in the original post just means that the output device is connected to the indicated input on the amp.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

IanS
Posts: 238
Joined: Wed Jun 20, 2012 2:51 pm
Location: Southampton, England

Re: Class D amp not loud enough

Thu May 19, 2016 12:05 pm

OK, yes on the Adafruit MAX98306 amp, L+, L-, R+ and R- are inputs, and the outputs are the LOUT and ROUT pairs.
In this case L- and R- are inputs and can be grounded if the input signals are supplied to R+ and L+.
However, the principle of my previous reply still stands. Do not connect any outputs to ground, or to each other.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Class D amp not loud enough

Thu May 19, 2016 1:16 pm

Thanks Ian. Still important advice.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

Raspigamer
Posts: 53
Joined: Thu Nov 05, 2015 3:48 am

Re: Class D amp not loud enough

Tue May 24, 2016 6:30 pm

elParaguayo wrote:Thanks Ian. Still important advice.
So if I understand this right I need to attach something a switch or potentiometer to the gain pins and what am I supposed to do with the L and R negative pins

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Class D amp not loud enough

Wed May 25, 2016 8:54 am

I'll tell you how I've done it.

I've ignored G and G' pins.
I have the 2x4 header block soldered to the gain portion of the board and use a jumper to select the required gain level.
I have a headphone socket wired to the board: Left to L+. Right to R+. (Headphone) GND to R-.
I've then joined R-, L- and GND on the board.
VDD and GND are connected to my 5v source.
Speakers are connected to L OUT and R OUT. No connection between the outputs.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
piglet
Posts: 913
Joined: Sat Aug 27, 2011 1:16 pm

Re: Class D amp not loud enough

Wed May 25, 2016 10:06 am

elParaguayo wrote: No connection between the outputs.
I managed to let out the magic smoke from mine by accidentally bridging the outputs when plugging in a stereo jack (the old a/v case I was using had this for speaker connection) :(

IanS
Posts: 238
Joined: Wed Jun 20, 2012 2:51 pm
Location: Southampton, England

Re: Class D amp not loud enough

Wed May 25, 2016 12:50 pm

This is why class D amps are bad as headphone amplifiers. Only high end headphones normally have separate ground connections for each ear, so a standard stereo jack which has L, R, Gnd connections ends up shorting outputs. Pop!
There is a way of doing it, but it does not use the full amplification capabilities of the amp. See http://electronics.stackexchange.com/qu ... dphone-amp

Raspigamer
Posts: 53
Joined: Thu Nov 05, 2015 3:48 am

Re: Class D amp not loud enough

Wed May 25, 2016 4:28 pm

elParaguayo wrote:I'll tell you how I've done it.

I've ignored G and G' pins.
I have the 2x4 header block soldered to the gain portion of the board and use a jumper to select the required gain level.
I have a headphone socket wired to the board: Left to L+. Right to R+. (Headphone) GND to R-.
I've then joined R-, L- and GND on the board.
VDD and GND are connected to my 5v source.
Speakers are connected to L OUT and R OUT. No connection between the outputs.
Using this did you get a good sound output?

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Class D amp not loud enough

Thu May 26, 2016 8:40 am

Raspigamer wrote:
elParaguayo wrote:I'll tell you how I've done it.

I've ignored G and G' pins.
I have the 2x4 header block soldered to the gain portion of the board and use a jumper to select the required gain level.
I have a headphone socket wired to the board: Left to L+. Right to R+. (Headphone) GND to R-.
I've then joined R-, L- and GND on the board.
VDD and GND are connected to my 5v source.
Speakers are connected to L OUT and R OUT. No connection between the outputs.
Using this did you get a good sound output?
Yes.

Only issue for me is the lack of bass so the sound isn't as "full" as I'd like. However that will be due to the size of the speakers I am using, rather than the amp.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

Raspigamer
Posts: 53
Joined: Thu Nov 05, 2015 3:48 am

Re: Class D amp not loud enough

Thu May 26, 2016 5:06 pm

elParaguayo wrote:
Raspigamer wrote:
elParaguayo wrote:I'll tell you how I've done it.

I've ignored G and G' pins.
I have the 2x4 header block soldered to the gain portion of the board and use a jumper to select the required gain level.
I have a headphone socket wired to the board: Left to L+. Right to R+. (Headphone) GND to R-.
I've then joined R-, L- and GND on the board.
VDD and GND are connected to my 5v source.
Speakers are connected to L OUT and R OUT. No connection between the outputs.
Using this did you get a good sound output?
Yes.

Only issue for me is the lack of bass so the sound isn't as "full" as I'd like. However that will be due to the size of the speakers I am using, rather than the amp.
Thank you when I get a chance I will try this and hopefully be able to continue with my project

Raspigamer
Posts: 53
Joined: Thu Nov 05, 2015 3:48 am

Re: Class D amp not loud enough

Sun Jun 05, 2016 4:34 pm

elParaguayo wrote:
Raspigamer wrote:
elParaguayo wrote:I'll tell you how I've done it.

I've ignored G and G' pins.
I have the 2x4 header block soldered to the gain portion of the board and use a jumper to select the required gain level.
I have a headphone socket wired to the board: Left to L+. Right to R+. (Headphone) GND to R-.
I've then joined R-, L- and GND on the board.
VDD and GND are connected to my 5v source.
Speakers are connected to L OUT and R OUT. No connection between the outputs.
Using this did you get a good sound output?
Yes.

Only issue for me is the lack of bass so the sound isn't as "full" as I'd like. However that will be due to the size of the speakers I am using, rather than the amp.
Hello I have tested the amp using the wiriring that you told me and I still can't get it to work. could it be that I'm trying to run it off a teensy 2.0

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: Class D amp not loud enough

Mon Jun 06, 2016 11:25 am

Do you mean that the Teensy is essentially the power source for the amp? If so, I have no idea what the max power output for the Teensy is and whether it's sufficient for the amp.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
Burngate
Posts: 6191
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Class D amp not loud enough

Mon Jun 06, 2016 5:16 pm

Raspigamer wrote:Hello I have tested the amp using the wiriring that you told me and I still can't get it to work. could it be that I'm trying to run it off a teensy 2.0
It started off just not loud; now it's not working at all?
And where does the teensy come in? Are you connecting the teensy to the Pi by USB, then powering the amp from that, but still running the audio from the Pi's jack into the amp?

Perhaps a diagram would help us.

Return to “Graphics, sound and multimedia”