Detect 220Vac signal on Microcontroller
Consider using an industry-standard interface isolation module such as...

http://www.opto22.com/site/pr_details.aspx?cid=4&amp;item=IAC5A

It has the advantage of regulatory approvals to avoid any problems with "home-made" DIY solutions in a commercial or industrial system.