using a tiny avr µc for this purpose seems okay, firmware is simple, I have a cree led, the problem is how to make the sensor for the plug cable and how to make it work with the µc - I don't want to ruin it. any ideas what voltage should i expect when using such sensor?

distorted sine wave? how do I get rid of the negative half wave? how do I limit the upper half to 5V?
what circuitry should I use at the input pin of the µc?