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
Comparators in Spice
Started by ●December 15, 2014
Reply by ●December 15, 20142014-12-15
On 2014-12-15 13:34, Sylvia Else wrote:> 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.> [circuit deleted] Looks like the output is at about 500mV. That's a low, in my book. Jeroen Belleman
Reply by ●December 15, 20142014-12-15
On 2014-12-15 14:35, Jeroen Belleman wrote:> On 2014-12-15 13:34, Sylvia Else wrote: >> 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. > > [circuit deleted] > > Looks like the output is at about 500mV. That's a low, > in my book. > > 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 by ●December 15, 20142014-12-15
On Mon, 15 Dec 2014 23:34:59 +1100, Sylvia Else <sylvia@not.at.this.address> wrote:>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. > >[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 http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
Reply by ●December 15, 20142014-12-15
On Mon, 15 Dec 2014 23:34:59 +1100, Sylvia Else <sylvia@not.at.this.address> wrote:>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. > >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 by ●December 15, 20142014-12-15
On Mon, 15 Dec 2014 23:34:59 +1100, Sylvia Else <sylvia@not.at.this.address> wrote:>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.--- 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 by ●December 15, 20142014-12-15
On Mon, 15 Dec 2014 08:00:39 -0800, John Larkin <jlarkin@highlandtechnology.com> wrote:>On Mon, 15 Dec 2014 23:34:59 +1100, Sylvia Else ><sylvia@not.at.this.address> wrote: > >>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. >> >> > >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--- And yet... John Fields
Reply by ●December 15, 20142014-12-15
On 16/12/2014 2:32 AM, Jim Thompson wrote:> On Mon, 15 Dec 2014 23:34:59 +1100, Sylvia Else > <sylvia@not.at.this.address> wrote: > >> 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. >> >> > [snip] > > Change .TRAN to .OP > > You don't have anything moving for a .TRANDoesn't seem to make any difference. Anyway, this is just an example. My real circuit isn't so trivial. Sylvia.
Reply by ●December 15, 20142014-12-15
On 16/12/2014 12:54 AM, Jeroen Belleman wrote:> On 2014-12-15 14:35, Jeroen Belleman wrote: >> On 2014-12-15 13:34, Sylvia Else wrote: >>> 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. >> > [circuit deleted] >> >> Looks like the output is at about 500mV. That's a low, >> in my book. >> >> 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.I get 4.8V. The plot thickens. Sylvia.
Reply by ●December 15, 20142014-12-15