Electronic Workbench Tutorial: Copy As Bitmap
Electronic Workbench Tutorial: Copy As Bitmap
Introduction
1
To open EWB click on its icon. Initially you will see an empty
circuit window and two toolbars, the circuit toolbar with the common file
management, editing and graphics tools, and a Parts Bin toolbar from
which you can select a wide range of circuit elements, and instruments.
The following will guide you on your first attempt to simulate circuits.
2
2. Click in the Parts Bin toolbar. The basic toolbar should appear.
3. Drag two resistors from the toolbar to the circuit window.
Resitor
To keep the Basics toolbar open, drag it onto the circuit window.
Otherwise, it will close after you drag an item from it, and you will have to
reopen it for every resistor.
4. Move to the Sources on the Parts Bin toolbar. Click on it and a toolbar
containing the battery and ground should appear. Drag those onto the
circuit window.
select the desired operation under Circuit. In this case you want to rotate
both resistors.
1. Select both by either CTRL+click, or by dragging the mouse over them.
2. Choose your favorite way to rotate by 90 degrees.
Note that selected circuit elements are highlighted/changed color.
3
Initially you wiring may not look very pretty. However, after making the
connections, you can move wires and components around without
breaking the connections.
4
Step 7. Make changes and additions
You now have a very simple but functioning circuit. Take this
opportunity to make some changes and additions.
1. Add an ammeter to the circuit to measure the current through the
resistors.
2. Change the values of the resistors, and observe the change in the
currents and voltages.
The ammeter can be connected by positioning it on top of the wire through
which you want to measure the current. EWB will automatically make the
right connections. If you are not sure that this is done correctly, drag the
ammeter, the wires should move with it.
5
Figure 2. The function generator with bargraph displays.
6
The oscilloscope
An oscilloscope is a far more powerful instrument than a bargraph
indicator or even a voltmeter. It can show you the time dependence of the
signals in your circuit. The EWB
oscilloscope provides a fairly
close approximation of a real one.
It has two independent input
channels, A and B, an input for
an external trigger and a ground
connection.
7
3. Make drastic changes in the signal amplitude and frequency, and
adjust the sensitivity and time base settings such that you still
maintain an easily interpretable picture of the wave form on the
oscilloscope screen. It may be necessary to occasionally reactivate the
simulation.
8
5. Change the "y position" such that the trace comes back on center.
This can always been done as long as the offset is not too large. (Most
oscilloscopes cannot produce an internal offset that is much larger
than the full scale display range.)
6. Change the "y-position" back to zero, and select "AC" as input
coupling mode. In this mode the DC component of the signal is
removed. The EWB oscilloscope is very good at this, but real
instruments have a difficulty distinguishing between DC and very
slowly oscillating signals. In practice, avoid the AC input mode for
signal frequencies less than 100 Hz.
To get a larger image of the oscilloscope, try the expand button. On the
expanded display you will find two vertical line cursors. By moving these
around you can measure time and amplitude of points on the displayed
traces.
Two exercises
The following exercises are meant to show the power EWB. In the
first one you can study what happens when a LRC circuit is driven with
a square wave. Even this simple circuit shows a wide range of behavior,
depending on the component values and the drive frequency. EWB make
it possible to study this at least in a qualitative manner. The second
exercise gives you the opportunity to build up a simple circuit without
knowing much of how things will work out. This is one of the major
advantages of simulation programs. Without much math or investment
in hardware you can try out ideas and adjust them to reality where
necessary.
9
Assemble the circuit shown below, and activate. After you have
achieved something similar to fig. 4, change the value of the damping
resistor. Look at values from 100Ω to 100kΩ. Can you explain your
observations?
Set the damping resistor to 100Ω. Now scan the function generator
frequency from 15 Hz to 25 Hz in steps of 1 Hz. The behavior of the
10
circuit seems to change dramatically for very small changes in the
frequency. Try to figure out why this happens.
AC à DC conversion
Somehow you have picked up the information that there are circuit
elements that pass a current in one direction and block it in the opposite
one. They go by the name of diode. It strikes you that this could be useful
to convert an AC voltage, maybe from a transformer, to a DC voltage. To
see if this is actually going to get you somewhere you put down the
following circuit.
11
Figure 6. Using a diode to rectify a sine wave. Note that we
have used the Y-position offset on the scope to separate the A
and B channel traces.
Apparently there is some truth to the story, you only have positive
voltage across the resistor, when the input voltage goes negative the
output voltage is zero. However, you realize that this isn't quite what you
want. What you are after is a voltage that is re asonably constant, and
certainly not something that is zero half the time. You now suffer a
sudden flash-back to you introductory physics course. There this
capacitor thing was mentioned. It supposedly could store charge. Maybe
this could be used to keep the voltage up during the periods that the
diode blocks the current. So the next step is to put a capacitor in. The
problem is, you don't know how large it should be. To save money and
space you want to minimize the capacitance. In this case start with 10µF
and change the value to see what you can get away with.
12
Figure 7. Smoothing the rectified sine wave using a capacitor.
13
Figure 8. Using a zener diode to get the desired voltage. In
the circuit diagram you see the zener labeled as BZV49-
C8V2. To get this specific one you have to double-click on the
generic zener, and go through the list of "real" zener diodes
that are available.
This doesn't work so well. You notice that for part of the time you
have a constant voltage of the desired value, but in between there are big
dips. You don't quite understand, so you use the oscilloscope to
investigate what is going on. Leave channel B where is, but move channel
A to measure the voltage across the capacitor. From the oscilloscope
picture it is now quite clear what is going on. As long as the voltage on
14
the capacitor is larger than 8.2V the zener works fine. However, when the
capacitor discharges below 8.2 V, the zener diode cannot make it more,
and stops stabilizing the voltage. To make the circuit work, the voltage on
the capacitor has to be larger than 8.2V all the time. In part (2) you saw
that this requires a larger capacitor. You can now increase the
capacitance so that it has just the right value.
15
easier, you should set the sensitivity (y-scale) for both
channels to the same value, and the y-positions to zero.
16
Figure 9. Checking for the size of the ripple on the DC voltage.
Note that here we have connected both channels to the same
point. Channel A, set for DC-5V/div, monitors the DC voltages,
Channel B, set for AC-10mV/div looks at the small ripple.
Since it is difficult to trigger from a nearly constant voltage, we
have used the external trigger input to trigger directly on the
input sine wave.
17
Congratulations! You have just mastered an extremely useful piece
of software. Keep in mind that while EWB is intended for electronic
circuits, many thermal and mechanical problems can be mapped onto
equivalent electrical circuits, and simulated/solved using this software.
18