Comparators in Spice

I just cannot get any comparator to behave sensibly in Spice. For example, with the following, the output stays high regardless of the inputs. As configured, as far as I can see, the output should be negative, or zero, not high.

Am I having a senior moment?

Sylvia.

Version 4 SHEET 1 880 680 WIRE 304 32 -64 32 WIRE 336 32 304 32 WIRE 304 128 304 32 WIRE 336 128 336 32 WIRE 288 160 16 160 WIRE 528 176 368 176 WIRE -64 192 -64 32 WIRE 16 192 16 160 WIRE 288 192 80 192 WIRE 16 272 -64 272 WIRE 64 272 16 272 WIRE 80 272 64 272 WIRE 336 272 336 224 WIRE 336 272 80 272 WIRE -64 288 -64 272 WIRE 432 336 432 320 WIRE -64 400 -64 368 WIRE 304 400 304 224 WIRE 304 400 -64 400 FLAG 64 272 0 SYMBOL voltage 80 176 R0 WINDOW 3 90 19 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value 0.5 SYMBOL voltage 16 176 R0 WINDOW 3 156 -17 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V2 SYMATTR Value 1 SYMBOL voltage -64 176 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 SYMATTR InstName V3 SYMATTR Value 5 SYMBOL voltage -64 272 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 SYMATTR InstName V4 SYMATTR Value 5 SYMBOL Comparators\\LT1715 320 176 R0 SYMATTR InstName U1 TEXT -98 406 Left 2 !.tran 1

Reply to
Sylvia Else
Loading thread data ...

Looks like the output is at about 500mV. That's a low, in my book.

Jeroen Belleman

Reply to
Jeroen Belleman

Erm, no, I'm having my own senior moment. The output is near 150mV. Give meaningful names to some nodes. It helps to avoid confusion.

Jeroen Belleman

SHEET 1 880 680 WIRE 336 32 -64 32 WIRE 368 32 336 32 WIRE -64 64 -64 32 WIRE 336 80 336 32 WIRE 368 80 368 32 WIRE 320 112 16 112 WIRE 496 128 400 128 WIRE 528 128 496 128 WIRE 272 144 80 144 WIRE 320 144 272 144 WIRE 16 160 16 112 WIRE 80 160 80 144 WIRE -64 272 -64 144 WIRE 16 272 16 240 WIRE 16 272 -64 272 WIRE 80 272 80 240 WIRE 80 272 16 272 WIRE 368 272 368 176 WIRE 368 272 80 272 WIRE -64 304 -64 272 WIRE 80 320 80 272 WIRE 432 336 432 320 WIRE -64 400 -64 384 WIRE 336 400 336 176 WIRE 336 400 -64 400 FLAG 80 320 0 FLAG 496 128 out FLAG 272 144 inp SYMBOL voltage 80 144 R0 WINDOW 3 90 19 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR Value SINE(1 .5 2) SYMATTR InstName V1 SYMBOL voltage 16 144 R0 WINDOW 3 156 -17 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR Value 1 SYMATTR InstName V2 SYMBOL voltage -64 48 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 SYMATTR InstName V3 SYMATTR Value 5 SYMBOL voltage -64 288 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 SYMATTR InstName V4 SYMATTR Value 5 SYMBOL Comparators\\LT1715 352 128 R0 SYMATTR InstName U1 TEXT 104 424 Left 2 !.tran 1

Reply to
Jeroen Belleman

[snip]

Change .TRAN to .OP

You don't have anything moving for a .TRAN ...Jim Thompson

-- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson

Well, circuits are sensitive about their appearance and like to be drawn neatly:

