How to detect the phase sequence of a 3-phase ac (R-Y-B or R-B-Y) using Atmega32?
One solution would use three opto-isolators, one per phase.  Use a "capacitive dropper" to feed the LED side of each opto-isolator - no transformer required.  Make sure you protect those LEDs from reverse voltage when the phase goes negative.