Don’t Be a Sunday (LED) Driver HDDG #0xF Jason Cerundolo
LEDs!
Throwie
Problem
Shunt Resistor I led = 2 mA V led = 1.8 V V R = V batt – 1.8 V I R = 2 mA R = (V batt – 1.8 V)/(2 mA) Vbatt = 3.0 V R = 1.2 V / 2 mA = 600 Ohm
Microcontroller Control LED power sourced by GPIO pin R = (5.0 V – 1.8 V)/(2 mA) R = 1.6 kOhm
Microcontroller Control LED power sunk by GPIO pin
Microcontroller Control Pros Different supplies for LED and MCU Sink more current than source Cons Watch your max rating on GPIO voltage
PWM Control Pros Cheap Easy Cons Possible strobing effect Max f PWM = f CLK / 2^n Ideally f PWM > 500 Hz
Current Control vs Voltage Control Maxim Application Note 3256
Why Current Control? Avoid max current Control brightness Control white balance
Linear Current Control I led = 200 mA V R2 = V BE = 0.6 V R = 3 Ohm V cc > V led V P waste = (V cc – V led ) * 200 mA PWM Control available
Switching Current Control More efficient But this is a voltage supply…
Switching Current Control V FB = 0.5 V I LED = V FB /R P waste = 0.5 V * I LED No output cap Be careful about using EN pin for PWM control
Buck Converter Details Methods for Dimming Control PWM on EN pin Override V REF Add to V FB
PWM Dimming P waste = 0.1 V * I LED Minimum on time 6 cycles 1.5 MHz switching frequency 8 bit control => f PWM = 1.5 MHz / (6 * 2^8) = 977 Hz Datasheet recommends 500 Hz
Analog Dimming Vctrl [V] V R1 [V]
Better PWM Control Pro FET provides a sharper turn-off Con Make sure you can switch the FET V TH_EFF = V TH + V FB
Multiple LEDs Maxim Application Note 3256
Multiple LEDs Only turn on one LED at a time LEDs can be different types (eg, red, green, and blue)
Multiple LEDs Turn on any number of LEDs, as long as D1 is active All LEDs must have similar I-V curve
Strings of LEDs Multiple LEDs in series All LEDs have same current Vcc > n*V f + V FB
Boost Converter Driver Multiple LEDs in series All LEDs have same current Output cap is back Vcc < n*V f + V FB V max > n*V f + V FB
Putting it all together
Thank You Website: Github:
More Information efficiently-drive-an-led efficiently-drive-an-led 03/smart_led_driver.html 03/smart_led_driver.html
RGB LED Matrix Panel
Integrated IC LEDs