How Does an LED Control Its Brightness?#
Take a close look at Christmas tree lights. The lights don’t just turn on and off — they gradually get brighter and then gradually dimmer. In other words, the brightness is being controlled.

Is the LED’s brightness really being controlled? No! In fact, it’s tricking our eyes into thinking the LED’s brightness is being adjusted. Let me explain the principle.
A Simple LED Circuit#

I’ve prepared a battery, an LED, and a switch. By connecting them in series, I built a simple electrical circuit. As shown in the figure on the right, when the switch is closed, current flows and the LED turns on. Conversely, as shown on the left, when the switch is opened and the current is cut off, the LED turns off.