1102 - EPE Hybrid Computer - Part 1
1102 - EPE Hybrid Computer - Part 1
(Sequoia House, 398a Ringwood Road, Ferndown, Dorset BH22 9AU, UK)
and TechBites Interactive Inc.,
(PO Box 857, Madison, Alabama 35758, USA)
The materials and works contained within EPE Online — which are made available by
Wimborne Publishing Ltd and TechBites Interactive Inc — are copyrighted.
TechBites Interactive Inc and Wimborne Publishing Ltd have used their best efforts in preparing these materials and works. However, TechBites
Interactive Inc and Wimborne Publishing Ltd make no warranties of any kind, expressed or implied, with regard to the documentation or data
contained herein, and specifically disclaim, without limitation, any implied warranties of merchantability and fitness for a particular purpose.
Because of possible variances in the quality and condition of materials and workmanship used by readers, EPE Online, its publishers and agents
disclaim any responsibility for the safe and proper functioning of reader‐constructed projects based on or from information published in these
materials and works.
om
In no event shall TechBites Interactive Inc or Wimborne Publishing Ltd be responsible or liable for any loss of profit or any other commercial
damages, including but not limited to special, incidental, consequential, or any other damages in connection with or arising out of furnishing,
performance, or use of these materials and works.
.c
READERS’ TECHNICAL ENQUIRIES
ag
We are unable to offer any advice on the use, purchase, repair or modification of commercial equipment or the incorporation
or modification of designs published in the magazine. We regret that we cannot provide data or answer queries on articles or
projects that are more than five years’ old. We are not able to answer technical queries on the phone.
m
PROJECTS AND CIRCUITS
pe
All reasonable precautions are taken to ensure that the advice and data given to readers is reliable. We cannot, however,
guarantee it and we cannot accept legal responsibility for it. A number of projects and circuits published in EPE employ voltages
.e
that can be lethal. You should not build, test, modify or renovate any item of mains‐powered equipment unless you fully
understand the safety aspects involved and you use an RCD adaptor.
w
COMPONENT SUPPLIES
w
We do not supply electronic components or kits for building the projects featured; these can be supplied by advertisers in our
publication Practical Everyday Electronics. Our web site is located at www.epemag.com
w
We advise readers to check that all parts are still available before commencing any project.
To order you copy for only $18.95 for 12 issues go to www.epemag.com
Constructional Project
EPE HYBRID
COMPUTER
PETROS KRONIS Part 1
om
amplifiers
B Three modes of operation, Compute,
computers employ both those tiny periods of time necessary to per-
H
YBRID
Hold and Reset
major categories of electronic sys- form the iterations add up to considerable B Automatic or Manual mode control
.c
tems, the analogue and the digital. time periods. If anyone is still skeptical, B Offset null on all amplifiers
As is true with every type of system, each visit the following site on the internet: B ATOM microcontroller:
has its advantages and disadvantages. The www.indiana.edu/~rcapub/v21n2/p24 8k Flash program memory
ag
hybrid system is an attempt to combine the .html 384 bytes of RAM
best of both worlds. There, you will meet Dr Jonathan 15 I/O pins
Many people imagine analogue comput- Wayne Mills, associate professor of com- RS232 serial link
ers to be antique units stored away in puter science at Indiana University,
em
Analogue-to-digital converter
University laboratories. But not many peo- Bloomington, and director of the Adaptive PWM and Timer functions
ple realise that in some cases the analogue Systems Laboratory, whose patented new BASIC compiler programming
computer can solve a problem with analogue computer uses radically simpli- Integrated Development
admirable elegance, ease and simplicity, fied electronic components and “continu- Environment (IDE)
while the solution of the same problem on ous value logic” circuits, that make his
p
the digital computer may be virtually computer able to work incredibly fast and
.e
impossible. process more sensory inputs than a digital difficult to solve manually. Differential
A few analogue amplifiers connected computer can handle. equations describe the behaviour of physi-
together in a few minutes can give the cal systems, such as the suspension system
ANALOGUE
w
solution to a complex problem with the of a motor car or the flight of a rocket.
units producing results in real time. A COMPUTER The variables involved in such systems,
similar problem may take months to be An analogue computer uses voltage as such as the stiffness of the springs in the
w
programmed on the digital computer, pro- the analogue to represent a physical quan- first example, or the thrust of the engine in
vided the programmer has the skill to solve tity, in the same way that the height of the the second, can be varied by simply turn-
w
the equations. mercury column of an old fashioned mer- ing the dial of a potentiometer. In this way
For the digital computer to execute the cury thermometer represents temperature. the behaviour of the systems can be simu-
program, millions of iterations have to be The analogue computer is designed to lated, and many experiments carried out
performed, and not in real time. Granted solve mathematical equations, in particular without going to the expense of construct-
digital computers are now very fast, but differential equations, which are especially ing and testing real models.
Other advantages of the analogue com-
puter are the speed with which it carries
out the processing, and the relative sim-
plicity with which one can formulate the
problem on the computer. The disadvan-
tage is that the range of voltage variation is
limited and the measurement of that volt-
age is prone to errors. However, engineer-
ing is not an exact science and the ana-
logue computer is a useful tool in the
design of many engineering systems.
DIGITAL COMPUTER
In contrast to its analogue counterpart,
the digital computer works by manipulat-
ing discrete voltage pulses, instead of con-
tinuously varying voltages. It has the
advantage of high accuracy and repeatabil-
ity of results. On the other hand, it is
difficult and time consuming to program a
digital computer to solve differential equa-
tions and, moreover, the programmer must
om
Integrator circuit fundamental building blocks of an ana-
piler resident in the PC (see later). With the Integrator circuit (Fig.3), with logue computer. Other specialised cir-
Communication is through a serial link. capacitor Cf in the output voltage is given by: cuits, such as four-quadrant multipliers,
The MCU sends and receives data and various non-linear circuits, can be
through its input and output ports and has Vo = – ( ò
1
V1dt +
1
ò
V2dt + used to simulate effects such as back-
.c
the capability to convert analogue signals R1Cf R2Cf lash, friction, dead space, absolute
ò ò )
to digital by means of the built in ana- 1 1 values, etc., although they are not the
logue-to-digital converter (ADC). V3dt + V4dt subject of this design.
ag
R3Cf R4Cf
RF
INPUT OUTPUT
em
MULTIPLICATION OF A VARIABLE BY A
COEFFICIENT MULTIPLIER POSITIVE CONSTANT COEFFICIENT X
0<k>1 kX
R1 k
V1 A VO
R2
p
V2
INPUT OUTPUT
.e
R4
V4 INPUTS
X 1
w
W 10 (X+Y+10Z+10W)
CF
INPUTS
X 1
SUMMATION OF THE INTEGRALS OF OUTPUT
R1 Y 1
SUMMER INTEGRATOR VARIABLES WITH RESPECT TO TIME
V1 A VO Z 10
W 10 x(X+Y+10Z+10W)
R2
V2
R3
Fig.5. Analogue computer units, their function and symbols.
V3
HOLD RESET
R4
V4 Ric Ric
Vic
Fig.3. The Integrator circuit.
VIN
VR VO
Fig.4. The Coefficient Multiplier Fig.6. Circuit changes for integrators for the Hold and Reset modes.
S3B
S1b INTEGRATE
MANUAL
k
RESET D1 RLB
IN4005 1 INTEGRATE C1
a VR1 100n
RLB1
TO
VR10
1 C1 C2
20k
2 10n
x1
R1 8 VOUT
TR2 1M
7 C2
COMPUTE/ R9 BFY51
e 5 6
HOLD AUTO HOLD 82Ω
b NC IC1 TO IC10 VOUT
R2
S4A x1 RLA1 OPA177
1M
c
3
R3
+ 4 VOUT
S4B x10
100k
S2b
MANUAL
k R4
HOLD D2 x10
RLA 100k IC11 TO IC20
IN4005 1 PINS 3 AND 5
a
GND GND
om
15V
Fig.7. Circuit diagram for the Analogue Amplifier. Ten copies of this circuit are required to be built.
ANALOGUE COMPUTER
.c
precision op.amp,
which gives very +15V
CONTROL good performance at
TO
IC1 TO IC10
ag
PIN 6
Circuits which control the mode of oper- a reasonable cost. VR11
8
ation of the analogue computer are neces- Resistors R1 to R4 22k
sary. The EPE Hybrid Computer can be are the input resistors 3 R10
operated in three modes, Compute, Hold, and R5, plus capaci- + 1k3
D3
em
1 a k
and Reset. In addition, an overload warn- tors C1 and C2, are 2
ing system is included which monitors the the feedback compo- IC11 UNDER
TO
outputs of all amplifiers and gives a warn- nents. The values IC12 TO IC20 R12
TO
ing when they are about to saturate. chosen give a multi- 100k IC20 R11
5 1458
plication factor of ×1 +
p
om
single potentiometer, VR15, as shown in for the main p.c.b. is shown in Fig.14, and
Fig.12. Eight copies of this circuit are that for the ATOM microcontroller board in
4
required. Fig.17 later.
Track layout details for the boards are
15V
MICROCONTROLLER not shown separately as their size and dou-
CIRCUIT
Fig.10. Reference Voltage Cross-
Detection circuit.
.c
The circuit diagram for the Basic Micro
ATOM microcontroller is shown in Fig.13.
ble-sided requirement make them unsuited
for normal hobbyist manufacture. Full-size
photocopies of the printed circuit board
ag
of the overload op.amps (IC11 to IC20). The ATOM has the advantage of being track master patterns can be supplied to
Light emitting diodes (l.e.d.s) D3 and D4 programmable in BASIC, a simple but readers via the Editorial office on request.
are lit when the amplifier output voltage powerful language. Programs can be writ- Enclose a self-addressed envelope,
exceeds its reference voltage. ten and loaded into the ATOM at will, and stamped to suit four A4 pages.
em
trol. These units are useful when the pro- all the complexity is
grammer wishes to monitor an output with- inside the chip. The
out going to the trouble of transferring the only connections nec-
w
op.amp. It can be used to produce a control sion has been made for
signal when a voltage crosses a predefined connecting a liquid
value. crystal display (l.c.d.)
for those who wish to
R13 R15
use one, writing their
1k 5k6 own program to do so.
POWER
IN
R14
C3
10n
LS1
SUPPLY
design Fig.13. Connections to the Basic Micro ATOM microcontroller.
1k C4
IN
10n This
requires an external
d.c. power supply, with outputs of +15V, The boards are available ready-made
–15V, +5V and 0V. The supplies of +15V from the EPE PCB Service, codes 375
and –15V must be regulated. The +5V sup- (Main) and 376 (ATOM).
Fig.11. Audio circuit. ply does not need to be regulated as the
ATOM microcontroller has an on-board P.C.B. ASSEMBLY
voltage regulator. This is provided to the Solder the components of the main p.c.b.
VIN
ATOM’s Vin pin 24 (with its Vdd pin 21 in the following sequence:
being left unconnected). Power supplies Use double-sided solder pins, suited to
VR15 can be constructed using the appropriate 0·8mm holes, to connect the two sides of
10k VOUT
(P1 TO P8) voltage regulator i.c.s (7815, 7915 and the p.c.b. Resistor off-cut wires will be sat-
7805). isfactory as an alternative.
For the prototype, an old PC computer Because alignment is critical, the mode
power supply was used. These power sup- switches and the l.e.d.s have to be soldered
plies give +12V, –12V, +5V and various while being assembled with the front panel
Fig.12. Coefficient Multiplier. Eight are other output voltages. The voltage range is (shown in Fig.15.). Attach the switches to
used. slightly reduced, but it is a convenient the front panel, position the l.e.d.s in the
802
1 2 3 4 5 6 7 8 ME1
W W W W W W W W
R R R R R R R R R R
1 1 1 1 1 1 1 1 1 1
R R R R R R R R R R
2 2 2 2 2 2 2 2 2 2
R R R R R R R R R R
7 7 7 7 7 7 7 7 7 7
w
R R R R R R R R R R
3 R 3 R 3 R 3 R 3 R 3 R 3 R 3 R 3 R 3 R
6 6 6
w 6 6 6 6 6 6 6
R R R R R R R R R R
4 C
1
R
4 C
1
R
4 C
1
R
4 C
1
wR
4 C
1
R
4 C
1
R
4 C
1
R
4 C
1
R
4 C
1
R
4 C
1
R
5 5 5 5 5 5 5 5 5 5
C C C C C C C C C C
.e
2 2 2 2 p 2 2 2 2 2 2
S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2
em
ag
TO S3 TO
ATOM
RLB RLA RLB RLA RLB RLA RLB RLA RLB RLA TO S4 PCB
.c
IC IC IC IC IC IC IC IC IC IC
VR1 VR2 VR3 VR4 VR5 VR6 VR7 VR8 VR9 VR10
1 2 3 4 5 6 7 8 9 10
om
VR11 R R R R R R R R R R
10 IC 10 IC 10 IC 10 IC 10 IC 10 IC 10 IC 10 IC 10 IC 10 IC
D3 D3 D3 D3 D3 D3 D3 D3 D3 D3
k a 11 k a 12 k a 13 k a 14 k a 15 k a 16 k a 17 k a 18 k a 19 k a 20
R11 R11 R11 R11 R11 R11 R11 R11 R11 R11
R9
D4 D4 D4 D4 D4 D4 D4 D4 D4 D4
VR12 a k a k a k a k a k a k a k a k a k a k
15V TO
GND ATOM
+15V PCB
om
.c
ag
em
Care must be taken when assembling that the switches, potentiometers, l.e.d.s and sockets align with the front panel holes.
The sockets need to be mounted last, their extension leads going into the holes just visible in the upper part of the above photo.
A socket functions diagram will be given in Part 2.
COMPONENTS £220
p
Approx. Cost
Guidance Only
.e
excl. case
w
P2
A
P13
MODE
ag
10
P3 P12 46 14
T 35
12.5
10
P4
O P11 MANUAL MANUAL
10
M RESET HOLD 39 DIA
12.5
32
18 ADD m 12.5
P5 P10
COMPUTE/
AUTO RESET
COMPUTE/
AUTO HOLD
163
pe
P6 P9
39.5
12.5
P7 P8 23.5
INTEGRATE
12.5 ME1 VR13
33
A1 A2 A3 A4 A5 A6 A7 A8 A9 A10
.e 10
AX3 AX2
+
AX1 AX0
ME2 VR14
20
22 OFFSET NULL
OVERLOAD
w 10
10
9
+ 10 w +
EPE HYBRID 32.5
10.5
-
18 25 25 25 25 25 25 25 25 25
12.5
32
w
CROSS DETECTION
37.5 61
COMPUTER
31 15.5
side (behind the front panel), then once sol- locations necessary to drill the holes for the socket connects via a suitable lead to the B Power supply sockets to the 1mm p.c.b. or the –15V to supply the bulbs. This is
dered the p.c.b. will not be able to be components. PC’s COM2 serial port. pin-header connectors. useful as the panel meter lights function
removed from the front panel. The general dimensions of the box are Attach the panel meters, potentiometers, B SK1 serial socket to p.c.b. connector. also as power on indicators.
shown in Fig.16, but may vary depending remaining switches and sockets to the front B P.C.B. connectors to coefficient multi- Photographs of some aspects of the case
FRONT AND REAR on the source of the case. The layout of the panel. Drill holes in the back panel to accept plier potentiometers and the return to assembly are in Part 2.
PANELS rear panel is shown in the photograph. The the power supply sockets and the serial link earth.
The computer was housed in a box with four power supply connectors were 4mm socket SK1. Cut ribbon cable to the required B Panel meter wiring. Note that panel ATOM BOARD
a sloping front panel. Fig.15 shows the sockets in the prototype, and should be length and solder the ends to the appropriate meters may have connectors for illumi- The ATOM p.c.b. (Fig.17) is soldered
design of the front panel with all the labelled appropriately. The 9-way D-type connectors. Make cable harness to connect: nation of the dials. Use either the +15V to the front panel sockets in a similar
804 Everyday Practical Electronics, November 2002 Everyday Practical Electronics, November 2002 805
15V
GND
+15V
+5V S4 NC
NC
R14 e
R13
TR2 b
c
a
S3 NC
NC D2
R15 e k
SPEAKER
TR1
+
b
C C c
4 3 a k
D1
RESET
SWITCH
5
DB9 4
PINS 3 R
2 17
NC * C5 *
R
IC22 16 IC21
L.C.D.
DISPLAY
(PROVISION)
om FROM S3
FROM S4
+15V
15V
GND
.c TO MAIN PCB
ag
Fig.17. Component layout details for the ATOM microcontroller p.c.b.
way to the main board. The ATOM i.c.
used in the prototype had four small pads
em
NEXT MONTH
In the concluding part next month, test-
ing the various aspects of the design is
described. Examples are then given illus-
trating how the computer can be used to
simulate real-world engineering problems,
such as encountered when loading a spring,
or demonstrating the take-off and landing
of a Harrier jump jet!
RESOURCES
VB6 software for this project is avail-
able for free download from the EPE ftp
site, or on CD-ROM (for which a charge
applies) from the EPE Editorial office,
see the EPE PCB Service page for
details. Software for the ATOM can be
supplied on CD-ROM when you buy this
microcontroller (see this month’s
Shoptalk page for details) or can be
downloaded from www.basicmicro.com.
806 Everyday Practical Electronics, November 2002