Voltage Divider Not Behaving - Page 1
Forum section: electronics / general

author: yanir
author_rank: Regular Contributor
timestamp: September 27, 2011, 06:20:46 pm
content: Hi, I'm am driving a 8x2 Character LCD with backlight using one of pic24 parts (pic24fv32ka). Everything works except for the backlight. When I power the backlight directly (it's just an 3V green led on the lcd board) it works. But when I try to power it from the microcontroller it doesn't. The voltage coming out of the pin is 3.24 (should be 3.3, not sure why it's 3.24) And I pass that pins output to a voltage divider (r1 = 10000K, r2 = 100000K). With 3.3V as input you should get 3.0V output from the divider. I get around 2.45V, which is too low to turn on the LED. Even with a 3.24 input the output would be 2.94.Why would I get such strange output from the divider?Notes: The output pin on the micro is set for open drain.My voltage regulator fixed at 3.3V.I have powered it from a pickit3 and from it's normal power supply with the same results.Any insight would be appreciated.Yanir

author: ejeffrey
author_rank: Super Contributor
timestamp: September 27, 2011, 06:47:48 pm
content: Voltage dividers only work when driving a high impedance load. The LED draws current, dragging the voltage down. Instead, you need a current limiting resistor.

author: Unknown
author_rank: Unknown
timestamp: September 27, 2011, 06:54:55 pm
content: Two issues: when using a voltage divider, the impedance of the divider should be much lower than the load impedance. This makes them impractical for low impedance loads, as ejeffrey writes.The other issue is that you should keep the current constant for an LED, not the voltage. The forward voltage drop will vary with temperature and between samples of the LED, and due to the exponential relation between current and voltage, this will have huge effects on the current that will be flowing.

author: Zero999
author_rank: Super Contributor
timestamp: September 27, 2011, 07:03:08 pm
content: I agree with all of the above. Another thing: the output impedance is equal to the equivalent of the two resistors in the divider connected in parallel.

author: deephaven
author_rank: Frequent Contributor
timestamp: September 27, 2011, 07:13:21 pm
content: You don't need a voltage divider, just a series resistor to limit the current flowing through the LED. Something like 100 ohms would give you 10 mA. You commented on the output being not quite 3.3V, this is normal IC specs, you will never get exact voltages out of a micro. If you look at the specs in the data sheet it will show you what voltages to expect.

author: yanir
author_rank: Regular Contributor
timestamp: September 27, 2011, 08:16:43 pm
content: Thanks for all the quick responses. I am experimenting with the limiting resistor. I don't have any small value surface mount resistors here to replace the 10K. I already removed the 100K. It doesn't turn on with the 10K in place.Without the resistor it drags the voltage down to 2.7 from 3.2 out of the micro. I also noticed that there is a 5 ohm resistor in series with the led on the lcd.I do have a 510ohm, 487ohm, and a 1K in 0603 package. I might throw those on there to give it a try.

author: yanir
author_rank: Regular Contributor
timestamp: September 27, 2011, 08:34:05 pm
content: Update: I did have an 82Ohm resistor from a different project (only 2!) and It works. Thanks for your help.

author: Zero999
author_rank: Super Contributor
timestamp: September 27, 2011, 11:13:14 pm
content: Is it bright enough though?You may need to reduce the resistance.If the green LED's forward voltage is 3V, the current will only be 3.66mA which won't produce much light.What's the forward voltage specified on the datasheet?You may have to reduce it to 33R or even 15R for full brightness.

author: yanir
author_rank: Regular Contributor
timestamp: September 28, 2011, 01:39:01 am
content: It is a bit dim. The data sheet for the LCD doesn't state forward voltage. I'll email the manufacturer.An area of confusion for me is the difference between resistance and impedance. It is my understanding impedance is resistance on an ac signal. Also, If the led is a low impedance device, why does it it drop the voltage at the point between the anode and the resistor?Thanks in advance, this has always confused me.

author: deephaven
author_rank: Frequent Contributor
timestamp: September 28, 2011, 07:42:01 am
content: At DC impedance and resistance is the same thing. At AC, the impedance is nominally the same as resistance for a resistor. Impedance gets more complicated at AC when you have inductance and/or capacitance involved becaus it now has 'complex' components to it.The led is low impedance (or resistance) but it isn't zero, so when it starts to conduct it will exhibit a low but finite impedance. It will obey ohms low, i.e. V = I X R where V is the volt drop across the led, I is the current passing through it, and R is the effective impedance of the led in that state.

author: ejeffrey
author_rank: Super Contributor
timestamp: September 28, 2011, 09:16:33 am
content: Quote from: yanir on September 28, 2011, 01:39:01 amNo 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.

author: yanir
author_rank: Regular Contributor
timestamp: September 28, 2011, 02:34:22 pm
content: Quote from: ejeffrey on September 28, 2011, 09:16:33 amI 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 amSo I measured 2.7V across the LED, giving me (3.3-2.7)/0.02A = 30 Ohm. I'll test that out. Thanks!

author: Zero999
author_rank: Super Contributor
timestamp: September 29, 2011, 04:39:44 pm
content: 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.