Electrical – Transistor driving LED

diodesledohms-law

I have already asked a question regarding this problem but it was about a different thing, slightly. Here is the drawing of a LED driving circuit.

enter image description here

The problem I have encountered with traditional resistor circuit is that I need a very precise current to run through that LED so it produces the desired amount of light.

Lets say 8 bit precision (255 steps). Since LED's Vd can vary with a current I thought that a simple resistor circuit woukdn't be able to give the precision in the desired range, just because there is no way to mathematically express the voltage drop of a LED.

So I came up with the circuit that is shown above. When I showed it to some people they told me that it is a terrible idea to do so without any explanation and looking at me like I am an idiot.

So far the transistor works as a current limiter, it limits current to lets say 20mA perfectly no matter what LED Vd is. It is always going to be the desired current. One problem I ran in to is that a transistor now has a current depending on Vd from its base to emitter. Which again puts me in a situation where I need to mathematically express that and again there is no such a way to do so, because of too many factors I can't control – for example, manufacturing process.

Why do I need such a precision ? I am trying to make LED that displays a color. RGB value. So for example 0.00007843137 Amps is Red = 1 and 0.00015686274 Amps is Red 2 (8 bit colors).

My question is how to precisely express this voltage drops in a transistor or LED in order to manipulate such a small current.

Best Answer

A simple way to accurately control RGB LEDs is with a 3-channel shift register PWM driver.

All you do is use one resistor to set the maximum current for all three LEDs and then program the grey scale values for each LED.

The Texas Instruments TLC5973 has 4096 brightness levels for each LED. The device is programed with a single serial wire. The device has an internal oscillator so no clock is required for the serial data.

I would recommend using 50 mA LEDs for increased brightness resolution.

enter image description here


LINK: Arduino Uno Code

LINK: Arduino Library for TLC5973

Related Topic