Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What simulation type to use in LTSPice to see a graph of varying OUTPUTS and not inputs

Status
Not open for further replies.

SuzanneOC

New Member
I need to model a simple circuit which has a fixed 3V input and a variable resistor. I want to model the varying outputs over time. What simulation type do I use?
DC operating point will only generate a numerical output.
DC sweep requires a changing input.
The others are for AC

I would appreciate some help with this.
 
hi S,
Do you have an example LTS asc file you could post.?

E
EDIT:
Do you mean like this image.?
 

Attachments

  • A01.gif
    A01.gif
    23.5 KB · Views: 331
Last edited:
If the resistor value is time-variant use a transient analysis.
 
It is called Transient Analysis, using a .TRAN directive.
Directly from the Help File:

.TRAN -- Perform a Nonlinear Transient Analysis

Perform a transient analysis. This is the most direct simulation of a circuit. It basically computes what happens when the circuit is powered up. Test signals are often applied as independent sources.

Syntax: .TRAN <Tstep> <Tstop> [Tstart [dTmax]] [modifiers]
.TRAN <Tstop> [modifiers]

The first form is the traditional .tran SPICE command. Tstep is the plotting increment for the waveforms but is also used as an initial step-size guess. LTspice uses waveform compression, so this parameter is of little value and can be omitted or set to zero. Tstop is the duration of the simulation. Transient analyses always start at time equal to zero. However, if Tstart is specified, the waveform data between zero and Tstart is not saved. This is a means of managing the size of waveform files by allowing startup transients to be ignored. The final parameter dTmax, is the maximum time step to take while integrating the circuit equations. If Tstart or dTmax is specified, Tstep must be specified.

Several can be placed on the .tran line.
 
alec_t
The resistor values change as moisture gathers on my sensor. I need to model the change in Voltage output as this occurs. My model shows 3 variable resistors as I have 3 moisture sensors.
 
hi S,
Your circuit will not work as you expect, there are many errors.

I assume your moisture sensors are probes placed in the soil.? and you require to measure/amplify a change in resistance of the sensors.??

E

EDIT:

Is this what you are trying to do.?
 

Attachments

  • A02.gif
    A02.gif
    28.9 KB · Views: 307
Last edited:
hi S,
Your circuit will not work as you expect, there are many errors.

I assume your moisture sensors are probes placed in the soil.? and you require to measure/amplify a change in resistance of the sensors.??

E
Hi Eric,

I have attached a photo of them. They are 3 interdigitated sensors on the back of a pcb board and form part of a larger circuit. The voltage follower exists in order to reduce the power consumption on the device. As moisture is added to these sensors the resistance decreases and I need to model the changing output voltage in direct response to the changing resistance. This is the circuit that was given to me by the designer, i had thought it would be reasonably straight forward to model.
 

Attachments

  • moisture sensors.jpg
    moisture sensors.jpg
    1,004.4 KB · Views: 279
hi S,
Is this what you are trying to do.?
I have assumed only one probe at this time, its resistance varying from close to zero to 10k.

Do you know the expected resistance range of your soil.?

E
Added 3 probe image.
 

Attachments

  • A02.gif
    A02.gif
    28.9 KB · Views: 294
  • A03.gif
    A03.gif
    29.2 KB · Views: 306
Last edited:
hi S,
Is this what you are trying to do.?
I have assumed only one probe at this time, its resistance varying from close to zero to 10k.

Do you know the expected resistance range of your soil.?

E
Hi Eric,

That looks like I expected to see.What simulation did you use?

My resistances will go from 1MEG to minimal resistance

In the circuit, you changed various resistance values from 1k to 10k and 2k,for instance. Unfortunately my circuit has been built and I have to use the resistor values of the actual resistors on my board.

Also can you tell me why you altered the voltage follower and took it to ground?
 
Last edited:
hi,
I use LTSpice as you do.
The soil sensor probe is a LTSpice 'potentiometer model'. Change the Rtot = 1meg wiper = PotSet.
Note: you cannot set a 0 [zero] step start use eg:Step param PotSet 0.001 1 0.1
Do you have that model on your LTS system.?

E
 
Hi MikeML

I didn't know how else to let you know about this because the original thread is locked but......

That is one of the TI encrypted models that works only with the TINA simulator which is nothing but a come on to buy this expensive third-party product. I detest TI for encrypting their models. I now go out of my way to avoid designing-in TI products into my consulting gigs. I bash TI about it every chance I get. The idiot at TI that come up with this should be fired...

The OPA625 model I discussed is not encrypted.

Recently, TI has decrypted a large number of their model files.

(sorry moderator)
 
Hi MikeML

I didn't know how else to let you know about this because the original thread is locked but......



The OPA625 model I discussed is not encrypted.

Recently, TI has decrypted a large number of their model files.

(sorry moderator)

Totally my fault Mike, i transgressed on another thread by asking a question. Didn't realise my mistake. Here is the thread where we can discuss my opamp issue
https://www.electro-tech-online.com...-file-opa694-lib-ltspice.146030/#post-1261612
 
hi,
I use LTSpice as you do.
The soil sensor probe is a LTSpice 'potentiometer model'. Change the Rtot = 1meg wiper = PotSet.
Note: you cannot set a 0 [zero] step start use eg:Step param PotSet 0.001 1 0.1
Do you have that model on your LTS system.?

E
What does the horizontal axis represent? Is the vertical axis representing the input voltage?
You appear to be doing a dc sweep from 0 to 3v but that is only modelling the output while the input is varying?
 
Last edited:
Hi

That thread is locked and doesn't accept any more posts.

Ok, I gather from the moderator that it is ok to answer it here as I opened this thread. My two issues are in relation to the same circuit anyway.

So eventhough the TI opa625 is not encrypted, then i still have the issue with the pins. I will try to edit the file as suggested by you previously.
 
Last edited:

Attachments

  • Potentiometer_test_step2.zip
    2.3 KB · Views: 249
hi S,
Unzip this pot.zip.
Place all its files within the same folder as you working asc files for this project.

I would recommend that you join the free Yahoo LTS user group.

E
Thank you Eric,

I have joined them and will open a post there too. I appreciate your effort in helping me.

Much appreciated.
 
Here is another way you can model a changing resistance. The sim runs for 10k simulated seconds. The X-axis represents a resistance change from 1Ω to 10.001kΩ.
ResistorVarying.PNG
 
And yet another way to simulate a variable resistor that doesn't require a pot.

It uses the Spice directive .step function to vary the resistance from 10 ohms to 1k ohms in 10 ohm steps (look in the Help file for .step).
(Note that R in the resistor definition must be enclosed with curly brackets).

The DC operating point simulation command then displays the output voltage versus the change in resistance.

Another advantage of this technique is that it directly plots the output voltage versus the resistance change.

upload_2016-4-22_9-34-19.png
 

Attachments

  • resistor model ltspice-forum.asc
    1.3 KB · Views: 259
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top