Maker Pro
Maker Pro

How to control 80 relays using ardrino

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
Again really thanks for your valuable reply. I understood the whole thing and I will surely take your suggestion of relays placing on the load side. That is I think far more safe than what I thought of doing that in my PCB. Here I need one little tip that will it be good to solder the biopolar transistor circuit for all the 80 relays in my pcb board? because I really dont want to run my ardrino digital signal wires all over to the relay box to the load end. I might just put the relays on each of the load side and run only the relay coil power from the transformer to the relay end from my PCB. And the thing u said about using a UPS instead of battery seems pretty good to me. But I was thinking is the monster 30V 50A transformer is possible? and if possible then how much watt it will consume? Becaue at this moment I already have a UPS of 1200VA which I can use for this project. For this I need to know the exact watt the monster transformer will consume to calculate the backup time of the UPS. Please help me to calculate how much watt the transformer might consume. I put some second thought on the battery thing but by doing the backup stuff with a battery is quite a big hassel. And I might cost a lot for a huge amp battery. So I am going with a UPS. So please help me find out the transformer watt and is the custom transformer possible? and also it will be great if somebody could provide me a estimated price which the transformet might cost.


Thanks in advance...
 

Martaine2005

May 12, 2015
4,953
Joined
May 12, 2015
Messages
4,953
@hevans1944 , I use the x10 system here in England. It works very well on 220-240v 50-60hz.
I do believe there are 256 addresses.
They also have din rail modules for consumer units too.
Very reliable system but not much use for TV's that stay on standby because you still need the TV remote to switch out of standby.
I have 68 modules to date and still buy from ebay when they are cheap enough.
I am only using 15 though..
Martin
 
Last edited:

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
I am totally not aware of what is the X10 modules and its working procedure. And I think from the reference provided by hevan that a X10 setup might be expensive. And I am using a cheap raspberry in my system to use a voice recognition software which I started working on recently. So my home automation will not just be automation only. It will also have voice recognition and some power saving protocls. So I am really not interested in going to X10 systems at this moment.
 

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
ow..thats realy great but the sole purpose of my project is home automation and learning about different electronic parts. So using a X10 ready module wont allow me to do so. So it is better for me to go with a custom system built of my own with this forums help :) hope you understand my concern Martain. But totally appreciate your help about letting me aware of the X10 modules could also work in my case.
 

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
Please someone provide me a AC Watt calculation of a 30V 50A Transformer. And @Harald Kapp please help me out with some circuit diagram how can I make a regulator for my transformer to provide regulated voltage and amp to my microcontrollers, relays and sensors. It would be very helpful for me.

Thanks in advance...
 

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
That is the output watts I think. But I want the input watts consume so that I can measure the time the transformer will run on a 1200VA UPS.
 

Martaine2005

May 12, 2015
4,953
Joined
May 12, 2015
Messages
4,953
I think you are asking an impossible question to answer.
You need to supply the wattage combined of all the appliances you want to automate?
But if that is the transformer you are going to use then the amswer is still 1500 watts.
Martin
 

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
No I need to supply the wattage to only the controller box using the transformer and need to calculate how much watt the transformer will consume from my AC source...
 

Martaine2005

May 12, 2015
4,953
Joined
May 12, 2015
Messages
4,953
I am getting really confused here...
You said about a battery backup for power outages.
If you are using the battery backup to keep the transformer online, then the transformers wattage is what you use..Surely?
 

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
Let me ask you the simple way. I have a 30V 50A custom transformer using which I run some microcontrollers, relays and sensors for my home automation. Now I have a 1200VA UPS which I used to power up the transformer. Now for how much time the UPS could give backup power to the transformer in case of power outage.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,887
Joined
Jun 21, 2012
Messages
4,887
That is the output watts I think. But I want the input watts consume so that I can measure the time the transformer will run on a 1200VA UPS.
Transformers are pretty efficient, perhaps 98% unloaded dropping to maybe 80% to 90% fully loaded. It depends on the resistive losses in the windings and core losses (from magnetic hysteresis, mainly). Your best bet would be to temporarily load up the secondary to get 50 A at 30 V using a temporary nichrome heating wire load and measure the primary current and line voltage and secondary current and line voltage. It helps to have two meters: one to measure RMS voltage, a second clamp-on type to measure RMS current. Since the secondary has a purely resistive load, you don't have to worry about a power factor correction.

Maybe you can salvage the length of nichrome wire you need for this test from a discarded space heater. You will need a length that measures one ohm or less to provide a 1500 watt load at 50 A with 30 V on the secondary. The nichrome increases in resistance as it gets hot. When it is dissipating 1500 watts (the rating of your transformer) it should have a resistance of 30/50 or 0.6 ohms. You may have to parallel several strands of nichrome to get a resistance this small when the wire is hot. I would try to start out with one ohm or more and then add parallel strands until you reach 1500 watts dissipation. You will also need to figure out a way to support the nichrome wire well away from combustible objects. This will not be a permanent load, so neatness doesn't matter. You can attach the ends of the nichrome wire to a barrier strip, preferably ceramic but phenolic willl do for short-term (a few seconds) operation. Allow a few minutes for everything to cool down between voltage and current measurements. You need to energize the transformer only long enough to measure the current and voltage on the primary side and the current and voltage on the secondary side. The ratio of these two power products will approximate the efficiency of the transformer, which you can then use in your calculations to estimate the primary current as a function of the secondary current. Or, do what I would do: guess and leave a margin for error in the guess. So, if the maximum transformer load is 1500 watts, I am going to guess the worst-case primary power dissipation is 2000 watts or 75% efficiency. Then, if I have a 1200 watt UPS, I am going to have to lower the load on the secondary from 1500 watts to 900 watts to keep the primary power dissipation under 1200 watts. Or get a larger UPS.

Most UPS devices have a very limited hold-up time under their full rated load, typically no more than ten or fifteen minutes. Some are a lot less, maybe five minutes. This gives you time for an orderly shut-down of computer disk drives and not much else. Some UPS have provision for user to attach an external battery, but I wouldn't go there because it gets expensive very quickly. If you want to continue to record data from sensors during a power outage, you might want to separate the relays for loads that you will drop from the relays for the sensors that must continue to record. Power the latter from a separate power supply and connect that power supply to another UPS. And try to minimize the load the UPS must drive when the power goes out.

I don't understand why you want to use such a large transformer to drive eighty relays. That would provide more than eighteen watts for each relay (1500/80 = 18.75)! What's going one here?

It sounds to me like you plan to buffer each Arduino output with a transistor. This is a good plan. You will need only place the relay coil in series with the collector of a small NPN transistor, ground the emitter, and insert about a 1 kΩ resistor between the base and the Arduino output. A diode will have to be mounted in parallel with the relay coil, and this should be done at the relay, not on the board with the driving transistor. It will help with troubleshooting if you also include, on the circuit board, a 10 kΩ resistor from each collector to the positive relay power rail. That will allow you probe the collectors to see which ones are turned on. If you want to get really fancy, use an LED with a suitable current-limiting resistor in place of the 10 kΩ resistor. For this project you need to find a source of really inexpensive relays with a low-current requirement for the coil. To some extent, your choice will be determined by the loads you want to switch. Some high-current loads (an air conditioner for instance) will require a relay with a high current rating which in turn may mean the relay must be bigger to handle the increased weight of the contacts... all the way up until the relay is no longer called just a relay, but a relay contactor! So nail that down first. Determine how much current each of the relays must switch and then try to find a single relay that covers the entire range of current. It would be better to select relays with 12 V DC coils because these are the most common and easily available.

Now, where is that block diagram of what you propose to build?
 

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
Thanks again for your suggestion hevans. I made a little mistake in the calculation. I re calculated everything and it seems that I dont need a 50A transformer. It would be a huge waste. Sorry for my mistake. But your right, I was thinking to buffer the ardrino output for the relays. But I wasnt aware of the relays parrallel connection topology your talking about. But after a total recalculation I think a 24V 30A transformer will do the trick. I just mis calculated and said that I might need a 30V 50A transformer. So now after correcting my calculation I think 24V 30A transformer is sufficient for this work. After I customely make this transformer I am going for some calculation with the method you have provided above. I was searching for the circuit diagram using which I could buffer the ardrino output. Could you please provide me a circuit diagram of the buffer transistor along with parallel relays connection as NPN because I really dont understand that part. And I have a hand written rough block diagram of my project. I will provide it tommorrow. It is very late night at this moment in our country. So I will provide the block diagram computerized tommorrow.


Thanks again all...
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
30A is still about 10 times higher than you need.

Also, why do you need to power the relay coils when the AC power is off? This makes no sense at all, in fact, it is the opposite of what you should be doing, you should not power then until the power is once again stable.

Bob
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,747
Joined
Nov 17, 2011
Messages
13,747
I think 24V 30A transformer is sufficient for this work
How do you arrive at these numbers?
Why 24V? The arduino needs considerably less (7V...12V) and relays can be controlled from 12V easily with the help of a transistor, see my post #3..
Why 30A? Have you read and understood my post #16?

Power supply circuits for a 12V supply (regulated or unregulated) can be found en masse on the internet either as circuit diagrams for building your own or rather cheap from manufacturers in the far east.
 

Farukh Khan

Jun 12, 2015
160
Joined
Jun 12, 2015
Messages
160
Yeah I calculated a little High I think. But the transformer I am using is not for powering the relays when there is a power outage. It will be used to power the relays using different regulated voltage other than my ardrino. And the ardrino will use the transistor as suggested by harald to give a signal so that the power from the transformer will go to the relays to power it's coil. And yeah for that I am thinking to low down the transformer configuration. I will post the exact one soon. I am just got really confused with it.
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,887
Joined
Jun 21, 2012
Messages
4,887
... I am just got really confused with it.
Yeah, me too. I might reply again when there is some sense to be found here... maybe after I see a system block diagram complete with component specifications. Until then, I'll go spin my wheels somewhere else.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,747
Joined
Nov 17, 2011
Messages
13,747
Yeah I calculated a little High I think
a factor of 10 is more than just a little. How did you "calculate". To me it looks like guesswork.
And yes, I fully understood that the transformer is going to power the relays. You can still use 12V and power the arduino too from the same transformer. Or use 24V and 1/2 the current at 12V - the power requirement is the same.

maybe after I see a system block diagram complete with component specifications.
Me too. Especially the part where the 80 relays are controlled...
 
Top