qucs_s
qucs_s copied to clipboard
555 timer models working in ngspice but don't work using Qucs-S
As an exercise I ran some simulations using 4 different 555 timer models. I used the DuSpice GUI to confirm all worked with ngspice. Only 1 model (UA555.lib) worked when run via Qucs-S.
I suspect some of the issues are due to my Qucs-S netlists lacking the added "Steps" that the authors of the ngspice netlists used to get the models to work.
I only mention this because I would think new users might use a 555 timer and become frustrated.
Hello Tom, thank you for submitting your results. It's possible to make simulations work.
- You need to set
initialDC=no
to obtaintran ... UIC
the same as used in netlist. Otherwise initial conditions on C1 capacitor will be ignored and taken from DC - It's possible to define PWL source using red Vsource device (look attached screenshot)
A library and/or example containing 555 timer model should be added to Qucs-S. This will help to new users.
It's good this has come up again. I was unable to get a number of the 555 models attached above to work in Qucs-S. They came from the ngspice examples folder. Some issues are caused by not exactly duplicating the test conditions in the ngspice netlists.
At a minimum bipolar and CMOS 555 timer examples should be made to work for Astable, Monostable and PWM configurations.
I took another look at the 555 timer folders I sent above. I only included four 555 models that I got to work under ngspice. I cannot get TLC555ng.lib to work under Qucs-S but does work under ngspice. I included all the ngspice files I ran using DuSpice.
Hello Tom, thanks for providing examples. I will try to turn your 555 subcircuits into the library for distribution with Qucs-S.
Some background:
The 555 model, TLC555ng.lib is a modification by Holger of TLC555.lib supplied with ngspice. I don't understand the reason it was done since both TLC555ng.lib and TLC555.lib work with the test file 555-timer-2.cir also supplied with ngspice. I use DuSpice for verification. Neither TLC555ng.lib or TLC555.lib work using my schematics in Qucs-S.
https://sourceforge.net/p/ngspice/discussion/ngspice-tips/thread/d2048be2/ https://sourceforge.net/p/ngspice/discussion/ngspice-tips/thread/d2048be2/ https://github.com/imr/ngspice/blob/master/examples/p-to-n-examples/555-timer-2.cir
555-timer-2.cir uses two different 555 models, TLC555.lib and UA555.lib, CMOS and bipolar.
TLCng_UA555_astab.cir is my test file that removed the UA555 model from 555-timer-2.cir
For some reason I am unable to edit the above comment. A lot of text is missing. I updated the zip file.
Lastly, whatever models are chosen it would be best if all inputs and outputs are fully functional. Some models don't have fully functional inputs and outputs. A popular model in the following link has these issues.
http://www.ecircuitcenter.com/Circuits/555_Timer1/555_timer1.htm
I cannot get TLC555ng.lib to work under Qucs-S but does work under ngspice.
The oscillator circuit started to work after I replaced the SpiceLibComp
device by Spice netlist
device. SpiceLibComp
was designed for directly placing on schematic and may produce nested subcircuits when wrapped inside subcircuit. Look at the attached screenshots. I will provide a 555 time library based on your examples and include it in the next release.
I think the library containing two 555 models will be sufficient. I am planning to take two implementations for this library:
- TLC555ng model from Holger
- 555 XSPICE model from Clyde
The 555 XSpice model by Clyde is being modified to work over a wider voltage range. Presently it works for only 5 volts. Not sure when he will finish it.
I found a NE555 timer that seems to work pretty good and doesn't have limitations like Clyde's behavioral model. It is used by both LTSpice and ngspice users.
https://forum.kicad.info/t/simulation-of-555-timer-circuit-in-kicad/21697
Yes, I tried this 555 model. It works fine with Ngspice+Qucs-S.
I have added a library containing 555 timer model and oscillator example. This will available since v1.0.1 release.
Both CMOS and Bipolar models?
A new library contains only CMOS model provided by Holger Vogt. I didn't add the bipolar model yet.
I have just updated the library and added the bipolar model from KiCAD forum.
A new v1.0.1 package (released today) contains 555 timer library. Closing this.