Maybe some combination of parts and this App note from Atmel.
Atmel AVR182 Zero Cross Detector.pdf (95.1 KB)