[LWN Logo]
Weekly Edition
Daily updates
Events Calendar
Book reviews
Penguin Gallery

About LWN.net

Creating Schematics With Xcircuit

May 25, 2000
Forrest Cook
Xcircuit is a powerful open source schematic capture program written by Timothy Edwards at Johns Hopkins University. The program has most of the features of a general purpose drawing package and includes a symbol library facility that can be used to store user defined schematic symbols. Schematics, flow charts, chemical diagrams, and even musical scores may be created with xcircuit by loading the freely available symbol libraries. There are even libraries of vacuum tube symbols for technical historians and ham radio enthusiasts. A mathematical symbol typesetting capability is included in the program. Xcircuit uses the PostScript language for its output and library files. The PostScript created by Xcircuit is human readable which makes manual editing possible. Xcircuit is distributed under the Artistic License.


Installation of xcircuit may be accomplished by way of either source code or an RPM package.

For RPM systems, simply download the RPM version of xcircuit, become root, and install the package as follows:

#rpm -i xcircuit-2.0a11-1.i386.rpm

For source code installations, download the .bz2 file and do the following as a regular user:

$bunzip2 xcircuit-2.0a11.tar.bz2
$tar -xvf xcircuit-2.0a11.tar
$cd xcircuit-2.0a11
Edit the Imakefile and uncomment the line:
CCOPTIONS = -O2  -m486

Again, as a regular user, compile the code as follows:

Now become root and run:
#make install
#make install man
and finally, as a regular user:
$make clean

There are several versions of xcircuit available on the xcircuit home page. The beta version of the program functions but tends to be a bit unstable. I recommend starting with the more stable alpha 11 version just to get a feel for the program. Beware that schematics created with the new version may not be backwards compatible with the old version.

Entering a Schematic

To begin, you should read the Xcircuit tutorial and work through all of the examples. The tutorial is easy to follow and will quickly get you up to speed entering schematics. As with most documentation, the tutorial is a bit out of date. The tutorial is based around an older version of the program, but all of the example exercises seem to work. The xcircuit home page has a down-loadable version of the tutorial, so you don't need to be online to run the tutorial.

The drawing conventions used for making electronic schematics vary from region to region. Xcircuit can easily support different styles with the use of custom parts libraries. A fairly conventional U.S. schematic style is used in this article.

A quick summary of the steps involved in making a schematic are:

  • Pull the various parts you need from the parts libraries
  • Arrange the parts to where you want them on the page
  • Draw connecting wire lines between the parts
  • Place dots on the wire intersections
  • Enter text describing the part numbers, values, and other documentation
  • Save the file in PostScript format and print it out.
I use the old classic image viewing program XV 3.10a to convert xcircuit schematics to gif and jpeg files for inclusion in web pages. Run xcircuit and zoom the image to the desired scale, turn off the grid and axes, do an image grab from xv, and save the image in your favorite format. XV isn't truly free software, any image manipulation tool with an equivalent "grab" function will also work. Another method of turning an arbitrary image on the screen into an image file is to use the programs xwd and convert:
xwd ?> /tmp/image.xwd
convert /tmp/image.xwd image.jpg
rm /tmp/image.xwd
When xwd turns the cursor into a "+" symbol, click on the xcircuit window. Xwd is part of the XFree86 package and convert is part of the ImageMagick package.

The user interface on xcircuit has been well thought out for efficiency of use. Making wire connections is probably the single most common step to entering a schematic, and the program is set up so that the mouse is normally in wire entry mode. Pulling parts symbols from the libraries is another common task, the parts libraries are just a click of the "L" key away. Once you are up to speed on the basic operations, high quality schematics can be produced very rapidly.

Creating Custom Parts Libraries

Xcircuit's ability to create custom parts libraries is probably its most powerful feature since it allows the user to tailor the program to their own needs. The tutorial should be followed to learn how to create and manipulate parts libraries. The parts libraries are just ASCII postscript files, it is possible to edit the libraries with your favorite text editor. Be sure to save an unmodified copy of the library before hacking on it. The general purpose nature of the program allows any kind of custom symbols to be created. The musical composition on the xcircuit home page is a good example of the flexibility of the program. The program has a tendency to crash when working on custom parts libraries on RedHat 6.X systems, save often.

Development and Improvements

The newer beta version of xcircuit includes a feature called schematic capture, this adds another level of information on top of the schematic that allows for circuit simulation with tools such as spice. Netlists, which describe lists of parts with common connections, can be created in schematic capture mode and can be used with printed circuit board tools to assist in the layout of parts. The beta version if xcircuit is indeed very beta, one should proceed with caution since it tends to crash easily.


Xcircuit is a bit rough around the edges at this point in its development, but it has proven itself to be a valuable program. If you design circuits, network diagrams, flow charts, or just need a drawing package with symbol libraries, xcircuit is worth investigating.


Eklektix, Inc. Linux powered! Linux ® is a registered trademark of Linus Torvalds