1
\$\begingroup\$

I'm trying to use the LM219 (equivalently LM119 or LM319) comparator in a project I am working on (I chose this over other comparators because it has a fast response time for the desired supply voltages). I am using supply voltages of +-12 volts, and I am generating a square wave output from a triangle wave input (+1 to -1) and DC bias (for duty cycle control). Essentially if the difference in the inputs are greater than 0, it should rail to +12, and rail to -12 otherwise.

However, all of the datasheets for the LM219 I have looked at don't have a simple comparator application circuit (all typical application circuits don't intuitively explain how the comparator works), and I don't completely understand how to wire it up. How does the part decide whether to rail to +12 or -12 based on the connections? Would the circuit below suffice for my application? enter image description here

A related question, all SPICE models for the part I found online don't seem to work well. Who can I contact to find a SPICE or TINA-TI model for this part?

\$\endgroup\$
1
\$\begingroup\$

The LMx19 has an open-collector output. If you look at Fig 6.1 - Functional Block Diagram in the TI datasheet, you will see that the output transistor can only pull the output towards Ground when Low, and lets the output float when not Low. It cannot drive the output to either supply (well, if V- is tied to Ground it can drive the output to V-/Ground).

\$\endgroup\$
2
  • \$\begingroup\$ I see, so if I connected the GND pin to V- and connected V+ to the output via a pullup resistor, would that result in the desired behavior of driving the output to the supply rails? \$\endgroup\$ – mmanohara Jun 3 '20 at 1:34
  • \$\begingroup\$ Yes, that should do it. By the way, most analog comparators have an open-collector output. \$\endgroup\$ – Peter Bennett Jun 3 '20 at 3:22
1
\$\begingroup\$

The LM219 circuit has these building blocks:

  • input bipolar differential pair Q1/Q2, with gain resistors R2/R3 and a shared resistor R1 to position the amplified output voltage(s) at a level to avoid upsetting the amplification of the next stage, which is driven from the emitter-followers Q3/Q4 into

  • 2nd gain stage Q6/7 with emitter-follower buffers 8/9

  • level translator (actual matched current sources, the current set by R11 / R12), into

  • current_mirror Q10/11/12 that converts the currents into voltages

  • positive_feedback output driver, controlled by collector of Q12

  • Bias generator to set the 2 tail currents for the two differential_amplifier gain stages: Q2, Q21 for tail currents, and Q 20/19/18 in the bias circuit, using R9 (18,000 ohms) to start up the bias operation.

Notice "Q2" is redundant part designator.

\$\endgroup\$
0
\$\begingroup\$

Here is the basic comparator function operating as a PWM modulator.

enter image description here

The LM119/UK model is in the /EXTRA/ExtraComparators folder of LTspiceIV.

In this case the timebase sawtooth is applied to the inverting input and the input signal is applied to the non-inverting input, so that a more positive input signal results in more "on" time.

\$\endgroup\$
4
  • \$\begingroup\$ Thank you for pointing this out! \$\endgroup\$ – mmanohara Jun 3 '20 at 2:21
  • \$\begingroup\$ Even for LTspice this looks like a Frankensteinian schematic. :-) \$\endgroup\$ – a concerned citizen Jun 3 '20 at 6:24
  • \$\begingroup\$ @aconcernedcitizen It brings to mind the skilled medical practitioner who brought inert components to life? \$\endgroup\$ – Spehro Pefhany Jun 3 '20 at 21:47
  • \$\begingroup\$ More or less, yes... more or less. :-) \$\endgroup\$ – a concerned citizen Jun 4 '20 at 6:33
0
\$\begingroup\$

The basic problem here seems to me is a basic understanding of the Analog Comparator IC such as the bipolar LM319 family. It is an analog to digital conversion meaning if +Vin < -Vin the output switches to Logic "0" otherwise open circuit.

The reason that it has an open-collector output and why it fails without a pullup resistor is that the voltage for the logic level output is often much lower than the analog bipolar supply voltages. So you need the pullup R to define the logic "1" level instead of the "open circuit".

There are simply 2 basic types of output drivers, namely;

  • Push-Pull, ( Totem Pole and Complementary driver switches)
  • Open Collector/Drain (Pull only or switch to 0V = ground.).

There are literally dozens of different logic families now with from old high-speed ECL, PECL to TTL to CMOS, CML, LV CMOS, ALV CMOS, etc. each with different tradeoffs for; voltage, power & speed. If you look at Digikey's search engine for Analog Comparators, you will find just as many output types.

It helps if you master studying basic transistor design 1st then learn to read schematics focusing on what you recognize at the inputs and output.

The biggest help in finding answers quickly (in any subject) is knowing the best keywords. In this case "analog comparator" or in a full sentence, which doesn't really matter by asking "how does an "analog comparator" work? You often get the answer the first time. If not make add more keywords and subtract with a hyphen in front like "-digital".

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.