AVR reset on AC spark!

Thread Starter

allahjane

Joined Sep 19, 2012
75
Hi,

I'm using an AVR ATMEGA 16 with a 4700uf cap in the 12 volts supply to the lm7805 and a 1uf cap between the vcc and gnd very close to them. I'm using Xtal with 20Mhz

The Circuit is operating near AC mains switches and wall plug sockets. We all know switches make some spark when you turn them on or off !

The sparks ate generating interference which immediately hangs the AVR (including watchdog!!!) and in some cases (lucky ones) resets it.

How should I make the circuit withstand noise/interference?

Like how do our cellphones and laptop computers etc. keep working unaffected by any outside electrical noise (atleast they wont restart or hang)
 

t06afre

Joined May 11, 2009
5,934
Big caps are not very good for filtering out high frequency transient noise. Try some 100nF decoupling caps in parallel with the 4700uF caps. Some ferrite beads may also help. However the problem may (and probably is) be more complex than this. So some pictures of the setup would be nice
 

Thread Starter

allahjane

Joined Sep 19, 2012
75
Big caps are not very good for filtering out high frequency transient noise. Try some 100nF decoupling caps in parallel with the 4700uF caps. Some ferrite beads may also help. However the problem may (and probably is) be more complex than this. So some pictures of the setup would be nice
Ferrite beads will be very bad for the design due to their bulkiness and size! I would like to avoid it at all costs!

Does anyone know How the the circuits like our cellphones (some of which now run on Ghz range processors) are not affected at all by these sparks.
 

ericgibbs

Joined Jan 29, 2010
18,873
Ferrite beads will be very bad for the design due to their bulkiness and size! I would like to avoid it at all costs!

Does anyone know How the the circuits like our cellphones (some of which now run on Ghz range processors) are not affected at all by these sparks.
I wouldn't say that this type of ferrite bead is bulky, ref image.:)

If your AVR power supply is derived from from the mains, its very likely that the interference is mains borne, so I would advise the same as 't06' fit 100nF caps on the input to the 7805 and the 5V reg output, also the 1uF needs sizing up to say 47uF. Add a 100nF close the AVR power pins.

If its airborne interference screening will reduce the problem, do you have long, unscreened leads attached to the AVR.

As requested , photo's would help.
 

Attachments

THE_RB

Joined Feb 11, 2008
5,438
How have you handled the reset (MCLR) pin?

It could be noise getting into the reset pin, especially if you have no cap from that pin to ground. Or have only a high value resistor pulling up the reset pin.

If you don't need the reset pin, tie it to Vdd 5v with a wire.
 
Top