Forums

Basic LTSpice question

Started by Aussie May 17, 2017
On 18-May-17 12:14 PM, Aussie wrote:
> On 18-May-17 10:47 AM, rickman wrote: >> On 5/17/2017 9:47 PM, Aussie wrote: > >>> >>> I was playing around trying to simulate the effect of temp on an op amp >>> circuits Vio. >>> >>> Is there a way to add temp dependency to a voltage source? >>> Then I could try putting that voltage source in series with say the +ve >>> input to the op amp and simulate it that way. >>> >>> Maybe that would save me from getting in over my head poking around in >>> the model definitions. >> >> If I'm not mistaken, there is a programmable voltage source component. >> You can drive that with the same parameter you are using to se the >> temperature and adjust the output to a voltage as you see fit. I >> haven't done this myself, so I don't recall which component would do >> this. It might be the voltage controlled voltage source. Or there >> might be a voltage source directly controlled by a parameter. >> > > Thanks Rick. I think I've found the voltage source but I'm not sure how > to set it up. > > It gives you the option to enter a function, but it does not like the > syntax. > > > http://imgur.com/a/Edn0o > > I'm trying to add a voltage source with a slope of 5uV/°C > > > > > There are a few other configurable voltage sources but none appeared to > have a temperature parameter. >
Scratch that last post - I'm a fool. Too long since school................. I tried V=F(0.000005*(temp-25)) Obviously I should have put; V=0.000005*(temp-25)
On 5/18/2017 12:14 AM, Aussie wrote:
> On 18-May-17 10:47 AM, rickman wrote: >> On 5/17/2017 9:47 PM, Aussie wrote: > >>> >>> I was playing around trying to simulate the effect of temp on an op amp >>> circuits Vio. >>> >>> Is there a way to add temp dependency to a voltage source? >>> Then I could try putting that voltage source in series with say the +ve >>> input to the op amp and simulate it that way. >>> >>> Maybe that would save me from getting in over my head poking around in >>> the model definitions. >> >> If I'm not mistaken, there is a programmable voltage source component. >> You can drive that with the same parameter you are using to se the >> temperature and adjust the output to a voltage as you see fit. I >> haven't done this myself, so I don't recall which component would do >> this. It might be the voltage controlled voltage source. Or there >> might be a voltage source directly controlled by a parameter. >> > > Thanks Rick. I think I've found the voltage source but I'm not sure how > to set it up. > > It gives you the option to enter a function, but it does not like the > syntax. > > > http://imgur.com/a/Edn0o > > I'm trying to add a voltage source with a slope of 5uV/°C > > > > > There are a few other configurable voltage sources but none appeared to > have a temperature parameter.
I think you should remove the F() notation. Try just V=0.000005*(temp-25) -- Rick C
On 5/18/2017 12:18 AM, Aussie wrote:
> On 18-May-17 12:14 PM, Aussie wrote: >> On 18-May-17 10:47 AM, rickman wrote: >>> On 5/17/2017 9:47 PM, Aussie wrote: >> >>>> >>>> I was playing around trying to simulate the effect of temp on an op amp >>>> circuits Vio. >>>> >>>> Is there a way to add temp dependency to a voltage source? >>>> Then I could try putting that voltage source in series with say the +ve >>>> input to the op amp and simulate it that way. >>>> >>>> Maybe that would save me from getting in over my head poking around in >>>> the model definitions. >>> >>> If I'm not mistaken, there is a programmable voltage source >>> component. You can drive that with the same parameter you are using >>> to se the temperature and adjust the output to a voltage as you see >>> fit. I haven't done this myself, so I don't recall which component >>> would do this. It might be the voltage controlled voltage source. >>> Or there might be a voltage source directly controlled by a parameter. >>> >> >> Thanks Rick. I think I've found the voltage source but I'm not sure >> how to set it up. >> >> It gives you the option to enter a function, but it does not like the >> syntax. >> >> >> http://imgur.com/a/Edn0o >> >> I'm trying to add a voltage source with a slope of 5uV/°C >> >> >> >> >> There are a few other configurable voltage sources but none appeared >> to have a temperature parameter. >> > > > Scratch that last post - I'm a fool. > > Too long since school................. > > > I tried V=F(0.000005*(temp-25)) > > Obviously I should have put; > > V=0.000005*(temp-25)
I should have read this one too... lol -- Rick C
On 18-May-17 3:27 PM, rickman wrote:
> On 5/18/2017 12:14 AM, Aussie wrote: >> On 18-May-17 10:47 AM, rickman wrote: >>> On 5/17/2017 9:47 PM, Aussie wrote: >> >>>> >>>> I was playing around trying to simulate the effect of temp on an op amp >>>> circuits Vio. >>>> >>>> Is there a way to add temp dependency to a voltage source? >>>> Then I could try putting that voltage source in series with say the +ve >>>> input to the op amp and simulate it that way. >>>> >>>> Maybe that would save me from getting in over my head poking around in >>>> the model definitions. >>> >>> If I'm not mistaken, there is a programmable voltage source component. >>> You can drive that with the same parameter you are using to se the >>> temperature and adjust the output to a voltage as you see fit. I >>> haven't done this myself, so I don't recall which component would do >>> this. It might be the voltage controlled voltage source. Or there >>> might be a voltage source directly controlled by a parameter. >>> >> >> Thanks Rick. I think I've found the voltage source but I'm not sure how >> to set it up. >> >> It gives you the option to enter a function, but it does not like the >> syntax. >> >> >> http://imgur.com/a/Edn0o >> >> I'm trying to add a voltage source with a slope of 5uV/°C >> >> >> >> >> There are a few other configurable voltage sources but none appeared to >> have a temperature parameter. > > I think you should remove the F() notation. > > Try just V=0.000005*(temp-25) >
cheers Rick, I couldn't see the woods for the trees...........
On 5/18/2017 3:46 AM, Aussie wrote:
> On 18-May-17 3:27 PM, rickman wrote: >> On 5/18/2017 12:14 AM, Aussie wrote: >>> On 18-May-17 10:47 AM, rickman wrote: >>>> On 5/17/2017 9:47 PM, Aussie wrote: >>> >>>>> >>>>> I was playing around trying to simulate the effect of temp on an op >>>>> amp >>>>> circuits Vio. >>>>> >>>>> Is there a way to add temp dependency to a voltage source? >>>>> Then I could try putting that voltage source in series with say the >>>>> +ve >>>>> input to the op amp and simulate it that way. >>>>> >>>>> Maybe that would save me from getting in over my head poking around in >>>>> the model definitions. >>>> >>>> If I'm not mistaken, there is a programmable voltage source component. >>>> You can drive that with the same parameter you are using to se the >>>> temperature and adjust the output to a voltage as you see fit. I >>>> haven't done this myself, so I don't recall which component would do >>>> this. It might be the voltage controlled voltage source. Or there >>>> might be a voltage source directly controlled by a parameter. >>>> >>> >>> Thanks Rick. I think I've found the voltage source but I'm not sure how >>> to set it up. >>> >>> It gives you the option to enter a function, but it does not like the >>> syntax. >>> >>> >>> http://imgur.com/a/Edn0o >>> >>> I'm trying to add a voltage source with a slope of 5uV/°C >>> >>> >>> >>> >>> There are a few other configurable voltage sources but none appeared to >>> have a temperature parameter. >> >> I think you should remove the F() notation. >> >> Try just V=0.000005*(temp-25) >> > > > cheers Rick, I couldn't see the woods for the trees...........
There are woods? -- Rick C
On 18-May-17 4:29 PM, rickman wrote:
> On 5/18/2017 3:46 AM, Aussie wrote: >> On 18-May-17 3:27 PM, rickman wrote: >>> On 5/18/2017 12:14 AM, Aussie wrote: >>>> On 18-May-17 10:47 AM, rickman wrote: >>>>> On 5/17/2017 9:47 PM, Aussie wrote: >>>> >>>>>> >>>>>> I was playing around trying to simulate the effect of temp on an op >>>>>> amp >>>>>> circuits Vio. >>>>>> >>>>>> Is there a way to add temp dependency to a voltage source? >>>>>> Then I could try putting that voltage source in series with say the >>>>>> +ve >>>>>> input to the op amp and simulate it that way. >>>>>> >>>>>> Maybe that would save me from getting in over my head poking >>>>>> around in >>>>>> the model definitions. >>>>> >>>>> If I'm not mistaken, there is a programmable voltage source component. >>>>> You can drive that with the same parameter you are using to se the >>>>> temperature and adjust the output to a voltage as you see fit. I >>>>> haven't done this myself, so I don't recall which component would do >>>>> this. It might be the voltage controlled voltage source. Or there >>>>> might be a voltage source directly controlled by a parameter. >>>>> >>>> >>>> Thanks Rick. I think I've found the voltage source but I'm not sure how >>>> to set it up. >>>> >>>> It gives you the option to enter a function, but it does not like the >>>> syntax. >>>> >>>> >>>> http://imgur.com/a/Edn0o >>>> >>>> I'm trying to add a voltage source with a slope of 5uV/°C >>>> >>>> >>>> >>>> >>>> There are a few other configurable voltage sources but none appeared to >>>> have a temperature parameter. >>> >>> I think you should remove the F() notation. >>> >>> Try just V=0.000005*(temp-25) >>> >> >> >> cheers Rick, I couldn't see the woods for the trees........... > > There are woods? >
So I hear.... ;)
On Thu, 18 May 2017 12:18:11 +0800, Aussie <aussie@none.com.au> wrote:

