Raspberry Zero i2s audio and TP4056 charger

Hardware-related questions that don't fit into any of the specialized hardware categories go here.
Post Reply
BitLocker
Posts: 3
Joined: Mon Apr 08, 2019 8:12 am
Location: https://tejashwi.io
Has thanked: 1 time

Raspberry Zero i2s audio and TP4056 charger

Post by BitLocker » Mon Apr 08, 2019 8:26 am

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?

User avatar
Ampersand
Posts: 94
Joined: Fri Aug 04, 2017 3:52 am
Has thanked: 21 times
Been thanked: 116 times

Re: Raspberry Zero i2s audio and TP4056 charger

Post by Ampersand » Tue Apr 09, 2019 5:35 am

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).

User avatar
Ampersand
Posts: 94
Joined: Fri Aug 04, 2017 3:52 am
Has thanked: 21 times
Been thanked: 116 times

Re: Raspberry Zero i2s audio and TP4056 charger

Post by Ampersand » Tue Apr 09, 2019 5:38 am

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

BitLocker
Posts: 3
Joined: Mon Apr 08, 2019 8:12 am
Location: https://tejashwi.io
Has thanked: 1 time

Re: Raspberry Zero i2s audio and TP4056 charger

Post by BitLocker » Tue Apr 09, 2019 5:52 am

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:

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2747
Joined: Thu May 05, 2016 8:33 am
Location: Fall River, MA
Has thanked: 1400 times
Been thanked: 3068 times

Re: Raspberry Zero i2s audio and TP4056 charger

Post by Helder » Tue Apr 09, 2019 12:53 pm

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.
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!


User avatar
Picicle
Posts: 67
Joined: Wed Apr 24, 2019 2:08 pm
Has thanked: 6 times
Been thanked: 20 times

Re: Raspberry Zero i2s audio and TP4056 charger

Post by Picicle » Sat Apr 27, 2019 11:39 am

The i2s audio is an unnecessary item. https://learn.adafruit.com/introducing- ... io-outputs

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2747
Joined: Thu May 05, 2016 8:33 am
Location: Fall River, MA
Has thanked: 1400 times
Been thanked: 3068 times

Re: Raspberry Zero i2s audio and TP4056 charger

Post by Helder » Sat Apr 27, 2019 2:51 pm

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.
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

User avatar
Picicle
Posts: 67
Joined: Wed Apr 24, 2019 2:08 pm
Has thanked: 6 times
Been thanked: 20 times

Re: Raspberry Zero i2s audio and TP4056 charger

Post by Picicle » Sat Apr 27, 2019 3:47 pm


... 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest