LTSpice - Am I blind?

Jan 02, 2024 Last reply: 2 years ago 6 Replies

Got it installed with wine here on my PC. Fonts are a bit wonky, but that happens from time to time, so not going to really bother with it.



Took things for a spin by trying to build your basic low-pass filter as one might see on a momentary-contact button (etc.).



Thing is, I wasn't seeing any "switch" or "button" type symbols -- am I just blind, and missed them somewhere in the myriad of semi-cryptic parts, or is it just that they happen to not be modeled in the base product?


There's a voltage-controlled switch SW. Ask HELP to search for 'switch'.

S is in the index too.

In the component selector, search for SW. It needs a .model statement.

Use a voltage source to switch it.

Or just poke a voltage source into your filter. Or use a voltage source and a mosfet.

Yeah, I saw that. I was looking for "generic bogus button" type "switch" (not that sw or csw wouldn't work). I'll probably just work-around it by inserting one of the variable voltage sources I noticed (IIRC, one said it'd do square wave, I think).

Yeah, the V voltage source (in "advanced" mode) has a pulse generator mode.

I usually specify a rise and fall time. LT is a little weird if you use defaults.

Note that if Tr=Tf=Ton=1, it's above zero for 3 seconds. Ton is the flat part.

Sometimes it's handy to use a sine wave source and square it up with a comparator. That makes square waves easier.

An e with a tanh function makes a nice comparator.

Yes, I'm starting to notice that :)

Thanks (and for the hint about comparators). Lots to learn here :)

The standard ltspice switch has a nice infinitely-differentiable characteristic if you specify a negative hysteresis value. It’s an arctan rather than tanh, but it works just as well.

Cheers

Phil Hobbs

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required