Pulse Width Modulation (PWM) controls LED brightness by rapidly switching the LED ON and OFF. A 50% duty cycle means the LED is ON half the time and OFF half the time. Electrically, that is half the average power.
But visually? It does not look half as bright.
Human brightness perception follows a roughly logarithmic or power-law response. Our eyes are far more sensitive to changes in darker tones than brighter ones. That means linear PWM steps produce non-linear perceived brightness.
Example:
* 10% PWM duty cycle does not look “10% bright”
* 50% duty cycle does not look “half bright”
* Most of the visible brightness change gets compressed toward the upper PWM range
This is where gamma correction matters.
Gamma correction remaps brightness values so that equal numerical steps produce visually smoother brightness transitions.
Instead of:
Input → PWM directly
You use:
Input → Gamma curve → PWM output
Typical approximation:
Output = Input^γ
Where gamma (γ) is often around:
* 2....
Suggested Credits
Tags, Events, and Projects