Arduino Resetting Itself With AC Load

Hi,

Just like this guy Arduino Resetting Itself with Relay - Motors, Mechanics, Power and CNC - Arduino Forum

I use Arduino and 4 Relay Channel. Everything is ok. But when I load with AC. Arduino resetting itself when I try to turn on/off the relay. I already separate the power between relay and coil of relay like this tutorial https://arduino-info.wikispaces.com/RelayIsolation

This is the wiring.

Question 1:
How EMF or spikes come? Look at the picture, AC load not interrupt any of power line, right? AC only goes to K1 and not jump to coil, right? Then, how to protect Arduino from resetting it self?

Question 2:
If snubber circuit is the answer. How to define value of capacitor and resistor? Do I need trial and error? Or just follow the instruction of other people to use 0.1 micro Farad and 100 ohm?

What type of lamp?

Paul_KD7HB:
What type of lamp?

It is not like bulb. Kind of TL lamps and white like this

I have try with 1.5 micro farad and 100 ohm resistor. The arduino not resetting, but when I turn off the relay, light still has dimmer (not 100% off). I think the problem because capasitor giving much voltage, and the resistor is burn out.

I have try with 1.5 micro farad and 1k ohm resistor. The arduino still resetting, and I think the current not goes to RC or snubber since the ohm is very big, right? 1k Ohm. It means RC resistance greater that lamp resistance I think.

If I use LED light. Does spike still come or not?

uconalpukat:
It is not like bulb. Kind of TL lamps and white like this

I have try with 1.5 micro farad and 100 ohm resistor. The arduino not resetting, but when I turn off the relay, light still has dimmer (not 100% off). I think the problem because capasitor giving much voltage, and the resistor is burn out.

I have try with 1.5 micro farad and 1k ohm resistor. The arduino still resetting, and I think the current not goes to RC or snubber since the ohm is very big, right? 1k Ohm. It means RC resistance greater that lamp resistance I think.

If I use LED light. Does spike still come or not?

That is a regular florescent lamp with a built in ballast. That is the source of your problem. Use a regular incandescent lamp. It is pure resistance and will not cause a problem.

I had the same problem with my very first Arduino project. I was building it on a bench with a small tube type florescent lamp over the bench. Every time I turned the light off or on, the Arduino picked up the pulse on a lead with a switch to ground. Even powering with a battery got the same result. In this case I could fix it with software, but your project can't do that.

If you insist on using that lamp, you must move it and the relays some distance from the Arduino. Several meters away! You will have to do tests to solve the problem.

Paul

Paul_KD7HB:
That is a regular florescent lamp with a built in ballast. That is the source of your problem. Use a regular incandescent lamp. It is pure resistance and will not cause a problem.

I had the same problem with my very first Arduino project. I was building it on a bench with a small tube type florescent lamp over the bench. Every time I turned the light off or on, the Arduino picked up the pulse on a lead with a switch to ground. Even powering with a battery got the same result. In this case I could fix it with software, but your project can't do that.

If you insist on using that lamp, you must move it and the relays some distance from the Arduino. Several meters away! You will have to do tests to solve the problem.

Paul

Several meters away relay between arduino? I don't have any space like that.
Anyway, thanks for the answer.

Doesn't need to be that far - but you will have to take steps to reduce interference. Ideally find out
what route the interference is coming in - via power supply? leads to the relay? Direct interference (mains
wiring too close to Arduino board).

Snubber will always help reduce the transient at source of course, but you should defend in depth.

MarkT:
Doesn't need to be that far - but you will have to take steps to reduce interference. Ideally find out
what route the interference is coming in - via power supply? leads to the relay? Direct interference (mains
wiring too close to Arduino board).

Snubber will always help reduce the transient at source of course, but you should defend in depth.

Hi, can you tell me behind this theory? I mean, how electrical transient goes to power source, since the lamp only get to relay contact (K1) - Normally Close and Normally Open.

Does electricity jump to coil relay and get back to power source of relay (JD-VCC)? If yes, I already separate JD-VCC (adaptor 5V) with VCC (Arduino 5V). How come this transient get to power source of arduino (VCC) and make Arduino reset itself ?

If you use this method for relay connections, then there will be no conductive path for EMI to get to the Arduino. The jumper is removed and there is no GND wire to the Arduino. You need to use a separate power supply for the relay board.

Now, all that's left is emissive EMI ... this is where interference can be picked up through floating inputs and other sensitive areas / components on the Arduino circuit board. This emissive EMI is due to contact arcing when the relay contacts break the load.

If the problem persists, using a ferrite core on the AC load wire can be a quick and effective solution. In this case, disconnect the load wire that goes from the relay's NC terminal (pin3 in your diagram) and wrap it through the ferrite core with 5 or more turns (the more the better). Re-connect to pin3. Now the arcing will be greatly reduced, the relay will last longer and the emissive EMI problems should go away.

If the problem still persists, try using a longer cable and move the Arduino 2ft or more from the relay board and fluorescent lamp load.

I have try with 1.5 micro farad and 100 ohm resistor. The arduino not resetting, but when I turn off the relay, light still has dimmer (not 100% off). I think the problem because capasitor giving much voltage, and the resistor is burn out.

The RC snubber will always conduct current if connected across the relay contacts and the contacts are open (as shown in the link you provided). This current would be enough to cause a fluorescent lamp to flicker or remain dim. A ferrite core solution on the AC load wire will not cause this problem.

Signals are either induced (electro-magnetic induction - as used in transformers), capacitively coupled,
or radiated (radio emissions).

Shielding and using balanced signals massively reduces all of them, but a mains transient is approx 1kV
level over a timescale of microseconds, that's perhaps 10^9 volts/second, it takes very little stray capacitance
to couple that into a sensitive part of the circuit - shielding and using groundplanes really helps.

