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.
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.
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
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.
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...
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.
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.