Analyzing this circuit

Discussion in 'General Electronics Chat' started by jdavies, Oct 20, 2009.

  1. jdavies

    Thread Starter New Member

    Oct 7, 2009
    This circuit was provided by MikeML with input from SgtWookie. I have a couple of questions (well, plenty, but I'll start small) to help me understand exactly what the circuits are doing. The original thread can be found at

    To begin, R2 and R4 work together as a voltage divider to supply the "inverted signal" or probably more correctly named the "reference voltage". By my calculations, the reference voltage comes to ~ 0.009V into the op amp comparator.

    I believe that the role of R6 is simply there to reduce the current to the LED. Is that accurate?

    R1 and R3 look suspiciously like another voltage divider to me. However, the role of R5 confuses me. Do I calcuate the voltage going into the + side of the comparator using R1 and R3 only? Does R5 affect the voltage going into the + lead of the comparator?

    Finally, since I'm using the LM 339 for the op amps, just what is the voltage comparison tolerance? What I really mean to ask is, at what voltage difference does the op amp decide that one voltage is greater than the other? I'm reading the data sheet but the terminology is new to me. Terms like, "Low Input Offset Current: +/- 5nA TYP" have limited meaning to me. Does that mean that if the current difference is greater than 5nA that the op amp triggers?

    I feel pretty close to understanding how this circuit works, and therefore how to use these principles going forward. Thanks in advance for your help.
  2. SgtWookie


    Jul 17, 2007

    That's mostly what it does.
    They are!
    Yes, it does. It's there to add hysteresis.

    They aren't opamps, nor are they being used as opamps.
    They are comparators, being used as comparators.
    Square peg, square hole. ;)
    The comparators have pretty high gain; a minimum of 50v/mV, but typically 200v/mV. The hysteresis gives the transition a bit of a "snap"; sort of a Schmitt-trigger effect. This helps to reduce the likelihood of oscillations.

    Things that might throw it off are input offset current, amount of hysteresis, and tolerances in components used.

    Good :)