Arduino 300 Outputs

Hi,

I have a little bit of Arduino experience, but the project I'm working on is a little more complicated. I'm interested in creating an array of 300 relays, so I believe I would need 300 outputs. I've read that I can connect multiple Arduinos or daisy chain shift registers, and program them to talk with each output? Does anyone know of any controllers that have 300 or more outputs to begin with?

For the shift registers, could I put 38 x 74HC595, in line and have the pins react as outputs 0-300?

Thanks in advance for any help,

B

A TPIC6B595 (ebay) shift register has build-in mosfets, and can switch eight relays directly.
Coding/wiring is the same as a 74HC595.
Post a link to the relays you are planning to use.
Leo..

What current do the relays need? I offer a couple of shift register boards that might do the trick to sink current thru relay coils.
One uses TPIC6B595 and can control 96 outputs at up to 150mA per output.
A second uses shift registers to drive N-channel MOSFETs at 1 or more Amps, depending on how many are driven at one time. It is set up as 4 channels of 8 outputs, with each channel supporting 8 to 10A.

The first one has arduino controller built in, only an FTDI Basic or equivalent needs to be plugged on to download code into it. The second one needs a separate Arduino to control it. Both are easy to control, just blast one to however many bytes are needed to fill the shift registers being used.

http://www.crossroadsfencing.com/BobuinoRev17/

We've redone this one recently to use SMD transistors, resistors, caps, and LEDs. Very easy to daisychain the control signals with a 6-conductor ribbon cable.

I have a P-channel MOSFET version also, very heavy with the TO-220 package, and pricey as low Rds P-channel MOSFETs are more expensive.


Pretty good Rds with -4.5V gate drive, when you just gotta source current!
https://www.fairchildsemi.com/datasheets/ND/NDB6020P.pdf

You'll have to put your own diodes across the relay coils, to dissipate the coil generated current when you de-energize the coil. The TPIC6B595 datasheet says
"The device contains a built-in
voltage clamp on the outputs for inductive
transient protection. Power driver applications
include relays, solenoids, and other mediumcurrent
or high-voltage loads."
and it shows test results for a 200mH load, but how much are relays really?
I use this one on a board I offer, but I don't see a mH rating, so I use a diode across the coils, and have not had a problem.

Hi,
Welcome to the Forum.

What is the application that needs 300 relays?

How often do you need to switch them?

Is there a situation where they will all be on at once"?

There may be another way out if we know what it is you are trying to accomplish.

Thanks.. Tom.. :slight_smile:

Hey all,

Thank you so much for all the advice. I don't have the relays yet, but I'm thinking to use optocouplers because of their high speed. The outer circuits only need close contact switches, so low/no current is necessary, I'm now researching if there are any optocouplers that can close a low/no voltage circuit. Any ideas?

Thanks Wawa and CrossRoads for offering hardware options. The Mosfets and relays need a voltage in the end circuit though right? If I can add voltage to the end circuit to make it work I may be able to use these.

Tom, the final goal will be to switch them on in sequence from 1-300. Each relay will be on once, but not at the same time. I tried connecting multiple Arduino's together, by sending an output signal from one to another (with it's separate program) to start, but there was a slight delay in that transition, so I think working with one program is best.

Thanks,

B

What exactly will you be switching.
Leo..

If you only need one relay to be on at a time, then things get much simpler. Arrange them in a 18x18 matrix.

SQRT 300 is < 18 so you just need to drive one of 18 lines HIGH, and one of 18 LOW.

3 shift registers for each of the HIGH and LOW drivers.

You'll still need approriate power handling devices , but if there are 'high-side drivers like the low-side TPIC6B595 you don't even need these.

you will need freewheel diodes, of course. 1N4148's are cheap

Allan

birdhouse:
I'm thinking to use optocouplers because of their high speed.

I'm not sure what you mean by "high speed", but I would argue that optocouplers are generally slower than any a properly driven transistor (such as a mosfet). If you are comparing optocoupler's to relays then they are faster than a mechanical relay, but generally can't switch the same amount of current.

allanhurst:
If you only need one relay to be on at a time, then things get much simpler. Arrange them in a 18x18 matrix.

SQRT 300 is < 18 so you just need to drive one of 18 lines HIGH, and one of 18 LOW.

3 shift registers for each of the HIGH and LOW drivers.

An 18x18 matrix is a bit wasteful, a 15x20 matrix can be done with 5 shift registers.

birdhouse:
The Mosfets and relays need a voltage in the end circuit though right? If I can add voltage to the end circuit to make it work I may be able to use these.

What "end circuit"? How would any circuit work without a voltage applied to it?

Relays are basically mechanical switches, operated electronically.

MOSFETs have a minimum gate voltage before they start conducting; I don't know what happens if the drain-source voltage is lower than the gate-source voltage.

Optocouplers have a minimum voltage drop over the phototransistor, typically about 0.7V. Any voltage lower than that on the switched side and you won't have any current, not matter how bright you make the LED side. See data sheet for details.

Similar post to Can Arduino control 300+ Relays ? - Frequently-Asked Questions - Arduino Forum. Wondering what kind of system needs a sequence of 300 electromagnets? Sounds like a small EMALS.

With assumptions only one relay need be on at one point in time and a directional diode was used on each. And given the tri-state ability of the output ports. In theory, it seems 18 pins would provide the ability to drive 306 small relays directly in a Charlieplexing like format. Assuming I did the math correctly where the sum of the sequence 2x(n-1) with n limits from 1 to 18 is 306. A simple small example using n=3 pins to drive ((2x0)+(2x1)+(2x2))= 6 relays would be...

This is a lot of relays! And a lot of un-answered questions. This method would probably need a directIO to port library like the one from mmarchetti to get any decent sequence speed. And with one on at a time the sequence speed would be limited by the mechanical close rate of the relays.