Open ra3xdh opened 1 month ago
I have tested the provided PWM controllers models, and it doesn't work with Ngspice. The Ngspice reads the model without error but then fails to converge or gives kilovolt outputs. Theses models requires significant effort to port them to Ngspice syntax.
Can you post your project? The ngspice guys have made many changes to improve compatibility. They also have recommended changes to models.
Here is the project. It is done using the latest snapshot build. The MC34063 device is taken from another place and works as expected. The both UC3483 and TL494 gives either zero or kilovolt output. I suppose the problem may come from the following line in the models:
.IC V(QINT,GND) 0
I have tried replacing this by setting IC on the capacitor connected to this node, but no result. I also see nested IF
conditions in one source. I am not sure if NGspice supports this.
GQ GND QINT VALUE {IF(V(CLKI,GND)>{V(VCC,GND)/2},IF(V(D,GND)>{V(VCC,GND)/2},{V(VCC,GND)},-5),0)}
I have used testbench schematics from PDF documents from this page: https://fotoelektronika.com/spice-models/
I finally managed to get TL494 operational. The .IC directive required correction. Also setting InitialDC=no
helps. The UC3843A model still be no result.
I have added MixerIC library containing SA612 model as part of #850. Everything works as expected with default Ngspice settings.
I will make a symbol for the Tl494.
I worked on the SA612 many years ago. Attached is my project. I made two different SA612 symbols but the colors and line widths don't conform to what we are using today.
I have fixed the UC3843A model. There was a mistake in testbench schematic in PDF. The supply voltage should be in range from 9 to 15V. Also the DX diode model required a correction. The default BV value caused convergence error for Ngspice. The fixed model is attached. The other UC384x devices may be fixed in a similar way.
Summarizing all above, the PWM controller models could be assembled in a library. This library could be added in the upcoming release.
I have added TODO list to this issue.
First cut of the TL494 symbol. Since the device can be used to make multiple regulator topologies, no obvious way to make the symbol.
PWM controller library implemented by #855.
I made a small change to the TL494 symbol. PIN3, CMP->FBK
CMP was on an old schematic. FBK is on data sheet...
I updated the library as well.
There is a KiCad example using the UC1825. I haven't tested it in Qucs-S but trying to confirm why I can't get it to work under KiCad. I made a preliminary symbol and modified the model.
UC1825 device seems to be obsolete and available for purchase only as CerDIP variant. It presents a little interest for inclusion in the library.
SG1525A/SG3525A is very similar and made by many companies.
I found an PSpice/OrCAD SG1525A model. It might be usable.
Page has a lot of models. https://robustdesignconcepts.com/files/pspice/libs/
I have updated the Avago ACPLK30T Photo Voltaic Isolator. It would make a good addition to Optocoupler.lib
I have added ACPLK30T model as the part of #927
I did some preliminary work on a Neon bulb library.
Goal was to use the Zabb Csaba model as-is. Use the LTspice model and have all parameters available for modification. I also tested a simple model I found in the web that was tested in Qucs-S and have all parameters available for modification.
The Zabb Csaba model "Neon_65.cir" doesn't work at all unless I use "uic". Changing parameters not straightforward.
The LTspice model "NeonBulb.cir" "works" at T=0 but the data is wrong elsewhere. When the bulb turns on the volatge drops to 0 instead of 40-50 volts. I assume this is caused by the Warning that "vser" is not recognized. ngspice doesn't support the "level 2" LTspice switch model. https://ltwiki.org/LTspiceHelp/LTspiceHelp/S_Voltage_Controlled_Switch.htm
The model "Neon_60_SW.cir" doesn't work at T=0 unless I use "uic". It does "work" elsewhere. This model could have user defined parameters so it would mimic other neon bulbs. https://wigglewave.wordpress.com/2015/03/29/adventures-in-neon-discharge-bulbs/
I have recently discovered this website containing SPICE models for different devices: https://fotoelektronika.com/spice-models/ The most of these models could be converted to Qucs-S libraries. The models requires porting to Ngspice notation (replace
IF
by ternary operator etc.).The following models are especially interesting:
The presented PWM controller models (UC3844, TL494 etc.) don't contain LTspice digital gates extensions and should work with Ngspice after minor tweaks.
TODO list from @ra3xdh: