Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

strange LT Spice s/h behavior

61 views
Skip to first unread message

John Larkin

unread,
Aug 12, 2022, 3:48:18 PM8/12/22
to
I figured that I could bootstrap an LT Spice sample/hold to make a
stairstep waveform.

Without the RC, the output jumps to +10 volts at the first clock edge.
And the RC has to be right to get a proper stairstep.



Version 4
SHEET 1 880 680
WIRE 144 -128 32 -128
WIRE 240 -128 144 -128
WIRE 448 -128 320 -128
WIRE 144 -80 144 -128
WIRE 448 0 448 -128
WIRE 144 16 144 -16
WIRE 32 96 32 -128
WIRE 192 96 32 96
WIRE 192 128 32 128
WIRE 448 144 448 80
WIRE 448 144 368 144
WIRE 576 144 448 144
WIRE 32 160 32 128
WIRE 192 160 96 160
WIRE 96 208 96 160
WIRE 96 320 96 288
FLAG 96 320 0
FLAG 32 160 0
FLAG 144 16 0
SYMBOL SpecialFunctions\\sample 272 128 R0
WINDOW 0 -16 -113 Left 2
WINDOW 3 -56 -83 Left 2
SYMATTR InstName A1
SYMATTR Value ROUT=1m
SYMBOL voltage 96 192 R0
WINDOW 0 48 76 Left 2
WINDOW 3 21 110 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value PULSE(0 1 10u 1n 1n 500n 1u 1e6)
SYMBOL voltage 448 -16 R0
WINDOW 0 57 42 Left 2
WINDOW 3 49 76 Left 2
SYMATTR InstName V2
SYMATTR Value 500m
SYMBOL res 336 -144 R90
WINDOW 0 77 55 VBottom 2
WINDOW 3 85 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 1k
SYMBOL cap 128 -80 R0
WINDOW 0 -56 19 Left 2
WINDOW 3 -59 49 Left 2
SYMATTR InstName C1
SYMATTR Value 10p
TEXT -200 112 Left 2 !.tran 100u
TEXT -216 8 Left 2 ;S/H Stairstep
TEXT -224 56 Left 2 ;JL Aug 12 2022


--

John Larkin Highland Technology, Inc trk

The cork popped merrily, and Lord Peter rose to his feet.
"Bunter", he said, "I give you a toast. The triumph of Instinct over Reason"

Phil Hobbs

unread,
Aug 12, 2022, 4:05:56 PM8/12/22
to
John Larkin wrote:
> I figured that I could bootstrap an LT Spice sample/hold to make a
> stairstep waveform.
>
> Without the RC, the output jumps to +10 volts at the first clock edge.
> And the RC has to be right to get a proper stairstep.
>

Didn't try it out, but did you use the vanilla trap solver or the tricky
one?

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC / Hobbs ElectroOptics
Optics, Electro-optics, Photonics, Analog Electronics
Briarcliff Manor NY 10510

http://electrooptical.net
http://hobbs-eo.com

John Larkin

unread,
Aug 12, 2022, 4:16:23 PM8/12/22
to
On Fri, 12 Aug 2022 16:05:46 -0400, Phil Hobbs
<pcdhSpamM...@electrooptical.net> wrote:

>John Larkin wrote:
>> I figured that I could bootstrap an LT Spice sample/hold to make a
>> stairstep waveform.
>>
>> Without the RC, the output jumps to +10 volts at the first clock edge.
>> And the RC has to be right to get a proper stairstep.
>>
>
>Didn't try it out, but did you use the vanilla trap solver or the tricky
>one?
>
>Cheers
>
>Phil Hobbs

Mod trap, alternate. I'll try something else.

John Larkin

unread,
Aug 12, 2022, 4:21:45 PM8/12/22
to
Control panel, spice, reset to default (mod trap, normal solver) it
behaves the same.

legg

unread,
Aug 12, 2022, 8:27:27 PM8/12/22
to
On Fri, 12 Aug 2022 12:47:59 -0700, John Larkin
<jjla...@highlandtechnology.com> wrote:

>I figured that I could bootstrap an LT Spice sample/hold to make a
>stairstep waveform.
>
>Without the RC, the output jumps to +10 volts at the first clock edge.
>And the RC has to be right to get a proper stairstep.
>

So it works with the RC - suggests a linear condition is
permitted at the sampling time. Perhaps the internal
gates aren't timed to prevent signal shoot-through.

RL

John Larkin

unread,
Aug 12, 2022, 9:41:49 PM8/12/22
to
I can't understand it. Even 1K and 1 fF allows it to make a staircase.
But 1K and 0 fF doesn't.

Obviously something is goofy inside the s/h model, but I wouldn't know
how to accomplish that.

I can do what I want to do, by adding an RC, but I don't understand
it.

John Larkin

unread,
Aug 13, 2022, 12:19:26 AM8/13/22
to
On Fri, 12 Aug 2022 12:47:59 -0700, John Larkin
<jjla...@highlandtechnology.com> wrote:

Even the RC is dicey. The best thing is to add a delay line at the s/h
input.

legg

unread,
Aug 13, 2022, 9:34:21 AM8/13/22
to
On Fri, 12 Aug 2022 18:41:32 -0700, John Larkin
<jjla...@highlandtechnology.com> wrote:

>On Fri, 12 Aug 2022 20:28:14 -0400, legg <le...@nospam.magma.ca> wrote:
>
>>On Fri, 12 Aug 2022 12:47:59 -0700, John Larkin
>><jjla...@highlandtechnology.com> wrote:
>>
>>>I figured that I could bootstrap an LT Spice sample/hold to make a
>>>stairstep waveform.
>>>
>>>Without the RC, the output jumps to +10 volts at the first clock edge.
>>>And the RC has to be right to get a proper stairstep.
>>>
>>
>>So it works with the RC - suggests a linear condition is
>>permitted at the sampling time. Perhaps the internal
>>gates aren't timed to prevent signal shoot-through.
>>
>>RL
>
>I can't understand it. Even 1K and 1 fF allows it to make a staircase.
>But 1K and 0 fF doesn't.
>
>Obviously something is goofy inside the s/h model, but I wouldn't know
>how to accomplish that.
>
>I can do what I want to do, by adding an RC, but I don't understand
>it.

Stick 50R in series with the SH inputs and look at the voltages on
each side of the resistor. This shouldn't normally 'break' a S/H,
should it?

RL

legg

unread,
Aug 13, 2022, 9:43:30 AM8/13/22
to
On Fri, 12 Aug 2022 18:41:32 -0700, John Larkin
<jjla...@highlandtechnology.com> wrote:

>On Fri, 12 Aug 2022 20:28:14 -0400, legg <le...@nospam.magma.ca> wrote:
>
>>On Fri, 12 Aug 2022 12:47:59 -0700, John Larkin
>><jjla...@highlandtechnology.com> wrote:
>>
>>>I figured that I could bootstrap an LT Spice sample/hold to make a
>>>stairstep waveform.
>>>
>>>Without the RC, the output jumps to +10 volts at the first clock edge.
>>>And the RC has to be right to get a proper stairstep.
>>>
>>
>>So it works with the RC - suggests a linear condition is
>>permitted at the sampling time. Perhaps the internal
>>gates aren't timed to prevent signal shoot-through.
>>
>>RL
>
>I can't understand it. Even 1K and 1 fF allows it to make a staircase.
>But 1K and 0 fF doesn't.
>
>Obviously something is goofy inside the s/h model, but I wouldn't know
>how to accomplish that.
>
>I can do what I want to do, by adding an RC, but I don't understand
>it.

The S/H input has no current flow.

Perhaps the modeler forgot a default zin.

RL

legg

unread,
Aug 13, 2022, 10:06:31 AM8/13/22
to
On Fri, 12 Aug 2022 18:41:32 -0700, John Larkin
<jjla...@highlandtechnology.com> wrote:

>On Fri, 12 Aug 2022 20:28:14 -0400, legg <le...@nospam.magma.ca> wrote:
>
>>On Fri, 12 Aug 2022 12:47:59 -0700, John Larkin
>><jjla...@highlandtechnology.com> wrote:
>>
>>>I figured that I could bootstrap an LT Spice sample/hold to make a
>>>stairstep waveform.
>>>
>>>Without the RC, the output jumps to +10 volts at the first clock edge.
>>>And the RC has to be right to get a proper stairstep.
>>>
>>
>>So it works with the RC - suggests a linear condition is
>>permitted at the sampling time. Perhaps the internal
>>gates aren't timed to prevent signal shoot-through.
>>
>>RL
>
>I can't understand it. Even 1K and 1 fF allows it to make a staircase.
>But 1K and 0 fF doesn't.
>
>Obviously something is goofy inside the s/h model, but I wouldn't know
>how to accomplish that.
>
>I can do what I want to do, by adding an RC, but I don't understand
>it.

In a sim where the staircase ends prematurely (C1<=1f), C1 has no
current during the final, out-sized signal rise, though it shows
well defined values in previous 'normal' steps.

RL

legg

unread,
Aug 15, 2022, 11:16:14 AM8/15/22
to
On Fri, 12 Aug 2022 21:19:06 -0700, John Larkin
<jjla...@highlandtechnology.com> wrote:

>On Fri, 12 Aug 2022 12:47:59 -0700, John Larkin
><jjla...@highlandtechnology.com> wrote:
>
>>I figured that I could bootstrap an LT Spice sample/hold to make a
>>stairstep waveform.
>>
>>Without the RC, the output jumps to +10 volts at the first clock edge.
>>And the RC has to be right to get a proper stairstep.
>>
<snip>
>>TEXT -216 8 Left 2 ;S/H Stairstep
>>TEXT -224 56 Left 2 ;JL Aug 12 2022
>
>Even the RC is dicey. The best thing is to add a delay line at the s/h
>input.

LTspice group on io says the sample is instantaneous without internal
delays - that direct gain is possible. Uncommented defaulkt output Z
is iK. A Td statement will have no effect.

Says not to worry - you can't buy one of these anyways.

RL

jla...@highlandsniptechnology.com

unread,
Aug 15, 2022, 12:14:56 PM8/15/22
to
It's still very weird.

>
>Says not to worry - you can't buy one of these anyways.
>
>RL

A few people used to make analog s/h chips, but I think they are gone.

John Larkin

unread,
Aug 15, 2022, 6:01:14 PM8/15/22
to

legg

unread,
Aug 16, 2022, 10:16:42 AM8/16/22
to
The 'sample' subcircuit is not a model of any of these
parts, hence the purchasing non-information.

RL
0 new messages