Tag: BT136

1 articles found.

TRIAC Lamp Dimmer with ESP32 - Proteus Simulation

TRIAC Lamp Dimmer with ESP32 - Proteus Simulation: the ESP32, the BT136 triac, the P21W lamp on 12 V AC and the PC817 zero-cross detector

Hello friends, I hope you all are doing great. Today, I am going to share the TRIAC Lamp Dimmer with ESP32 - Proteus Simulation, the ninety-first project of our IoT Projects series. If you have searched for a TRIAC dimmer with an ESP32, how phase-angle control works, a zero-crossing detector with a PC817, or how to dim an AC lamp from a web page, here is a complete one in a Proteus simulation. Every rotary wall dimmer you have ever turned works the same way: it does not lower the voltage, it switches the lamp on part-way through each half-cycle of the AC. This project builds that dimmer around an ESP32. A PC817 optocoupler tells the ESP32 when the AC crosses zero; the ESP32 waits, then gives a BT136 triac a short gate pulse; the triac conducts until the next zero. The later the pulse, the less power reaches the lamp. But there is a catch: the power does not follow the delay in a straight line. So this ESP32 does it properly: you ask for 25 % of the power, and it solves the RMS formula of a phase-cut sine for the firing angle that gives exactly that. In this tutorial, we will go through the circuit, how a triac works and why it switches itself off at every zero, the zero-crossing detector and its small offset, the firing angle and the power formula, why a cold filament needs a soft start, and why this sketch has no display. Then we dim a 21 W lamp in the simulation, compare a soft start with a hard one, and run a sunrise. At the end, you can download the project with the ...