It will be better if you post your schematic since a lot of advice depends on what you have. Anyway, the basic way to do it is to catch the zero crossing of the mains. If you have that accounted for in the schematic, you can control the phase angle at which the triac turns on and have dimming.
Bookmarks