GPIO Screen & 3.5mm audio out - Pi Zero

Hi,

I’m looking to make a low power tiny arcade machine with a pi zero running retropie, and ordered a cheap LCD yesterday… As the GPIO on the screen takes up most of the physical space, I’m wondering if the remaining GPIO pins would accommodate a small 3.5mm interface for audio-out… Below are the screen I bought and the audio module I’m considering using.

! LCD module Pi TFT 3.5 inch (320*480) Touchscreen Display Module TFT for Raspberry Pi 3
Screen module

Interface I2S PCM5102 DAC Decoder GY-PCM5102 I2S Player Module For Raspberry Pi pHAT Format Board Digital PCM5102A Audio Board
Example of interface

I know a lot of peeps would suggest not using a pi zero but this is a genuine experiment/project I’m hoping to learn from… So far I’ve considered (if I have enough correct unused pins remaining) instead of using a gpio socket strip, maybe use individual gpio cables to use the least possible space.

Hope y’all can help! Thanks

Looks like an SPI LCD, which should mean it leaves plenty of GPIO free and- in particular- the ones you require for I2S.

If you can figure out exactly which pins the display needs (probably the main SPI bus and a couple of others), you’d probably be able to wire it up with ribbon cable- either off the shelf stuff, or salvaged from an IDE cable or Pi ribbon cable. Individual wires would work, but would be messy.

Even if it uses BCM18 for a backlight ala Adafruit’s display- https://pinout.xyz/pinout/pitft_plus_35 - you can always omit/reassign that pin.

Wow thanks for this ridiculously helpful answer! I’ve been on the product guide and it says that pins 3, 5, 7, 8, 10, 12, 13, 15, 16 (out of the 26 pins the GPIO ‘plug’ would obstruct) are classed as ‘NC’ which I would guess means ‘not connected’…

I’m expecting 40 single GPIO Male-Female cables in the post before the screen turns up - in which case, when I know exactly which pins the I2S requires I should hopefully be able to individually assign the pins one by one. And rather than keep mithering you good people I’ll see if I can use ‘equivalent’ vacant pins where the ones i need are in use; although I imagine I may have an issue or two configuring drivers with an improvised arrangement!

Thanks yet again, think I’m addicted to these projects already, I’ll keep y’all informed!

Benjamin

Hi, after looking up some solutions/ requirements I’ve noticed a conflict which im hoping to overcome!

The LCD requires 2 5v power pins, but the audio device needs one of them to work… Is there a way of getting around this as there’s only 2 5v pins on the board?

Also, am I right in assuming I can assign any ground pin on the board if the particular pin ground mentioned on the product page will be already engaged?

If I’m not bothered about using the touch screen functionality (I.e only as a display), can I omit any of the pins specifically used in touch functionality? Just in case this manages to free up some pins if I fancy adding buttons to the project which are wired to the gpio rather than the usb… I know this sounds a little impractical but I think this is a bit of a challenge which I hope to succeed whilst learning for future projects.

Thanks so much for the help so far, no idea how valuable it’s been for my new obsession!

For the most part you can consider 5v and Ground pins as an unlimited resource*- insofar as you’re able to connect wires to them. You can, for example, break out the 5v supply to a mini breadboard and use that to redistribute power to multiple boards. Or do the same, but with a spliced and soldered cable.

  • * not quite unlimited, since the current available on the 5v pin is a funciton of whatever you input into the Pi minus whatever it consumes. But in your case you’re unlikely to exhaust that.

I’m not 100% sure if the touch pins- probably an i2s bus- are just used for touch (they could also be used for an LCD init routine or otherwise), but yes you can probably omit them. If they are i2c, you don’t necessarily have to omit them, though since i2c is a communications bus you can add multiple devices to. Another approach might be to use an i2c IO expander (like an MCP23017) to give you additional GPIO pins.This is one of the oldest tricks in the book for Pi, since it was an easy early chip to start playing with. See: https://learn.adafruit.com/mcp230xx-gpio-expander-on-the-raspberry-pi?view=all

Absolutely bob-on thanks! Maybe it’s because I’m a bit ASD or I’ve just been missing out all my life but all I’ve been doing in my spare time recently is learn about electronics!

I’ll have a look at the products you recommended but following the initial advice I’m gonna see if I can safely improvise somehow in the spirit of this project.

Thanks again, hoping to be able to help people out myself soon enough!

1 Like