Version 4 SHEET 1 880 680 WIRE 304 32 -64 32 WIRE 336 32 304 32 WIRE 304 128 304 32 WIRE 336 128 336 32 WIRE 112 160 16 160 WIRE 288 160 112 160 WIRE 480 176 368 176 WIRE 528 176 480 176 WIRE -64 192 -64 32 WIRE 16 192 16 160 WIRE 208 192 128 192 WIRE 288 192 208 192 WIRE 16 272 -64 272 WIRE 128 272 16 272 WIRE 336 272 336 224 WIRE 336 272 128 272 WIRE 432 272 336 272 WIRE -64 288 -64 272 WIRE 432 336 432 272 WIRE -64 400 -64 368 WIRE 304 400 304 224 WIRE 304 400 -64 400 FLAG 432 336 0 FLAG 208 192 IN FLAG 112 160 REF FLAG 480 176 OUT SYMBOL voltage 128 176 R0 WINDOW 3 -89 166 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 WINDOW 0 -13 130 Left 2 SYMATTR Value PULSE(0 2 0 500m) SYMATTR InstName V1 SYMBOL voltage 16 176 R0 WINDOW 3 -4 -41 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 WINDOW 0 -12 -71 Left 2 SYMATTR Value 1 SYMATTR InstName V2 SYMBOL voltage -64 176 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 WINDOW 0 -89 26 Left 2 WINDOW 3 -84 62 Left 2 SYMATTR InstName V3 SYMATTR Value 5 SYMBOL voltage -64 272 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 WINDOW 0 -83 41 Left 2 WINDOW 3 -77 74 Left 2 SYMATTR InstName V4 SYMATTR Value 5 SYMBOL Comparators\\LT1715 320 176 R0 WINDOW 0 54 -68 Left 2 WINDOW 3 35 -35 Left 2 SYMATTR InstName U1 TEXT 600 224 Left 2 !.tran 1 TEXT 504 64 Left 2 ;Sylvia_Comparator_1 TEXT 552 104 Left 2 ;JL Dec 15 2014

--

John Larkin         Highland Technology, Inc 
picosecond timing   laser drivers and controllers 

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

--- Prob'ly not...

I made your drawing a little easier to read gave you something to plot:

Version 4 SHEET 1 880 680 WIRE 304 96 -64 96 WIRE 336 96 304 96 WIRE 304 128 304 96 WIRE 336 128 336 96 WIRE 288 160 64 160 WIRE 448 176 368 176 WIRE 288 192 160 192 WIRE 336 240 336 224 WIRE -64 288 -64 96 WIRE 64 288 64 160 WIRE 160 288 160 192 WIRE 304 288 304 224 WIRE -64 416 -64 368 WIRE 64 416 64 368 WIRE 64 416 -64 416 WIRE 160 416 160 368 WIRE 160 416 64 416 WIRE 304 416 304 368 WIRE 304 416 160 416 WIRE -64 464 -64 416 FLAG -64 464 0 FLAG 336 240 0 FLAG 448 176 OUT SYMBOL voltage 160 272 R0 WINDOW 3 13 100 Invisible 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 WINDOW 0 18 105 Left 2 SYMATTR Value PULSE(.9 1.1 0 1u 1u 1ms 2ms) SYMATTR InstName V3 SYMBOL voltage -64 272 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 WINDOW 0 12 105 Left 2 WINDOW 3 15 5 Left 2 SYMATTR InstName V1 SYMATTR Value 5 SYMBOL voltage 304 384 R180 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 WINDOW 0 -43 7 Left 2 WINDOW 3 13 7 Left 2 SYMATTR InstName V4 SYMATTR Value 5 SYMBOL Comparators\\LT1715 320 176 R0 WINDOW 0 49 15 Left 2 WINDOW 3 25 40 Left 2 SYMATTR InstName U1 SYMBOL voltage 64 272 R0 WINDOW 3 13 4 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 WINDOW 0 13 104 Left 2 SYMATTR Value 1 SYMATTR InstName V2

John Fields

Reply to
John Fields

--
And yet... 

John Fields
Reply to
John Fields

Doesn't seem to make any difference. Anyway, this is just an example. My real circuit isn't so trivial.

Sylvia.

Reply to
Sylvia Else

I get 4.8V.

The plot thickens.

Sylvia.

Reply to
Sylvia Else

I downloaded a more recent version of LTSpice, and it seems OK now.

The version I had was from a year ago. I find it hard to believe that comparators didn't work in that version, but...

Thanks to those who took a look at it.

Sylvia.

Reply to
Sylvia Else

It ran just fine here. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Probably the model got changed... Mikey is always "updating". ...Jim Thompson

-- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson

If you expect the output to go below 0 then you need to connect the G (ground) pin to a - supply, not common. As it is, it does what it looks like it should.

Jamie

Reply to
Maynard A. Philbrook Jr.

That's kinda funny. You mean the LTSpice LTSpice plot or the sort of plot in a mystery?

Reply to
John S

FWIW Version 4.12u released on Oct 6, 2011 shows 145mV. Besides updating everything to the latest and greatest your download may have also overlaid corrupted software with a right proper image. As you say, it's hard to believe cooperators didn't work in your original version.

--
 ,-.                                 GIVE MORE expect less LOVE MORE 
 \_/                                 argue less LISTEN MORE talk less 
{|||)<   Don Kuenz                   LAUGH MORE complain less DREAM MORE 
 / \                                 doubt less HOPE MORE fear less 
 `-'                                 BREATHE MORE whine less
Reply to
Don Kuenz

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.