Dual latch Relay Circuit Setup

From this, I feel the best way to control it is: From one main arduino Mega in a central location that sends pulses via cat6 into the roof, into the wall cavities housing the relay circuit? Does this sound like it would work?

Yes, this could work.

That way I could also have a 5v power supply at the main source which I can send out with the cat 6 through the cables.

Something to consider: I'm quite sure it's possible to use just one supply for everything. I would consider using a 7.5V (regulated) DC supply that can be used to power the Arduino through Vin and also provide power to all the relays. For relay power, just use one 1N4004 or 1N4007 diode in series with the 7.5V. This essentially creates a separate 6.8V supply for the relays.

This will not be a problem because of the voltage drop across the transistor (0.3V) and the voltage drop through the wiring which would leave something less than 6.5V. Note that the rated voltage of the relay coil is 130% max = 6.5V.

I’m quite sure it’s possible to use just one supply for everything. I would consider using a 7.5V (regulated) DC supply that can be used to power the Arduino through Vin and also provide power to all the relays. For relay power, just use one 1N4004 or 1N4007 diode in series with the 7.5V. This essentially creates a separate 6.8V supply for the relays.

I have an adapter split and a screw terminal end, so I could power the arduino through the jack as normal, then have it split off into screw terminal, then into ground and then hot to diode and then a common hot line?

Is it perhaps better to have the diode at each of the cat 6 end points or would that make the voltage too unreliable on account of voltage drop in different distances of cabling?

I am starting to get excited about all of this.

Will it limit the longevity of the relays possibly putting them at the end of their tethers for the entire life at 6.5v or is it more like to be less and within the range is within the range?

Would a main arduino and a common 5v power supply , which I step up to a solid 5v → 500ma at the end of the circuit be better for the life of my project or is there issues with using cheap chinese step up modules.

Should I employ an opto-isolator?

Sorry about all the questions, thank you so much for your responses. i am learning alot

I have an adapter split and a screw terminal end, so I could power the arduino through the jack as normal, then have it split off into screw terminal, then into ground and then hot to diode and then a common hot line?

If the adapter is 7 to 7.5V, then yes. At the screw terminal with 7.5V connect the anode of the diode. Then use the other end of the diode (stripe end) for your 6.8V supply.

Is it perhaps better to have the diode at each of the cat 6 end points or would that make the voltage too unreliable on account of voltage drop in different distances of cabling?

No advantage ... only one diode required at the main power supply point.

Will it limit the longevity of the relays possibly putting them at the end of their tethers for the entire life at 6.5v or is it more like to be less and within the range is within the range?

No ... its within specifications. The main thing that would shorten life span is having the pulse duration too long. This overheats the coil.

Would a main arduino and a common 5v power supply , which I step up to a solid 5v -> 500ma at the end of the circuit be better for the life of my project or is there issues with using cheap chinese step up modules.

The main problem here is that you would need a separate module for each relay if the relays are at different locations. Also, more components, more chances of component failure.

Should I employ an opto-isolator?

Good question. There are definitely advantages with this. Note that it would make the circuit somewhat more complex. You'll probably need to design your own relay module for this.

EDIT: This darlington photocoupler could directly drive the relay coil (no extra transistor required).

Thank you so much for your time. It is beyond appreciated.

Good question. There are definitely advantages with this. Note that it would make the circuit somewhat more complex. You'll probably need to design your own relay module for this

Yes, I am a bit confused as to how they work..or send a signal. But I do know they can and maybe should be used to isolted relay circuits from microcontrollers?

If it has 4 pins, surely that means two inputs and two outputs. Could a whole bunch of 4 pin opto-isolators be used to send the set and reset message, perhaps I am mistunderstanding how they work.

Basically, yeah I plan to mount this on a perfboard. The only factor stopping me current is that although the 6 - > NC, C and NO fit on a normal spacing, the 3 input pins do not fit on anything unless diagonal, which really does not work.. Not sure what the best method to deal with that conundrum is

