The invention provides a pulse modulation LED dimming
system and method based on an STM32 single-
chip microcomputer. The
system is mainly composed of an STM32F103C8T6-single-
chip microcomputer module, an
OLED display module, a
signal acquisition module, a matrix key module, a
Bluetooth module, an
LED lamp module and the like. The
system method comprises the following steps: step 1, optimizing a
hybrid modulation strategy and carrier allocation, and establishing a dynamic carrier
frequency allocation model through a multi-mode
hybrid scheme fusing
pulse width modulation and
pulse density modulation; step 2, collecting an LED load current waveform in real time through a current sampling module, dynamically adjusting a
gain coefficient based on a
harmonic distortion rate, and counteracting a main
harmonic component of a current
signal in real time; and step 3, implementing nonlinear compensation of
volt-
ampere characteristics. The system supports 0%-100% stepless dimming, brightness adjustment is smooth and
flicker-free, the system has four dimming
modes of normally-on, single-point, circulating and sliding, matrix key local control and
Bluetooth remote control are supported, and a flexible and stable LED dimming scheme is provided for a user.