SCR gate controller circuit

I have use a zero crossing detector circuit. Before I connect into the arduino, the value gives a high at the negative cycle and a low at the positive. But the moment I connect it to arduino pin, the value of the zero crossing is giving me negative value instead of a zero. Which I think is the cause for the delay and the irregularities of scr firing angle. this is the circuit I am using. its a PSIM simulation therefore the optocoupler is a standard type. I am used 4n25 at 1st then now i changed it into H11aa1. It gives me the same result

zero.png