I hooked up the MAX98357A Class D amplifier to my Raspbery Pi Zero W according to these instructions https://learn.adafruit.com/adafruit-max ... d-mono-amp
I setup the software, and everything went according to Hoyle. I can run alsamixer and I see the volume go up and down, But when I run the speaker test I get no audio.
I used my ohm meter and checked continuity between the solder pads on the amp and the solder pads on the pi, as well as the leads to the speaker.
I don't have an oscilloscope, so I'm not able to check for signaling, but I checked for voltage on LRClock, BitClock, and Din, each showed .003 volts whether I was playing a file or not. I checked voltage on the speaker wires and it shows 0 volts. I triple-checked the wiring a half dozen times and I'm 100% certain I am hooked up to all the correct pins on the Pi.
Because there's no change in voltage when playing a file, I suspect the problem is software, not hardware, but I don't know how to confirm it, or even what to do about it. Everything is set up according to the instructions.
Is there a log file I can look at? Or, some diagnostic tools?
Raspberry Pi Zero W and MAX98357A Amplifier
Moderators: adafruit_support_bill, adafruit
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
- charles92027
- Posts: 12
- Joined: Wed Jun 08, 2022 4:32 pm
- mikeysklar
- Posts: 14194
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Raspberry Pi Zero W and MAX98357A Amplifier
Please post a photos so we can verify the correct pins are attached and the board soldering looks good (both Pi and max98357).
Which are the details of the Pi OS build you are running? (eg. 32-bit, lite, bullseye)
Please post the output of aplay -l which will confirm that you device you are trying to send audio to with speaker test is on the correct card/device number.
Also attach the asound.conf you are using to confirm that matches up with the card/device number.
Which are the details of the Pi OS build you are running? (eg. 32-bit, lite, bullseye)
Please post the output of aplay -l which will confirm that you device you are trying to send audio to with speaker test is on the correct card/device number.
Code: Select all
aplay -l
- charles92027
- Posts: 12
- Joined: Wed Jun 08, 2022 4:32 pm
Re: Raspberry Pi Zero W and MAX98357A Amplifier
I'll have to take a picture when I get home this evening, but I just noticed a possible problem in the tutorial
The tutorial says to use Raspberry Pi #21, #18 and #19,
But, this post: viewtopic.php?f=50&t=176340&p=865228&hi ... 7A#p863480 indicates it should be GPIO #21, #18 and #19, all of which appear to be PCM related, but they are Raspberry Pi #40, #12 and #35
So, I think I'm just wired incorrectly, and could be a big problem why so many people have reported problems with this amp. I'll rewire this evening and report my findings, but if anyone can verify my assumption I would appreciate it
The tutorial says to use Raspberry Pi #21, #18 and #19,
But, this post: viewtopic.php?f=50&t=176340&p=865228&hi ... 7A#p863480 indicates it should be GPIO #21, #18 and #19, all of which appear to be PCM related, but they are Raspberry Pi #40, #12 and #35
So, I think I'm just wired incorrectly, and could be a big problem why so many people have reported problems with this amp. I'll rewire this evening and report my findings, but if anyone can verify my assumption I would appreciate it
- charles92027
- Posts: 12
- Joined: Wed Jun 08, 2022 4:32 pm
Re: Raspberry Pi Zero W and MAX98357A Amplifier
The boards are all mounted vertically, so it’s a little tough to see it.
Anyway, I adjusted the wiring to use the GPIO pin numbering instead of the Raspberry Pi pin numbering and it works great now.
Anyway, I adjusted the wiring to use the GPIO pin numbering instead of the Raspberry Pi pin numbering and it works great now.
- mikeysklar
- Posts: 14194
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Raspberry Pi Zero W and MAX98357A Amplifier
Thank you for the followup. Glad it was just a matter of following the GPIO number.
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/