Re: 8051 and triac
Hi Sunish,
some time ago I needed a power regulator circuit just like you described. By the time it evolved to the 3-channel light dimmer with IR control and automatic light intensity correction depending on the ambient light. All works fine for me, however, there is a difficulty, most people rise: the circuit is directly connected to the mains without any galvanic separation. If you decide to build something like this, beware of potential risk of electric shock and severe injury if you don't use insulated box for the device.
Fortunately I have no kids at home
, so a simple warning written on the cover is quite a sufficient measure against tinkers and irresponsible nerds.
So all responsibility is yours, not mine.
Regards, yego
Ps.
Of course, you can build a circuit with a power transformer, with MOCxxxx optocouplers, but it all costs money and complexity.
Basic circuit for a single phase light dimmer (power controller) is like this: