Electronics > Microcontrollers

Voltage Divider Not Behaving

<< < (3/3)

ejeffrey:

--- Quote from: yanir on September 28, 2011, 01:39:01 am ---It is a bit dim. The data sheet for the LCD doesn't state forward voltage. I'll email the manufacturer.

--- End quote ---

No need, the forward voltage doesn't change much with current.  Measure it with your 82 ohm resistor in place, and use that.  The important thing from the data sheet is the operating current.  The resistor you want is then given by the formula: (3.3 V - Vf) / Io.

One thing: you say the output of your micro is set to open drain? Are you sure?  If so, you would normally connect the LED from 3.3V to the open drain pin, and then light the LED by pulling the output pin low.  That doesn't sound like what you are doing.

yanir:

--- Quote from: ejeffrey on September 28, 2011, 09:16:33 am ---One thing: you say the output of your micro is set to open drain? Are you sure?  If so, you would normally connect the LED from 3.3V to the open drain pin, and then light the LED by pulling the output pin low.  That doesn't sound like what you are doing.

--- End quote ---

I have the micro pin connected to the resistor which is connected to the led. I set the pin high and low to turn the back light on and off. It was my understanding that open drain allows me to source the most current from the pin. Am I misusing the pin?

--- Quote from: ejeffrey on September 28, 2011, 09:16:33 am ---No need, the forward voltage doesn't change much with current.  Measure it with your 82 ohm resistor in place, and use that.  The important thing from the data sheet is the operating current.  The resistor you want is then given by the formula: (3.3 V - Vf) / Io.
--- End quote ---

So I measured 2.7V across the LED, giving me (3.3-2.7)/0.02A = 30 Ohm. I'll test that out. Thanks!

Zero999:
You may be able to just omit the resistor as the internal resistance of the microcontroller's IO pin might be enough to limit the current through the LED. Look at the MCU data, if the IO pins voltage is 3V or less when the output current is 10mA you should be pretty safe.