Simulating Circuits – More Examples!

Hope you liked my previous tutorials on SPICE simulation in Fedora Electronic Lab. Well this post comes a little late because I had a lot of circuits in mind. So take a deep breadth and get ready for Part 3! 🙂

I’m assuming that you’ve read through the previous two tutorials and that you are now comfortable with using gschem. After this tutorial, you must go through the ngspice manual atleast once. I’ll be moving a bit fast from now on because there is a lot to cover. If something is not clear, feel free to post a comment. I also assume that you’ve completed a course on analog electronic circuits. If you are currently in such a course, go through the circuits you are familiar with and come back later.

Remember to plan a directory structure before each example. Also, the models for the transistors are available from Fairchild Semiconductors and diodes from I’m not posting these here due to copyright restrictions.

A quick recap:

  1. You draw you circuits in gschem.
  2. Generate the netlist by running: gnetlist -g spice-sdb -o <>  <input_schematic.sch>
  3. Always check the netlist once yourself. Also see which are the input and output nodes.
  4. Simulate the circuit using: ngspice -b -r <raw_file.raw> -o <log_file.log> <>
  5. Finally open the waveform viewer by running gwave <raw_file.raw> and dragging the output you want to see to the panel.

Ready? Go! Read more of this post

Circuit Simulation in GNU/Linux – Lets begin!

Welcome back! 🙂

As promised, here is the first of my tutorials on EDA in GNU/Linux. In this post we will start with SPICE simulations. Please remember that I’m a total beginner to these tools as well so I could be wrong at places (post a comment and I’d be happy to correct) and that my examples will remain very simple.


For this tutorial you’ll need these tools installed.

  • gEDA gschem – A schematic capture program.
  • gnetlist – a program that converts your schematic to a netlist.
  • ngspice and gnucap – circuit simulators.
  • gspiceUI – A graphical circuit simulator.
  • gwave – a waveform viewer.

This tutorial assumes that you have taken up a course on basic electronic circuits. It would help if you know how to write a spice netlist but its not a necessity. Read more of this post

%d bloggers like this: