hybridfree/eevblog-posts huggingface dataset:
LTSpice Help - Page 1
Forum section: electronics / beginners

author: fourierpwn
author_rank: Regular Contributor
timestamp: March 03, 2017, 06:08:29 am
content: Hi,I am a little confused with some basics in LTSpice.I was looking at this photo of some MOSFETs and I don't understand what setting the value of VSD and VSG (5 and 0 respectively) does when you're sweeping them in the .dc command anyway.i.e., for the ID_VSD curve, does setting VSD to 5V even do anything? The source is being swept in the .dc command from 0 to 5V in 1mV steps.Confirmation on this would be most appreciated

author: fourierpwn
author_rank: Regular Contributor
timestamp: March 03, 2017, 06:13:44 am
content: I probably should have done this before I made the thread, but I have investigated this myself and it appears that there is no difference between setting the VSD source as it is overwritten by the .dc command.I still don't see the point in bothering to set the source to a specific value though...

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: March 03, 2017, 06:39:29 am
content: I'm no spice expert.But I see no node connected to GND.

author: danadak
author_rank: Super Contributor
timestamp: March 03, 2017, 11:03:14 am
content: There are 3 grounds, at top of schematic.Regards, Dana.

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: March 03, 2017, 11:10:23 am
content: Quote from: danadak on March 03, 2017, 11:03:14 amAh. Right. Gotcha.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: March 03, 2017, 11:21:46 am
content: Quote from: fourierpwn on March 03, 2017, 06:08:29 amIn the first two models you have VSD is not over written by the .dc command. Only the VSG source is swept. VSD is kept constant at 5V. This sets the operating conditions for the MOSFET.In the third model VSD is swept from 0-5V in 1mV steps, that is why you have 0-5V on the horizontal axis.This is sweep of VSD is repeated 6 times with VSG being stepped from 0V to 5V in 1V steps. This is why there are multiple curves.Does this help?Regards,Jay_Diddy_B

author: Ian.M
author_rank: Super Contributor
timestamp: March 03, 2017, 11:51:24 am
content: You set all the sources to thedefaultvalues you want then override one or more sources with a .dc sweep or a .step command. This makes it easy to keep settings constant between multiple analyses. e.g. you'd put all three .dc commands on the same schematic.LTSPICE only allows you to have a single analysis command active. If multiple analysis commands are present, LTSPICE lets you pick one from a list when you run the analysis, and auto-comments all the other ones by replacing the . with a ;Once that's happened, to change to a different one simply uncomment it by replacing the ; with . then when you run again its back on the pick-list.N.B. the d() function can be used on a plottable expression in the waveform viewer to plot the derivative of that expression. e.g. to plot gm directly.

author: fourierpwn
author_rank: Regular Contributor
timestamp: March 03, 2017, 11:42:06 pm
content: Thanks for the help everyone.Re: the d() function. Yep, I understood this. Quite a neat feature!
LTspice IA responce - Page 1
Forum section: electronics / beginners

author: gogoman
author_rank: Regular Contributor
timestamp: February 09, 2024, 09:00:37 am
content: hello, for fun i created this circuit and then plotted the response. Rather than take it for granted, I like to understand the following:1. Based on the RC, How was the filter response calculated2. Why does the phase start to rise at ~100klink to tutorials will work tothanks

author: iMo
author_rank: Super Contributor
timestamp: February 09, 2024, 09:24:07 am
content: 1. g..gle "RC transfer function calculation"2. because there is possibly a lot of various R/L/C stuff inside the opamp model there..

author: magic
author_rank: Super Contributor
timestamp: February 09, 2024, 09:35:48 am
content: Note that you can independently plot the differential voltage at the inputs of the chip, to see what comes from your passive circuit and what comes from the chip. Or disconnect the chip and see if its input admittance is having any effect.The stuff at high frequencies may be some input to output capacitance in the chip (or in the model, at least). An example of such effect is base-collector capacitance of simple common emitter amplifiers, which sometimes "overrides" normal operation of the stage and passes very high frequency signals at almost unity gain, uninverted.
LTspice IGBT HGTG12N60A4D - Page 1
Forum section: electronics / beginners

author: MaxTsv
author_rank: Newbie
timestamp: August 19, 2022, 05:15:54 pm
content: Hello guys,I am new to LTspice, and I am trying to simulate a simple circuit, including an a bit ol IGBT - HGTG12N60A4D, in LTspice.It appears that there is no simulation file for this particular item, may I ask you how you usually go thru an obsticle like this one? Having the datasheet and NIGBT or PIGBT symbols in LTspice, can I get it done somehow? What procedure or approach should I use in this case?Thanks a lot!
LTSPICE inconsistent grad/deg use in trig functions - Page 1
Forum section: electronics / beginners

author: AlfBaz
author_rank: Super Contributor
timestamp: June 08, 2016, 04:44:38 am
content: This tripped me up for a bitWhen using sin() in an arbitrary voltage source the parameter to the function must be in grad's but if you use sin() in a ".measure x param sin(...)" statement, it's in degrees.Is there some reason why they do this or is it simply an inconvenient bug?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 08, 2016, 01:27:05 pm
content: Wow, that's insultingly bad... SPICE standard, is math standard, radians.Tim

author: MatthewEveritt
author_rank: Unknown
timestamp: June 08, 2016, 04:02:28 pm
content: Behavioral sources use radians, not grads.

author: AlfBaz
author_rank: Super Contributor
timestamp: June 08, 2016, 10:09:57 pm
content: Quote from: MatthewEveritt on June 08, 2016, 04:02:28 pmOops, that's what I meant
LTSpice: Integrator not working - Page 1
Forum section: electronics / beginners

author: stafil
author_rank: Regular Contributor
timestamp: June 20, 2020, 12:17:47 am
content: Anyone can help me understand why my integrator circuit doesn't work in LTSpice?V(n002) is taken at the output of the OpAmp

author: Ian.M
author_rank: Super Contributor
timestamp: June 20, 2020, 12:49:15 am
content: Next time, please also attach the .asc sim file!LTspice defaults to doing a DC operating point analysis to decide the starting state of the circuit. The analysis treats capacitors as open circuits and inductors as short circuits (actually as their DC resistance). With 3V in and effectively no feedback, the OPAMP is of course railed, with its output at the negative rail.There's two ways you can fix this - *either* make V3 a pulse source that starts at 0V and a short time later steps to 3V. e.g.PULSE(0 3 1u)*or* add theuicoption to your.trancommand which disables the DC operating point analysis, i.e. all capacitors start with zero charge and inductors zero initial current unless explicitly overridden by a.icdirective or ic instance parameter..tran .... uiccan result in very large charging currents for capacitors, which can make plotting currents a PITA due to autoscaling, so you may prefer thestartupoption, to ramp up all fixed DC sources from zero in the first few tens of us of the sim run.

author: stafil
author_rank: Regular Contributor
timestamp: June 20, 2020, 01:27:28 am
content: Quote from: Ian.M on June 20, 2020, 12:49:15 amThanks, uic did the trick!Sorry, I thought I did. For what's worth it, I am attaching it now.
LTSpice - Linear regulator - constant current mode - loop gain analysis - Page 1
Forum section: electronics / beginners

author: not1xor1
author_rank: Frequent Contributor
timestamp: February 26, 2017, 09:33:13 am
content: Hi,I wonder what is the correct method to simulate the loop gain/phase margin of linear regulators working in constant current mode.I couldn't find anything with google (may be I used the wrong terms), so I devised this test circuit where I unconnected the voltage regulation part and connected the output to ground. That produced something which looks like a correct bodeplot:BTW I found some TI document about using huge inductor and capacitor in loop gain spice simulations and so I used 1 TeraHenry/1 TeraFarad (1 microOhm parasitic resistance) components to provide separate paths to DC and AC sources.Anyway I'm unsure the result I got is correct (i.e. is meaningful regarding real circuits).I'd like to get some feedback.Thanks

author: Kleinstein
author_rank: Super Contributor
timestamp: February 26, 2017, 11:24:30 am
content: The loop gain analysis looks OK. There is even no need for the capacitor and inductor - it should work the same ways without.However keep in mind that this is the short circuit case.

author: not1xor1
author_rank: Frequent Contributor
timestamp: February 27, 2017, 09:34:56 am
content: Quote from: Kleinstein on February 26, 2017, 11:24:30 amI used the large inductor/capacitor trick because I had got strange results in other tests with the 0VDC/1VAC source.That was probably caused by some other stupid mistake of mine (may be a non 0? series resistance).At first I could not succeed in getting any significative results with a non short-circuit load, but then I realized I had to plot the rate of the voltage at the Rsense terminals, i.e. V(output,load)/V(fb,load) in the schematic belowThanks for your valuable support
LTSpice make variable change with time - Page 1
Forum section: electronics / beginners

author: Etesla
author_rank: Regular Contributor
timestamp: January 19, 2018, 10:01:52 pm
content: In LTspice: I was wondering if anyone had figured out how to change a parameter of a component in relation to time. Specifically I am trying to have the amplitude of a sin wave from a voltage source change with time.Thanks!

author: Etesla
author_rank: Regular Contributor
timestamp: January 19, 2018, 10:39:05 pm
content: Figured it out. For anyone who had a similar issue, you can have arbitrary voltage and current sources in ltspice. They are called arbitrary behavioral (current/voltage) source's.
LTspice model for COB LED - Page 1
Forum section: electronics / beginners

author: ocset
author_rank: Super Contributor
timestamp: July 04, 2019, 05:17:20 am
content: Hi,Do you know how I can get a LTspice model for the LC019D and LC033D LEDs from Samsung?Ie something that gives the same I,V curve when a DC sweep is done?(pages 26,27 of datasheet)https://cdn.samsung.com/led/file/resource/2018/09/Data_Sheet_COB_D_Series_Gen.3_Rev.2.3.pdfI did the attached but its not accurate

