Installing and using LTspice IV (now including LTXVII), From beginner to advanced

You can copy the *.net file while LTC is open if you want to keep it. I use a bat file in Sendto to clean up other LTC files in subdirectories....

Anyhow, I came here to say that when I overdrove Mark's model, it had terrible rail sticking at 1KHz, even. So, I wanted to see if Teemuk/Ian's model did the same. Well no, but it does have a terrible phase reversal problem on the negative clip. The problem comes from the VAS Darlington dumping current into the VAS degen resistor. Of course, this is in the LM3886 chip, so has anyone with a real chip seen this problem? I would be surprised if such a serious problem wasn't fixed, but for an accurate simulation, we would like to know just how. A current limit on the VAS turns out to be quite picky but a series resistor on the first collector is more forgiving, but it may affect the phase margin. This image shows a possible fix (Rfix) to the model, but who knows what is on the chip?
 

Attachments

  • Rfix.png
    Rfix.png
    33.9 KB · Views: 167
Last edited:
Perhaps the only people that badly need a detailed model are those making cheap clones of the chip. Maybe TI has an accurate model, but it is only available with a Non-Disclosure Agreement. Those who are buying chips from TI can treat it as a black box, more or less complete solution. I know that data sheets often deliberately contain errors in the "equivalent schematic", usually fairly obvious to those who understand the chip. But that circuit often tells you how to bias the chip and use it in unusual ways, and a warning about the chip limitations.
The company that I used to work for resorted to using a Chinese vendor to build products that used chips only the company could make, in order to maintain control of the product. But using a Chinese manufacturer was the only way to compete in the low-price market.
 
Perhaps the only people who wheedle and beg and thunderously DEMAND another simulation model, are low volume hobbyists whose cumulative purchasing volume is negligible. Perhaps the high volume customers who buy 1 x 10^7 parts per year, posses the manpower and the dedicated funds+equipment to build and measure prototype boards, then make informed judgments about what modifications to make, if any. With or without simulations.
 
That runs straight off (apart from 3 pins not connected on the IC and V3 set to zero) but maybe that is because I have that model set up anyway.

When you look in the Lib folder you should have the netlist as in the image here.

If you copy and paste the file somewhere else you can play around with it. If you right click it and open it with Notepad (do not accept the option to always use notepad to open these, do it as a one off) you will probably see the line at the top saying:

*C:\Users\Karl\Documents\LTspiceXVII\lib\LM3886v1_1\LM3886v1_1.asc

which is of course incorrect for your PC. Try changing that line using notepad and resave the file. When you are happy do it for real on the file in the Lib folder.

View attachment 1017280

View attachment 1017281

View attachment 1017282
Hi Mooly,

Thanks again for taking your time to look into this,
I believe everything is as it should, .net file has the right directory and is marked as "read only", yet I'm still getting this

Error on line 70 : e:u1:* u1:copyright u1:© u1:2000 u1:linear technology corporation. all rights reserved.
Unknown parameter "technology"
Error on line 10 : v3 0 n004 v
Unknown parameter "v"
Fatal Error: u1:e*: Missing gain value


The annoying thing is, I tried it on my MacBook and it worked (sort of - it wasn't giving me errors, but it wasn't amplifying properly in the same circuit configuration).

I'm going to re-install LTspice and try again....
 

Attachments

  • Screen Shot 2022-01-22 at 09.15.12.png
    Screen Shot 2022-01-22 at 09.15.12.png
    9.1 KB · Views: 120
  • Screen Shot 2022-01-22 at 09.14.50.png
    Screen Shot 2022-01-22 at 09.14.50.png
    19.9 KB · Views: 100
  • Screen Shot 2022-01-22 at 09.19.04.png
    Screen Shot 2022-01-22 at 09.19.04.png
    10.9 KB · Views: 132
That's really not the point, but I see where you're coming from. My customer service mindset is just different, I guess.
This doesn't have much to do with customer service mindset but just how running a business works.

Spending more resources (read:money) into things that won't give you any or barely any profit is just not sustainable.

Obviously there is a balance to be made there.

When it comes to TI the service they provide has been going down rapidly the last 5 years.

I personally even think we can be thankful we have some basic models at all to begin with thanks to some enthusiasts at TI.
If you look at where the bulk of their products end up. It wouldn't surprise me that the amount of their customers who even remotely care (or even know) about SPICE modeling is less than 10%
 
This doesn't have much to do with customer service mindset but just how running a business works.

Spending more resources (read:money) into things that won't give you any or barely any profit is just not sustainable.

Obviously there is a balance to be made there.

When it comes to TI the service they provide has been going down rapidly the last 5 years.

I personally even think we can be thankful we have some basic models at all to begin with thanks to some enthusiasts at TI.
If you look at where the bulk of their products end up. It wouldn't surprise me that the amount of their customers who even remotely care (or even know) about SPICE modeling is less than 10%
Fixing a die may mean millions of dollars. You had better sell tends of millions of the part.
 
Hi Mooly,

Thanks again for taking your time to look into this,
I believe everything is as it should, .net file has the right directory and is marked as "read only", yet I'm still getting this

Error on line 70 : e:u1:* u1:copyright u1:© u1:2000 u1:linear technology corporation. all rights reserved.
Unknown parameter "technology"
Error on line 10 : v3 0 n004 v
Unknown parameter "v"
Fatal Error: u1:e*: Missing gain value


The annoying thing is, I tried it on my MacBook and it worked (sort of - it wasn't giving me errors, but it wasn't amplifying properly in the same circuit configuration).

I'm going to re-install LTspice and try again....
I don't follow what you did to get there? Attached is a zip file with working Mooly files, including a copy of the net file. Do not move any files out of the "mooly" folder.
However, the copyright line is a comment that starts with an asterisk, and LTC should ignore it, not attempt to decode it. I think the asterisk has to be the first character in the line but you did not share the file so I dunno if that rule has been abused.
Also, this reminds me that different systems handle end-of-line differently. The asterisk may not be recognized as a comment because it follows an end-of-line character that is not correct for the problem system. You might try editing the file in Notepad++ or similar text editor that supports control characters.
 

Attachments

I am having trouble with the relationships in my commands. Depending on the number of samples, a function of time, I can get THD results from .000014% to .23%

Left of the fundamental depends somewhat on number of samples, which I also do not understand.
In the View for the FFT, the FFT size is set to match the fft parameter.

I know on the bench, I can measure around .003% 1K @ 5W. ( 60W amplifier) So it is a good amp, but magic!
As far as tweaking the schematic, I believe the trends are correct, but the values are unbelievable to both extremes. Curious, short runs are higher, but much longer, like 5000 cycles, are also higher distortion. What am I not understanding here?

I posted some info back at post #3167 , maybe give that a try.
 
I would like to see something on measuring amplifier phase margin. I do a bode plot, looking at the two sides of the input diff pair and see where the phase diverges in relation to zero gain. Is that correct?

Best to use a TIAN probe in the feedback path, there is a Ltspice example circuit that you can use, the file is named LoopGain2.asc and you can find this in (Microsoft Windows) - C:\Users\username\Documents\LTspiceXVII\examples\Educational
 
Last edited: