I have been trying for a long time to digitally control the fan speed and light intensity of a dimmable LED bulb, but I am not able to. Basically I want to replace the mechanical potentiometer with a digitally controlled resistance. I have tried every possible dimming solution.
Replacing the mechanical pot with LDR and varying its resistance by illuminating it with LED in closed tube. It's not at all a good & stable solution and the arrangement is difficult to replicate (the output fluctuates greatly).(commercially available solution is very costly)
Cutting a portion of AC waves by detecting zero crossing with the help of a micro (ATTiny). It gives a flickering output when a dimmable LED bulb is used.
Thought of digital potentiometer arrangement, but the voltage that comes across the mechanical potentiometer in a triac dimmer circuit is around 180V when the pot's at the highest resistance level of 300KOhm (The AC supply voltage in my country is 240V). It is well above the digital pot's max recommended voltage of 5V (Vdd) across the variable resistance legs. Can anyone suggest a digital pot that can be interfaced with a 5V micro and can withstand the voltage in a triac dimmer circuit. Is there any other solution to digitally control a resistance. I am willing to achieve this within 3$.
Is there any other better way to do it? Please help.