No one knows if the filter capacitor would charge to 25V, or if that would be a problem?
Where is the Arduino GND connected?
That filter cap can't charge beyond +5.5V or -0.5V thanks to the clamping diodes of the Arduino.
This is the third or fourth chip I've smoked with this project, even though the circuit works, so something isn't right.
What is the value of supply voltage for this arduino? How many volts?
You could use a circuit like this: Zero Cross opto
Circuit #4 is a peak detector, not zero crossing. Needs a bit more magic with the timers to make that work, but the great advantage is no hot resistors.