This LED Dimmer Circuit uses a 555 Timer to control the PWM duty cycle of the current drive. Rather than apply proportional but continuous current to the LED for dimming, which can cause color shifts, modulating the duty cycle allows the LED to operate at its nominal current during the “ON” portion of the cycle. Because the frequency response of human vision is limited, using a PWM frequency of 250 Hz avoids the perception of flicker for the observer.
The LED model has an internal monitor for the "perceived" light output (light-blue waveform), which is a low-pass filtered version of the instantaneous light output. The filter pole frequency is set to 15 Hz to represent the bandwidth of the human eye. The value of the dimmer setting (green waveform) is increased from 10% to 90% at time 100msec. The LED current pulses (purple waveform) are shown just before and after the duty-cycle transition.
Part of this design is based on a dimmer schematic found on-line:
That original circuit is actually incorrect, one of the diodes needs to be reversed. There was a comment from a reader who said he built the circuit as shown and it didn’t work. This is a good example of the value of simulating circuits before building hardware!