Go Back   Home > Forums > >

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools
Old 2nd September 2021, 06:46 AM   #3061
jan.didden is offline jan.didden  Europe
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Westende Resort, BE coast
Quote:
Originally Posted by steveu View Post
Does anyone have a better answer than driving with a square wave and measuring the plot?

In any case, you may have run up against the initial conditions problem with pulse sources. Using two pulses in series makes a bipolar square wave with zero Volts at time zero. A finite rise time is required but should not be a problem.
As long as you know how to measure slew rate rather than rise time, there's nothing wrong with using a square wave.

Jan
  Reply With Quote
Old 2nd September 2021, 01:22 PM   #3062
Mark Johnson is offline Mark Johnson  United States
diyAudio Donor
diyAudio Member
 
Mark Johnson's Avatar
 
Join Date: May 2011
Location: Silicon Valley
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
For BJT input stage with no emitter degeneration resistors, an input square wave amplitude > 1.2V pk-pk will ensure slewing in almost all cases.

For BJT input stage with emitter degeneration resistors, an input square wave amplitude > 2.5V pk-pk will ensure slewing in almost all cases.

For JFET input stage, best to apply an input square wave amplitude > 3V pk-pk

Remember that output_pk_pk = gain * input_pk_pk . If you're testing a circuit whose closed loop gain is high (or whose output clipping levels are low), these tests could very possibly push the amplifier into clipping. So measure the slew rate from ~25% to ~75% on the scope, and disregard the clipping region.

You'll need a pretty fast square wave generator, with very small rise/fall times, because
  • input_slew_rate >= output_slew_rate / gain
So if you expect an output slew rate of, let's just say, 200 volts per microsecond, and if your closed loop gain is 11X, then your input slew rate needs to be greater than (200/11) = 18 volts per microsecond. For a BJT input stage with 1.2V input amplitude, that's a rise time of (1.2/18) = 0.066 microseconds. Which equals 66 nanoseconds. Better use a pulse generator whose risetime is 30ns or lower!
  Reply With Quote
Old 2nd September 2021, 04:06 PM   #3063
steveu is offline steveu  United States
diyAudio Member
 
Join Date: May 2005
Location: Colorado Springs
Default measuring slew rate

I found this here:
How to plot dy/dx versus x of a given y=f(x) plot in LTspice? - Electrical Engineering Stack Exchange

And I tried it out:
I did find that the maximum timestep has to be set small and there can be a auto-scale problem with the derivative.
Attached Images
File Type: png slewrate.png (97.1 KB, 158 views)

Last edited by steveu; 2nd September 2021 at 04:10 PM.
  Reply With Quote
Old 14th September 2021, 01:08 PM   #3064
goddlediddles is offline goddlediddles  Ireland
diyAudio Member
 
goddlediddles's Avatar
 
Join Date: Nov 2010
Location: Kerry
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
I was quite good at simulating in LT Spice before I took a break. But now I'm very rusty. Also, I'm now using Windows 10. I have a large file of tube models, and I need to get them into LT Spice, but I cannot see where to put them. I put the symbols in with no trouble, but I cannot see where to put the large text file of tube models.
__________________
Always make up your own cables.

Last edited by goddlediddles; 14th September 2021 at 01:26 PM. Reason: Spelling.
  Reply With Quote
Old 14th September 2021, 05:36 PM   #3065
Ray Waters is offline Ray Waters  United States
diyAudio Member
 
Join Date: Nov 2010
Location: Kansas
LTspice looks for models under the lib\sub folder. You can place your tube library file there.

But I created a User folder under lib\sub for all of my third party models and libraries. That keeps them separate from the built-in models. If you do this, you will need to include the User folder in the path name when you include these models in your schematics; or in LTspice XVII you can specify this folder in settings. See the "Sym & Lib Search Paths" tab. Right-click in the Library Search Path box and browse to the folder that contains your own third party models and libraries.

Last edited by Ray Waters; 14th September 2021 at 05:40 PM.
  Reply With Quote
Old 14th September 2021, 06:08 PM   #3066
goddlediddles is offline goddlediddles  Ireland
diyAudio Member
 
goddlediddles's Avatar
 
Join Date: Nov 2010
Location: Kerry
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
Quote:
Originally Posted by Ray Waters View Post
LTspice looks for models under the lib\sub folder. You can place your tube library file there.

