Hi!
Here is the details of my project.
Problematic Part:
I am using a microcontroller to switch a relay with 220VAC load.
Problem:
Everything works fine if there are no load connected to the relay but once a load was connected, the switching became strange. Sometimes when the pic sends an ON signal to the relay the relay would momentarily turn on and off again (sometimes does not turn on at all). Also, when the relay did successfully switch the AC load, the MCU sometimes can't turn off the relay by sending OFF signal to the relay.
Another weird behavior that I encountered is sometimes when the relay is OFF and I plugged in the AC main to the switching pin of the relay, the relay will turn on.
I've also tested that the circuit behaves differently on different AC outlet. The problem occurs more frequently on some.
I'm aware that a relay driver is needed when switching with MCU. Attached below is the driver that I used. The LED is just an indicator for the relay's state.
Steps that I took to solve the problem:
I added a big 4.7uF bypass capacitor and it seems that improved the performance a bit.
I added a snubber: 200ohms, 0.1uF (Result: No observable changes)
Most successful attempt is with an electric fan as load
What do you think could cause this behavior? Thanks in advance!
The relay that I use - http://ph.element14.com/omron-elect...-5dc/relay-spst-no-16a-high-inrush/dp/2213809

Here is the details of my project.
Problematic Part:
I am using a microcontroller to switch a relay with 220VAC load.
Problem:
Everything works fine if there are no load connected to the relay but once a load was connected, the switching became strange. Sometimes when the pic sends an ON signal to the relay the relay would momentarily turn on and off again (sometimes does not turn on at all). Also, when the relay did successfully switch the AC load, the MCU sometimes can't turn off the relay by sending OFF signal to the relay.
Another weird behavior that I encountered is sometimes when the relay is OFF and I plugged in the AC main to the switching pin of the relay, the relay will turn on.
I've also tested that the circuit behaves differently on different AC outlet. The problem occurs more frequently on some.
I'm aware that a relay driver is needed when switching with MCU. Attached below is the driver that I used. The LED is just an indicator for the relay's state.
Steps that I took to solve the problem:
I added a big 4.7uF bypass capacitor and it seems that improved the performance a bit.
I added a snubber: 200ohms, 0.1uF (Result: No observable changes)
Most successful attempt is with an electric fan as load
What do you think could cause this behavior? Thanks in advance!
The relay that I use - http://ph.element14.com/omron-elect...-5dc/relay-spst-no-16a-high-inrush/dp/2213809
