Common ground between Arduino & relays?

Hi,

I wonder if someone can shed some light on this matter, as I can't find a clear answer.
In many tutorials I see people always say that one should rather use an Solid State Relay to drive a big load (i.e. 220V / 5A) instead of a relay.

The problem is, I don't have an SSR but I do have some relays (NT72C-S10 6VDC) at hand. I want to turn on a water pump (230V/2.5A) and solenoid (24V/1A) with two relays.
The relays operate at 6V so I'll need a separate transformer for this purpose.

So, my wiring will be as follows:
9V AC/DC transfer (i.e. similar to "wallwart"?) going into a PCB, which feeds both the Arduino, and stepped down to 6V for the relay coil. There's a Zenner Diode on the relay coil to prevent reverse voltage spikes. Then I'll use a 2N2222 transistor to activate the relay coil, from the Arduino. i.e. one of the Arduino's digital pins will connect to the Base of the transistor, with the

Two of these will be setup, and controlled by two Arduino digital pins independently. i.e. the sketch will let each relay open at different times, and together at some times.

The layout is similar to this one: Arduino Playground - HomePage

Now, the main question I have: Will it be a problem is everything is powered from the same 220V source? i.e. the pump will be plugged into the same wall outlet, as the AC/DC transformer which will power the Arduino + relays.

Will it be a problem is everything is powered from the same 220V source?

You will be fine.
Don't use a zener use a 1N4004 diode as in the diagram.

Hi, draw a circuit diagram and let us see what you have in mind.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png or pdf?

Tom.... :slight_smile:

The problem that is encountered in these situations, relates to the propagation of electromagnetic impulses from the power circuit that the relay is switching, and possibly from the relay circuit itself, to the Arduino circuit and in particular, any input devices you have attached as inputs are quite sensitive.

This is a greater risk in "lash-ups" with long wires draped around. It is principally important to keep wiring from the various sections, separate and the wiring of each section close together. In a final implementation, connections will be as short as practical and wiring to external devices made by multi-conductor (two or more) cable.

Finally, grounds from different sections should be made to a common point on the microcontroller board, so that no length of wire "shares" current from different devices.

LarryD:
You will be fine.
Don't use a zener use a 1N4004 diode as in the diagram.

Hi,

Thanx for the info. Why would I not use a Zener diode? Something like a 1N4148?

TomGeorge:
Hi, draw a circuit diagram and let us see what you have in mind.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png or pdf?

Tom.... :slight_smile:

Hi Tom, drawing isn't my best skill but I'll see if I can come up with something decent, and understandable :slight_smile:

Paul__B:
The problem that is encountered in these situations, relates to the propagation of electromagnetic impulses from the power circuit that the relay is switching, and possibly from the relay circuit itself, to the Arduino circuit and in particular, any input devices you have attached as inputs are quite sensitive.

This is a greater risk in "lash-ups" with long wires draped around. It is principally important to keep wiring from the various sections, separate and the wiring of each section close together. In a final implementation, connections will be as short as practical and wiring to external devices made by multi-conductor (two or more) cable.

Finally, grounds from different sections should be made to a common point on the microcontroller board, so that no length of wire "shares" current from different devices.

Uhm, you lost me there.....
Can you please re-iterate?

RudiAhlers:
Hi,

Thanx for the info. Why would I not use a Zener diode? Something like a 1N4148?

because zener diodes are not designed for that. A zener diode allows the current to flow in the reverse direction, if reverse voltage is above the voltage of this zener diode (zener voltage). A "normal" diode only allows the current to flow in one direction.
In this case, the diode is there to suppress the peaks of tension that appear when you suddenly stop the current through the relay coil. You need a "normal" diode for that.
BTW, an 1N4148 is a "normal" diode, not a zener one :wink: . IMO, you could use it .

Why would I not use a Zener diode? Something like a 1N4148?

The 1N4148 is a high speed low current switching diode.
Use a 1N4007 for example, it can handle instantaneous current on release.

my bad, LarryD is right, I thought 1n4148 had a higher peak forward current than it actually has (1µS -> 2A )

