Voltage Comparator

In electronics, a comparator is a device which compares two voltages or currents and switches its output to indicate which is larger. More generally, the term is also used to refer to a device that compares two items of data. Output voltage will “switch” whenever the input voltage (at the inverting input) reaches the reference voltage Vref (at the non-inverting input). It is very useful for comparing signals and working with sensors

Simple comparator shown below:

comparator Voltage Comparator

Note that R2 and R1 form a voltage divider. Use a potentiometer in place of R2 for an adjustable reference voltage.

Comparator cicuits can be built with opamps, but there are also comparator ICs with large slew rates and short propagation delays – good for high speed switching.

A dedicated voltage comparator will generally be faster than a general-purpose op-amp pressed into service as a comparator. A dedicated voltage comparator may also contain additional features such as an accurate, internal voltage reference, an adjustable hysteresis and a clock gated input.

Input voltage range
The input voltages must not exceed the power voltage range: VS- ? V+,V- ? VS+.

In the case of TTL/CMOS logic output comparators negative inputs are not allowed: 0 ? V+,V- ? Vcc.

Op-Amp implementation of voltage comparator
A standard op-amp operating without negative feedback can be used as a comparator. When the non-inverting input (V+) is at a higher voltage than the inverting input (V-), the high gain of the op-amp causes it to output the most positive voltage it can. When the non-inverting input (V+) drops below the inverting input (V-), the op-amp outputs the most negative voltage it can. Since the output voltage is limited by the supply voltage, for an op-amp that uses a balanced, split supply, (powered by ± VS) this action can be written:

Vout = VS sgn(V+ ? V?)

where sgn(x) is the signum function. Generally, the positive and negative supplies VS will not match absolute value:

Vout <= VS+ when (V+ > V-) else VS- when (V+ < V-).

Equality of input values is very difficult to achieve in practice. The speed at which the change in output results from a change in input (often called the slew rate in operational amplifiers) is typically in the order of 10ns to 100ns, but can be as slow as a few tens of ?s.

Dedicated voltage comparator chips
A dedicated voltage comparator chip, such as the LM339, is designed to interface directly to digital logic (for example TTL or CMOS). The output is a binary state, and it is often used to interface real world signals to digital circuitry (see analog to digital converter). If one of the voltages is fixed, for example because a DC adjustment is possible in a device earlier in the signal path, a comparator is just a cascade of amplifiers. When the voltage is nearly equal the output voltage would not fall into one of the logic levels, thus analog signals would enter the digital domain with unpredictable results. To make this range as small as possible the cascade is long and high gain, that is bipolar transistors instead of field effect transistors are used, except sometimes for the first stage. For high speed the input impedance of the stages is made low. This already reduces the saturation of the slow, large P-N junction of the bipolar transistors, which would otherwise lead to long recovery times. Fast that is small Schottky diodes as in binary logic are applied to improve matters even further. Also like in binary logic the speed is not as high as if the amplifiers would be used for analog signals. Slew rate has no meaning for these devices. For the application in flash ADCs after each amplifier the signal can be fanned out over 8 ports matched to the voltage and current gain and resistors are used as level-shifters.

The LM339 accomplishes this with an open collector output. When the inverting input is at a higher voltage than the non inverting input, the output of the comparator is connected to the negative power supply. When the non inverting input is higher than the inverting input, the output is floating (has a very high impedance to ground).

With a pull-up resistor and a 0 to +5V power supply, the output takes on the voltages 0 or +5 and can be interfaced to TTL logic:

Vout <= Vcc when (V+ > V-) else 0.

en.wikipedia.org

Robotics is the branch of technology that deals with the design, construction, operation, structural disposition, manufacture and application of robots. Robotics is related to the sciences of electronics, engineering, mechanics mechatronics, and software
  Title :   Voltage Comparator
  Category :   Electronics, Robotics Tutorial.
  Tags :   comparator,  comparator tutorial,  Electronics,  lm339 circuits,  voltage comparator,  voltage comparator circuit,  voltage comparator schematic,  voltage comparator tutorial,  why not just use comparator instead of opamp, 
Robotics Short Story

The word robotics was derived from the word robot, which was introduced to the public by Czech writer Karel Čapek in his play R.U.R. (Rossum's Universal Robots), which premiered in 1921.

According to the Oxford English Dictionary, the word robotics was first used in print by Isaac Asimov, in his science fiction short story "Liar!", published in May 1941 in Astounding Science Fiction. Asimov was unaware that he was coining the term; since the science and technology of electrical devices is electronics, he assumed robotics already referred to the science and technology of robots. In some of Asimov's other works, he states that the first use of the word robotics was in his short story Runaround (Astounding Science Fiction, March 1942). However, the word robotics appears in "Liar!"

Posts related to Voltage Comparator:


Comments

3 Responses to “Voltage Comparator”
  1. bhuvi says:

    how to regulate capacitor voltage using comparator

  2. mm says:

    please inform how i will use the lm339 ic in a/d converter.

  3. Negash says:

    I trying to use LM339 as voltage comparator. but i can’t understand the operation &calculation of feedback, pull-up (load )resistor please tell me how it can.


Do you have any comments on Voltage Comparator ?