Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesLow-Cost Simulation


September 1994 / Reviews / Low-Cost Simulation

Using a circuit simulator to test your designs can save both time and money

Dany Dion

Sometimes a simulation can be better than the real thing. I design and build electronic control systems for a variety of automation tasks, and there are times when I would like to try out a circuit before building it. Electronics Workbench is a simulator that runs under DOS or Windows or on the Macintosh and provides breadboard and test facilities for analog and digital circuitry. I looked at the Windows version of Electronics Workbench 3.0.

Workbench is a medium- to low-end product, intended for electronics students and designers. The package includes both analog and digital schematic capture programs, with simulation and testing tools for each. Workbench is configured like some high-end simulators that cost $2000 or more (e.g ., Spectrum Software's Micro-CAP or Orcad's Verification and Simulation Tools) in that the digital and analog portions are entirely separate functions. To get true mixed-mode simulation, you'd have to use a very expensive package like MicroSim's Design Center for Windows (about $8000 to $16,000).

Inside Workbench

The primary interface to Workbench is a palette (or bin) of electronic parts (either analog or digital, depending on which simulator you load) and a selection of test equipment. To construct a circuit, you drag parts out of the bin (see the screen) and place them in the work area. Each part has one or more live connection points. Dragging a line between any two points makes a wired connection; the wires themselves are auto-routing. Double-clicking on a part in your design brings up a dialog box that lets you change the part's parameters (e.g., resistance and capacitance). Once you have connected all the components and attached the signal generators, multimeters, and oscilloscope, you cli ck on the on/off switch to start the simulation.

Considering Workbench's reasonable price, I was impressed by how well it worked. My analog and digital control systems regularly include signal amplifiers, filters, bridge amplifiers with feedback and current limiting, stepper-motor controls, and sundry logic decoders. I entered some of my working designs into Workbench to see how well the simulation compared to the real thing. The fact that the analog and digital simulations are separate was a big problem, however; many real-world designs freely mix analog and digital circuitry.

Workbench's transistors won't properly bias because the simulator uses only ideal values. Real transistors don't work exactly like their descriptions in a textbook. I managed to get my working circuit to run on the simulator by changing some resistor values and removing some filter capacitors.

Troubles in Analog Land

The function generator can produce sine, triangular, or square waves at any frequency from 1 Hz to 999 MHz, with a duty cycle of from 1 percent to 99 percent. The analog simulator's oscilloscope is a dual-channel type with a time base of 0.10 nanosecond to 0.50 seconds per division.

The Bode plotter produces a graph of a circuit's frequency response. When connected to a circuit, the plotter generates a range of frequency over a spectrum selected from 1.0 MHz to 10.0 GHz. The result is a screen plot that shows how your circuit performs over the entire frequency-range sweep.

Workbench's op amps (operational amplifiers) may not work the way you expect, because the simulation drives them with standard voltage values (15 V DC) instead of the voltage sources you have elsewhere in your circuit. Op amps behave differently depending on their power-supply voltage.

Workbench transistors don't have limitations on voltage or current. In Workbench, you can use a small signal transistor, like a 2N2222, as a power transistor and sink 10 amperes at 120 V DC without causing an error. In real life , you'd get a rather spectacular puff of smoke. The frequency generator provides your choice of square, sine, or triangular wave output, but at only one frequency. Finally, some of the parameters use different measurements. AC voltage sources have peak values, while other components, like fuses and light bulbs, use rms (root mean square) values. You have to be careful to match these different voltage measurements.

The analog simulator comes with a library of 37 basic components, including connectors, voltage sources, current sources, ground, and other components. Designing circuits with the analog simulator can be difficult if you don't have enough working knowledge of real-world components. You have to hand-check every component for proper rating before building a real circuit from the design.

Digital Simulation

The parts bin in the digital simulator is filled with common logic design elements: logic gates, flip-flops, a half adder, and a seven-segment display. As with the analog simulato r, you can select a region of a circuit and save it in your bin as a subcircuit.

