Working of LM3914 LED Bar Graph Driver

Discussion in 'General Electronics Chat' started by richard6767, Dec 19, 2012.

  1. richard6767

    Thread Starter New Member

    Dec 19, 2012
    4
    0
    Hi.

    I don't understand comparitors. In the LM3914 there are 10. The "+" inputs are all at different voltages, but held steady at various bias voltages. When you have input voltage on pin 5,the voltage on the "-" input of all the comparitors changes and is the same for all.

    Okay, but under what input conditions of the comparitors in the LM3914 does a comparitor's output go to ground, thus closing the LED circuit?

    Does input on "-" need to be more positive or negative than on "+" input?

    Thanks.
     
    Last edited: Dec 19, 2012
  2. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    When the input "-" voltage of a particular comparator is more positive then the bias voltage on the "+" input the output will go low and turn on the associated LED which is connected to the positive voltage.

    In general, when the "+" input of a comparator or op amp is more positive then the "-" input, the output will go positive and vice versa.
     
  3. richard6767

    Thread Starter New Member

    Dec 19, 2012
    4
    0
    I'm trying to make a table which shows when a comparitor sinks current (or is "ON"), thus drawing current to light up a LED.

    Here, I'm assuming that pin 6 (RHI) is at 1.25 volts, and that a current of 12.5mA flows from out of pin 4(RLO). Not sure how practical that assumption is.

    If that were the case, the following voltages would appear at the "+" inputs:

    Comparitor1:. 1.250V
    Comparitor2:. 1.125V
    Comparitor3:. 1.000V
    Comparitor4:. 0.875V
    Comparitor5:. 0.750V
    Comparitor6:. 0.626V
    Comparitor7:. 0.500V
    Comparitor8:. 0.375V
    Comparitor9:. 0.250V
    Comparitor10:0.125V

    Assuming input impedance of all "+" inputs is infinite.

    Let's say that our "-" input rises from OV.

    At 0V, no comparitor grounds it's ouput, because no comparitor's "-" input is above it's "+" input.

    When the "-" input rises to +0.125V, that equals "+" input on comparitor 10. But, that would not turn on comparitor 10. It's just equal and not more positive.

    When the input goes to 0.250V, comparitor10 then turns on -only.

    That would not make a 0-10V LED bar voltmeter arrangement. It fails to make a comparitor's output ground on the first 0.125V input increment.

    So, actually, we must, ensure that our "-" input starts above 0V, in order to make things work right. A sequence something like:0.1V - 0.225V - 0.350V etc.

    If that were true, then comparitor10 grounds on the first 0.125V voltage increment. Not the second.

    In the LM3914 case, "-" inputs have to be more positive than "+" inputs.

    Just bear with me, I'm eventually trying to figure out how to arrange things for any kind of voltage input.
     
    Last edited: Dec 19, 2012
  4. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,067
    3,837
    The resistor ladder works as you said. However, the 1.25V internal reference needs some external resistors to "program" the actual reference voltage. The "program" resistors work the same way as they would to set the voltage on a LM317 voltage regulator if you are familar with that.

    Figure 1 in the Texas Instruments datasheet for your device number explains a bit better...

    www.ti.com/lit/ds/symlink/lm3914.pdf

    Once you select the right resistor combination to make the reference = 10V, then you can apply your input signal to pin 5 and your comparitors will switch as expected based on the voltage of your input signal. The formula for calculating the value (or ratio of values) for your program resistors is at the bottom of figure 1 in the Texas Instruments datasheet.
     
  5. richard6767

    Thread Starter New Member

    Dec 19, 2012
    4
    0
    Okay thanks. I've just ordered a fairly old book Optoelectronics Circuits Manual, that has examples of how to program the IC. Got it cheap from Alibris.

    Reading that book will make things much clearer than the application note I think.

    Rich


     
  6. Dodgydave

    Distinguished Member

    Jun 22, 2012
    5,000
    745
    You can apply any voltage on pins 4(reflo) and pin 6(refhi) the comparators will divide this by 10 and will put each led on at that level of change,

    So for example Rlo is at 3v , and Rhi is at 10v, then difference is 7v so each led comes on at 700mV change, starting at 3.7v, then 4,4v etc..
     
  7. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    Actually when the voltage is at 0.125V the output may be high or low depending upon the offset of comparator 10. As soon as the voltage is slightly above the comparator's offset voltage (15mV maximum) comparator 10 will go low. Thus its output is guaranteed to go low at no higher then 0.140V.
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The comparators have very high gain. Ignoring the fact that the comparators may have input offset voltages of ±15mV, if 1.250V does not turn on the first LED, then 1.251V will turn it on.
     
  9. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,067
    3,837
    One more thing that is counter-intuitive about these chips is that the LED drivers are actually all HIGH when 0V is on the input signal. Notice that hte LEDs are pointing into the chip and the anode of the LED is connected to the V+. Therefore, the LED only lights when the comparitor is pulled LOW to allow current to flow from V+ rail to the LOW comparitor.
     
  10. richard6767

    Thread Starter New Member

    Dec 19, 2012
    4
    0
    Is the ouput of a comparitor a current sink?
     
  11. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,067
    3,837
    Yes. For an LED to light, that comparitor must be a current sink.

    When the input signal is SMALLER than a given point on the resistor ladder, that comparitor will be HI (LEDs not lighting because the anode of that comparitor is also at V+ rail).

    When the input signal is GREATER than a point on the resistor ladder, the comparitor will go low and sink current.
     
    Last edited: Dec 21, 2012
Loading...