Electronics > Projects, Designs, and Technical Stuff
How bad it is to power LCD backlight from MCU IO?
<< < (4/4)
Siwastaja:
Yes but it's guaranteed range of actual current regulation, regardless of LED Vf and supply voltage variation.

Do the actual analysis for the resistor solution and you may be surprised how hard it is to guarantee an accurate LED current unless you have a lot of voltage to drop over the resistor. For example (made up numbers to show the point):

Nominal design:
Vsupply = 5.0V
Vf=3.0V
R = 133 ohms
Iled = 15mA

Worst case max current:
Vsupply = 5.0V + 4% (typical 7805-style linear reg) = 5.2V
Vfled = say 2.6V
R = 133 ohms - 5% = 126 ohms
Iled = 20.1mA

Worst case min current:
Vsupply = 5.0V - 4% (typical 7805-style linear reg) = 4.8V
Vfled = say 3.4V
R = 133 ohms + 5% = 140 ohms
Iled = 10.0mA

So suddenly 12.0mA to 18.0mA starts looking appealing.

Note that far too often, LED Vf range is not properly rated at all (only typical condition given). Also note even if the min,max range is tabulated, it's only the unit variation at a specific temperature, and you need to add the temperature coeff on the top.

Though, all of this likely won't matter. The backlight brigthness is not that different at 10 or 20mA. Just make sure you won't exceed the maximum.

But clearly, if you do this analysis with the 3V3 supply, it's a definite no-go. It may still practically work, especially for one-off, but that's design by luck. That's why I tend to drive blue, white, or high-brightness green LEDs that require Vf=3V-ish, using the 5V tolerant open-drain IO pins; red, yellow etc. at below 2V work fine with a series resistor from the 3V3 output.
Chalcogenide:
I think you could just run the LED with the anode connected to the +5V supply, and its cathode via a resistor to your MCU IO pin. If you set your output high, at 3.3 V, the LED will stay OFF (it's only seeing a 1.7 V forward voltage, nowhere near enough for it to emit any sort of measureable light output) and your IO pin will be kept at 3.3V which is safe; to turn on the backlight, just set the pin low. You don't necessarily need open-drain, 5 V tolerant pins to get this to work, as long as the rest of your circuit on the 3.3V rail draws more current than what leaks through through the LED when OFF (otherwise the voltage on the 3.3V rail may rise, potentially causing issues. But that's quite unlikely with a single LED driven this way).
3dgeo:
@Siwastaja:

Very good point indeed!

If I remember correctly absolute max is 25mA.
My project will be powered by USB.
Actually I have IS31FL3741 LED matrix driver on the PCB, but I can't use it cos it's a matrix driver...

I can drive it from 5V, and yes, I understand how to make it work with MCU IO (open/drain config).

This will not be a cheap product, I totally can use that constant current driver, it's just my OCD I guess to optymyze as much as I can :D

And I rather spend few cents per PCB more than dealing with issues in the future...

As I said I will make universal PCB prototype so I can test all posible options, tho I'm leaning to 5V, open/drain and NSI45015WT1G...
wizard69:
You need to look at the spec directly below the one that you highlighted!    The first thing you check obviously is the current handling capability of one pin!  But that is only part of the chips power capability, since only you know what is connected to the other pins and the current draw there, we can't say if it is OK.    For a backlight you should consider current draw to be continuous but we have no idea what the other pins are doing.   15ma is about 1/10 of your budget that can quickly escalate if you have other continuous loads.

So yeah consider doing so but verify your overall load on the processor.


--- Quote from: 3dgeo on March 12, 2020, 03:30:31 pm ---
--- Quote from: madires on March 12, 2020, 03:14:42 pm ---Should work fine. One disadvantage could be the impact of the PWMed current on sensitive MCU functions like the ADC.

--- End quote ---

By "PWMed current" you mean backlight PWM? Would be nice feature to use PWM on BL to dim the screen...
Anyway, not using any analog stuff, only digital IO (regular digital IO, I2C, SPI).

--- End quote ---
TomS_:

--- Quote from: 3dgeo on March 12, 2020, 02:04:34 pm ---And STM32F411 IO is capable sunking/sourcing up to 25mA:

--- End quote ---

But dont disregard the total sink/source capability (the figures at the top of that table), and how the current requirements of the backlight might eat into the budget required for the rest of the chip and what ever else it is doing.
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod