My avr drives relay to switch ac lamp ,i use ciruit like the attached. the same output is used for ac motor
There is external interrupt on int 0 ,When i connect the ac supply of loads the avr enters interrupt, and the lcd hangs and shows nothing.
I used capacitor 1uf on the +5 supply of the circuit. all the dc supply of control circuit and relay circuit is common. all the ground is common.
Isn't transistor enough?should it be optocoupler?
There is external interrupt on int 0 ,When i connect the ac supply of loads the avr enters interrupt, and the lcd hangs and shows nothing.
I used capacitor 1uf on the +5 supply of the circuit. all the dc supply of control circuit and relay circuit is common. all the ground is common.
Isn't transistor enough?should it be optocoupler?
Attachments
-
78.6 KB Views: 9