STM32 DIMMER LEDS BRIGHTNESS
I have 36 leds on my board. I will connect dimmer my board. How can i adjust leds brightness with dimmer? Because i need to manage 36 output pins. How can i do it?
I have 36 leds on my board. I will connect dimmer my board. How can i adjust leds brightness with dimmer? Because i need to manage 36 output pins. How can i do it?
It depends on how your LEDs are controlled and how you feed the dim signal.
If, for example, one transistor is connected in series with each LED, this will lead to flickering at low duty cycles. To avoid this, take one constant current source per LED and short-circuit the LED with the transistor, which allows you to control the brightness between 0% to 100% without flicker. Disadvantage: the set current always flows per LED, only the LED voltage and thus the brightness is reduced to zero.
For brightness control, you can use one PWM channel per LED and transistor if you want to control all 36 LEDs independently.
Now you just have to find an STM32 with as many timers with PWM channels as you need for your 36 channels. And that is exactly what only the STM32H7 family can do at the moment, e.g. with the STM32H723ZG, with which 40 PWM channels can be realised (TIM1...5, TIM8, TIM12...17, TIM23...24).
I recommend using n-channel MOSFETs with a very low gate threshold as transistor switches, because they are directly 3.3V-compatible and their gate can be directly controlled by the PWM output.
Does it answer your question?
Regards
/Peter
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.