control AC fan speed using microcontroller
Solution 2 should have worked, I think you've implemented it incorrectly. This is what I would try:
Where I live there are dimmers with a rocker switch (a pair of push buttons actually). See if you can get one, open it and check the voltage across the button (be careful). If it's low try to short it with an active device like a transistor. If it works add a micro to control the transistors.