stefonalfaro
Posts: 2
Joined: Mon Jun 18, 2018 11:33 pm

How to expand to 120 GPIO?

Sat Jun 23, 2018 6:01 pm

Hi, I have a project where I need to control 60LEDs, 60buttons, and 60LCD displays.

I know I am going to need at least 120 GPIO if not more for the LCD display requirements. What would be the best way to expand the current set of the Raspberry Pi 3?

Thanks!

fruitoftheloom
Posts: 20143
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: How to expand to 120 GPIO?

Sat Jun 23, 2018 8:02 pm

stefonalfaro wrote:
Sat Jun 23, 2018 6:01 pm
Hi, I have a project where I need to control 60LEDs, 60buttons, and 60LCD displays.

I know I am going to need at least 120 GPIO if not more for the LCD display requirements. What would be the best way to expand the current set of the Raspberry Pi 3?

Thanks!


https://www.raspberrypi.org/blog/gpio-expander/
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

User avatar
The Traveler
Posts: 360
Joined: Sat Oct 21, 2017 3:48 pm

Re: How to expand to 120 GPIO?

Sat Jun 23, 2018 8:17 pm

Along with the links provided above you can Google: MCP23017 and i2c for starters.

However, without knowing the details of your LCD display requirements, it's hard to say. Are displaying info from the RPi3? Are you simply turning them on and off? More details are necessary.

Cheers.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

User avatar
Arjan
Posts: 261
Joined: Sat Sep 08, 2012 1:59 pm

Re: How to expand to 120 GPIO?

Sat Jun 23, 2018 8:31 pm

stefonalfaro wrote:
Sat Jun 23, 2018 6:01 pm
Hi, I have a project where I need to control 60LEDs, 60buttons, and 60LCD displays.
When using addressable led's (WS28xx), then you just need one SPI MOSI pin.
The 60 buttons can be configured in a matrix; scanning principle. Less GPIO's needed.
Are the LCD display's controller with SPI, I2C?
At any time a I2C or SPI I/O expander can do a good job.
Last edited by Arjan on Sun Jun 24, 2018 7:55 am, edited 1 time in total.
http://www.raspberrypi-dmx.org/
Open Source DMX/RDM/MIDI/OSC/Art-Net/sACN solutions

stefonalfaro
Posts: 2
Joined: Mon Jun 18, 2018 11:33 pm

Re: How to expand to 120 GPIO?

Sun Jun 24, 2018 12:41 am

Interesting that is good to know I can connecting multiple Raspberry Pi's to a central computer or even maybe a central Raspberry Pi.


Arjan wrote:
Sat Jun 23, 2018 8:31 pm
When using addressable led's (WS28xx), then you just need on SPI MOSI pin.
The 60 buttons can be configured in a matrix; scanning principle. Less GPIO's needed.
Are the LCD display's controller with SPI, I2C?
At any time a I2C or SPI I/O expander can do a good job.
Okay that makes sense so I would learn how to do an 8x8 input matrix for 64 buttons.

I am still learning and not sure how many pins are required for a 2 digit LCD display. It would be something such as https://www.jameco.com/Jameco/Products/ProdDS/24715.pdf and the datasheet looks as if I need 18 pins per LCD.

Since my project requires at least 60 LCD displays I need more than the potential I2C 120 GPIO if I used an extender.

User avatar
Gavinmc42
Posts: 3438
Joined: Wed Aug 28, 2013 3:31 am

Re: How to expand to 120 GPIO?

Sun Jun 24, 2018 4:16 am

RPT also make this wonderful IO expander that plugs into the USB port of the Pi3.
It is also quite cheap, only $5 ;)
Not only does it have GPIO, it has 2 x i2c and 2 x SPI and lots of other stuff.
All on a ready to go PCB.

It is called the Zero :D
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

fruitoftheloom
Posts: 20143
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: How to expand to 120 GPIO?

Sun Jun 24, 2018 4:38 am

Gavinmc42 wrote:
Sun Jun 24, 2018 4:16 am
RPT also make this wonderful IO expander that plugs into the USB port of the Pi3.
It is also quite cheap, only $5 ;)
Not only does it have GPIO, it has 2 x i2c and 2 x SPI and lots of other stuff.
All on a ready to go PCB.

It is called the Zero :D

Yes I posted that above, but as you missed reading that response here is the GPIO Expander link:

https://www.raspberrypi.org/blog/gpio-expander/

:roll:
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

seanspotatobusiness
Posts: 186
Joined: Tue May 22, 2012 11:19 pm

Re: How to expand to 120 GPIO?

Sun Jun 24, 2018 5:17 am

Hey, could you connect the buttons in a matrix? If you use a matrix then you only need 16 (8+8) pins to be able to use 64 (or 60) momentary switches.

http://pcbheaven.com/wikipages/How_Key_Matrices_Works/

You might be able to wire the LEDs in the same way, using only 16 pins for all of them, assuming that addressable LEDs aren't an option: https://www.youtube.com/watch?v=MmCGDJ90Qt4

I've no idea how you're going to deal with 60 LCD screens though.
Last edited by seanspotatobusiness on Sun Jun 24, 2018 6:05 am, edited 1 time in total.
Raspberry Pi 3 B and B+
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

User avatar
Gavinmc42
Posts: 3438
Joined: Wed Aug 28, 2013 3:31 am

Re: How to expand to 120 GPIO?

Sun Jun 24, 2018 5:20 am

Yes I posted that above, but as you missed reading that response here is the GPIO Expander link:
Yep missed it completely.
How big is the image that get loaded onto the Zero?

I have been using Ultibo on USB Zero's for Graphics coding.
But it is getting to be useful for other stuff.
https://ultibo.org/forum/viewtopic.php? ... vity#p7221
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

fruitoftheloom
Posts: 20143
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: How to expand to 120 GPIO?

Sun Jun 24, 2018 7:51 am

Gavinmc42 wrote:
Sun Jun 24, 2018 5:20 am
Yes I posted that above, but as you missed reading that response here is the GPIO Expander link:
Yep missed it completely.
How big is the image that get loaded onto the Zero?

I have been using Ultibo on USB Zero's for Graphics coding.
But it is getting to be useful for other stuff.
https://ultibo.org/forum/viewtopic.php? ... vity#p7221

Naybe you missed also reading the Blog ?? has links to Source Code etcetera....


Also see MagPi Issue 67

The Pi Zero features a USB OTG (on-the-go) port, allowing you to boot over USB from a PC. Your PC sends the required boot firmware to the Pi over the USB cable, launching a mini version of Raspbian and booting it in RAM. The OS then starts the pigpio daemon, allowing ‘remote’ access over the USB cable.
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

Return to “Beginners”