Page 1 of 1

Raspberry Zero i2s audio and TP4056 charger

Posted: Mon Apr 08, 2019 8:26 am
by BitLocker
Hello everyone,

I am new into Raspberry world (electronics to be true), I am planning to make a little game console for myself and ordered few parts from Ali express, and right now I am waiting for the parts to be delivered. Following a list of parts which I ordered:

1. A Spotpear 1.54 LCD game hat, https://www.aliexpress.com/item/Raspber ... 16666.html
2. A TP4056 battery charging board, https://www.aliexpress.com/item/TP4056- ... 87739.html
3. A MAX98357 i2s amp board, https://www.aliexpress.com/item/MAX9835 ... 38393.html
4. A LiPO 1000mAh battery and a toy speaker (8ohm, 0.5 watt)

Now I am confused about the charging board connection and amplifier board connection. Let me explain my concerns:
If you see the charging board which I have ordered there's BAT+, BAT- and IN+ and IN- and this got me confused if the battery connections will go in BAT+/BAT- or IN+/IN- if anyone can help me that will be great.

Okay, I got this part. Battery connection will go in BAT+ and BAT-. IN+ and IN- are there for input connection from a charger or charging power source, right?

The second confusion is regarding the amp board connection. Here's the schematic for the game hat
https://ae01.alicdn.com/kf/HTB1LKwxP4na ... C2VXas.png

On the adafruit link here, https://learn.adafruit.com/adafruit-max ... -pi-wiring
They mentioned to connect as below:

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

Now this again got me confused, if these are just header pin number or BCM pin number? And because I am new to electronics, the schematic of game hat is also not clear to me, if the pins for i2s amp is free to use, or they are already used by game hat.
If they are used by game hat, is there any other way to connect the amp?

Re: Raspberry Zero i2s audio and TP4056 charger

Posted: Tue Apr 09, 2019 5:35 am
by Ampersand
BAT+ and BAT- connect to the battery.
IN+ and IN- connect to the USB socket and can be connected to an alternative charging connection if didn't want to use the USB socket.
Not really sure where you'd connect the Pi to it (I'm sure someone here does).
I use these:
https://www.aliexpress.com/item/1PCS-5V ... st=ae803_4
They have OUT+ and OUT- connections. OUT- goes to GND and OUT+ goes to a switch before going to 5V on the Pi (assuming you want a switch to turn it on and off).

Re: Raspberry Zero i2s audio and TP4056 charger

Posted: Tue Apr 09, 2019 5:38 am
by Ampersand
For the I2S board, the numbers (21, 18, 19) refer to the GPIO on the Pi, not the pad number.
Image
So it's the numbers on the outside, not the numbers in the circles

Re: Raspberry Zero i2s audio and TP4056 charger

Posted: Tue Apr 09, 2019 5:52 am
by BitLocker
Thank you for your help. Now all I need to figure out how to use the Amp with the game hat and very if the GPIO pins (18, 19 and 21) are free to use, and if not free what are the other ways to achieve the same :roll:

Re: Raspberry Zero i2s audio and TP4056 charger

Posted: Tue Apr 09, 2019 12:53 pm
by Helder
18 is free but 19 and 21 are used for buttons. Not sure else is being used in that hat but you might be able to use other pins for those buttons. Problem is that those are likely hardwired in and to reuse them you'll have to cut traces.

Re: Raspberry Zero i2s audio and TP4056 charger

Posted: Tue Apr 09, 2019 4:55 pm
by Ampersand

Re: Raspberry Zero i2s audio and TP4056 charger

Posted: Sat Apr 27, 2019 11:39 am
by Picicle
The i2s audio is an unnecessary item. https://learn.adafruit.com/introducing- ... io-outputs

Re: Raspberry Zero i2s audio and TP4056 charger

Posted: Sat Apr 27, 2019 2:51 pm
by Helder
Picicle wrote:
Sat Apr 27, 2019 11:39 am
The i2s audio is an unnecessary item. https://learn.adafruit.com/introducing- ... io-outputs
We know and have used that circuit but the quality of audio is not good and picks up alot of noise from the data lines. USB Audio and I2S are better quality audio which is why it's now widely used.

Re: Raspberry Zero i2s audio and TP4056 charger

Posted: Sat Apr 27, 2019 3:47 pm
by Picicle

... but the quality of audio is not good and picks up alot of noise from the data lines. USB Audio and I2S are better quality audio which is why it's now widely used.
I agree with you.