[snip]
> >I tried V=F(0.000005*(temp-25)) > >Obviously I should have put; > >V=0.000005*(temp-25) >
That only works in LTspice... your LTspice netlists will fail in virtually ANY other Spice... LTspice fails to completely adhere to Berkeley standards. In general... E<name> <(+) <node> <(-) node> VALUE = {<expression>} This also works in LTspice. Why Mikey thinks it appropriate to deviate from convention, who the hell knows. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Thinking outside the box... producing elegant solutions. "It is not in doing what you like, but in liking what you do that is the secret of happiness." -James Barrie
On Thu, 18 May 2017 09:44:00 +0800, Aussie wrote:

> On 17-May-17 11:31 PM, Tim Wescott wrote: >> On Wed, 17 May 2017 14:17:22 +0800, Aussie wrote: >> >>> I'm (very slowly) learning to play with LTSpice. >>> >>> For temperature simulations do the models generally have a temperature >>> dependent characteristics built in? >>> >>> I can do a temp simulation with a Si diode and get some sensible >>> output. >>> >>> With feeding a fixed voltage from a resistor divider into an op amp >>> follower I get no change in the output with temperature. >>> >>> Am I correct in thinking the LT op amp models and the resistors have >>> no temperature dependent parameters included? >>> >>> >>> Are temp dependent parameters only included for diodes and >>> transistors? >> >> Different resistors (and caps, and inductors) respond to temperature >> differently. It's not just the magnitude of the change -- some have >> positive temperature coefficients, some negative, some have responses >> that are not straight-line with temperature. So if it matters, you'll >> need to model the temperature response of the components in question >> yourself. >> >> Hopefully the paper John cites goes into all that. >> >> > > Understood. Thanks Tim. > > PS - I hope you enjoy your new job & still find time to do the odd > YouTube video.
I'm hoping that'll be the case. In the short term I have a couple of customers yet to take care of -- they weren't keeping me alive, but I'm still on the hook for significant work. In the longer term, I should be able to get stuff done. The prospect of changing roles has given me a lot of energy that I thought had just gone away with old age -- time will tell if it holds up or if it's just mental meth. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Wed, 17 May 2017 19:03:03 -0700, Winfield Hill wrote:

