UC3846: Simulation in LTSPICE is not operating as expected

Status
Not open for further replies.

Jonathan Hanson

New Member
Good afternoon,


As the thread title suggests, I am having trouble simulating the UC3846 model in LTSPICE. I have gone through the process of creating the chip and adding it to the simulation space, but when configured in a similar way to the "Typical Application Diagram" from the data sheet it doesn't create any output oscillation. The system runs up to certain voltages then remains constant through the rest of the operation.

Ct should supposedly always output some oscillatory waveform if the chip is powered up. This is not the case, so I believe the issue is with the model itself. TI supplies the .lib file that should operate in PSPICE and TINA-TI. LTSPICE claims it is capable of operating any PSPICE .lib file without issue and TI says they do not support operation of their products in LTSPICE, so I'm left in an odd position. Is there any reason I can't directly create the chip model in LTSPICE from the spice .lib?

I am using LTSPICE XVII, Windows 10, and I've attached the .lib file of the component (changed to a .txt to upload), its data sheet and a picture of my circuit layout (It used to look identical to the typical application diagram as I mentioned above, but have since changed it to try different things to get it to work).
 

Attachments

  • Controller_UC3846.pdf
    1.6 MB · Views: 448
  • uc1846.txt
    6.7 KB · Views: 378
  • UC1846_Oscillator.png
    27.8 KB · Views: 491
The pins in your IC symbol have names which are different from those used in the model.
 

Hi

The model file needs to be massaged. Try the attached model file. Let me know the results.
Also verify your symbol pin mappings are correct.

eT
 

Attachments

  • UC1846_LTspice.txt
    6 KB · Views: 414
Last edited:
The pins in your IC symbol have names which are different from those used in the model.

Hi

The subckt can have pin names different than the symbol. Its the pin order that is used to map the pins. For example, if my symbol has two pins, VDD, and VSS, and my .subckt has two pins named V+ and V-, the VDD pin and the V+ pin must be the first pin of the two if I want them to be mapped to each other. The names don't have to match.

However, the only time they need to be the same is when the symbol is auto generated from a .asc schematic. LTspice creates the pin order after matching the pin names.

eT
 
Useful to know. Thanks.

Edit:
I've just experimented and it seems that even with an auto-generated symbol the pin names can be edited, providing the pin numbering remains unchanged.
 
Last edited:
Useful to know. Thanks.

Edit:
I've just experimented and it seems that even with an auto-generated symbol the pin names can be edited, providing the pin numbering remains unchanged.

Not sure what you mean...
The pin order is not significant until the part’s schematic file is converted to a subckt definition and the symbol instance is changed to X. Until then, the pin names need to match and the pin order is ignored unless gaps are left in the symbols pin numbering.

eT
 
Hi

The model file needs to be massaged. Try the attached model file. Let me know the results.
Also verify your symbol pin mappings are correct.

eT

Thank you for the reply. I have used your .txt file to no avail. The simulation still operates in the same fashion as in the original post.

When generating a component each of the ports is assigned to a netlist number. Once assigned the name and location of the port on the chip should not matter as LTSPICE only views the netlist number for its simulation. Perhaps the pins are assigned to the wrong ports from the beginning, but I'd find that to be surprising.

When measuring the Ct port in a transient circuit analysis there should always be oscillation present, as far as TI has informed me the oscillation will be there as long as the chip is powered. I have yet to see this for myself. Any thoughts?
 

Hi

TI models should run in LTspice but some do have issues.
I have a program that does some massaging of the subcircuits to eliminate spurious messages being generated by the simulation. Just a first attempt at fixing the problem. I look further check the subcircuit definitions.

I have my own 1846 model and tried substituting the TI model and basically had the same issue you did.

eT
 


I work with a number of different manufacturers, do others have these kinds of problems too? What kind of program is it that you use to fix the subckt's?

I'll continue working with it to see if I can gain any headway with the component myself, but I appreciate the help!
 
