Multiplexing cascade setup

Hello,

I need to control 12 custom boards each equipped with 10 reed relays. I would like to use one arduino.

I saw examples about using multiple 74HC595, but they come only with 8 ports, so I would need two ICs on each board, and I don't have enough space.

I read also another example using the 74HC4067 (16 ports), but I can't figure out if I can link them.

like this:

Arduino ---> 74HC4067 ---(12)---> 74HC4067--(10)--> reed relays

Any suggestion ?
Thank you,
Robse

Are you aware that only one output of the 4067 is active at any time. The 4 bit address enables one of 16 outputa where the 595 can have 1 to 8 outputs enabled.

Thank you for pointing that out. That makes the 4067 useless for this project.

Is there any 565 alternative ?

Hi, you can’t use 74hc595 to control relays directly. Even reed relays need more current than this chip can source/sink if all 8 are activated at once. You will need transistors to boost the current. Is that why you don’t have enough room on your boards?

What are the relays controlling? What voltage/current is being switched? Maybe we can suggest something that can replace the relays.

Paul

Hi Paul,

the reed relays I would like to use are like this: http://www.cotorelay.com/datasheets/Coto%20Technology%209000%20Reed%20Relay.pdf

It looks like they need 5V * 500ohm = 10mA (am I wrong ?) for switching the coil

On the other side on the 595 specs I see:
± 6-mA Output Drive at 5V

Putting transistors would mean more complexity in the small space I have.
I have to use reed relays, transistor switching for this application is out of question

Basically I want to do this: (wires missing, I know)

How can I accomplish this with arduino ?
Thank you,
Robse

Does it have to be ten relays per board?

The obvious choice is an I2C I/O chip on every board.

eg. The PCF8574a will give you 8 I/O lines per chip. You can get chips with 16 I/O lines but your life will be much simpler if you stick to 8 relays per board.

Yes, I'll have 10 to 13 relays per board.

I will look into PCF8574a

Thank you !

robse:
It looks like they need 5V * 500ohm = 10mA (am I wrong ?) for switching the coil

You mean 5V divided by 500ohm!

robse:
On the other side on the 595 specs I see:
± 6-mA Output Drive at 5V

Not sure where you got that 6mA figure from, but when I was at school 6 was less than 10. However, this data sheet says +-35mA. But that's not the problem. The problem is the max supply current is 70mA, which is less than 8 x 10mA needed if all 8 outputs where on at once. With two '595s you could spread the 10 relays 5 to each chip and avoid that problem.

robse:
Putting transistors would mean more complexity in the small space I have.

Then use tpic6c595 instead of 74hc595. Same size and pinout, but can sink (not source) much more current. Maybe they could replace your reed relays, which are what is taking up most of the space on your boards, after all.

robse:
I have to use reed relays, transistor switching for this application is out of question

We can't advise you properly if you keep secrets!

robse:
I will look into PCF8574a

If you haven't got room on your boards for 2 x 74hc595, you won't have room for 2 x PCF8574 either...

Paul

it looks like PCF8575 and MCP23017 are suitable for the job.

I think i'll use the latter since it comes in DIP package

robse:
it looks like PCF8575 and MCP23017 are suitable for the job.

I think i'll use the latter since it comes in DIP package

Two potential problems (sorry!):

  1. Only 8 of these devices on the same i2c bus. You need 12 for your 12 boards?
  2. i2c bus can only run for a few hundred millimeters without the use of extra line driver chips, which you won't have room for.

PaulRB:

  1. Only 8 of these devices on the same i2c bus. You need 12 for your 12 boards?

You can have a lot more than that with software I2C.

PaulRB:
2. i2c bus can only run for a few hundred millimeters without the use of extra line driver chips, which you won't have room for.

Any other chips will have the exact same problem, including '595s. The solution would be use line drivers, OR to slow down the transmission.

One advantage of I2C is that you can address chips individually, you don't have to update every single chip at once. This helps negate the cost of slow transmissions (you only update the devices that actually change) and can eliminate the need for line driver hardware.

According to:

The max lenght is a few meters on the i2c bus

For the "8 devices per i2c bus" problem, I plan running two separate buses from the arduino (ie using a total of 4 io pins on the board), each bus with 6 multiplexer (1 master + 5 slave).

This is theory... I'll experiment in the next few days.

That link says:-

In typical applications, the length is a few meters (9-12ft).

I would disagree with that and say that 2ft was closer to the maximum reliable operation. I would not like to use it for any greater length.