Author Topic: LTSpice simulation  (Read 2390 times)

0 Members and 1 Guest are viewing this topic.

Offline aparlettTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
LTSpice simulation
« on: December 26, 2017, 10:13:42 pm »
Hello everyone,

I have finally landing a design roll, after 3 years of working in maintenance. I'm trying to get back into it all however I have found myself getting stuck on a simulation. I'm trying to  compare a sine wave to a voltage signal and every time the signal is above 5V it should out put 5V signal. which works when tested separately but when its connected to a LTC6994-1 it wont play nice, I have added the two circuits that I simulated its something simple but I cant figure for the life in me what it is.

Any help would be great.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17807
  • Country: fr
Re: LTSpice simulation
« Reply #1 on: December 27, 2017, 12:01:42 am »
Hi,

the problem is with the simulation of the AD8034 opamp. With my LTSpice version (latest), none of your circuits give a proper output for this opamp.

If your replace it with the LT1721 comparator for instance, it works fine.
Another way of making this simulation work is to power the AD8034 with a dual supply (+/-5V for instance) instead of single, or offset the input signal so that it nevers goes negative.

Why? There is an issue with your design which explains the simulation problem.
Your sine input signal is symmetrical (+/-1V peak-to-peak), whereas your opamp-based comparator is powered with a single supply. When the input signal goes below ground, past the Vf of the input clamp diode of the opamp (around -0.6V most likely), this diode will conduct and that's not good at all. You may end-up destroying your opamp and/or the stage which is driving the positive input if it can provide enough current.

In simulation, the spice model of the AD8034 doesn't seem to like that very much, whereas the LT1721's doesn't mind. Anyway, you have to consider using an input signal that doesn't get below ground, either by design or by shifting it, or use a dual supply. Another cheap solution if you can't afford that is to add a series resistor just before the positive input of the opamp (which btw is suggested in the AD8034 datasheet: "If the inputs are driven well beyond the rails, series input resistance should be included  to limit the input bias current to <10 mA.")

In your simulation circuit, adding a 1k resistor between the sine source voltage and the positive input of the opamp is enough to make the simulation work, and most importantly, make it safe in real life.

NB: The AD8034 model in LTSpice seems definitely "temperamental" when on a single supply. On some runs, it worked properly with the series resistor, and on others, it would get stuck. The AD8031 works properly (and many others). Not sure if this is a problem with the model itself or with LTSpice, or a combination of both. From experience, I can just tell you that some spice models of opamps don't behave properly on single supplies even if the opamp itself is designed for it.


« Last Edit: December 27, 2017, 12:31:18 am by SiliconWizard »
 

Offline aparlettTopic starter

  • Regular Contributor
  • *
  • Posts: 57
  • Country: au
Re: LTSpice simulation
« Reply #2 on: December 27, 2017, 03:53:45 am »
Thanks  so much for  the detailed answer I will need to go over all my analogue circuit theory.

Using the LT1721 worked the two parts of the circuits now talk together.

The circuit will delay the first pulse however it will not delay any of the other pulses. Looking at the waveforms I suspect that its due to the fact that the output of the comparator is not reaching zero. Is this the cases or is there something else I'm missing?

Thanks in advanced.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17807
  • Country: fr
Re: LTSpice simulation
« Reply #3 on: December 27, 2017, 02:13:21 pm »
No, according to LTC6994's datasheet, you should be fine (see p. 4 for input levels).

This has to do with the programming resistors R1, R2, R3, I think. Try 280k for R2 for instance or lower R1, and you'll see all pulses on the output. I must admit that the datasheet is not quite limpid at first glance, so you may have to re-read it several times and play with values to really get it. It's a bit confusing.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->