author: Ian.M
author_rank: Super Contributor
timestamp: July 04, 2019, 09:59:01 am
content: The curves in the datasheet don't have enough resolution so it will be difficult to fit a Berkeley SPICE diode model to them. Best option is always a manufacturer supplied model - *IF* LTspice can run it!If they don't offer a model, you can take one of the LEDs, run it at a very low current so you can count the number of dies, then make a best guess how many parallel strings, and how many dies per string to get instance parameter N for the simulated diode, then put it on a curve tracer (preferably one that can do low duty cycle pulsed measurements to avoid self-heating effects, divide the voltages measurements by N and apply the fitting procedure documented at the link below, and you can get a pretty decent model out of it.https://hackaday.io/project/12874-automated-ledlaser-diode-analysis-and-modeling/log/48368-estimating-spice-diode-modelsFor a detailed explanation of the Berkeley SPICE diode model, and its parameters see:http://www3.imperial.ac.uk/pls/portallive/docs/1/7292572.PDF
LTSpice model for S14K175 EPCOS MOV - Page 1
Forum section: electronics / beginners

author: SG-1
author_rank: Regular Contributor
timestamp: January 22, 2018, 11:32:40 pm
content: Does anybody have a link to a ltspice model for a EPCOS S14K175 MOV ?

author: SG-1
author_rank: Regular Contributor
timestamp: January 22, 2018, 11:41:27 pm
content: What is the max ambient temperature for this device? The data sheet says no derating up to 85 degrees C, then below it seems to give the upper operating temperature as 85 degrees C, with a storage temperature of 125 degrees C.
LTspice Modeling an electret microphone capsule with embedded transistor. How? - Page 1
Forum section: electronics / beginners

author: HMS
author_rank: Contributor
timestamp: March 01, 2023, 04:35:33 pm
content: Hello,after modeling a microphone preamp circuit on LTspice, it looks impossible to represent a mic capsule because there is no ready library models. also, the mic capsule EM 273 already have the FET inside it and the capsule have 3 terminals (Source, Drain and Ground) like this onehttps://primomic.com/pdf/EM273.pdf.any idea how to mode it in LTspice correctly based on its Volt, Impedance and sensitivity as in datasheet to connect it to a 48V preamp circuit?thanks!

author: iMo
author_rank: Super Contributor
timestamp: March 01, 2023, 06:17:26 pm
content: I've found a model in my libs - coming from Bordodynov library I downloaded years back.It has got an input for the acoustic pressure (Y) it seems, it does something, you have to investigate what it does, however..

author: HMS
author_rank: Contributor
timestamp: March 09, 2023, 02:53:56 pm
content: thank you for your post imo.also, I found an interesting simulation document from TI website (Single-Supply, Electret Microphone Pre-Amplifier Reference Design) on page 11. it looks more realistic in representation but, couldn't find the alternative on LTspice.https://www.ti.com/lit/ug/tidu765/tidu765.pdf?ts=1678372839497&ref_url=https%253A%252F%252Fwww.ti.com%252Ftool%252FCIRCUIT060016hope this help getting better modeling on LTspice. what do you think?
LTSpice Noob - Page 1
Forum section: electronics / beginners

author: Szewczykm
author_rank: Regular Contributor
timestamp: January 14, 2013, 06:40:57 pm
content: Hi, I'm just starting to play with LT spice and what I'm trying to simulate is a delay that's controlled with a capacitor. There is an LED controlled by a 2n2222, and I want to have the LED stay on for a few seconds after a button is pressed and released.I'm trying to build this in LTSpice so I can play with values and just figure out how it all works, but how do you simulate a button press?

author: Colfaxmingo
author_rank: Contributor
timestamp: January 14, 2013, 07:07:34 pm
content: Lots of ways. You could use a separate voltage source instead of the button. Then doing a transient simulation set the delay to whatever value you want.

author: Szewczykm
author_rank: Regular Contributor
timestamp: January 14, 2013, 07:31:42 pm
content: Thanks, I created another voltage source and then edited it's properties.Right Click Voltage Source -> PulseThen I played with the pulse values and it acted like a button I was pressing.Thanks!Mike

author: AndyC_772
author_rank: Super Contributor
timestamp: January 14, 2013, 09:00:48 pm
content: Another useful and non-obvious feature is that you can create components which don't have fixed values. I often simulate a switch by creating a resistor whose resistance changes between a very large and a very small value at some point in time.The way to do it is to create one whose value is "R=V(name)", where "name" is a label attached to some node in your design. You can assign it to the output of a voltage source which steps between (say) 1V and 1000kV at some time, to make the resistor change from 1 Ohm to 1MOhm.

author: Harvs
author_rank: Super Contributor
timestamp: January 15, 2013, 06:55:05 am
content: Quote from: AndyC_772 on January 14, 2013, 09:00:48 pm+1 Much more flexible than a stepped voltage source, because it's not a low impedance to ground when it's off.
Ltspice opa189 behaves strange - Page 1
Forum section: electronics / beginners

author: bittumbler
author_rank: Contributor
timestamp: November 15, 2024, 02:53:30 pm
content: Hi,i am trying to simulate a filter. The schematic is from Analog Filter Design Tool (tools.analog.com), but i changed the opamp."out2" is the filter with the generic "Universal Opamp" from Ltspice. That works."out6" is the same filter with the opa189 (.lib file from TI). This has a totally different behaviour. I dont understand why. I am not anywhere near the limits of OPA189 (i think).TIA

author: Zero999
author_rank: Super Contributor
timestamp: November 15, 2024, 10:35:46 pm
content: You got the power supply connections wrong. The basic universal op-amp model doesn't use the power supply rails, which is why it worked.Why not just paste the model file into the schematic and use the opamp2 symbol, rather than uploading it separately?

author: bittumbler
author_rank: Contributor
timestamp: November 16, 2024, 05:34:27 am
content: Quote from: Zero999 on November 15, 2024, 10:35:46 pmUps. Thanks for your help.I left the .lib model file separately, as it is quite long/complex and supplied in that way from the vendor.The images in your attachement, can these be created inside Ltspice, or are they just screen grabs? I found only "print to pdf".

author: Zero999
author_rank: Super Contributor
timestamp: November 16, 2024, 06:59:22 pm
content: Quote from: bittumbler on November 16, 2024, 05:34:27 amThere isn't a way to export to PNG directly from LTSpice. It's possible to copy to the clipboard. Click Tools, Copy Bitmap to Clipboard. I just pasted them into Gimp cut away any empty space and reduced the colour depth to 256 colour or less, to make the file as small as possible.
LTSPice Parts lists. - Page 1
Forum section: electronics / beginners

author: CJay
author_rank: Super Contributor
timestamp: January 11, 2019, 09:15:28 am
content: Probably *really* trivial but I've been spending some time with LTSpice recently and have some circuits which it seems to suggest will work nicely so I'm about to put solder to bit and make them real.Something that would make life a little simpler would be if I could export a parts list from LTSpice to create a BOM or somehow extract one from the .asc file, however there doesn't seem to be a way to do that?I have googled but somehow I've not managed to hit the correct combination of words, so, is there a simple way to export a parts list with values from LTSpice or from the relevant .asc file?

author: iMo
author_rank: Super Contributor
timestamp: January 11, 2019, 10:01:36 am
content: View->Bill of Materials->Paste to clipboardQuote

author: CJay
author_rank: Super Contributor
timestamp: January 11, 2019, 10:10:10 am
content: Damnit, that simple.Thank you.
LTSpice question - Page 1
Forum section: electronics / beginners

author: lordvader88
author_rank: Frequent Contributor
timestamp: April 16, 2019, 09:27:28 am
content: I'm getting the hang of LTS, I made the linear PSU from my Tektronix 422 and it works perfect.When u make a circuit, and you have to find DC operating points, do u have to run DC op.point every time u change a value ? I see when I run transient sim, that I can change a value, and just hit run again, and it makes the changes. Does that update the saved DC op.point as well each time ?

author: Zero999
author_rank: Super Contributor
timestamp: April 16, 2019, 02:34:41 pm
content: Running the transient simulation, updates the DC operating point, unless the "skip initial operating point solution" or "start external DC voltages at 0V" is selected.The .step command can be used to run simulations for different values of the same component(s) without having to manually keep editing them and rerunning the simulation.Here are a couple of simulations I've done recently, using the step command, to emulate a variable resistor.https://www.eevblog.com/forum/beginners/need-assistance-in-calculating-resistors-in-a-differential-amplifier/msg2331510/#msg2331510https://www.eevblog.com/forum/beginners/simple-transistor-impedance-understanding/msg2221683/#msg2221683

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 16, 2019, 02:38:52 pm
content: It's always done automatically, unless you turn on "save op point", or disabled completely as mentioned.Tim

author: Zero999
author_rank: Super Contributor
timestamp: April 16, 2019, 08:08:31 pm
content: A demonstration showing a simplified model of the LM317, with both resistor values swept. R1 from 50Ohm to 200Ohm, in 25Ohm steps and R2 from 10Ohm to 1500Ohm in 100R steps.Note, the file size of the schematic converted to an image can be reduced by converting the colour depth to <8-bit, removing the alpha channel and saving as PNG.
LTspice question - Page 1
Forum section: electronics / beginners

author: questron
author_rank: Regular Contributor
timestamp: October 29, 2016, 04:19:21 pm
content: Dave did an LTspice video,https://www.youtube.com/watch?v=FEGT5dUpdrc,fills in some always ignored basic info about it, very helpful.one thing LTspice always puzzles me is this, for example,i simulated this circuit:and it amplifies the input from 1mV to about 30mV:the fft looks like this:the spike of the primary only reaches about -30dB, instead of 0dB for example,why is that?how is fft done, what does it always compare to?how should i read this fft?what is involved in this -30dB thing?thank you for all the help!

author: Dave
author_rank: Super Contributor
timestamp: October 29, 2016, 04:42:26 pm
content: It is actually showing you dBV. Do the math and you will find that 31 mVpksine is -33 dBV, exactly what you're seeing on the diagram.

author: Zero999
author_rank: Super Contributor
timestamp: October 29, 2016, 06:14:13 pm
content: Yes and the second and third harmonics are clear too.

author: questron
author_rank: Regular Contributor
timestamp: October 30, 2016, 07:00:13 pm
content: thank you Dave and Hero999!i was not aware of the "V" in "dBV" is a reference voltage of 1V, and forgot about the RMS value of the sine wave, so failed to get the correct answer. but after looking that up and did the calculation, it's really -33dBV.so i didn't "build" an attenuator as opposed to an amplifier after all, haha...great, thank you for the help!

author: kulky64
author_rank: Regular Contributor
timestamp: October 30, 2016, 08:14:31 pm
content: It's -30.5 dBV, not -33 dBV.

author: Dave
author_rank: Super Contributor
timestamp: October 30, 2016, 10:51:09 pm
content: Quote from: kulky64 on October 30, 2016, 08:14:31 pmSince we're nitpicking... The diagram shows the waveform swinging from -31 to 30 mV.$${\frac{61\text{ mV}_\text{pk-pk}}{\sqrt8}=21.6\text{ mV}_\text{RMS}}$$$${\log_{10}{(21.6\text{ mV}_\text{RMS})}\cdot20=-33.3\text{ dBV}}$$

author: kulky64
author_rank: Regular Contributor
timestamp: October 30, 2016, 10:55:56 pm
content: Forget about RMS values when dealing with FFT andamplitudespectrum. Check how is Fourier series defined.

author: Dave
author_rank: Super Contributor
timestamp: October 30, 2016, 11:10:14 pm
content: Please, enlighten me.
LTspice Schmitt-Trigger spikes - Page 1
Forum section: electronics / beginners

author: Detzi
author_rank: Regular Contributor
timestamp: January 02, 2018, 02:58:13 pm
content: Hi there,i created a 3rd Order Low Pass Elliptic Filter and attached an Schmitt-Trigger behind. On the Output i can see some huge spikes.Does someone know why and where these come from?Thanks in advance!

author: Audioguru
author_rank: Super Contributor
timestamp: January 02, 2018, 05:07:01 pm
content: Obviously the spikes are produced by the No-name Schmitt Trigger that has no power supply to clamp its output level.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 02, 2018, 05:25:21 pm
content: SPICE mixed signal simulation is notoriously bad. Here's an example from Altium:The best solution is to use an analog (transistor level simulation or behavioral equivalent) model, but this does slow down the simulation a bit, and is impractical with more than a few gates.Tim

author: Detzi
author_rank: Regular Contributor
timestamp: January 02, 2018, 05:51:59 pm
content: Quote from: Audioguru on January 02, 2018, 05:07:01 pmObviously you are wrong, the ''No-name Schmitt Trigger'' is a universal with LTspice supplied model which gets configured and its ''Power constaints'' through the spice lines. Which are for this reason visible in my picture above (see ''SpiceLine'' and ''SpiceLine2'') .Quote from: T3sl4co1l on January 02, 2018, 05:25:21 pmThanks man, so i do not have to worry then. Also good to know that Altium does it too

author: Zero999
author_rank: Super Contributor
timestamp: January 02, 2018, 06:43:28 pm
content: You could try using the 555 timer model for the schmitt trigger, but it's inverting, so you'd need two in series, if that's an issue.

author: StillTrying
author_rank: Super Contributor
timestamp: January 03, 2018, 12:53:51 am
content: My old version of LT doesn't show it.Setting the 'Max Timestep' in 'Edit Simulation Cmd.' to about 25n should fix it.

author: Detzi
author_rank: Regular Contributor
timestamp: January 03, 2018, 07:22:43 am
content: Quote from: Hero999 on January 02, 2018, 06:43:28 pmThe good old 555little that can't be done with it.Quote from: StillTrying on January 03, 2018, 12:53:51 amThat really did fix it. Thanks for your input. Strange that the problem is a too large timestep value, choosen by the solver. I would not have expect that. Changing the default integration method to ''Gear'' does also fixes it, no need for a min timestep there.
[Solved] LTSpice sim for toggle power switch is taking too long - Page 1
Forum section: electronics / beginners

author: kasbah
author_rank: Contributor
timestamp: January 19, 2016, 01:45:52 pm
content: Hey, not really a beginner but I don't use LTSpice that much.I am trying to simulate the press-on-hold-off toggle switch circuit fromthis article(in auto-off mode).The simulation is taking waaaay too long. Like it will never finish. Any ideas? LTSpice file is attached.EDIT: To clarify, if I use a 18V DC voltage source, instead of one with an initial 18V pulse step the simulation finishes fine, but I don't think it's an accurate representation of the circuit and it doesn't behave as hoped.

author: AlfBaz
author_rank: Super Contributor
timestamp: January 19, 2016, 01:58:34 pm
content: looks like it's having a hard time with the ground path. Try placing a 100Meg (Meg not M) from the anode of D1 to gorund

author: kasbah
author_rank: Contributor
timestamp: January 19, 2016, 03:26:22 pm
content: Brilliant! That did it. Updated schematic attached. Thanks very much.

author: kasbah
author_rank: Contributor
timestamp: January 19, 2016, 05:40:29 pm
content: Here is a simulation of switching on, pressing button for 1s without effect then holding to turn off, and then back on again. What do people think of this circuit? Any pitfalls?

author: K5HJ
author_rank: Regular Contributor
timestamp: January 19, 2016, 09:24:50 pm
content: For future reference, all nodes must have a DC path to ground.

author: andre_teprom
author_rank: Regular Contributor
timestamp: January 20, 2016, 09:42:35 pm
content: Quote from: kasbah on January 19, 2016, 05:40:29 pmIsn't the circuit nothing else than working as described in the original article?Quote

author: kasbah
author_rank: Contributor
timestamp: January 20, 2016, 10:07:45 pm
content: Yes, now it does. Originally I couldn't get the simulation to work.

author: kasbah
author_rank: Contributor
timestamp: July 26, 2016, 02:28:11 am
content: Sorry, to bump this but I turned this into a little a PCB and have quite a lot left over in case you would like one.You can buy the right parts and download the Gerbers here:https://kitnic.it/boards/github.com/kasbah/push-on-hold-off/

author: RogerFL
author_rank: Newbie
timestamp: April 06, 2020, 10:16:39 pm
content: Old topic I know but I need a power switch circuit like this so here's an update.I took the 3rd ltspice file from kasbah and thought it needed a load to be more complete, so I simply added a 10K resistor to GND from the output Vout. And then the simulation quit working.Anyone want to try solving this again?Attaching the updated sim.

author: eblc1388
author_rank: Frequent Contributor
timestamp: April 07, 2020, 02:24:27 pm
content: You can try the attached file. I tested the output with different loading from 10R to 100K.
LTSPICE simulation results vs real world amplifier [SOLVED] - Page 1
Forum section: electronics / beginners

author: spicey
author_rank: Newbie
timestamp: November 06, 2021, 10:00:55 am
content: Hello,I am testing LTSPICE and, although at the moment I am a little rusty, out of curiosity I have drawn the schematic of a simple common-emitter amplifier based on a NPN transistor, 2N3904 measured for hfe (256) with a multimeter. I have tested the simulation and, surprise, it does not match the results I get directly on the scope. I also tried to define a new model for 2N2904 with a 256 hfe but the simulation results in LTSPICE were the same.Here are some images with the schematic,the result of the simulation with LTSPICE with an obvious top and bottom clipping,...in the real amplifier the input is connected to a 5kHz 5V signal generator and the aim is to convert/amplify it to a 5kHz 18V signal. Here is a screenshot of the scope with the amplifier and there isn't clipping at all,the LTSPICE peak-to-peak voltage for V(out) is over 23.2V while in the scope is 17.6VWould anyone be so kind to tell me what I'm doing wrong or what I'm missing? Any help will be appreciated, thank you.

author: guymo
author_rank: Regular Contributor
timestamp: November 06, 2021, 10:05:41 am
content: On the scope shot it seems that the input signal is 5V peak to peak and the output is 18V peak to peak. Isn't that exactly what you would expect?Your LTSpice input signal is 5V amplitude, which is 10V peak to peak.

author: Kleinstein
author_rank: Super Contributor
timestamp: November 06, 2021, 10:14:05 am
content: Usually the difference between real world and the simulation is from not using the same parts, like more parasitic capacitance, or wire inductance.Here the obvious difference is the amplitude. Another likely difference is the output impedance of the source.

author: spicey
author_rank: Newbie
timestamp: November 06, 2021, 10:17:17 am
content: Thanks a lot.Quote from: guymo on November 06, 2021, 10:05:41 amThat's it! Thank you, guymo.Edit: Just to give context to the problem: I had a hard time when I resumed using LTSPICE after a few years, I did not remember how to handle the GUI, how to place components and I even came to resort to edit the text files by hand to copy and paste symbols from old schematics. The sine wave source was copy-pasted borrow from an old project and by not editing it, after hours of fighting hard with LTSPICE, I did not realize that it had twice the amplitude. On the other hand, the V(in) trace in the LTSPICE plotter was there just to do it the same as with the scope, but I didn't really even watch it.
LTSPICE Transmission Line - Page 1
Forum section: electronics / beginners

author: Hammbone
author_rank: Newbie
timestamp: February 16, 2025, 08:54:15 pm
content: I am trying to figure out how the lossy transmission line (ltline) works in Ltspice. I thought that it worked like a RLC ladder where the len parameter determined the number of RLC pairs. However, when I simulate a using the ltline model versus discrete components I get a different result. The discrete version has much more ringing. Does anyone know what might be causing this?Simulation parameters:.tran 0 40n 0 .1n.model MyLossyTline LTRA(len=10 R=.058 L=7.6277n C=2.9868p)

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 16, 2025, 09:58:27 pm
content: Every time I've tried to use ltline, I eventually give up (for transient simulations that is, I think it worked ok for AC sims). Usually I resort to using one or more sections of tline with my own loss resistors connected to it.
LTSpice vs. reality - why NMOS works and BJT doesn't? - Page 1
Forum section: electronics / beginners

author: dvh
author_rank: Contributor
timestamp: October 26, 2024, 04:27:44 pm
content: Once again, I had a bit of time on my hand and started looking into boost converter circuits. As always, had to realize that there is something I don't get.Stuff of my electronics journey seems like.I built a breadboard version of this circuit, where VSig is provided by a 555 timer.Of course it didn't work! I replaced the 2N2222 BJT with a BS170 NMOS with appropriate voltage divider and resistor to ground to see if things change. And indeed they did, the circuit worked on the breadboard.Now comes the fun part: both of the circuits work in LTSpiece.The question: why didn't the BJT approach work if the NMOS did? What am I missing?Thanks!

author: jwet
author_rank: Frequent Contributor
timestamp: October 26, 2024, 05:02:27 pm
content: The BJT didn't work because it takes a lot more current that .4 mA to full switch on ("saturate") the BJT. You can watch the difference in spice between that right side of the inductor (collector or drain). You will see that the BJT, doesn't conduct enough current to full charge the inductor. Quick fix, make the base resistor 470 ohms or so.

author: Zero999
author_rank: Super Contributor
timestamp: October 26, 2024, 07:23:05 pm
content: Models are often based on typical device characteristics, not worst case. It's likely the transistor you used hat a lower hFEthen the model.Why do you have a potential divider before the MOSFET's gate?

author: dvh
author_rank: Contributor
timestamp: October 27, 2024, 03:54:00 pm
content: The potential divider is there to limit IDS. At least that was my theory - is it silly?Quote from: Zero999 on October 26, 2024, 07:23:05 pmThe min. hFE is 35 according to the datasheet. Is 17.5mA Ic enough to charge the inductor?Quote from: jwet on October 26, 2024, 05:02:27 pmIn LTSpice I measure around 26mA for Q1 and around 21mA for M1. Where did the 0.4mA came from?

author: iMo
author_rank: Super Contributor
timestamp: October 27, 2024, 04:31:04 pm
content: Mind there are two variants of 2N2222 with different pin assignments. Like PN2222 in TO92 or something like that.Try with different npn transistor as well.Also with npn as well as with mosfet you may need a resistor from base to ground in order to speed the transitions up.Also 1 picosecond edges with you signal is something I would not use in simulation as that is pretty unrealistic assumption..PS: your npn version does not work in LTspice properly, btw.The duty cycle and period of your driving signal has to fit somehow your inductance and load.You have to see the collector current to ramp up to certain level, which converts to higher voltage then.Also you need some base current.You have to play with the duty and period and base current and inductance and load, or do the math
ltspice - what does .ic V(C1)=10 actually do? - Page 1
Forum section: electronics / beginners

author: ledtester
author_rank: Super Contributor
timestamp: May 13, 2024, 11:41:04 pm
content: In the simple RC circuit below setting the initial condition V(C1)=3 doesn't seem to do anything, but setting the initial voltage of the node OUT (e.g. V(OUT)=3) works to start the capacitor voltage at 3V.So why doesn't.ic V(C1)=3do the same thing as.ic V(OUT)=3?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 13, 2024, 11:55:11 pm
content: You assign it to nodes, not components.Whether it throws an error or is ignored passively, I suppose depends on the SPICE engine.You need to put the "IC=3" on the C1 statement itself (or in the part edit dialog), which will set the respective node(s).Tim

author: ledtester
author_rank: Super Contributor
timestamp: May 14, 2024, 12:06:20 am
content: Ok, I think I understand now...This directive:Code:.ic V(C1)=3is quietly ignored. In order to set the initial voltage of C1 you have to:1. Control-Right-Click on the cap to bring up the Component Attribute Editor.2. Add "IC=3" to SpiceLine23. To make this visible on the schematic click in the "Vis." column to put an "X" on that line.Whew!

author: Sensorcat
author_rank: Regular Contributor
timestamp: May 14, 2024, 12:16:50 am
content: Quote from: ledtester on May 14, 2024, 12:06:20 amYes, but C1 is not symmetric in simulation. It has a first and a second node that define the positive voltage direction. So you can accidentally apply -3V that way. Your original solution to set the node voltage is easier to understand and not ambiguous in the schematic.

author: ledtester
author_rank: Super Contributor
timestamp: May 14, 2024, 03:08:07 am
content: Quote from: Sensorcat on May 14, 2024, 12:16:50 amTrue but what I've determined is that the voltage is is consistent with the current arrow that the cursor turns to when you hover over the device after running a simulation -- the arrow points from the high voltage end to the low voltage end (assuming your initial condition voltage is positive).Now that I have read the docs more carefully I think my confusion was that the .IC can set the initial current through a part (like inductors) but for voltage it can only set it for nodes.Of course, for the polarity of an initial current setting you'll probably have to look at the arrow that the cursor changes to when you hover over it. It would be nice if ltspice could indicate this polarity on the schematic. One proposed solution is to use a different symbol which indicates which end is which:https://electronics.stackexchange.com/a/661590/95488

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 14, 2024, 04:20:54 am
content: Can also look at the netlist, in case you're working with it; current is always into the first node. (Likewise, positive voltage sources delivering power have negative current, and current sources are "from-to".)Tim
LTspice...wish to split LT1243 output into two separate pulse streams - Page 1
Forum section: electronics / beginners

author: ocset
author_rank: Super Contributor
timestamp: December 09, 2019, 01:16:46 pm
content: Hi,I wish to simulate a Half Bridge SMPS in LTspice, but using the LT1243 adapted to control it.I need to split the gate drive in to two separate streams as in the attached.Would you say D flip flop for each stream would be best to achieve these two streams?

author: ocset
author_rank: Super Contributor
timestamp: December 09, 2019, 03:03:18 pm
content: The attached (LTspice and schem) shows how it can be done…but I am getting an unfortunate little spike in the waveform streams as shown.Any better ways?

author: unitedatoms
author_rank: Frequent Contributor
timestamp: December 09, 2019, 03:17:12 pm
content: The spike is caused by pulse front leaking from input. You can replace your voltage TTT and SSS and both switches with 2 AND gates. Wire LT chip output to 2 inputs of 2 AND gates. Other inputs of AND gates go to Q and #Q of flip flop.
LTSpice XVII gridlines in waveform viewer - Page 1
Forum section: electronics / beginners

author: IonizedGears
author_rank: Regular Contributor
timestamp: December 06, 2016, 07:42:38 pm
content: How do I get the grid to show in the waveform viewer. I've googled this and looked through the manual but I can't seem to find how to do it. It's annoying to trace back to the axis when I want to get a round-about value and it's cumbersome to constantly use the cursors to get a definite value. I've also looked through the control panel but I still can't seem to find any setting for this.The attached picture directly from the manual shows what I want.

author: IonizedGears
author_rank: Regular Contributor
timestamp: December 06, 2016, 07:44:54 pm
content: Nevermind, I'm an idiot. I had to click on the plot pane so i can see the different settings.
LTspice Yahoo Group Files section - Blank (Resolved) - Page 1
Forum section: electronics / beginners

author: eblc1388
author_rank: Frequent Contributor
timestamp: March 11, 2018, 02:36:36 am
content: Ltspice Yahoo Group:Instead of the usual list of file directories, all I got is a blank when I clicks on "Files". Does this happen to you too?The models and circuits there are years of experience from people all over the world and it is sad to see them gone. Is there is a backup repository for all the model files somewhere else?

author: chris_leyson
author_rank: Super Contributor
timestamp: March 11, 2018, 10:00:39 pm
content: Everything is still there, you just have to use the search box.

author: rstofer
author_rank: Super Contributor
timestamp: March 11, 2018, 10:08:26 pm
content: There are 2 LTspice forums on Yahoo. The main one is used for discussion and has a few temporary files. The secondary forum is the main repository for files.

author: eblc1388
author_rank: Frequent Contributor
timestamp: March 12, 2018, 12:10:34 am
content: Quote from: rstofer on March 11, 2018, 10:08:26 pmThanks. I didn't know that as I used to get all my files from the main discussion group.For others who are in a similar situation, please join also the Yahoo Group "LTspiceFiles" to obtain the model files.
LTSpiceIV beginner. Opamp model question. - Page 1
Forum section: electronics / beginners

author: hazuki
author_rank: Contributor
timestamp: June 19, 2013, 01:32:09 am
content: Hi all. A quick question. I want to simulate an LT1494 opamp for a circuit I'm designing. Basically it's just a differential amplifier used in a rail to rail application. My question is: to what length does the simulation model go to match the performance of an actual device? You can see in my schematic (attached) that I have a +12v supply powering the opamp, but the opamp input goes up to 24V. According to the simulation, there isn't an issue but there would be in real life.Also if anyone has any good recommendations on learning LTSpice, I'd appreciate it!Thank you.

author: Bored@Work
author_rank: Super Contributor
timestamp: June 19, 2013, 02:18:27 am
content: Good SPICE models match the real behavior of a component with regards to certain aspects within the component's safe operating conditions (maximum specifications). Outside the maximum specifications, or for others than the modeled aspects you get rubbish.Bad SPICE models always produce rubbish.Good SPICE models in a bad-for-SPICE circuit can also produce rubbish.Quote from: hazuki on June 19, 2013, 01:32:09 amDon't learn SPICE. Learn the trade, starting from the basics like Ohm's law onwards. SPICE requires to have more than a clue what you are doing. If you don't happen to have a clue you can't detect if SPICE is producing rubbish.
LTV-817 Optocoupler Benchtest - Page 1
Forum section: electronics / beginners

author: OpenCircuit
author_rank: Regular Contributor
timestamp: March 25, 2017, 03:09:51 am
content: Trying to determine if functional while removed from circuit. My idea is to have terminals 3 and 4 on DMM #1 in continuity setting.For pins 1 and 2 I am not certain. Tried DMM #2 in diode mode while probing 1 and 2 thinking DMM#1 would indicate continuity-not working. Valid test? If no, can I apply X volts to 1 and 2 and then get the emitter and collector to close (connect)? If so, value of x? Page 9 on input show 50mA? I was expecting something like volts as the solution for x.https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=7&cad=rja&uact=8&ved=0ahUKEwj4s8yM1PDSAhUG2IMKHbdxB8MQFghTMAY&url=http%3A%2F%2Fwww.jameco.com%2FJameco%2FProducts%2FProdDS%2F878243.pdf&usg=AFQjCNEZ-j3LGNcsr-tsOVvLqMfBvzabvw&sig2=dY746WxDOVRJMSEk0NwKYA

author: ebclr
author_rank: Super Contributor
timestamp: March 25, 2017, 05:58:21 am
content: A resistor and a battery will help on a better test

author: tpowell1830
author_rank: Frequent Contributor
timestamp: March 25, 2017, 06:03:43 am
content: Quote from: ebclr on March 25, 2017, 05:58:21 amNice test setup, but I would add an LED in series with R2 so that you know when transistor fires.

author: Cervisia
author_rank: Regular Contributor
timestamp: March 25, 2017, 07:58:40 pm
content: The input (pins 1/2) is a LED, so you must not apply a voltage but a current. If all you have is a voltage source, add a resistor to limit the current (like you would do with any other LED).Your DMM's diode test mode will limit the current, but I don't know how high that current is.50 mA is the absolute maximum rating, i.e., the limit beyond which the chip might blow up. A good value to test would be the current it was designed for, i.e., the current for which the CTR is specified (5 mA).The output is a transistor, so it will allow a certain amount of current to pass through. If your input current is too small, you will not get enough output current, and the continuity function (which actually tries to measure the resistance) will not trigger.The most reliable way to test an optocoupler is to use a voltage source and a resistor on the input. To check whether the output is switched on, connect it to a voltage source (you can use the same that's powering the input) and measure the current going through the output, or measure the voltage drop over a resistor in series with the output.
Luminosity of standard RED led - Page 1
Forum section: electronics / beginners

author: adrian.wong
author_rank: Newbie
timestamp: December 28, 2015, 11:59:13 am
content: I'm a newbie in electronics and I would like to what is the luminosity of standard RED led. Kindly reply asap. thanks!

author: alsetalokin4017
author_rank: Super Contributor
timestamp: December 28, 2015, 01:23:17 pm
content: There really isn't any such thing as a "standard red LED". There are many different types of red LEDs available, and their brightness (or luminosity) depends on how much current you are putting through them.SO if you really want an answer, and you can't find it by googling -- you will have to be a lot more specific in your question.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 28, 2015, 06:42:22 pm
content: Anything from <10 to >20,000 mcd. Depends on type (pointlike or diffuse), size (especially current rating), wavelength (orange-red has higher efficacy than pure red).Tim
Lux Drive 700ma driver overcurrent - Page 1
Forum section: electronics / beginners

author: Sparkey_500
author_rank: Contributor
timestamp: November 14, 2013, 12:08:58 pm
content: I have decided to build a 3W IR/RGB/white/UV light source. I'm using 12v from an ATX psu to power a lux drive 700ma buckpuck (3021-D-E-700). For some reason when I connect the IR 3W 700ma LED to the driver it will supply ~1amp. All of my other LEDs are rated for 700ma, and all of them will not draw more than 700ma. I've already burnt out one IR LED, I don't understand why it's drawing more than the max of the driver. If the problem was the driver, why don't the other LEDs have similar problems.

author: Psi
author_rank: Super Contributor
timestamp: November 14, 2013, 01:26:38 pm
content: Only thing i can think of is the ultra low forward voltage of a single IR led.It's much less than a typical LED, around ~1V compared to ~3VMaybe the controller doesn't like such a small voltage

author: Sparkey_500
author_rank: Contributor
timestamp: November 15, 2013, 01:46:18 am
content: Thanks, that was it.forward voltage of LEDs is:Red 2.0-2.5vGreen 3.2-3.5vBlue 3.2-3.5vWhite 3-3.6vUV 3.2-3.6VIR 1.5-1.7

author: Psi
author_rank: Super Contributor
timestamp: November 15, 2013, 01:53:06 am
content: Easy fix then, just use two IR leds in series.The output power of a 1.5V @ 700mA LED is ~half a regular 3V @ 700mA LED anyway.So having two in series will even up the total IR output compared to your other leds.
LVC driving of Powertip displays - Page 1
Forum section: electronics / beginners

author: AussieBruce
author_rank: Regular Contributor
timestamp: November 07, 2022, 01:31:06 am
content: I need to replace an old 5v CPU driving a Powertip (40 x 2 lines) display with an ARM, so the outputs to the display will change from 5v to 3v3. The signal voltage margins specified on the very vague datasheet suggest that I should be OK simply wiring the outputs across directly, without level conversion, and leave the display on 5v supply. There appear to be no pullups on any of the display input lines. Is this likely to work, any other possible gotchas?