No ... its within specifications. The main thing that would shorten life span is having the pulse duration too long. This overheats the coil.

I just looked at voltage drop from 24 gauge with a load of .125, the cable needs to be atleast 14 metres long. Otherwise it will be over 6.5v. Will there be other ways in the transport process that voltage will be lost or should I employ a power supply that is less than 7v?

Thank you for your time.

Don't forget that the transistor drops 0.3V. So, directly connected we have 7.5 - 0.7 - 0.3 = 6.5V. This is within specifications. In a different application, I have many 12V latching relays that use an 18V pulse (150%) and have been in service without any failures for about 15 years.

EDIT: Could use 2 diodes in series if you're concerned (5.8V).

Don't forget that the transistor drops 0.3V. So, directly connected we have 7.5 - 0.7 - 0.3 = 6.5V. This is within specifications. In a different application, I have many 12V latching relays that use an 18V pulse (150%) and have been in service without any failures for about 15 years.

Awesome news, this will be a much better option than running a whole bunch of arduino nanos!

I have ordered some of these:

Optocoupler

Hopefully they shouldnt be too difficult to figure out once they arrive and they are sufficient.

Thank you for your help my friend.

I'm not happy with your installation plans. What looks good for a breadboard model, is not normally applicable in a larger area.

Inside a car (5m) 12V are used, for longer distances 24V. These higher voltages will reduce currents, and consequently power consumption and losses. Consider to use such voltages with a central power supply, and break the voltage down in every node of your home automation network. Don't forget fuses, or you risk failure of your entire installation on a local problem.

How do you intend to control the many relays? Individual lines to every relay will sum up into a huge number of wires. Better were a bus system with addressable nodes (I2C, CAN, Ethernet...), that also can be extended at any time. Line drivers are almost required, for secure signal transmission, so that I2C can not be used across a house.

I'd not try to build a cheap and unreliable home automation system, unless I want to make my living from service and repair.

Using an opto would provide high reliability and could handle long cable runs. However, you'll need a separate power supply. Yeah, there'll be a practical limit to how many relays you would want to control like this due to the increased wiring and digital outputs required.

|500x332

EDIT: The relay coil voltage (not counting voltage drop through cable) when pulsed would be about: 7.5V - 0.7V (diode) - 1.5V (Vce) = 5.3V

I'd suggest RS485 from the master out to the remotes, with the remotes having intelligence to receive a serial message and manage the relays from there. Way less wiring, each remote can be powered locally. Remotes can then report status too if you want to set up sensors, or have light switches that can be turned on manually at the remotes sites, temperature, etc. Can make a little custom card with equivalent of a Promini, RS485 chip (MAX488 perhaps), wallwart for power, relay driver (shift register like TPIC6B595) and that can also control other things, some sensors, etc.

How do you intend to control the many relays? Individual lines to every relay will sum up into a huge number of wires. Better were a bus system with addressable nodes (I2C, CAN, Ethernet...), that also can be extended at any time. Line drivers are almost required, for secure signal transmission, so that I2C can not be used across a house.

I have a few options:

  1. Individual ethernet shields per light switch, which i control from main respberry pi via firmata and C# programming

  2. One main arduino mega and ethernet shield, connected to each relay module via ethernet shield from raspberry pi via firmata. As it is only sending small pulse with low current the voltage drop will be minimal.

I'm not happy with your installation plans. What looks good for a breadboard model, is not normally applicable in a larger area.

Can you elaborate, Obviously this solutiojn would be soldered onto a perfboard. I have tested latching the circuit through ethernet lines running through my house already and I was successful in both sending the message through the lines and sending the message through firmata.

Don't forget fuses, or you risk failure of your entire installation on a local problem.

Where would fuses be added to the circuit?