Induction is reduced by avoiding poor layout (big open loops are coils, they couple to any other
nearby open loops - so no open loops, use twisted pair for high current wiring, keep layout tight, keep
transformers and motors well away from your circuit)

RF interference tends to follow lengths of wire and can be much worse if there's an accidental resonance
at the relevant frequency. Ferrite beads/toroids can help block this and reduce such signals getting into
circuits from the wires (actiing as antennas). 100pF to 1nF ceramic caps shorting inputs to ground at
high frequencies also help. Ground planes again highly effective, as are shielded boxes.

dlloyd:
If you use this method for relay connections, then there will be no conductive path for EMI to get to the Arduino. The jumper is removed and there is no GND wire to the Arduino. You need to use a separate power supply for the relay board.

Now, all that's left is emissive EMI ... this is where interference can be picked up through floating inputs and other sensitive areas / components on the Arduino circuit board. This emissive EMI is due to contact arcing when the relay contacts break the load.

If the problem persists, using a ferrite core on the AC load wire can be a quick and effective solution. In this case, disconnect the load wire that goes from the relay's NC terminal (pin3 in your diagram) and wrap it through the ferrite core with 5 or more turns (the more the better). Re-connect to pin3. Now the arcing will be greatly reduced, the relay will last longer and the emissive EMI problems should go away.

If the problem still persists, try using a longer cable and move the Arduino 2ft or more from the relay board and fluorescent lamp load.

Hi, before I post this question. I have already separate the power like you said. The EMI/spike still there. I think the problem because the load is too high.

Using ferrite corite, what does it mean of 5 turns, is it diameter? Let say, I have load around 8 Ampere. Which ferrite corite should i buy?

dlloyd:
The RC snubber will always conduct current if connected across the relay contacts and the contacts are open (as shown in the link you provided). This current would be enough to cause a fluorescent lamp to flicker or remain dim. A ferrite core solution on the AC load wire will not cause this problem.

yeah, I also realize that.

MarkT:
Signals are either induced (electro-magnetic induction - as used in transformers), capacitively coupled,
or radiated (radio emissions).

Shielding and using balanced signals massively reduces all of them, but a mains transient is approx 1kV
level over a timescale of microseconds, that's perhaps 10^9 volts/second, it takes very little stray capacitance
to couple that into a sensitive part of the circuit - shielding and using groundplanes really helps.

Induction is reduced by avoiding poor layout (big open loops are coils, they couple to any other
nearby open loops - so no open loops, use twisted pair for high current wiring, keep layout tight, keep
transformers and motors well away from your circuit)

RF interference tends to follow lengths of wire and can be much worse if there's an accidental resonance
at the relevant frequency. Ferrite beads/toroids can help block this and reduce such signals getting into
circuits from the wires (actiing as antennas). 100pF to 1nF ceramic caps shorting inputs to ground at
high frequencies also help. Ground planes again highly effective, as are shielded boxes.

Great explanation. So, the electricity come to Arduino by RF (Radio Frequency), right? I will try with ferrite toroid but I wonder which should I buy?


Using ferrite corite, what does it mean of 5 turns, is it diameter? Let say, I have load around 8 Ampere. Which ferrite corite should i buy?

It means to wrap the wire through the hole (5 passes through). If you count the number of conductors going through the hole, that is the exact number of turns. A wire going straight through the hole is 1 turn. The exact number of turns isn't critical, but if there's room, I would shoot for up to 10.

Most any ferrite core would work (any in your images look OK) ... here's one with an inductance factor of 5.4µH.
Digi-Key

The good thing about using a ferrite core, or MOV or any other arc-suppression method is that it reduces (or eliminates) the problem at the source and prolongs the life of the relay.

dlloyd:
It means to wrap the wire through the hole (5 passes through). If you count the number of conductors going through the hole, that is the exact number of turns. A wire going straight through the hole is 1 turn. The exact number of turns isn't critical, but if there's room, I would shoot for up to 10.

Most any ferrite core would work (any in your images look OK) ... here's one with an inductance factor of 5.4µH.
Digi-Key

The good thing about using a ferrite core, or MOV or any other arc-suppression method is that it reduces (or eliminates) the problem at the source and prolongs the life of the relay.

hi, with 5.4µH how much load current (Ampere) can take? Is that any formula with this?
Number of turns is not critical, but if there is a room, can i shoot up till maximum?

Oya, what kind of cable should I use to this (diameter)?

hi, with 5.4µH how much load current (Ampere) can take? Is that any formula with this?
Number of turns is not critical, but if there is a room, can i shoot up till maximum?

Not an expert with this ... here's more info on the core: SIFERRIT material T35

More reference: The Use of Soft Ferrites for Interference Suppression

The total current seen by the core is the Ampere-Turns. For 8 Amps and 5 Turns, there is 40AT

For 8 amps, I wouldn't use anything smaller than #16 wire. 16 AWG or 14 AWG stranded or solid are OK.

I think too many turns could have negative effects (power loss, heating), so if a few turns or more solves the interference problem, I wouldn't add much more beyond that.

Check the voltage at the load to make sure there's not too much voltage drop.

dlloyd:
Not an expert with this ... here's more info on the core: SIFERRIT material T35

More reference: The Use of Soft Ferrites for Interference Suppression

The total current seen by the core is the Ampere-Turns. For 8 Amps and 5 Turns, there is 40AT

For 8 amps, I wouldn't use anything smaller than #16 wire. 16 AWG or 14 AWG stranded or solid are OK.

I think too many turns could have negative effects (power loss, heating), so if a few turns or more solves the interference problem, I wouldn't add much more beyond that.

Check the voltage at the load to make sure there's not too much voltage drop.

Oke thanks for your answer.