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.
As it is, it can only turn the lamp on or off but not dim it. To allow dimming it would use phase control and need to synchronize the microcontroller signal with the AC input.
The usual method is to use zero crossing (ZC) detection, this is simply means a signal is produced so the microcontroller knows the point where the AC waveform reverses polarity, in other words when the AC voltage passes zero as it changes from positive to negative or negative to positive. Remember that a triac like the BT136 has to be triggered but once it has been triggered it stays conducting until the current through it drops to almost zero. So if you trigger it just after zero crossing, it stays conducting for the whole period until the next zero crossing. If you delay triggering it, the first part of each cycle will pass without it conducting so the effective power it can pass to the load (the bulb) is reduced.
Knowing when the zero crossing occurs, the microcontroller can calculate a trigger delay from almost immediate to almost the end of the half cycle so from almost nothing to full power can be passed to the load.
Brian.
Thanks for your answer. But I have a problem with this. When I set to near zero the delay for triggering triac the bulb doesn't have the full power and full light!! What is the problem!?
Hi,
There is a lot of information missing.
Do you use zero cross detection?
Where is your code, or at least a flowchart?
You talk as if you use a transitor that can be switched ON and OFF at random times...but you use a triac, you have to synchronize to mains frequency.
Klaus