7 years, 6 months ago.

Special port expander question

Dear Developers,

I'm in a slightly complicated situation, which can be shortly described.

I have a 30×32 matrix, each element is an individual solenoid type linear actuator. All elements must be driven directly and individually based on a strict pattern. The actual prototype is using four MCP23017 i2c port expanders, and all elements connected in a multiplexed matrix (with darlingtons and transistors) and works flawlessly. The problem is simple: the actuators must be in "closed" state continuously for a long time (from 0,3 to 1,2 seconds, depends on the pattern), for each line of the matrix. That means, at least 0,3 × 32 = 9,6 seconds needed for a single round, but it may be up to almost 40 seconds, which is too long.

My idea for the next step is to drive each row (or column) of the matrix with an individual set of port expanders (for example, 2 MCP23X17 may be enough for a single line), and forget the multiplexed connection. Unfortunately only 8 drivers can be daisy-chained with individual addresses. M'kay I can drive one set on i2c and another on SPI, but it's till only 16, which is not enough (yet not elegant).

The question: is there any suggestion for a port expander to use which can drive all 960 lines independently? (I reached PCA9635 LED drivers which is addressable up to 126 drivers on a single i2c line.)

Any suggestion, please?

Thanks in advance,

Tamás

2 Answers

7 years, 6 months ago.

Hello Tamás,

I have never tried it but maybe you can chain 120 x 74HC(T)595 "8-bit serial-in, serial or parallel-out shift register with output latches" as suggested by Wim.

Zoltán

Accepted Answer

Hello Zoltán, Thanks for you answer. I've used 595s a while ago for driving 7 segment LED displays... It was a useful piece indeed so I have a few pieces somewhere to tested. Regards, Tamás

posted by Tamas Szekffy 06 Oct 2016
7 years, 6 months ago.

There are multiple solutions.

Most mbed platforms have more than one I2C engine. You could use multiple I2C buses that can each support 8 port expanders.

You could also use some glue hardware to multiplex an i2C engine onto multiple buses. Only one of them will be active at any time. However, instead of using your own multiplexer you can also use one of the readily available I2C multiplexers. You can find some that have one input I2C bus and upto 8 output buses.

Another and perhaps easier/cheaper solution in this case is to use SPI shiftregisters. A device like the 74595 has 8 outputs and can be daisychained using up only one SPI port (4 pins) for many devices connected in series. The SPI port is supported by the mbed lib. You could even use a device compatible to the 74595 but with an integrated driver that allows a maximum sink current of 150 mA. See this TPIC6B595 chip. This may save you the darlingtons depending on the currents you need.

Dear Wim, Thanks for your fast and extremly useful answer. Platform is still a question (now I'm using a LPC1768, but it's also possible to step back to Arduino IDE for some reasons out of my control). By the way, TPIC6B595 seems a perfect choice, because it's available for an affordable price, and also suggested to use as solenoid drive. I've ordered a few pieces and make some tests during the upcoming days. Yours sincerely, Tamás

posted by Tamas Szekffy 06 Oct 2016