The tools in the digital simulator are different from the analog simulator's. Since the digital simulator has no provision for analog circuitry, an oscilloscope or Bode plotter would make no sense; instead, you get a word generator, a logic analyzer, a voltmeter, and a logic converter.

The word generator stores a sequence of sixteen 8-bit words that can play back automatically (cycle) or one at a time (step), or play through once and stop (burst). Workbench's logic analyzer has eight input channels and can be triggered by an external signal, by the input channels themselves, or by a user-selected pattern.

I never did figure out what the voltmeter was good for. Since all circuits in the digital simulator are driven by 5 V and run at logic 0 and 1 levels (0 and 5 V), the voltmeter displays no more information than the simple LED probes that you can have any number of in your design.

The logic converter i s far and away the most interesting part of the simulator. It can look at your circuit and tell you the truth table, convert a truth table to a Boolean expression, take a logic equation and simplify it, or build a circuit from a truth table or a Boolean expression. The logic simplification algorithm is the Quine-McKluskey method, instead of the more familiar Karnaugh mapping.

The Quine-McKluskey method begins by sorting the terms of a truth table according to the number of true conditions they contain. These terms are compared to find those that differ by only one variable, and that variable is eliminated. The process is repeated until no further elimination is possible. The grouped terms that remain are considered prime implicants. The final step is the elimination of redundant expressions. Since this method works with the binary representation of expressions, the Boolean expression is automatic.

The logic converter would be most useful for situations where you want to replace a portion of your design with a PAL (programmable array logic chip). Once you test the circuit, you use the logic converter to convert the finished circuit to a truth table for the PAL programmer. You'll have to live within the limitations of the package, though, and restrict your PAL designs to eight inputs.

Alas, with its shortcomings, the digital simulator is as restrictive as the logic converter is enabling: Logic gates in the simulator are perfect and respond instantaneously. Without propagation delays such as you'd find in real silicon, high-speed circuits won't respond correctly and feedback loops are impossible. For instance, one popular way to create an inexpensive clock is to tie a number of logic inverters to themselves in a loop, with resistors and capacitors to control the speed. Without the analog/digital mix, you can't add the resistors or capacitors, and the simulator reports that the feedback loop is stuck in a race condition.

Pass the Breadboard

Perhaps the biggest shortcoming of the com bined package--one that might stop me from trying to do real design work with either simulator--is that Workbench has no import or export capability. If you complete a design and want to produce a printed circuit board, you can't simply capture the final schematic and transfer it to a printed circuit board layout package. Anyone using a schematic capture program or simulator like Workbench is likely to be using printed circuit board layout software to produce boards.

It's a sure bet that Intel won't be using this software for designing the successor to the Pentium. I might be able to use it for designing simple circuits, but most of my work requires combining analog and digital circuitry.

I can easily see Workbench as a product for hobbyists or electronics students. Perhaps even small companies that can't afford more expensive, professional-caliber tools like Orcad's Verification and Simulation Tools or Spectrum's Micro-CAP would find it useful. While the manual and the included samples don't at tempt to explain electronic theory in depth, they provide enough information to get anyone new to electronic simulation started.


The Facts



Electronics Workbench 3.0.....$299
for Windows or the Mac
Interactive Image Technologies, Ltd.
700 King St. W, Suite 815
Toronto, Ontario, Canada M5V 2Y6
(800) 263-5552
(416) 361-0333
fax: (416) 368-5799


Illustration: The results of applying the Bode plotter to the output of a standard RIAA (Recording Industry Association of America) equalization filter/preamplifier (the kind you normally find between a magnetic phonograph cartridge and a stereo amplifier). The input in this example is a sine wave varying from 10 Hz to 20 kHz. After it passes through the filter, the Bode plotter shows the attenuation curve.
Dany Dion is the owner of Promecan-Agma in Greenfield Park, Quebec, Canada. He has been designing quality-control systems for more than 10 years and has been programming on microcomputers si nce 1978. He can be reached on CompuServe at 75240,524 or on the Internet or BIX at ddion@bix.com .

Up to the Reviews section contentsGo to previous article: Power of CooperationGo to next article: In The WorksSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network