Go Down

Topic: 360 relays (Read 3 times) previous topic - next topic

daytrader152

Hi everyone,

I need to control 360 5V-relays with my Arduino (only one relay will be active at one time). From my search, 74HC595 seems to be the best candidate. I will need 45 units of 74HC595 since each 74HC595 can control 8 bits or 8 relays. Does anyone have a different approach that can help me reduce the number of 74HC595 required?

I came across a posting by Azi where he stated "I am using 8 shift registers per 3 pins, for totally controlling 225 relays". I have messaged him and am waiting for his reply. In the meantime, would anyone know how it is possible?

Thanks,
George

retrolefty

First I think we would need to know what the current consumption for the 5volt relay coil is. As without that key information a 74HC595 output pin may or may not be up to the task of powering that relay's coil, and the thought of having to use 360 switching transistors is rather ugly.

Lefty


daytrader152

The relay is Songle SRD-05VDC-SL-C. It is rated at 0.36W, so the current consumption is around 72ma. This seems a bit high and strange because I can control the relay just fine with my Arduino UNO.

I am powering up my Arduino using an external 12V/15A supply. I will likely need another external 5V supply just for the relays since 72ma x 45 = 3.24A, which is greater than 1A rating from Arduino 5V voltage regulator.

retrolefty

#3
Feb 28, 2012, 09:15 pm Last Edit: Feb 28, 2012, 09:17 pm by retrolefty Reason: 1

The relay is Songle SRD-05VDC-SL-C. It is rated at 0.36W, so the current consumption is around 72ma. This seems a bit high and strange because I can control the relay just fine with my Arduino UNO.

Because you can does not me you should. You risk real damage to arduino pins drawing that much current. Why don't you wire a relay coil directly to +5vdc and take a current measurement with your DVM. That will give you the answer and the point you to what devices can provide that much output current.

I am powering up my Arduino using an external 12V/15A supply. I will likely need another external 5V supply just for the relays since 72ma x 45 = 3.24A, which is greater than 1A rating from Arduino 5V voltage regulator.

But earlier you wrote:  "I need to control 360 5V-relays with my Arduino (only one relay will be active at one time)." So now you are going to power how many at a time? If you are only going to power one at a time on then it would seem to be very uneconomical to size a power supply that could power all of them at one time?

Lefty

zoomkat

Below are some control setups that might be of interest. If you are just powering one relay, the power requirements should be fairly small, powering one relay and its transistor, and all the chips. You just need to figure out how much current will be needed and compare that to the available power from the arduino. A safer bet would be to use an external power supply. 

http://computerchristmas.com/christmas/link-how_to/HowToId-25/Build_a_1024_Port_Controller_for_100

http://computerchristmas.com/index.phtml?link=how_to&HowToId=4

http://thehormanns.net/new/parallel320.phtml
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

daytrader152

Thanks guys. I just realized that there was a J3Y transistor on my relay module input trigger. The measured current consumption at the input trigger is around 6.5mA, so it's safe for the Arduino output pins. As for powering the relays, I will definitely need to use an external 5V power since the current draw will be around 3A+.

So back to my other question. Do I really need 45 8-bit shift registers in order to control 360 relays? Any way to reduce the number?

Many thanks,
George

johnwasser


So back to my other question. Do I really need 45 8-bit shift registers in order to control 360 relays? Any way to reduce the number?


Since you only want to turn on one at a time you could put them in a 24x16 matrix.  That would get you down to 5 shift registers.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

daytrader152

#7
Feb 29, 2012, 05:19 am Last Edit: Feb 29, 2012, 09:09 am by daytrader152 Reason: 1
Thanks, John. A matrix layout is great: 3 shift registers to control the columns and 2 shift registers to control the rows. Does that mean I need an OR gate at the row-column junction, i.e. relay input trigger? Or can I simply connect the output from the row/column shift registers to the relay input trigger?

*** Correction. I will need an AND gate, e.g. 7408, at each row column junction. With 360 outputs, I will need 90 7408 AND gates. I am wondering if I am better off with 45 shift registers instead.

johnwasser


Thanks, John. A matrix layout is great: 3 shift registers to control the columns and 2 shift registers to control the rows. Does that mean I need an OR gate at the row-column junction, i.e. relay input trigger?

Let's assume 24 rows and 16 columns and that your shift registers outputs can source and sink enough current to drive one relay.  Three shift registers source current to the rows directly.  Two shift registers sink current from the columns through diodes.  If you set all rows LOW there will be no current flow.  If you set all columns HIGH there will be no current flow (because of the diodes).  If you set one row HIGH and one column LOW current will flow through the one relay that is connected between that row and column.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

John_S

It still isn't clear if you need to power more than one relay at a time...

daytrader152

Only one relay will be active at one time.

Thanks, Johnwasser. I have taken your advice and managed to build something that works. For those who may encounter the same issue, here is what I have done to make the relay circuit with two inputs work. Basically you take this relay circuit:

http://www.arduino.cc/playground/uploads/Main/relays.pdf

And add another resistor-transistor combination to the emitter of the first transistor, which essentially becomes an AND gate. Now the relay will be active only when both inputs are HIGH.



Go Up