But I created a User folder under lib\sub for all of my third party models and libraries. That keeps them separate from the built-in models. If you do this, you will need to include the User folder in the path name when you include these models in your schematics; or in LTspice XVII you can specify this folder in settings. See the "Sym & Lib Search Paths" tab. Right-click in the Library Search Path box and browse to the folder that contains your own third party models and libraries.
Thanks for that, Ray. I think I've got the hang of it now. It's all coming back to me.
__________________
Always make up your own cables.
  Reply With Quote
Old 14th September 2021, 10:51 PM   #3067
kees52 is offline kees52  Netherlands
diyAudio Member
 
Join Date: May 2009
Location: Sprang-capelle Holland.
Hi all here.

A goof night for the ones who are still active now. The sleep disorder types of umans.

I have work the whole night getting something to work, it did work before.

Now I find that I get this after copy parts from a other schematic into the new one, I am quite convinced that this was the problem, I do copy sometimes parts of schematic for use into a new one, I see LTspice does ruin it and the schematic is not working anymore, it get mucho errors, the only way to let it work is redrawn.

Do you guys experinced this? Maybe I am the only one who do copy parts over to new schematics.

I have redrawn the whole schematic and I get now woring one who does what it has to do properly. so very strange. I did wanted to test a 2110 gate driver for multilevel, and it does nicely, after redrawn so the say.

regards
Attached Images
File Type: jpg ScreenHunter 1066.jpg (384.4 KB, 104 views)
  Reply With Quote
Old 16th September 2021, 08:33 AM   #3068
edbarx is offline edbarx  Europe
diyAudio Member
 
edbarx's Avatar
 
Join Date: May 2018
Location: Maltese Archipelago
Default How do I simulate an ideal BJT?

Since there is no forum section dedicated to "idealised components" and this question is about simulating an ideal BJT, I will post here, as this section is about solid state and BJTs are solid state.

If any moderator or administrator decides this thread should be deleted, I will not take offence. This question is completely theoretical, very few people are bothered to simulate an idealised BJT.

My LTSpice's simulation requires a power supply to power the ideal transistor. The current source should behave as an ideal current source provided there is enough voltage to power the transistor and to feed the load. My simulation lacks a power source.
Attached Images
File Type: png 2021-09-16-102456_771x697_scrot.png (43.2 KB, 66 views)
__________________
Any fool can make things bigger, more complex, and more violent. It takes a touch of a genius, and a lot of courage, to move in the opposite direction. [Albert Einstein]
  Reply With Quote
Old 16th September 2021, 09:06 AM   #3069
Mooly is offline Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.


Moved to:
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.

I think this is the best place to ask this.
  Reply With Quote
Old 16th September 2021, 01:46 PM   #3070
edbarx is offline edbarx  Europe
diyAudio Member
 
edbarx's Avatar
 
Join Date: May 2018
Location: Maltese Archipelago
As I found the solution, I am posting it here:

The solution is to assign to the current source's "Value" parameter the following conditional line:
Code:
I=if(I(R1)>0, 100*I(R1), 0)
I(R1) is the current through the input resistance. The statement is a condition which tells the current source to supply a current under condition the current is positive, that is, it is flowing in the right DC direction. The condition also amplifies the base current by 100 and produces a zero current when the input current flows in the opposite direction.
Attached Images
File Type: png 2021-09-16-155147_1366x717_scrot.png (66.3 KB, 48 views)
__________________
Any fool can make things bigger, more complex, and more violent. It takes a touch of a genius, and a lot of courage, to move in the opposite direction. [Albert Einstein]

Last edited by edbarx; 16th September 2021 at 01:48 PM.
  Reply With Quote

Reply


Installing and using LTspice IV (now including LTXVII). From beginner to advanced.Hide this!Advertise here!
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[LTSpice] Beginner - help with capacitor multiplier? bugbear Power Supplies 17 11th November 2016 11:18 PM
Meistersinger VFA-200, A beginnerís first try in LTSpice nattawa Solid State 34 29th January 2016 01:58 PM
Including a C- winding on a filament transformer AllenB Tubes / Valves 2 8th May 2014 05:17 AM
Need help installing LTSpice rif Software Tools 4 30th May 2013 01:59 AM


New To Site? Need Help?

All times are GMT. The time now is 07:59 PM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 13.64%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Copyright ©1999-2021 diyAudio
Wiki