Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
At the least, you will need to revisit your power supply, for a start, do not use an electrolytic capacitor as your mains dropper! You will also need a higher input voltage to your regulator, a minimum loading and some capacitance on the output in order for the regulator to be stable. The micro on it's own will likely not draw enough current when idle to keep your regulator happy, so add an LED to indicate power or something. There's no need for 2 fuses either, if only one "pops" your circuit is still live, just an accident waiting to happen. You would be better off using an opto-coupler with inbuilt zero crossing detector to drive your triac and concentrate your efforts on safety, your power supply and your remote controller code![]()
You wouldn't use an electrolytic capacitor dropper because it is 1. polarised and 2. not rated for mains use. Use a Class X rated, film type, capacitor as your dropper. I suggested adding in the opto-coupler to drive the triac, even though it's a non isolated circuit, to relieve you of the additional coding required to reliably detect the mains zero crossings and ensure your firing your triac properly, you can do without it and write the detection code yourself though, if you wish. I would also be adding a snubber network across the triac to prevent commutation![]()
Read ap note AN1003 from Littlefuse/Teccor. It covers direct connection between a triac and a uController.
One thing though, you need to drive the gate pin with respect to MT1, so your uC reference must connect directly to triac pin MT1.
https://www.littelfuse.com/~/media/...rol_Using_Thyristors_Application_Note.pdf.pdf
And remember to be very careful. Make sure you really understand the impact of it being non isolated. Make sure you fully disconect the circuit from the AC line when you connect your programmer. And make sure user contactable device such as switches are able to provide the necessary separation between user and the High Voltage line.