Go Down

Topic: Dual latch Relay Circuit Setup (Read 7377 times) previous topic - next topic

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Mikie_lomas

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

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

Quote
Don't forget fuses, or you risk failure of your entire installation on a local problem.
Where would fuses be added to the circuit?

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

Quote
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






DrDiettrich

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.

Mikie_lomas

Quote
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?

dlloyd

#49
Nov 23, 2016, 02:40 am Last Edit: Nov 23, 2016, 02:49 am by dlloyd
Quote
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.

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

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

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

Mikie_lomas

#50
Nov 23, 2016, 03:26 am Last Edit: Nov 23, 2016, 03:32 am by Mikie_lomas
Quote
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?

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

Quote
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?







dlloyd

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.

Mikie_lomas

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.


CrossRoads

Where are you and where did you order from? Digikey.com and Mouser.com could have them to you in mere days,
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Mikie_lomas

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.

Mikie_lomas

#55
Nov 23, 2016, 03:01 pm Last Edit: Nov 23, 2016, 03:07 pm by Mikie_lomas
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

Go Up