Increase number of I/O

Hi everyone,

For a project to test continuity of a complex wiring system, I want to increase the number of In/Out pins of my Arduino board. I saw the MCP23017 but I want around 250 pins if that's posible... Do you have any idea ?

Thank you so much !!

Quentin

MCP23017 are I2C port expanders. They have 16 GPIO each and you can have up to 8 on one I2C bus as they have three address pins

➜ 8 x 16 = 128 extra pins

if you want to double this then you need either an Arduino with two distinct I2C buses such as the Arduino DUE (and also use some of the ~50 pins left on the board) or have an extra module that will multiplex your I2C such as the TCA9548A

1 Like

Or maybe this will help.

yeah, software Wire could do, performance might suffer

How many inputs,  How many outputs?  Any analog required?

How do you plan to display results/errors?

Shift registers are an option, too.

Use one of the address pins as chip-select, and you can have more than 8 chips on the bus.
Leo..

Just continuity, then shift registers may be the solution. Those can be daisy-chained easily.

The 74HC595 is a popular serial to parallel one. Set all pins to 1 (high), shift in a single 0 (low) then pulse the clock to move it along the pins one by one. That's the easiest way to scan the whole bus.

On the other end of the wires use e.g. the 74HC165 parallel in to serial out shift register. Read them all out and see which one of the inputs is currently connected. Unfortunately there do not seem to be shift registers with built-in pull-up resistors so you have to add those externally.

If looking at I2C port extenders, you may also look at the PCF8575. Cheaper than the MCP23017, but the pins can only sink significant current, not source. For your application that'll be just fine. You may also consider using them for the input stage, as they do have internal pull-ups.

Both these port extenders can be set to eight different addresses so that'd make for 128 inputs, or 16 74HC165 with pull-up resistors for 128 inputs, combined with 16 74HC595 shift registers daisy-chained as your 128 outputs.

If not enough, use more shift registers (or for the port extenders indeed you may be able to get more on a single bus by actively manipulating the address lines).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.