We use many electronic gadgets in our daily life. Life can be a bit tough without these gadgets. But making an electronic circuit ‘work’ is even tougher. Electronics is a hobby for many, and it can be really expensive. Unlike most other hobbies like philately or numismatics there are a lot of things that an electronic hobbyist must know before getting his hands wet, otherwise things can get real messy and you may loose a lot of money. Circuit designing and debugging can be one heck of a job. If the design is wrong then there is no point in proceeding further, also most electronic components get damaged even if a very small mistake is made in designing the circuit. I have spent upto 3 weeks trying to figure out what was wrong with a circuit I made. Though it was simple it was difficult and I burned out many components. I knew about some circuit simulators but the experiences that I had when I first tried one was not so good. But very recently I came to know about Quite Universal Circuit Simulator.
What is QUCS?
Quite Universal Circuit Simulator (Qucs) is a open sourceelectronics circuit simulator software released under GPL, and is still in development process. Though still in development process it is very stable and effective, but of course there are things missing here and there, we will see what all qucs can do and cannot do. QUCS is a circuit simulator with graphical user interface (GUI). The GUI is based on Qt by Troltech. The software aims to support all kinds of circuit simulation types, e.g. DC, AC, S-parameter, Harmonic Balance analysis, noise analysis, etc. The outputs of these analysis can be expressed in various forms like Smith-Chart, Cartesian, Tabular, Polar, Smith-Polar combination, 3D-Cartesian, Locus Curve, Timing Diagram and Truth Table.
In a debian based system qucs can be installed by issuing the command
sudo apt-get install qucs
In Ubuntu qucs is available in the Ubuntu software center. Or you can do it the hard way, download the QUCS file from http://qucs.sourceforge.net/download.html and execute the following commands.
Unpack the distribution tarball:
$ tar xvzf qucs-.tar.gz
Change into the source directory: $ cd qucs-<version>
Configure the source package for your system:
Now compile the package:
$ make install
Once installed you will find QUCS in the applications-> Education-> menu in case of ubuntu or you can type qucs in the command terminal.
THE QUCS STRUCTURE
QUCS is actually a collection of different modules and each has a different function.
1) The GUI is used to create schematics, setup simulations, display simulation results, writing VHDL code, etc.
2) The analog simulator is a command line program which is run by the GUI in order to simulate the schematic which you previously setup. It takes a netlist, checks it for errors, performs the required simulation actions, and finally produces a dataset.
3) The text editor is used to display netlists and simulation logging information, and to edit files included by certain components (e.g. SPICE netlists, or Touchstone files).
4) The filter synthesis application can be used to design various types of filters.
5) The transmission line calculator can be used to design and analyze different types of transmission lines (e.g. microstrips, coaxial cables).
6) The component library manager holds models for real life devices (e.g. transistors, diodes, bridges, opamps). It can be extended by the user.
7) The attenuator synthesis application can be used to design various types of passive attenuators.
8) The command line conversion program tool is used by the GUI to import and export datasets, netlists and schematics from and to other CAD/EDA software. The supported file formats as well as usage information can be found on the manpage of qucsconv.
9) Additionally, the GUI steers other EDA tools. For digital simulations (via VHDL) the program FreeHDL is used. For circuit optimization (minimization of a cost function), ASCO is configured and run.
The QUCS component library has almost all components needed for most of the circuits but as it is still in development stages some components might be missing.
The following categories of components are provided:
Lumped components (R, L, C, amplifier, phase shifter, etc.)
Nonlinear components (diodes, transistors, etc.)
File containers (S-parameter datasets, SPICE netlists)
There is also a Component library that includes various standard components available in the market (bridges, diodes, varistors, LEDs, JFETs, MOSFETS, and so on).
QUCS provides many transistor models. These include FBH-HBT, HICUM L0 v1.12, HICUM L0 v1.2, HICUM L2 v2.1, HICUM L2 v2.22, HICUM L2 v2.23, MESFET (Curtice, Statz, TOM-1 and TOM-2), SGP (SPICE Gummel-Poon), MOSFET, JFET and EPFL-EKV MOSFET v2.6.
WORKING WITH QUCS
Before I begin let me remind you that this is just an introductory article and not a complete tutorial to qucs i’ll be just briefly touching the important points( Nothing to worry qucs is easy to learn :-))
Open qucs from the applications menu or type qucs in the terminal.
Making a project
Give the name and proceed. Once the project is created you can see all the contents of the project in the explorer window. In the work space we draw our circuit.
Lets start with a simple potential divider circuit. You can find the components in the components button on the left side of the explorer window.
Place two resistors from the lumped components and a dc source from sources. Connect them using the wire(CTRL + E) , now place the ground symbol near the negative of cell.(Specifying a ground point is very essential in all circuit simulators)
Select Insert->wire label and click on the point between the two resistors and name it Vout (or anything you want).
Now from simulations place the dc simulation block, the schematic should look as given below.
Now save it. Go to Simulation ->Simulate.
A new work area appears and also the explorer window changed to diagram tab. From there select table and drag it to work area. Placing diagrams
Choose the tabular (list of values) diagram and place it on the data display page. After
dropping the tabular, the diagram dialog appears
By double clicking the Vout.V the graph (i.e. values in a tabular plot) is added to
the diagram. Beside the node voltage Vout.V also the current through the DC voltage
source V1.I is available. Only items listed in the dataset list can be put into the graph.
Available dataset items
Depending on the type of simulation the user performed you find the following types of
items in the dataset.
node.V – DC voltage at node node
name.I – DC current through component name
node.v – AC voltage at node node
name.i – AC current through component name
node.vn – AC noise voltage at node node
name.in – AC noise current through component name
node.Vt – transient voltage at node node
name.It – transient current through component name
S[1,1] – S-parameter value
Depending on the type of graph you have various options to choose for the graph. For
a tabular graph there is the the number precision as well as type of number notation
(important for complex values). Press the “Ok” button to close the dialog.
You will get something as below.
You can change the properties of the components by double clicking on them and changing the properties in the property box.
Now lets see how we can plot the forward characteristics of a pn junction diode. The diode can be obtained from the non linear components. Since we are going to plot how voltage varies as current passing through the diode is changed we will use a dc current source and we will change its numerical value to a variable If. This can be done by double clicking the component and editing the component dialog box. The wire up the circuit (Don’t forget to ground the circuit) place a wire label at a point between the diode and the positive of the current source. Name it as Vd.
Now place the DC SIMULATION BLOCK
and also place the PARAMETER SWEEP BLOCK. In the parameter sweep properties give
simulation as DC1 ( the name of the DC SIMULATION BLOCK you placed)
parameter as If ( the parameter u wish to change)
then give the type of variation you want whether its linear or logarithmic. Then give the starting and ending values I gave 0 to 10. and also give
number as the number of points you need (100 will give you a pretty neat graph)
Now simulate and in the data display page place the Cartesian diagram instead of table as in previous example and choose the parameter you want to display. You will have the forward characteristics of the diode with voltage on y axis and current along x axis
WHAT NEXT ?
I believe that students should be taught such simulation software along with their lab experiments. And also students should try to use such tools when doing there projects in that way a lot of time and money can be saved. We can analyze how a system will respond in a given situation. Also we should contribute back to such projects that are available as open source or free software after all FOSS is all about sharing and giving and learning.
For further details about qucs you can visit http://qucs.sourceforge.net/
Well I hope these are enough to get you started. There are lots of tutorials available on the net and in the site mentioned above.There is a lot more that you can do with QUCS like digital simulation harmonic analysis, transient analysis etc. If you really liked the software try contributing back. What you can do is given in http://qucs.sourceforge.net/road.html.