I feel that the word "ground" often is used in an ambiguous and sometimes confusing way.

  • As a common reference potential

  • As a current return path

  • As a conductor in single ended signal transmission

  • As protective earthing proving a low impedance path to the transformers' neutral point so that in case of a fault

  • The contact voltage is kept at a low enough level

  • The resulting current is high enough to trip protection devices like fuses, circuit breakers and rcd's

The arduino circuit utilizes points 1 and 2 whether the mains circuit utilizes point 4.
As long as the wiring is kept sound the two grounds should not be connected but of course any exposed parts should be connected to protective earth

The diode only has to carry the relay coil current. The current does NOT multiply.

A 1N4007 is a rather slow diode.

alnath:
because zener diodes are not designed for that. A zener diode allows the current to flow in the reverse direction, if reverse voltage is above the voltage of this zener diode (zener voltage). A "normal" diode only allows the current to flow in one direction.
In this case, the diode is there to suppress the peaks of tension that appear when you suddenly stop the current through the relay coil. You need a "normal" diode for that.
BTW, an 1N4148 is a "normal" diode, not a zener one :wink: . IMO, you could use it .

Thanx. I don't know why I thought it's a zener. There's a couple in my drawer and somehow I automatically associated them with zener since they're glass diodes.

nilton61:
I feel that the word "ground" often is used in an ambiguous and sometimes confusing way.

  • As a common reference potential
  • As a current return path
  • As a conductor in single ended signal transmission
  • As protective earthing proving a low impedance path to the transformers' neutral point so that in case of a fault

The way I was taught, is that GND is generally used in DC applications, i.e. the "negative pole" on a battery, or black cable.
Earth is generally used for high voltage applications like 230V and is represented by a green or geen+yellow cable.

So in context of an Arduino, it's the GND / negative that I'm referring to.

TomGeorge:
Hi, draw a circuit diagram and let us see what you have in mind.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png or pdf?

Tom.... :slight_smile:

I have drawn up a rough sketch of what I have in mind. Hopefully this helps?

polymorph:
A 1N4007 is a rather slow diode.

Indeed it is, but this turns out to be irrelevant, because it only has to turn on promptly in this application. The current decays exponentially, and the diode will generally have turned off adequately before the relay is next switched on.

[quoteThe diode only has to carry the relay coil current. The current does NOT multiply. A 1N4007 is a rather slow diode.][/quote]
We have used 1000s of these for over 45 years with no problems.

1N4007: True, I forgot it was the reverse recovery time that makes it unsuited to something like a SMPS, but the forward recovery time is very fast, on the order of nanoseconds. And as you say, that is what is important when it comes to relay or other coil reverse spike reduction.

http://www.cliftonlaboratories.com/diode_turn-on_time.htm

Regarding the schematic:
You are missing the smoothing capacitor at the output side of the bridge rectifier.

And what is the box labeled "Step down transformer" along the top?

polymorph:
1N4007: True, I forgot it was the reverse recovery time that makes it unsuited to something like a SMPS, but the forward recovery time is very fast, on the order of nanoseconds. And as you say, that is what is important when it comes to relay or other coil reverse spike reduction.

I recall only too well arguing this point with obdurate people here before. I have accordingly bookmarked that valuable link. :smiley:

polymorph:
And what is the box labelled "Step down transformer" along the top?

I suspect he had in mind a regulator. If it is only to power the relay, that would be foolish - a resistor is what is required, calculated according to the relay coil resistance. (For 9V to 6, half the relay coil resistance.)

Paul__B:
Indeed it is, but this turns out to be irrelevant, because it only has to turn on promptly in this application. The current decays exponentially, and the diode will generally have turned off adequately before the relay is next switched on.

OK, so it's fine, as long as I don't need to "flicker" (i.e. on / off / on / off) the relay very quickly?

RudiAhlers:
OK, so it's fine, as long as I don't need to "flicker" (i.e. on / off / on / off) the relay very quickly?

Like more than about say, fifty times a second. :astonished: