solve the problem of noise

Thread Starter

mah

Joined Mar 15, 2010
393
i use external interrupt pin on atmega 8(INT1) to do action, but there is a relay and motor in my circuit which activated the interrupt and execute the action. i used switch debounce but no vain how to solve this problem?
 

Papabravo

Joined Feb 24, 2006
21,225
i use external interrupt pin on atmega 8(INT1) to do action, but there is a relay and motor in my circuit which activated the interrupt and execute the action. i used switch debounce but no vain how to solve this problem?
Examine your Ground (GND) connections. Best is to use one pair of power and ground leads/traces for the ATmega8, and a separate pair for the motor and solenoid. There should be only one common point -- at the power supply. That should be your first effort. A schematic of your entire system would be most helpful. Can you please provide one.
 

Thread Starter

mah

Joined Mar 15, 2010
393
i have gnd plane and power plane and i put capacitor 100nf across each switch also relay board is separated from MCU board
 

Attachments

danadak

Joined Mar 10, 2018
4,057
Using scope in one shot mode can you capture pin interrupt is tied to to
see if thats the problem ? Also is pin operated in a high Z environment,
eg. the drive to the pin is from a high z source ? This causes C coupling,
best way to get rid of noise is to lower pin Z and/or use a ferrite bead.

But confirm your changes with scope captures to make sure you have
created a wide margin suppression of noise.


Regards, Dana.
 

Papabravo

Joined Feb 24, 2006
21,225
i have gnd plane and power plane and i put capacitor 100nf across each switch also relay board is separated from MCU board
I know what you have, and that is a problem. If you take my suggestion you will have less of a problem. Go back and read it again. Do not pass Go and do not collect $200.00
 

SamR

Joined Mar 19, 2019
5,040
Couple of things. Relay coils can backfeed when field collapses and same for motor winding. Use diodes to prevent backfeed.
 

Papabravo

Joined Feb 24, 2006
21,225
Couple of things. Relay coils can backfeed when field collapses and same for motor winding. Use diodes to prevent backfeed.
Is backfeed a technical term? What exactly are you talking about?
Without a schematic we don't know if he has them or not.
 

SamR

Joined Mar 19, 2019
5,040
Backfeeding is flow of electrical energy in the reverse direction from its normal flow. For example, backfeeding may occur when electrical power is injected into the local power grid from a source other than a utility company generator.

Backfeeding - Wikipedia
en.wikipedia.org/wiki/Backfeeding

As happens when a coil or motor field collapses. Also can be a source of circuit noise and hence diodes to prevent.
 

KeithWalker

Joined Jul 10, 2017
3,093
this is the relay board drive small ac motor, i tried to use snubber rc circuit 100nf,47 ohm but there was leakage and the relay was always on
The second diagram you posted is the same one you posted above. We still don't know what type of relay and motor you are using, how they are connected and how you are powering them.
 

Papabravo

Joined Feb 24, 2006
21,225
Backfeeding is flow of electrical energy in the reverse direction from its normal flow. For example, backfeeding may occur when electrical power is injected into the local power grid from a source other than a utility company generator.

Backfeeding - Wikipedia
en.wikipedia.org/wiki/Backfeeding

As happens when a coil or motor field collapses. Also can be a source of circuit noise and hence diodes to prevent.
So turning off a switch on a solenoid leaves no path for the current to flow which makes backfeeding, as you put it, impossible. It physically cannot flow if there is no path so I think we are talking about different things. What you get without a current path, is a large voltage spike proportional to the inductance and the time rate of change of the current. A diode will provide an alternate path for the current in a coil to flow when the switch turns off, but it may or may not do much to help the TS's problem if his layout does not have a better grounding strategy.
 

Sensacell

Joined Jun 19, 2012
3,448
Is it possible to disable the interrupt synchronously with the relay activation?

If the same MCU controls the relay, then you might be able to mask the problem.
 

Thread Starter

mah

Joined Mar 15, 2010
393
Backfeeding is flow of electrical energy in the reverse direction from its normal flow. For example, backfeeding may occur when electrical power is injected into the local power grid from a source other than a utility company generator.

Backfeeding - Wikipedia
en.wikipedia.org/wiki/Backfeeding

As happens when a coil or motor field collapses. Also can be a source of circuit noise and hence diodes to prevent.
l293d driver has already internal diodes for this mission
 

Thread Starter

mah

Joined Mar 15, 2010
393
Is it possible to disable the interrupt synchronously with the relay activation?

If the same MCU controls the relay, then you might be able to mask the problem.
good idea, but Is it the right choice ? I mean Is it one of our options
 

KeithWalker

Joined Jul 10, 2017
3,093
I know what you have, and that is a problem. If you take my suggestion you will have less of a problem. Go back and read it again. Do not pass Go and do not collect $200.00
He mentions that the motor is "a small AC motor". We do not yet know how it is powered so it may not be a very good Idea to connect it to circuit ground.
 
Top