This is the PCB design of the project I have been working on recently (my first pcb design).
The idea is to control ac appliances (fans, bulbs etc) without relays. I am using triacs which are better than relays for such applications. I am using opto-isolators for complete isolation from ac lines. I tried running the arduino using USB cable connected to my laptop (with charger unplugged) as well as wall adapter (12V).
At first, circuit seemed to work fine. I was able to dump the code into the controller and control bulbs (On/Off as well as dim them) using UART. I sent the commands via UART. However it seems that whenever there is a spark on the ac lines (when I plug in/out a fan), the micro-controller doesn't look happy. Sometimes it resets (which is the better part of the picture) and other times it hangs and I am unable to send commands via UART. I am not sure whether burnt code gets affected as well but sometimes I had to re-upload the code. If I switch on/off a fan in other room, there is no effect.
Possible issues:
1) Absence of ground plane on the PCB.
2) Some sort of EMI due to sparks.
I also tried plugging in a water heater (800 watts resistive load) the same way as fan but nothing happened. So, I think it's the inductive load which is giving problems.
Any constructive solution for this issue will be very much appreciable.
Thanks.