For the past few weeks I’ve have the chance to work with an interesting module known as an AC Dimmer. What makes this module really stand out from the basic on/off switch is that you are allowed to control the amount of power the flows through a light bulb, so you can turn a light on/off or any value in between.

In the following video, I’ve created a circuit with two push buttons and an OLED screen. The code for the circuit that allows the user to control the amount of power flowing through the light bulb. The right button increases the power by a factor of 10 which is based on a scale of 0-100 (0 = off, 100 = on). The left button decreases the power by 10, and the OLED screen displays the power that the light bulb is set to.


The next video shows control of the light bulb by using a turning knob. Turning the knob gradually increases or decreases the brightness of the light bulb which allows for a greater range of light than the push buttons.


I had a lot of fun working on this project and I plan on upgrading the circuit with either more light bulbs or adding a different method of control.