Electronic – Hysteresis on LTspice with thermistor

hysteresisltspicestep

I'm trying to simulate an hysteresis on LTspice. The goal is just to see how evolve the output voltage in function of the value of the thermistor. For this, I have done a simulation with several steps. Each step corresponds to a temperature and as the thermistor evolves in function of the temperature, the non inverting input voltage of the op amp varies in function of the actual step.

Here is the simulation :

Hysteresis

My problem is that I am not able to see the hysteresis as the output voltage does not depend on the previous step. So I am always beginning the hysteresis in the same way. The ouput voltage is always the same at the beginning of a step. I would like to define the output voltage in function if the temperature goes up or if the temperature goes down. In other word if the non inverting input voltage goes up or goes down.

Thank you very much and have a nice day.

Best Answer

Instead of making the resistance a function of temperature you will need to make it a function of time, and then assume that the temperature changes with some known relationship to time. Then you will be able to see the hysteresis in a single transient simulation.