I work with a number of different manufacturers, do others have these kinds of problems too? What kind of program is it that you use to fix the subckt's?

I have a c++ program I wrote that removes things like curly braces that cause spurious messages to be generated in LTspice. I used to this by hand but decided to write a program to do it for me. It doesn't actually change the subckts.

I'll continue working with it to see if I can gain any headway with the component myself, but I appreciate the help!

I'll do the same..

eT
 

I've contacted TI and they don't work with LTSPICE as it infringes on their EULA agreement, so that's a dead end.
I've contacted AEi Systems, they are the ones who wrote the library file for TI, and this is the correspondence I've had with them:

AEi:
"This is a PSpice model, not an LTspice model. LTspice is not PSpice compatible.

Yes, it usually swallows the syntax, but the computational algorithms in LTspice cause it not to run PSpice models the same was as PSpice does in some cases, or as efficiently (simulation can grind to a halt), in some cases."


My reply:
"I thought generally LTSPICE is capable of using all PSPICE models. What is it about the algorithms that allow some models to work and others crash?"


AEi:
"There are also issues with the syntax conversion behavior that can be puzzling given they run in PSpice but grind to a halt in LT.

LTspice is known for not running some transient switching models that run in PSpice. We have had to convert many of our models. Some requires simple changes, other complete recoding.

We have a number of thoughts as to why based on the changes we have had to make but I cannot say for a number of reasons.

LTspice is not completely syntactically compatible, though mostly it does fine. That has little to do with giving the same answer and running with the same efficiency/time step progression.

“using” is a tricky word. If it runs but takes days when pspice runs in second “using”.

If you want to send your circuit ASC file, we can try a few quick tricks to see if it will unclog/run right. If we can’t get it to go, we will have to grind out a replacement."
 

Well....I agree that pspice isn't completely compatible with LTspice. Sometimes they'll work with minor changes, other times it a recode.

eT
 
Last edited:

Here is your test circuit using my own LTspice SG1846 model (same as UC1846).
 
Not sure what you mean..
I meant that once LTS has done its thing auto-generating the symbol from a netlist and the instance is set as X, then afterwards the pin names on the symbol can be changed, while leaving the pin order as is and the pin names in the model as is.
 
Here is your test circuit using my own LTspice SG1846 model (same as UC1846).
View attachment 113299

That looks about right, it's operating at 20kHz too, which is exactly what it should be! What does the Ct waveform look like? It should be a sawtooth if I remember correctly (I'm not on my work computer to double check). So what did you do to get this component?

Since you asked, I've attached my .asc file if you still wanted to poke at it directly.
 

Attachments

  • Test_UC3846Oscillator.asc
    5.5 KB · Views: 401
That looks about right, it's operating at 20kHz too, which is exactly what it should be! What does the Ct waveform look like? It should be a sawtooth if I remember correctly (I'm not on my work computer to double check).

Yup...I've attached an image that includes CT.

So what did you do to get this component?

I modeled it myself.
BTW - I asked TI about the equations on the data sheet. There are some errors on the UC1846 datasheet.
I have a couple UC1846 chips and 3846 chips. If I remember correctly, TI recommended I use the UC3846 datasheet.

Since you asked, I've attached my .asc file if you still wanted to poke at it directly.

I'm attaching the model, symbol and your test circuit. try it out.
It takes about 17 seconds to simulate.

eT

 

Attachments

  • SG1846_Test.zip
    6.6 KB · Views: 446


You modeled this yourself? That's incredible! How'd you learn to do that? I've spent days poring over data sheets and model/subckt files to try and design a single file for a part and was utterly unsuccessful.

The part runs on my machine too! Fantastic job and thanks for the help! As it works out I actually needed the UC3846 anyway, I only used the UC1846 component because that was the model name on TI's website.
 

Hi....well...yes I did and all I can say is I've had a lot of practice

Glad it worked...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…