background preloader

SPICE Simulation

Facebook Twitter

Ngspice – Interactive Mode! Welcome back for the 5th tutorial on SPICE in Fedora Electronic Lab. :) This time we’ll look at ngspice’s interactive mode.

ngspice – Interactive Mode!

We’ll see what this means in some time. Before that, make sure that you have gone through the previous tutorials. These are all filed under the SPICE category (point your mouse to Tutorials, then click SPICE). We will reuse the example circuits we created in the previous tutorials for this one. /dev/blog » Simulating a lowpass filter with gEDA and ngspice. Getting started with ngspice can be quite tricky.

/dev/blog » Simulating a lowpass filter with gEDA and ngspice

It’s a very powerful piece of software and although the user manual is quite comprehensive, its complexity can easily scare off beginners. Here’s a simple step-by-step tutorial on how to simulate a very simple electronic circuit. It should enable you to run your own simulations of circuits you designed. Creating the circuit The sample circuit is a lowpass RC filter. Start up gschem and draw the following circuit: Simple lowpass RC filter Of course, you can name your buses differently. V1 is an independent AC voltage source. Save the schematic as rcSIN.sch. Sandia National Laboratories: Xyce Parallel Electronic Simulator (Xyce)

Underhill.hhhh.org/ldoc/geda-gaf/wiki/geda-sdb_howto.html. Introduction The purpose of this document is to explain how to use the gEDA tools (running on Linux) to perform SPICE simulations.

underhill.hhhh.org/ldoc/geda-gaf/wiki/geda-sdb_howto.html

In particular, this HOWTO documents the usage of spice-sdb, which is an advanced backend for the gEDA netlister (gnetlist) used to create SPICE netlists. This HOWTO also provides advice about using LTSpice and/or ngspice to simulate a circuit netlisted with spice-sdb. I assume that you are already familiar with electronic design, the mechanics of schematic capture using EDA tools, and SPICE simulation in general. I also assume that you are reasonably familiar with the Linux operating system and its development environment. Overview From the top level, SPICE simulation in gEDA proceeds via the following steps: Creation and gathering of schematic symbols and SPICE model files.

To create a SPICE netlist, the netlister (gnetlist) iterates through the entire schematic and looks at several parts of each component’s symbol in order to create a blob of SPICE code. gEDA Resources - Evil Mad Scientist Wiki. Gschem symbol creation, the quick and easy tragesym way. Creating symbols for schematic capture can be very time consuming, error prone, and an all around pain.

gschem symbol creation, the quick and easy tragesym way

Luckily, gschem uses an open, text base file format that is very easy to use with scripting. This short tutorial describes how to use a third party tool, tragesym, to create symbols very quickly (probably more quickly than with any commercial package). Step 1: Obtain tragesym Step 2: Download you data sheet, and find the pin list For this example, we will be creating a symbol from the Philips Semiconductor PCA9555 16-bit IIC IO port. Step 3: Copy the pins from the data sheet, and put them somewhere The end goal is to get the pin list into a spreadsheet, like gnumeric, unfortunately, xpdf doesn't copy/paste into a form gnumeric seems to like. And then open gedit, and hit the middle mouse button to paste them in: Next, a little bit of preprocessing need to be done so that the gnumeric text import goes smoothly.

Now, just highlight everything and hit copy Step 4: Import into gnumeric #include. Circuit Simulation in GNU/Linux – Lets begin! Welcome back!

Circuit Simulation in GNU/Linux – Lets begin!

:) As promised, here is the first of my tutorials on EDA in GNU/Linux. Breaking it down – The .SUBCKT. Having done so many simulation examples, ever wondered how complex actual circuits can be?

Breaking it down – The .SUBCKT

Underhill.hhhh.org/ldoc/geda-gaf/wiki/geda-circuit_simulation_improvements.html. Rationale Using gschem as a circuit simulation (ngspice or gnucap) frontend is not easy for novice users.

underhill.hhhh.org/ldoc/geda-gaf/wiki/geda-circuit_simulation_improvements.html

A new user would like to do the following things inside gschem: specify what kinds of simulations should be run specify which voltages and currents should be plotted start the simulation The simulation runs and the postprocessing may be in an external programm that is triggered by IPC. There are some graphical frontends around but they can’t solve all of the above problems All frontends have the problem that you can not point to the net you’d like to see. Draft. SPICE 3 User's Manual. Table of Contents This User's Manual has been edited for the WWW by Charles Williams to support module PHY2003 and was originally based, with permission, on text from Kevin Thomas's html version of the SPICE3 Version 3f User's Manual.

SPICE 3 User's Manual

The copyright statement for that manual is reproduced here: Copyright 1990,1992,1993 Regents of the University of California. All rights reserved. This manual may be reproduced in whole or in part without permission for any purpose other than resale for profit, if this copyright notice is included; personal, educational, or internal business use is specifically permitted as long as the copyright notice is preserved. Note: corrections, additions, and HTML mark-up added in order to create this edition are Copyright © (1998 onwards) Charles Williams, and all rights are reserved.