I'd suggest RS485 from the master out to the remotes, with the remotes having intelligence to receive a serial message and manage the relays from there. Way less wiring, each remote can be powered locally. Remotes can then report status too if you want to set up sensors, or have light switches that can be turned on manually at the remotes sites, temperature, etc. Can make a little custom card with equivalent of a Promini, RS485 chip (MAX488 perhaps), wallwart for power, relay driver (shift register like TPIC6B595) and that can also control other things, some sensors, etc.

This is all a bit above my head...But it sounds similar to an idea I had, which I am not sure on its quality until I receive parts in the mail. But I brought a whole bunch of enc28j60 and arduino nano. One option i had was to firmata control the nanos in each wall cavity, that way I would run the cat 6 into the internet hub rather than an arduino mega and program my raspberry pi to connect to each specific nano based on the command/.

Using an opto would provide high reliability and could handle long cable runs. However, you'll need a separate power supply. Yeah, there'll be a practical limit to how many relays you would want to control like this due to the increased wiring and digital outputs required.

I like the circuit and it doesnt seem that much harder than the current one. Would you recommend implementing something like this? What do you mean on practical limit to how many relays I want to control like this?

From our original plan, it does look like I need to use another line for grounding.

So in a 3 gang switch, I would need 1 x hot, 1 x adapter ground, 1 x arduino ground, 2 pins x 3 = 9 lines, its a shame cat 6 only has 8. Maybe i can send arduino things through cat 6 and external power supply through phone cable?

Thank you for your time

If you use Ethernet or some other kind of a network for communication, any controller with an Ethernet module can act as a server or client in such a network. Downside is the requirement of a controller on every node, that translates the commands into outputs to the actuators. It's up to you to specify the number of actuators, connected to each network node. Here a practical limit is the number of wires, and their length, required to drive the actuators. It may be handier to use multiple small controllers in a network, instead of one big Mega. No network cable and connectors are required to attach sensors and actuators to a controller, you can use whatever cable fits your needs. Control cables with more than 50 wires are available, but they are not very handy and useful when finally relays in different places shall be connected.

Next comes the power source for each node, for operating the controller, Ethernet shield, relays etc. PoE is possible, but only with one voltage and limited current. AFAIK it also requires a splitter, to separate the power from the signal lines. In this case every node should have a fuse on its power line, so that an inadvertent short does not shut down the entire network supply. If higher voltage or current is required by an actuator, a local power supply is required on such nodes, at least a step-up or step-down regulator, or a wall wart or other mains supply.

Next comes the power source for each node, for operating the controller, Ethernet shield, relays etc. PoE is possible, but only with one voltage and limited current. AFAIK it also requires a splitter, to separate the power from the signal lines. In this case every node should have a fuse on its power line, so that an inadvertent short does not shut down the entire network supply. If higher voltage or current is required by an actuator, a local power supply is required on such nodes, at least a step-up or step-down regulator, or a wall wart or other mains supply.

I am at a crossroads as the two most helpful people on this thread are giving differing advice.

It would be useful to have a controller in each wall cavity, as I could add things like temp sensors (even to monitor the project), currents sensors to check the state of the switches. But it definitely does complicate the whole situation. As opposed to sending the pulses from the controller and treating the cat 6 as just a long reliable signal and power cable.

As lloyd said, each pulse only requires .125 A, with 7 volts the voltage drop will lower to acceptable standards for the relay.

I originally had the idea of shooting a strong voltage through the line and stepping up or stepping down at the end depending on what was required, but it is relying on too many indivudal modules.

LLoyds idea seems solid of the main arduino, but you have wigged me out a bit with the requirements of fuses.

I am a bit lost on this, do you mean I just get a fuse which is rated for the Lowest Amp of any part within my system and place it in series. Ergo it busts before any of the aprts reach their rated limit? Are fuses that meet the requirements expensive?

I like the circuit and it doesnt seem that much harder than the current one. Would you recommend implementing something like this?

Yes, I recommend using opto drivers, especially if using one main Arduino that controls "dumb" (non-MCU) relay modules at various distant locations.

What do you mean on practical limit to how many relays I want to control like this?

I just meant that there's a practical limit on how many wires you'd have to deal with.

So in a 3 gang switch, I would need 1 x hot, 1 x adapter ground, 1 x arduino ground, 2 pins x 3 = 9 lines, its a shame cat 6 only has 8. Maybe i can send arduino things through cat 6 and external power supply through phone cable?

Yes, that's a good possibility. Also, the phone cable would be totally isolated from the cat6 (the cat6 wiring is the input side of the opto, the phone cable is the relay coil +DC and ground).

I am at a crossroads as the two most helpful people on this thread are giving differing advice.

Could use a hybrid solution. One master MCU communicating with slaves that cover an area (room or floor/level). Each slave MCU would would control how many relays are required for each area through cat6.

You'll need to think of your overall project and what's important ... future expansion, controlling other sensors, status indicators, installation issues, cost, reliability, safety, etc.

Yes, I recommend using opto drivers, especially if using one main Arduino that controls "dumb" (non-MCU) relay modules at various distant locations.

So basically they work with the same script, just by using the circuit you provided recently?

Yes, that's a good possibility. Also, the phone cable would be totally isolated from the cat6 (the cat6 wiring is the input side of the opto, the phone cable is the relay coil +DC and ground).

So if I did go down the master slave design, would I power the arduino and the relay from the same supply line from the phone cable or would I send the arduino power through cat 6 and relay power through phone (if i did go down that route).

Could use a hybrid solution. One master MCU communicating with slaves that cover an area (room or floor/level). Each slave MCU would would control how many relays are required for each area through cat6.

A.Basically it is down to having a nano for each cavity that controls the relays within its area, with a mini enc28j60 ethernet which i use to control each arduino through firmata signals sent from raspberry pi C# app, where the arduino is powered via phone line cable and and ethernet cable is run which connects to the main internet of the house. This sounds alot safer than having a step down transformer or inner wall cavity mains socket with phone charger to power nano.

or

B. Having the main Mega, connected to firmata through ethernet. Cat 6 to every wall cavity from the arduino, with arduino also plugged in is 7.5v adapter which is sent out through phone cables. Rather than one master raspberry pi sending messages to slaves all around the house. There is one master pi , one slave mega with arms that go around the roof into each wall cavity.

I feel as if B for a simpler and maybe more solid and A should I want to add current sensors and motion sensors and temp sensors.

In this hybrid design. Would a 3 gang be

Ethernet firmata into home internet network + phone line cable 2 of 4 sending arduino current and 2 of 4 sending relay current.

Arduino Hot -> Arduino Ground -> Relay Hot -> Relay ground

thank you for all your help

EDIT: Where do fuses go in circuit?

Regarding the opto circuit ... its untested. I'd recommend testing a breadboard version with a long cable to see how it performs and see if any revisions or fine tuning is necessary.

Lots of decisions to make. Perhaps make a list of everything you would need to control (outputs) and monitor (inputs). Then create a block diagram showing how everything could interconnect. This would help when working on a more detailed schematic.

Thank you so much everyone for all your help.

Now i guess i just have to wait the 1-10 weeks for my optos to arrive.

This is a simplified version of one of the options.

Where are you and where did you order from? Digikey.com and Mouser.com could have them to you in mere days,

Yes digi and or mouser are awesome especially mouser. Except I need to order over 60 dollars in order for it to be free.

So i ordered from china. 2-3 x wait time, but free delivery and 1/10 the price.

But when the time comes to make a list of all the parts I need I will be hitting mouser up for sure.

I have loaded my current design…

I have decided to see if I can get the modules custom made in china and then delivered. I can not find any board that fits the spacing of my relay.

I am not sure if you guys will be able to open this, but hopefully you will.

Wouldnt let me save. Changed to png