General on Relays

Many inputs in the Forum is about powering relays and how to avoid interference between relay coils and Arduino.
I found it impossible to drive a solenoid valve with a relay even with opt coupler and local power to the relay coil (tough common GND for coil and Arduino).

The solution in my case was to find a relay that could be powered locally with no common GND.

The 4*shift opt coupler relay module VMA400 from Vellman was the answer.

  1. remove the jumper
  2. connect the external supply (9V) with + to VCC on the module and – to GND on the module. The coils are then driven by the external.
  3. Arduino should be connected with its GND to COM on the module and with signal wire (HIGH/LOW) to the In-pins on the module.

Hope a lot of troubles out there can be avoided by this total insolation btwn Arduino and Relays.

Rgds Jan

Hi,

If a relay board is actually opto-isolated there is not common ground with the Arduino.

See:

More info HERE.

As terryking228 already pointed out, many (1-8) relay boards have opto isolation, but it's up to the user to actually implement that.

  1. Remove JD-VCC jumper.
  2. Power relay board with a second independent 5volt supply, connected to JD-VCC (not VCC) and relay ground.
  3. Connect relay VCC to Arduino 5volt and the relay inputs to digital pins. Don't use pin 0, 1, or 13.
  4. DO NOT connect relay ground to Arduino ground (if you do, you don't have opto isolation).
  5. digitalWrite a HIGH to the pin BEFORE you set the pin to OUTPUT with pinMode (stops chattering during bootup).
  6. Use a snubber circuit if you're switching inductive loads. That means a diode across a DC powered solenoid.
  7. Keep relay contact wiring separated from relay input wiring.
    Leo..