The circuits in the picture are basically opto-couplers connected to a relay circuit. The input pin of the opto coupler is connected to a MCU and the output of the opto coupler is connected to the relay. Initially I was using circuit 1 but then I modified it to circuit 2. Both the circuits are working perfectly. My question is that is circuit 2 more prone to spikes and could the MCU get damaged or short due to any abnormality in circuit 2. I am using the circuit for long term continuous use. Which circuit, out of circuit 1 and circuit 2 is more reliable for long term continuous use?
If you cannot see the image then use this link:- https://drive.google.com/open?id=0B2HbfYZlVykfcEx0QWNkQjVJSlU