0

Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp
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/
Please be positive and constructive with your questions and comments.

Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Fri Jun 10, 2016 4:52 pm

Hi,

I build the Pigrrl zero and works great. I wanted to add audio internally so I remapped some of the buttons to other pins that the ones used by the Adafruit MAX98357 I2S Class-D Mono Amp.

So I added the I2S amplifier to it, followed the instructions to setup the system to use it but when the only thing it does is low noise static, followed by silence when I play a sound. Any idea?

I use the latest retropie and haven't found any information is there is any incompatibility issue anywhere or any similar posts. I also connected the SD pin to a switch to turn it off in needed. Even when its not playing sound, I measured +350mA consumption, I soldered a second one I had just to verify it was not burned or shorted, but has same behavior.

Any suggestions are welcome

Thanks
Thanos

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by adafruit_support_mike on Sat Jun 11, 2016 3:21 am

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 60305
Joined: Thu Feb 11, 2010 2:51 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Sat Jun 11, 2016 6:03 pm

adafruit_support_mike wrote:Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually



HI,

I connected the 5v wire directly to the Powerbooster but it made the noise worse. What stokes me is that it goes silent when it's suppose the play music or sounds, and makes static noise when idle.

I double checked all connections to be in the correct pins (18, 19, 21).

Image


You can see the position of the latching switch next to the USB.
Image


Thanks
Thanos

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by adafruit_support_mike on Sun Jun 12, 2016 3:12 am

Your assembly looks good, but the I2C board seems to be right over the aluminum pouch on the LiPo.

Try adding a piece of tape between those two and see if anything changes.

adafruit_support_mike
 
Posts: 60305
Joined: Thu Feb 11, 2010 2:51 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Sun Jun 12, 2016 9:59 am

I was using double sticky tape to mount it and avoid it touching the battery. I tried both boards I had floating on air away from the battery at first and still had no sound out of it.

Another thing I noticed is the volume mixer inside the retropie shows always 0% . Is that normal?

And I get this message when I go to terminal:

Image


Any suggestions?

Thanks
Thanos

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Sun Jun 12, 2016 12:02 pm

I have built way more complicate projects but for some reason I can't get the i2s working. I cant even find much info on these i2s amplifiers with raspberry pi zero working together.


See my other project with Raspberry Pi 3:
Image


And here running Dragons Lair 2:
https://youtu.be/k_8VuSDbD9E

Thanks
Thanos

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by adafruit_support_mike on Mon Jun 13, 2016 1:51 am

Hmm.. checking that error message led me to this thread, which says that EmulationStation has some hardcoded assumptions about the ALSA mixer:

https://github.com/Aloshi/EmulationStation/issues/433

You may need to edit and recompile.

adafruit_support_mike
 
Posts: 60305
Joined: Thu Feb 11, 2010 2:51 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Mon Jun 13, 2016 12:08 pm

Thanks for the tip with the mixer message, but that is still don't fix the NO-Audio issue that I have with the dac-amplifier.

I reconnected a brand new i2s amplifier to a Raspberry Pi 2, used the template to make sure all is connected in correct pins, but still no audio, only static noise. I have to mention that the mini speaker (0.5w) is overheating while the i2s amplifier is powered. I seen in the tutorial you were using much larger speaker, I could try that too, but then how I'm going to fit it in the PiGrrl Zero?

Image

Image


I have used clean retropie installation and hdmi output to a screen I had and followed all instructions to setup the i2s audio. I verified that the i2s setup is correct by using the Pomoroni Phat Dac and it plays all audio correctly with no noise or issues.

Image


It seems something must be wrong with all three i2c dac amplifiers I got, can't explain it otherwise...

Can someone try it on one of your PiGrrl Zero or even any raspberry to verify its working?

Thanks
Thanos

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Tue Jun 14, 2016 7:13 am

Any suggestions why the i2s amplifier does not work? Please?

Thanks
Thanos

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Tue Jun 14, 2016 9:14 am

Ok,


I found the issue, the suggested connection pins on the Learn center were wrong. Please correct them to save some frustration from others using this module.

https://learn.adafruit.com/adafruit-max ... y-pi-usage

Wrong connections
Connect:
• Amp Vin to Raspbery Pi 5V
• Amp GND to Raspbery Pi GND
• Amp DIN to Raspbery Pi #19
• Amp BCLK to Raspbery Pi #18
• Amp LRCLK to Raspbery Pi #21



Correct connections are:

Amp Vin to Raspbery Pi 5V
Amp GND to Raspbery Pi GND
Amp DIN to Raspbery Pi #21
Amp BCLK to Raspbery Pi #18
Amp LRCLK to Raspbery Pi #19



Thanks
Thanos

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by adafruit2 on Tue Jun 14, 2016 1:55 pm

woops! ok that was a typo - the photo is correct
its fixed now!
just swap those two wires ;)

adafruit2
Site Admin
 
Posts: 18906
Joined: Fri Mar 11, 2005 7:36 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Wed Jun 15, 2016 5:20 pm

adafruit2 wrote:woops! ok that was a typo - the photo is correct
its fixed now!
just swap those two wires ;)


Same wrong connections are mentioned here:
https://learn.adafruit.com/raspberry-pi ... o/hardware

You will need to connect it to the Pi Zero using the following pins:
•Amp Vin to Raspbery Pi 5V
•Amp GND to Raspbery Pi GND
•Amp DIN to Raspbery Pi #19
•Amp BCLK to Raspbery Pi #18
•Amp LRCLK to Raspbery Pi #21

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by jpete24 on Fri Jun 17, 2016 9:18 am

Thanos, once you swapped those wires did it work after that? I have the exact same idea and design I'm working on for PiGRRL Zero and I can't get the I2S to output any audio what so ever. Any tips? I followed the image on my wiring so it should be correct.

I'm working on a case modification with those components, almost done with it. Not sure how far you are on a case mod but we should connect on this.

jpete24
 
Posts: 71
Joined: Tue May 17, 2016 2:58 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by tronicgr on Fri Jun 17, 2016 11:18 am

jpete24 wrote:Thanos, once you swapped those wires did it work after that? I have the exact same idea and design I'm working on for PiGRRL Zero and I can't get the I2S to output any audio what so ever. Any tips? I followed the image on my wiring so it should be correct.

I'm working on a case modification with those components, almost done with it. Not sure how far you are on a case mod but we should connect on this.



Yes, after I connected the wires correctly, it works great. and everything fits in the Pigrrl zero case. Its loud enough to not need and hole for the speaker, I just have it attached like in the photos above.

Thanks
Thanos

tronicgr
 
Posts: 76
Joined: Wed Feb 03, 2016 1:48 pm

Re: Pigrrl zero and Adafruit MAX98357 I2S Class-D Mono Amp

by jpete24 on Fri Jun 17, 2016 11:23 am

Do you have a few more photos of your connections? Did you change any settings in retropie?

I can't quite figure out how your SD port is working with that latch system and why I can't get mine to output any audio....

I did hook up the amp wrong at first (wasn't paying attention to two wires same color...DOH) so I wonder if I didn't torch the I2S amp...

[EDIT] I re-read your first post, and it seems like you had to remap some of the buttons on the GPIO? Care to explain how you remapped everything to work properly?

jpete24
 
Posts: 71
Joined: Tue May 17, 2016 2:58 pm

Please be positive and constructive with your questions and comments.