Hot answers tagged

11 votes

I'm trying to simulate an audio amplifier circuit but I couldn't find how to add LM386 to LTSpice like image. Is there any suggestions?

What I will do here It isn't even clear to me what you actually want. One one hand, I think you may want a symbol. On the other hand, I think you may want a model. Or maybe both. I really cannot tell. ...
user avatar
  • 68.9k
8 votes
Accepted

Why is capacitor discharge time higher when an LED is included?

The short answer is the "voltage drop" of the diode, but the longer answer is the non-linear I-V characteristic of the diode. In hand-wavy engineering we resort to a simplified piecewise-...
user avatar
  • 2,039
8 votes

How can I model this power inductor more accurately?

Do you know that you need to model the nonlinearity? Usual progression of model capabilities is something like: inductor (gets the basic dynamics right); inductor with resistance (modeling loss over a ...
user avatar
6 votes

How can I model this power inductor more accurately?

You can build a simple saturable core model using an op-amp and a 1-F capacitor as shown by Larry Meares in a paper he published in 1986. The basic circuitry is shown below and mimics saturation ...
user avatar
6 votes

I'm trying to simulate an audio amplifier circuit but I couldn't find how to add LM386 to LTSpice like image. Is there any suggestions?

Generic adding components to LTSpice https://softsolder.com/2009/09/29/adding-a-device-to-ltspiceiv/ I found and saved the model from here. https://forum.allaboutcircuits.com/attachments/lm386-asy....
user avatar
6 votes
Accepted

If function error in LTSpice

The error is about exactly what it says: the conditional is defiend as if(a,b,c), and if you check the expression for BH with a ...
user avatar
5 votes

Why is capacitor discharge time higher when an LED is included?

If you’re putting the LED in series with the resistor then the discharge current will be significantly lower, and will drop almost to zero when the capacitors discharge to the forward drop of the LED.
user avatar
  • 5,350
5 votes

LTspice and op-amp strange behavior

V1 should be "+15V" in order to have -15V as a negative supply rail. Or you can have V1 at "-15V" and turn the voltage generator 180°. Post your graph when done
user avatar
4 votes

Failed to find DC operating point for AC analysis LTspice

May I direct your attention to the second graph (updated version, simulation with positive feedback). I don`t know if you are surprised about the results - because in reality such a circuit cannot and ...
user avatar
  • 22.5k
4 votes
Accepted

In LTspice, why does having these two transformer models create an error?

Don't put commas in your subcircuit names. Commas are special characters and count the same as a blank space in SPICE syntax, i.e. they both are used to separate out data fields. See Appendix 3 (...
user avatar
  • 2,039
4 votes

LTSpice RL circuit simulation with ideal inductor and inductor from database

My big suspicion is that your sine wave voltage excitation is initially applied when the sine wave voltage is passing through 0 volts. So, assuming that you are, the inductors in both scenarios will &...
user avatar
  • 378k
4 votes

Inconsistent behavior of MOSFET gate driver

Your inverter schematic is unusual at best. It looks incorrect (or making assumptions that aren't apparent to me) at first glance, but I'm going to ignore it for now. The gate driver you have chosen ...
user avatar
  • 17.6k
4 votes

Model positive exponential current curve on LTSPICE

I thought I've give my own suggestion a shot since I never personally tried it, and also give an alternate take on "quick'n'dirty" approaches. I used WebPlotDigitizer on your extremely low ...
user avatar
  • 2,039
3 votes

Model positive exponential current curve on LTSPICE

Before I say anything, I am trying to model this based on your first picture, annotated like this: You say nothing about the first dip (at the first dotted red line), time or value. You also say ...
user avatar
3 votes
Accepted

LTspice-RIAA-simulation not working out

Your output "vinyl" mimics the gain plot of the preamplifier. You need to flip things around so "vinyl" has a lower output at low frequencies and a higher output at high ...
user avatar
  • 3,770
3 votes

LTSpice: Stochastic Input Parameter in Subcircuit

I see now. The problem is that the gauss() function cannot be called inside a .func, only in a ...
user avatar
3 votes

LTspice and op-amp strange behavior

You have added wire labels (F4) and, in the process, more than one net share the same label. The effect is you are shorting out those nets. Either delete the labels, or use unique names for each net. ...
user avatar
3 votes
Accepted

How to control/remove "quiescent current" of UniversalOpamp2

[Opamps]/UniversalOpamp[2,3a,3b] use VCSW as the output stage, and the quiescent current is directly related to the values of ...
user avatar
3 votes
Accepted

Failed to find DC operating point for AC analysis LTspice

Judging from the apparent topology of the circuit drawn around the opamp, I guess you are trying to make an inverting amplifier. If so, it looks like you simply connected wires wrong. The input ...
user avatar
  • 10.2k
2 votes
Accepted

LTspice AC Analysis extracting only the phase shift value at a certain frequency

The results of .meas scripts come out as a compact notation, so you can't separate them, at least not within LTspice. You can use the error log with external ...
user avatar
2 votes

How to input range of current values in LT Spice

I want my waveform to oscillate from 10uA to 10mA That's a peak-to-peak value of 9.99 mA or, a peak value of 4.995 mA. So, use two current sources in parallel; one set to produce a peak current of 4....
user avatar
  • 378k
2 votes

How to input range of current values in LT Spice

I would use a behavioral current source (bi in the components library) The amplitude could be driven by a voltage source in PWL mode : and then, the arbitrary current source (or here voltage source) ...
user avatar
  • 21
2 votes
Accepted

LTspice and op-amp strange behavior

You're powering the op-amp from 0V. Run a DC analysis and check the voltages on the power pins :)
user avatar
2 votes

Same variables and different values on instances

These are the contents of the opamp.sub (installed by the LTSpice) file for an almost ideal opamp with two parameters: ...
user avatar
  • 6,093
1 vote

LTSPICE Dynamic Power / Voltage Slew Rate Controlled Source

As mentioned in the question's comments, you can leverage the UniversalOpamp2 component (found in the component library under ...
user avatar
  • 2,039
1 vote

Help with voltage doubler in a WPT application

The coupling between the two coils is very small. 0.089939 means about only ~9% of the flux from the primary coil is making it to the secondary. Try starting with a K = 1 for an ideal transformer to ...
user avatar
  • 11
1 vote

LTspice-RIAA-simulation not working out

I remember old vinyl pop-click, pop-click records. The same curve appears at https://sound-au.com/project06.htm .
user avatar
  • 2,179
1 vote

How to input range of current values in LT Spice

If you're referring only to your current source then what you ened is a sine with offset. So calculate it based on your maximum and minimum values, ...
user avatar
1 vote

LTspice and op-amp strange behavior

After many and many models tested, I finally found UniversalOpAmp3 that works exactly as I see with the real TL074 on a breadboard and, as far as I understood, an OP amp should work. At this point I ...
user avatar
  • 83
1 vote

LTspice and op-amp strange behavior

I noticed that your pin numbers are wrong and your sim program might not have a model of a TL074.
user avatar
  • 2,179

Only top scored, non community-wiki answers of a minimum length are eligible