I want to create an on/off timer for Christmas lights. I have decided to use a triac to control the load and want to use as low driving current as possible. When driving a resistive load it should be simple: after zero crossing fire the Gate until the current reaches latching current (+ add some safety margin). When trying to calculate the time needed I have encountered another problem: what about noise? If a noise tricks me to fire too soon the triac won't latch. Even if the triac latches the noise may cause the voltage drop so deep the triac will stop conducting. The included app note from TI states
AC mains signal contains harmonics or transients or a combination of both.
AC mains may have up to 40% total-harmonic-distortion (THD). For robustness, the ZCD circuit may be designed assuming 60% THD in AC mains.
(I have no idea what the THD is but the accompanying graphs are really ugly.)
Looking at the mains voltage around the ZC by my scope I see very clean trace. The noise around ZC is hidden in the noise of my cheap scope. Is it safe to assume a noise on domestic mains is a "rare" event and glitches caused by this are hardly noticeable?
You are over thinking the problem. Start be detecting zero crossing, trigger the triac with a short pulse, if it works OK then all good, if not try a slightly longer pulse until you find the shortest pulse that works reliably.
Or buy an SSR for AC with built in zero crossing detection.