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.

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

by jpete24 on Wed Jun 22, 2016 3:57 pm

I've probably got a ground issue on a couple of these.

Working on a version 3 of the case with standoff screws that go into a recessed part of the bottom case. Should be a fantastic add.

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 Wed Jun 22, 2016 9:40 pm

Hey, had a chance to make a "quick" video showing the inside and the sound working

https://youtu.be/ct3Clmvc-KQ

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 Thu Jun 23, 2016 12:11 am

tronicgr wrote:Hey, had a chance to make a "quick" video showing the inside and the sound working

https://youtu.be/ct3Clmvc-KQ


That's boss. I'm going to put together some tutorials and information on how to do this out on Thingiverse once I get Version 3 of my case uploaded. Standoffs for screws on the back are complete. Cases can be bolted together in four places now with recessed screw holes in the back. I'll make sure to credit you on all the software side of stuff.

This is all-in-all going to be some sick upgrades, hopefully adafruit brings us in on their youtube channel. :P
Last edited by jpete24 on Thu Jun 23, 2016 12:29 am, edited 1 time in total.

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

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

by jpete24 on Thu Jun 23, 2016 12:28 am

Version 3 of this case with recessed standoffs is up!

http://www.thingiverse.com/thing:1621907

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

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

by jpete24 on Thu Jun 23, 2016 10:16 pm

jpete24 wrote:I've probably got a ground issue on a couple of these.

Working on a version 3 of the case with standoff screws that go into a recessed part of the bottom case. Should be a fantastic add.


Solved my ground issue. It was Dpad UP and Button B touching each other on the back of the PiTFT. It's all solved now. We got some perfectly working PiGRRL Zero's now!

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

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

by jpete24 on Thu Jun 23, 2016 10:30 pm

tronicgr wrote:Hi,

I succeed to fix the volume issues in retropie without having to re-complile the Emulation Station!!!!!


I just added a mixer value for the I2S sound following the instructions of the HiFiberry page:
https://support.hifiberry.com/hc/en-us/ ... me-control

I edited the /etc/asound.conf adding:

Code: Select all | TOGGLE FULL SIZE
pcm.hifiberry {
    type softvol
    slave.pcm "plughw:0"
    control.name "PCM"
    control.card 0
}

pcm.!default {
    type plug
    slave.pcm  "hifiberry"
}

ctl.!default {
 type hw
 card 0
}


After a reboot, I can now access the volume via the alsamixer fine without having to recompile the Emulation Station!!!

You can check with the commands:
amixer
aplay -l


Code: Select all | TOGGLE FULL SIZE
pi@retropie:~ $ amixer
Simple mixer control 'Master',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%]
  Front Right: 255 [100%]
Simple mixer control 'PCM',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%]
  Front Right: 255 [100%]
pi@retropie:~ $


pi@retropie:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
pi@retropie:~ $



Thanks
Thanos


This worked like a charm, however I have my speaker setup on external potentiometer, so it's probably not needed, but nice for those that would rather not deal with it that way.

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 24, 2016 9:25 am

How did you wire the potentiometer on the amplifier? Can you post a simple wiring?

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 24, 2016 10:07 am

I'm working on a writeup for the whole thing today. Should have it up at some point. The potentiometer I used is linked on my Thingiverse and then I just wired it to the speaker wire. Make sure you also use a ground on the far end pole as it won't work otherwise!

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

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

by jpete24 on Fri Jun 24, 2016 10:11 am

Kind of like this but also with a ground on one of the posts.

Image

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

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

by jpete24 on Fri Jun 24, 2016 10:17 am

Oh, and only ground it directly to the Pi or on one of the Control Pads. That works best to use a control pad ground.

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 24, 2016 10:23 am

Thanks!

Can you take a photo of your wiring on the actual potentiometer you have?

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 joe7dust on Fri Jun 24, 2016 8:46 pm

tronicgr wrote: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


That looks very crisp, much better than my 320x240 display. What screen is that?

joe7dust
 
Posts: 17
Joined: Sun Jun 05, 2016 10:53 pm

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

by tronicgr on Fri Jun 24, 2016 10:08 pm

joe7dust wrote:
tronicgr wrote: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


That looks very crisp, much better than my 320x240 display. What screen is that?



Hi Joe,

It's the 2.2 inch 320x240 pitft from adafruit. It is SPI but still very fast and can handle 60hz frame rate!!!

https://www.adafruit.com/products/2315

See video of it here:
https://youtu.be/ct3Clmvc-KQ

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 24, 2016 10:48 pm

Here you go Thanos. This should give you some direction on how I set this up. Let me know if you're having issues.Image

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

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

by jpete24 on Fri Jun 24, 2016 11:24 pm

I've got a tutorial up of how to do all of this. Thanks to Thanos for all of his help, and hopefully people find this useful!

https://cdn.thingiverse.com/assets/17/f ... torial.pdf (Link edited)

Link to Version 3 Case with Speaker Setup and Standoffs for Tighter Connection on the Case - http://www.thingiverse.com/thing:1621907/
Last edited by jpete24 on Sat Jun 25, 2016 7:13 am, edited 1 time in total.

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

Please be positive and constructive with your questions and comments.