3
\$\begingroup\$

I need to control a remote relay over a 1km (max) distance. Here is a simple block diagram that represents what I'm trying to achieve:

schematic

simulate this circuit – Schematic created using CircuitLab

The control signals will generated with a microcontroller. The relay modules needs to be electrically isolated from the controller, and each of them have their, independent 12V supplies. Standard CAT5 cabling will used for connecting modules to controller.

The control signal frequency needs to transmitted is less than 1 Hz (mostly on or off).

What is the best way to reliably transmit the control signal to the relay modules?

Clarification / additional info:

  • Relay current is 40mA @ 12V

Some thoughts:

  • Using an optocoupler in relay module, I can buffer my TTL signal with a darlington array and drive that opto then relay.
  • I can use some kind of current loop?

I also assume that EMI will be a problem with long cabling, it can create false triggers or damage control/receiver sides. Is there anything other than using TVS / clamping diodes on each end of wiring?

\$\endgroup\$
  • 3
    \$\begingroup\$ Surely a simple opto isolator is the easiest way to go here? \$\endgroup\$ – DiBosco Nov 14 '17 at 13:27
  • \$\begingroup\$ Can you afford enough logic in the relay modules to just use RS-422 or RS-485? \$\endgroup\$ – The Photon Nov 14 '17 at 17:08
  • \$\begingroup\$ What is the coil current of the relay? \$\endgroup\$ – Trevor_G Nov 14 '17 at 17:48
  • \$\begingroup\$ Optoisolators usually have very limited current transfer ratio. \$\endgroup\$ – Vinit Shandilya Nov 15 '17 at 9:35
2
\$\begingroup\$

Relays already make great current loop devices. Your issue though is the voltage drop along the wires.

The solution to that is to drive it with a constant current / current limiter circuit and use a larger supply at the relay to cover the voltage drop.

schematic

simulate this circuit – Schematic created using CircuitLab

Note, in the schematic above I added a smaller relay on the logic side to provide full isolation.

Alternatively, you could flip all that around.

schematic

simulate this circuit

Of course these methods rely on the relay current being small. If need be you could add a smaller, lower current, 5V relay to drive the large 12V one.

\$\endgroup\$
  • \$\begingroup\$ First option seems good to me, but the wiring is not fixed at 1km, it actually between 10m-1km. Using constant current source and a higher supply voltage than relay rating can overload relay coils with a short wire. Also I assume that the double diodes are TVS diodes, if so, I'd like to ask why they are bidirectional rather than unidirectional? Thanks. \$\endgroup\$ – sabbath Nov 15 '17 at 11:10
  • 1
    \$\begingroup\$ @Sabbath why would a constant current source overload the relay? The relay requires 40mA at 12V, so set the current limiter to 40mA, and you'll get 12V across the relay. \$\endgroup\$ – Simon B Nov 15 '17 at 11:44
  • \$\begingroup\$ @SimonB Trevor suggests using voltages higher than relays' rated values for cover voltage drops in long lines (relay coil current passes through the wire). The current source will source more power (less voltage drop = higher voltage) if I use shorter wire. \$\endgroup\$ – sabbath Nov 15 '17 at 11:53
  • 1
    \$\begingroup\$ @Sabbath Continued: FYI, relays are actually current controlled devices. The coil is rated by volts just because that makes it easier. In truth what happens is the manufacturer designs the coil so at whatever voltage it is intended for, it will take the required current. As such, if you just give it the required current, the voltage will follow. \$\endgroup\$ – Trevor_G Nov 15 '17 at 15:12
  • 1
    \$\begingroup\$ OK, for some reason I ignored the current limiter when thinking, even if I mention it in my comments... Thanks for guiding me to the right direction. \$\endgroup\$ – sabbath Nov 15 '17 at 15:25
2
\$\begingroup\$

In view of the distance involved, I suggest that you need a differential line driver and receiver for each signal - typical examples of the type are MC3487 and MC3486. The optocoupler goes between the microcontroller and the line driver, which means a separate isolated power supply for the driver. Unless it is indoors there is a risk of lightning strikes, so you need suitable protective devices on the lines. You probably also need similar isolation at the receiving end, and it may be necessary to regard the line driver/receiver combo as expendable under extreme conditions.

If there are spare lines, some form of monitoring would be a good idea so you know that signals are getting through. However, in view of the complexity and risk of damage, a radio system is probably more reliable.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.