Author Topic: LTspice Schmitt-Trigger spikes  (Read 5029 times)

0 Members and 1 Guest are viewing this topic.

Offline DetziTopic starter

  • Regular Contributor
  • *
  • Posts: 60
  • Country: de
LTspice Schmitt-Trigger spikes
« on: January 02, 2018, 02:58:13 pm »
Hi there,
i created a 3rd Order Low Pass Elliptic Filter and attached an Schmitt-Trigger behind. On the Output i can see some huge spikes. :wtf: Does someone know why and where these come from?
Thanks in advance!
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: LTspice Schmitt-Trigger spikes
« Reply #1 on: January 02, 2018, 05:07:01 pm »
Obviously the spikes are produced by the No-name Schmitt Trigger that has no power supply to clamp its output level.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21701
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: LTspice Schmitt-Trigger spikes
« Reply #2 on: January 02, 2018, 05:25:21 pm »
SPICE mixed signal simulation is notoriously bad.  Here's an example from Altium:



The best solution is to use an analog (transistor level simulation or behavioral equivalent) model, but this does slow down the simulation a bit, and is impractical with more than a few gates.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Detzi

Offline DetziTopic starter

  • Regular Contributor
  • *
  • Posts: 60
  • Country: de
Re: LTspice Schmitt-Trigger spikes
« Reply #3 on: January 02, 2018, 05:51:59 pm »
Obviously the spikes are produced by the No-name Schmitt Trigger that has no power supply to clamp its output level.
Obviously you are wrong, the ''No-name Schmitt Trigger''  is a universal with LTspice supplied model which gets configured and its ''Power constaints'' through the spice lines. Which are for this reason visible in my picture above (see ''SpiceLine'' and ''SpiceLine2'') .

SPICE mixed signal simulation is notoriously bad.  Here's an example from Altium:

...

The best solution is to use an analog (transistor level simulation or behavioral equivalent) model, but this does slow down the simulation a bit, and is impractical with more than a few gates.

Tim

Thanks man, so i do not have to worry then. Also good to know that Altium does it too :)
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19537
  • Country: gb
  • 0999
Re: LTspice Schmitt-Trigger spikes
« Reply #4 on: January 02, 2018, 06:43:28 pm »
You could try using the 555 timer model for the schmitt trigger, but it's inverting, so you'd need two in series, if that's an issue.
 
The following users thanked this post: Detzi

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: LTspice Schmitt-Trigger spikes
« Reply #5 on: January 03, 2018, 12:53:51 am »
My old version of LT doesn't show it.

Setting the 'Max Timestep' in 'Edit Simulation Cmd.' to about 25n should fix it.
.  That took much longer than I thought it would.
 
The following users thanked this post: Detzi

Offline DetziTopic starter

  • Regular Contributor
  • *
  • Posts: 60
  • Country: de
Re: LTspice Schmitt-Trigger spikes
« Reply #6 on: January 03, 2018, 07:22:43 am »
You could try using the 555 timer model for the schmitt trigger, but it's inverting, so you'd need two in series, if that's an issue.
The good old 555  :) little that can't be done with it.

My old version of LT doesn't show it.

Setting the 'Max Timestep' in 'Edit Simulation Cmd.' to about 25n should fix it.

That really did fix it. Thanks for your input. Strange that the problem is a too large timestep value, choosen by the solver. I would not have expect that. Changing the default integration method to ''Gear'' does also fixes it, no need for a min timestep there.


« Last Edit: January 03, 2018, 07:28:23 am by Detzi »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf