• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Simple relay circuit getting noise spike form AC line

creichard

New Member
I have a simple relay circuit which consists of a 12v DC coil relay switching a 110v AC motor load. The relay is controlled by a pic through a ULN2803 Darlington array and there is also a 1N1004 diode across the relay coil to snub the flyback voltage from the coil.

The problem I have is when I switch the relay the AC load causes some sort of noise or interference which travels all the way back to the Pic and locks it up. This noise can happen both when I turn the motor on and when I turn the motor off. The motors are small 20 watt motors.

So what can I do to filter or suppress or eliminate this noise? What exactly is this noise?

One more thing, when I switch the relay with no AC load it works fine, it also works fine with resistive loads such as lights.


Thanks to all.
 

Hero999

Banned
Do you have a 100nF capacitor connected across the supply pins?
 

creichard

New Member
Most improtant for me is if someone can help me understand what is happening in the circuit. Why does the AC load effect my DC circuit when there is no direct connection between the two. And why does it only seem to be happening on motor loads?

For crying out loud, I am just switching a relay, what is going on here???

thanks again
 

blueroomelectronics

Well-Known Member
Inductive EMF switching loads can be a very noisy affair. Proper power decoupling is a must.

PS the 0.1uf go across every digital IC power pin pair.
 

Hero999

Banned
A snubber network across the motor might also help but if you've not got a 100nF capacitor across the supply pins of the PIC then you're asking for trouble.
 
Last edited:

HS3

New Member
creichard said:
So what can I do to filter or suppress or eliminate this noise? What exactly is this noise?
The short answer is that you need to filter out all the noise. Get rid of as much as you can at the motor and at the relay contacts. Better get as much as possible at the source. Then filter the power supply to the control electronics. Then filter some more right by the chip. Then pray that everything works.

Learn and understand differential and common mode noise and how to prevent them with differential and common mode filters. You will see these installed at the input of many electronics and you can salvage them and reuse them.
 

crutschow

Well-Known Member
Most Helpful Member
HS3 said:
The short answer is that you need to filter out all the noise. Get rid of as much as you can at the motor and at the relay contacts. Better get as much as possible at the source. Then filter the power supply to the control electronics. Then filter some more right by the chip. Then pray that everything works.
Yes. The three magic words are filter, filter, filter. Switching an inductive motor load not only causes power line noise, but can also radiate high frequency noise into sensitive circuits.

Is the PIC decoupled to a ground plane on a circuit board? It should have a power supply decoupling capacitor with short leads right at the power pins(preferably surface mount). Also try a small decoupling capacitor (say 0.01uF) with short leads across the relay coil.

And physically separating the motor and relay from the PIC as much as possible may help.

If all else fails you can try putting the PIC in a metal box with feedthrough filters for all lines.
 

MikeMl

Well-Known Member
Most Helpful Member
No such thing as a new thread :D

I believe that these types of noise spike problems are caused by common-mode coupling through the ac line. Both the motor and the PIC's ac power supply are ultimately tied to the same AC circuit. Due to the series resistance and inductance of the A.C. mains distribution system, the motor starting/stopping transients excite line-to-line, and line-to-ground voltages which can couple through the PIC's power supply due to the capacitance between primary and secondary in the PIC supply transformer.

You might try isolating the PIC board from earth ground, and temporarily running the PIC from a battery. If it works that way, but glitches when running the PIC via a mains-powered transformer, then at least you know where to start...
 
Last edited:

shripal_javia

New Member
Thanks for your earliest reply.
I have made isolation between MCU and Main Power. and gave battery power to MCU. But still same problem persists. MCU gets reset when relay gets OFF from ON (load connected). (Without load it works fine.)

and one another thing i tested. i made relay away from control board. so now it works fine even with same phase given to both MCU power supply and to inductive load.

So i think it is not the problem of common-mode coupling. but it is due to EMI genereted due to breaking of Relay Contacts.

How to solve this problem?
 

colin55

Well-Known Member
It could be the EMI generated by the leads of the motor. They may be physically too near the "electronics." Have you tried a capacitor across the leads of the motor and a cap across the contacts and a cap across the coil?
Have you tried shielding the leads of the motor?
You can always remotely mount the relay.
 

shripal_javia

New Member
motor is already having cap.
Motor and control circuits are far from each other.
but MCU and relay are on the same board.
and if i place MCU and Relay apart, they works fine.
but i need to make circuit compact so need to place relay and MCU near to each other.
so how can remove EMI from Relay load current or how can i remove EMI Malfunction efect in MCU power supply?
 

Sceadwian

Banned
Use bigger capacitors. Make sure you have a flyback diode on the relay.
Is there any way to move the MCU off of the board that has the relay? It's just generally a bad idea to put them close together,
 

fernando_g

New Member
My two yen on the subject;
I had an IDENTICAL problem waaay back.

What happens is that as the relay contacts open or close there is contact bounce. The resultant arcing creates an incredibly wide noise spectrum. Unfortunately, the relay's coil acts as a pickup coil (much like a pickup coil in an electric guitar) for the resultant noise which is fed back to the circuit.

Sometimes the noise pulse is so severe that defies almost any decoupling efforts.

How did I solve the problem back then? Use an optocoupler to drive the relay. To avoid having a separate, isolated supply only for energizing the relay's coil, use an AC-coil relay and drive it with a Triac-output optocoupler.

Worked great for me.
 

shripal_javia

New Member
thanks for your reply and suggestions.
Are you really sure that only coil of relay pickups up the noise?
When i tried my circuit by placing MCU and Relay apart from each other, it works nicely.
if problem is due to relay coil pickup, it might reset MCU in this case also.
Pl correct me if i m wrong.
 

colin55

Well-Known Member
It's the spikes "down the line" that are upsetting the Micro. It has nothing to do with the coil of the relay.
When the leads are long, the spikes are reduced.
 

Sceadwian

Banned
Colin, where is the schematic that you looked at to determine that? I don't think the poster has put one up yet, so we have absolutely no clue what the source of the problem is. If you've somehow gained the ability to psychically download schematics I would like to learn your secrets.
 
Last edited:

EE World Online Articles

Loading

 
Top