I have a 100Hz signal with a fast rising time and slower falling time. This is the output from a zero crossing detector. The signal is connect to an Arduino input pin. Arduino can generate an interrupt on signal RISING or FALLING edge. I tested them and both works well (apparently), but I wonder if there is a reason to choose one edge over the other.
This is the signal:
This is based in this circuit, which I need for one particular project (controlling a HID lamp):
In my case the lamp is a 240V 250W HID with magnetic ballast (0.88 power factor) that flicker with SSR, so I must use an electromechanical relay, but with zero crossing. With this signal Arduino will wait for a right time to close the relay, minimizing arcing. It's not terrible important, as the relay only close once per day (you bet).
Suggestions are welcome.
A different approach
User @jonk suggested a different approach to my problem. While it serve best my needs, it's not an answer to my question and cannot be posted, nor accepted.
Anyway, jonk's approach doesn't deserve to be lost in the comments, so here it is:
The idea is to use a SSR and an electromechanical relay in parallel. The Arduino will switch on both the SSR (with built-in zero cross detection) and the relay (two pins) at the same time. The SSR will switch on inmediatly, powering the load. After some delay and a few cycles, Arduino will turn off the SSR. Then the relay, already closed, will take the load while the lamp is still being heat (and it will unaffected for any voltage mishap anyway).
Why it is best? I don't have to mess with mains. I don't have to adjust timings. I don't need an interrupt capable pin (Arduino only have two).