> Tim Wescott wrote... >> >> On Wed, 17 May 2017, Aussie wrote: >> >>> I'm (very slowly) learning to play with LTSpice. >>> >>> For temperature simulations do the models generally have a temperature >>> dependent characteristics built in? >>> >>> I can do a temp simulation with a Si diode and get some sensible >>> output. >>> >>> With feeding a fixed voltage from a resistor divider into an op amp >>> follower I get no change in the output with temperature. >>> >>> Am I correct in thinking the LT op amp models and the resistors have >>> no temperature dependent parameters included? >>> >>> Are temp dependent parameters only included for diodes and >>> transistors? >> >> Different resistors (and caps, and inductors) respond to temperature >> differently. It's not just the magnitude of the change -- some have >> positive temperature coefficients, some negative, some have responses >> that are not straight-line with temperature. So if it matters, you'll >> need to model the temperature response of the components in question >> yourself. > > Then there's the serious issue that not all components on a PCB are at > the same temp. We have junctions that are rather hot, from tough jobs > they're doing, and other parts cruising along at ambient temp.
I was going to leave that for the advanced course. But yes. I'm thankful to not have been on projects like this myself, but I've sat NEXT to some poor bastards that spent months carefully calibrating a board over temperature, only to find that when ambient was changing the calibration didn't hold because of uneven temperatures. They cried. I was sympathetic, but inside I was very thankful that It Wasn't Me. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
"Jim Thompson"  wrote in message 
news:68drhcdt61b25dd2kvqmj2ct463dk4sidb@4ax.com...

On Thu, 18 May 2017 12:18:11 +0800, Aussie <aussie@none.com.au> wrote:

[snip]
> >I tried V=F(0.000005*(temp-25)) > >Obviously I should have put; > >V=0.000005*(temp-25) >
>That only works in LTspice... your LTspice netlists will fail in >virtually ANY other Spice... LTspice fails to completely adhere to >Berkeley standards.
Yeah, I cant handle that in SS. However, I did put in up to 4th order temp co in E sources. E1 1 2 3 4 [gain] tc1=[value] tc2=[value] tc3=[value] tc4=[value] -- Kevin Aylward http://www.anasoft.co.uk - SuperSpice http://www.kevinaylward.co.uk/ee/index.html