You are on page 1of 81

Volume 2 Issue 3

March 2000
Copyright © 1999 Wimborne Publishing Ltd and EPE Online, Febuary 1999 - www.epemag.com - XXX
Maxfield & Montrose Interactive Inc
Copyright  2000, Wimborne Publishing Ltd
and Maxfield & Montrose Interactive Inc.,
PO Box 857, Madison, Alabama 35758, USA
All rights reserved.

WARNING!
The materials and works contained within EPE Online — which are made available
by Wimborne Publishing Ltd and Maxfield & Montrose Interactive Inc — are
copyrighted. You are permitted to download locally these materials and works and to
make one (1) hard copy of such materials and works for your personal use. International
copyright laws, however, prohibit any further copying or reproduction of such materials
and works, or any republication of any kind.

Maxfield & Montrose Interactive Inc and Wimborne Publishing Ltd have used their
best efforts in preparing these materials and works. However, Maxfield & Montrose
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.

In no event shall Maxfield & Montrose 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.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 164
Maxfield & Montrose Interactive Inc
PROJECTS AND CIRCUITS
PARKING WARNING SYSTEM - by Tom Webb 167
Avoid having an unwanted rear entrance to your garage!

HIGH PERFORMANCE REGENERATIVE RECEIVER - Part 1 173


by Raymond Haigh
Beautifully designed receiver covering 130kHz to 30MHz global broadcast and amateur bands

AUTOMATIC TRAIN SIGNAL - by Robert Penfold 179


Easy-to-build, low-cost Starter Project for model railways

INGENUITY UNLIMITED - hosted by Alan Winstanley 194


Delay-On Timer, 555 Power Supply, PIC Adapter Socket; Shaky Dice, ...

EPE ICEBREAKER - by Mark Stuart 183


Real-time PIC In-Circuit Emulator, programmer, debugger, and development system

SERIES AND FEATURES


NEW TECHNOLOGY UPDATE - by Ian Poole 196
Magnetic memories threaten conventional and Flash devices

TECHNOLOGY TIMELINES - Part 2 Days of Later Yore, plus Fundamental 198


20th Centuary electronics by Clive “Max” Maxfield & Alvin Brown
Who, what, where, and when - the fascinating story of how technology
developed in the past millennium.

TEACH-IN 2000 - Part 5 - Waveforms, Frequency and Time 208


by John Becker
Essential info for the electronics novice, with breadboard experiments and interactive
computer simulations.

NET WORK - THE INTERNET PAGE surfed by Alan Winstanley 221


Radio Bygones Message Board; Search Engines; Disappearing URLs

CIRCUIT SURGERY - by Alan Winstanley 223


Opamp Differentials; Hot Regulator; Conventional Current Flow

PRACTICALLY SPEAKING - by Robert Penfold 228


A novice’s guide to resistors and potentiometers

REGULARS AND SERVICES


EDITORIAL 165
NEWS - Barry Fox highlights technology’s leading edge. Plus everyday 231
news from the world of electronics.

READOUT - John Becker addresses general points arising. 235


SHOPTALK - with David Barrington The essential guide to component 240
buying for EPE Online projects.

Copyright © 2000 Wimborne Publishing Ltd and EPE


EPEOnline,
Online,March
March2000
2000- -www.epemag.com
www.epemag.com- -164
84
Maxfield & Montrose Interactive Inc
BASH, WIND, WIRE
Occasionally a project comes along that makes you realize just how clever some of our modern ICs
are. One such project is the Micro-PICscope to be featured next month (see the Next Month page for
more details). When the editor of the hard copy edition of EPE – Mike Kenward – was an apprentice with
the Ministry of Aviation (now MoD), back in the distant past, he built a Wireless World Oscilloscope – in
those days Wireless World (now Electronics World) actually published constructional projects.
To build the ‘scope they first spent a week “chassis bashing”, and they also had to weld up the sides of
the aluminum chassis (and if you have ever tried welding aluminum you will know that many of them had to
start again when the prized chassis fell into holes under the welding torch!) Then they fitted the
transformers, valve bases, switches, potentiometers, tagstrips, and the oscilloscope tube, inside its mu-
metal screen; after which they could start wiring it all up. Oh, by the way, they also had to wind their own
mains transformer and EHT transformer before we started on the electronics.
By the time the unit was finished it weighed about 10kg and measured around 500mm x 300mm x
250mm, plus the performance was rather limited and it took five minutes to warm up! Now just 30 years on
we can do roughly the same thing with two chips and a liquid crystal display (LCD), put it in your pocket,
power it from a battery and build it for under 20 UK Pounds. Accepted the performance is very limited and
so, too, is the display, but it is a useful little tool for any hobbyist. We expect it to be very popular and there
are a couple of other PIC-based items of test gear in the pipeline.

TERRY
We dedicate this issue to Terry Farmiloe, the Typesetting Manager of the printed edition of EPE, who
died on Jan. 2nd, aged 61. Terry had a gruff exterior that hid a heart of gold. While his name will not be
known to readers, he has been responsible for running the EPE typesetting department, and thus the
production of EPE and other publications, for the last 10 years.
Good luck on your onward journey, Terry, we miss you greatly. Our sympathy goes to your loving
family.

Copyright © 2000 Wimborne Publishing Ltd and EPE


EPEOnline,
Online,March
March2000
2000--www.epemag.com
www.epemag.com--XXX
165
Maxfield & Montrose Interactive Inc
MICRO-PICSCOPE
It’s astonishing what opportunities are continuing to be revealed for the recently introduced
PIC16F87x series of microcontrollers. The Micro-PICscope is a prime example of a design idea
whose implementation was greatly simplified by using one of these devices.
The Micro-PICscope is a handy little item of test gear and of benefit to anyone’s workshop. Us-
ing an alphanumeric liquid crystal display, it is basically a signal tracer, but one with the great ad-
vantage that it shows a representation of the signal waveform being traced. This is shown across
eight of the LCD character cells and is a real-time trace of the monitored waveform.
Not only that, the display also shows the frequency of the signal being monitored, and its peak-
to-peak voltage. The frequency range covered is basically for audio, but frequencies well to either
side of this range can be traced.
Several ranges of control are offered by push-button selection, covering the sampling rate, and
synchronization on/off for the ‘scope display. The signal input is switchable to provide different
maximum peak voltage monitoring ranges. Selection of AC or DC input is provided.
The entire design requires only two ICs, a PIC microcontroller and an opamp, plus a 2-line by
16-character intelligent LCD. Probably the simplest and cheapest ’scope ever.

FLASH SLAVE
Cameras have undoubtedly increased in sophistication over the last ten years or so, with fea-
tures such as auto-focus and built-in flashguns now being commonplace. On the other hand, a few
“standard” features seem to have become rarities that are featured on little more than a few up-
market cameras. The humble flash socket certainly falls into this category.
For most users, this lack of an external flash connector is probably of little consequence, but it
is a major drawback for anyone wishing to go beyond simple “point and shoot” flash photography.
This easy-to-build, inexpensive little unit will fire a secondary flash without any connections to the
camera, thus overcoming the problem.

GARAGE LINK
This circuit helps to prevent the garage door (or either door in the case of a double garage hav-
ing twin doors) being left open all night. It works by establishing a radio link between the garage
and some point inside the house. The unit indoors then provides an audible warning in the form of
a short bleep every 45 seconds. It could also be used to monitor a range of other things around the
home.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 166
Maxfield & Montrose Interactive Inc
PARKING WARNING SYSTEM
by TOM WEBB

How to avoid having an unwanted rear entrance to your garage!

This is a device to aid you in INFRA-RED INFRA-RED BUZZER


parkiar in a garage by providing a ENCODER &
TRANSMITTER
RECEIVER &
DECODER
MONOSTABLE AND/OR
L.E.D.s
visual and audible warning. It is
easily set up by mounting it onto
the wall at the end of the garage.
The device produces a coded
infrared (IR) beam which detects CAR

the proximity of the vehicle by


bouncing IR off it as it Fig.1. Parking Warning System block diagram.
approaches, without being
confused by other IR sources. influenced by stray background removed. An HT12D decoder
When the vehicle is within the IR emission from lights etc. A then decodes the signal to give
preset range, an audible warning coded IR signal is better since a steady output.
is given and a group of light the receiver can be set up to
emitting diodes (LEDs) are turned only accept a specific code.
on. CODED
There are a number of
The block diagram in Fig.1 encoding and decoding ICs TRANSMITTER
shows how the circuit is split up available, but two from Holtek Either the HT12A or HT12B
into separate sections. are used for this circuit. The transmitter devices may be
HT12B transmitter encodes the used in the coded transmission
signal and adds a 38kHz carrier circuit. They work in exactly the
INFRARED CODING signal for greater reliability. A same way except the four data
A system based on a separate demodulating sensor outputs of the HT12A are
continuous IR signal would fail in detects the coded signal and inverted as compared with the
this type of application, since the provides a clean output HT12B. However, since these
receiving circuit would be heavily waveform with the 38kHz carrier outputs are not used in this
circuit, this is of no importance.
Referring to the full circuit
diagram in Fig.2, pins A0 to A7
of the transmitter IC2 set the
coded signal for the IR
transmission, which can only be
accepted by a decoder chip
(IC3 in Fig.2) with the same
settings. The printed circuit
board is designed so that pins
A0 and A1 are connected to the
0V supply line, pins A2 to A7
being left unconnected.
Pin 9 of IC2 is connected to
Fig.1. Parking Warning System block diagram. 0V and pin 18 connected to the

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 167
Maxfield & Montrose Interactive Inc
Constructional Project
R1
100Ω
OUT IC4 IN
7805
a
COM D3
R3
10k k
a
D4
+ VE TR1 VR2
R2 BC184L
c
1M k +
47k WD1 S1
b a 12V
IC1 OUT D5
PIC-26043S
e k
GND IC5a IC5b
14 4001 C4 4001 k + 12V D.C.
2 47µ 6 R10 D2
1 18 3 4 330Ω 1N4001 POWER
A0 V DD 5 a
1 INPUT
2 17 R4 (SEE TEXT)
A1 VT 47k 7
3 16
A2 OSC1 0V
4 15
A3 OSC2
TR3
5
A4 IC3 DIN
14
R9 BC184L
HT12D c
6 13 4k7 C5 C6
A5 D11 b
100n 1000µ
C1 7 12
100µ A6 D10
e
8 11 IC5c IC5d
A7 D9
R7 4001 4001
9 10 9 13
VSS D8 100k 10 11
8 N.C. 12 N.C.

a
D1
IR
R5 k
4k7
1 18
A0 VDD R8
2 17 C2 100Ω
A1 DOUT 100p
3 16
A2
4
A3
X1
X2
15
VR1
Fig.2. Complete circuit diagram for
IC2 X1 R6 470Ω
5

6
A4
HT12B
L/MB
14
13
455kHZ 10M C3
100p
TR2 the Parking Warning System. The
A5 D11 TIP122 OR
7
A6 D10
12
TIP121
c
transmitter is the lower section
8 11 b
9
A7 D9
D8
10 (IC2/TR2) of the circuit.
VSS
e

positive supply, which should A7. Since pins A0 and A1 on


not exceed +5V. IC2 pins 11 to INFRARED transmitter IC2 are connected to
14 are not used. The pins 0V, the same pins on IC3 are also
labeled X1 and X2 are the RECEIVER connected to 0V.
oscillator control pins, and The IR sensor/amplifier/ Resistor R4 sets the
require a 455kHz ceramic demodulator, IC1, is housed in oscillation frequency for IC3 to
resonator (component X1) along a package resembling a small the required 150kHz. The value is
with resistor R6 and two power transistor. The receiver chosen to suit a power supply of
capacitors, C2 and C3. rejects all IR transmissions between 4××5V and 5V. When IC3
The Dout pin provides a except the required 38kHz receives a correctly coded signal,
coded output superimposed on signal, and provides a clean its pin 17 (VT) goes high. This
a carrier signal of 38kHz which, output (easily viewed on an triggers the monostable formed
with the aid of Darlington oscilloscope). There are three by IC5a and IC5b. When the VT
transistor amplifier TR2, possible receivers that perform pin of IC3 is open circuit (no
operates the IR light emitting the functions required, but in signal being received), resistor
diode D1. tests the best performer for this R7 draws the input pin of the
circuit was the PIC26043S (not monostable to 0V. Once
Potentiometer VR1 allows
a PIC microcontroller!). triggered, the monostable’s
the transmission power to be
varied. Ballast resistor R8 When the detector detects a output remains high for a period
prevents a power supply short signal having a frequency of set by the values of C4 and VR2.
circuit through D1 and TR2 38kHz, its output goes high. The formula used to calculate
when VR1 is set to minimum Transistor TR1 inverts this level this period is T = 0××7 x R x C.
resistance. and supplies it to the decoder
With VR2 set to 100kW, the
IC3 at DIN (pin 14).
IC2 pin 10 is connected to period will be 0××7 x 0××1MW x 47uF
ground to hold the transmitter The code to which IC3
= 3××29 seconds.
perpetually triggered. responds is set by its pins A0 to
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 168
Maxfield & Montrose Interactive Inc
Constructional Project
COMPONENTS from the buzzer which might
otherwise damage the circuit.
Note that on the IR diode,
D1, the long leg is likely to be
Resistors R10 is a ballast resistor to limit the cathode (k), but check this
R1, R8 100 ohms (2 off) the current through the LEDs. with the component supplier’s
R2, R4 47k (2 off) catalog.
R3 10k
R5, R9 4k7 (2 off) POWER SUPPLY Infrared receiver IC1 has a
R6 10M “dome” on its sensitive side,
R7 100k Power to the circuit is which should face outwards
R10 330 ohms intended to be from a 12V mains from the PCB. Once soldered
Potentiometers adapter as the circuit will need to
VR1 470 ohm miniature horizontal
in, IC1 should be bent back to
be left switched on for long so that the dome is facing
skeleton preset
VR2 1M miniature horizontal periods of time. A supply of 12V upwards.
skeleton preset is required in order to power the
buzzer. The power supply is Use IC sockets for IC2, IC3
Capacitors and IC5. Do not insert the dual-
C1 100u radial electrolytic, 25V regulated down to 5V by IC4 to
C2, C3 100p (2 off) suit the rest of the circuit. in-line (DIL) ICs until
C4 47u radial electrolytic, 25V construction has been
C5 100n ceramic If a buzzer is not being used, completed and fully checked.
C6 1000u radial electrolytic, 25V then diode D2 can be omitted and
Semiconductors a supply of 5V (or 4××5V) could be
D1 IR diode used by inserting a wire link in the CASING
D2 1N4001 rectifier diode place of regulator IC4 (between
D3 to D5 red LEDs (3mm or 5mm)
Two plastic cases will be
its In and Out pins). However, in needed as the LEDs need their
TR1, TR3 BC184L npn
transistors (2 off) this case, the value of LED own separate case in order to
TR2 TOP122 (or TIP121) npn ballast resistor R10 should be be seen through the rear
Darlington transistor reduced to about 180 ohms. This windscreen of the car.
IC1 PIC26043S IR receiver also means that batteries could
IC2 HT12B (or HT12A) encoder The circuit board is
be used as the standby current is
IC3 HT12D decoder mounted in its own case on
IC4 78L05 +5V 100mA regulator less than 10mA.
small PCB supports which firmly
IC5 4001B quad NOR gate Capacitors C5 and C6 secure it in place, see Fig.4.
Miscellaneous decouple the power fed to IC4. Drill holes in the case to suit the
S1 s.p.s.t. toggle switch (optional) Capacitor C1 and resistor R1
WD1 buzzer, 12V
positions of the IR receiver and
X1 455kHz resonator
smooth out the voltage supplied IR diode, see photographs. The
to the receiver device, IC1. hole for the IR receiver should
Printed circuit board available not be too small otherwise the
from the EPE Online Store , code range will be reduced. If
7000258 ( www.epemag.com ); CONSTRUCTION maximum range is required
plastic case to suit (2 off, see text);
14-pin DIL socket; 18-pin DIL Apart from the buzzer and then the IR receiver should be
socket (2 off); connectors for LEDs, all the components are positioned right by the hole.
power and LED cables (see text); contained on a single printed If you prefer to have
PCB pillars (4 off); connecting circuit board (PCB). The topside
wire, solder, etc. plugged connections for the
component layout and full size power supply input and for the
See also the underside copper foil master are output to the LEDs, suitable
SHOP TALK Page! shown in Fig.3. This board is holes should also be drilled for
available from the EPE Online their sockets. You also need a
Approx. Cost Store (code 7000258) at
Guidance Only $29 www.epemag.com
hole for the power on/off switch
if you decide to use one,
Begin construction by although one was not used on
The output from the
soldering in the resistors and the the prototype.
monostable, at IC5b pin 4, is
four wire links. Ensure the correct Additionally, two holes are
fed to transistor TR3 via resistor
orientation in the PCB for required to allow adjustment
R9. When the output level is
components C1, C4, C6, TR1 to access to the two preset
high, TR3 is turned on and
TR3, D1 and D2. Capacitors C2, potentiometers, using a small
drives the warning buzzer WD1
C3 and C5 may be connected screwdriver. All holes should be
and turns on LEDs D3 to D5.
either way round. drilled accurately to correspond
Diode D2 prevents back EMF
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 169
Maxfield & Montrose Interactive Inc
Constructional Project

+
C4
+
C1
+VE GND OUT
R
9
D3 D4 D5
e c b e R a k a k a k
R 1
VR2 3 c IC1 R
TR3 b 2
D2 TR1 OUT IC4 L.E.D.S CONNECTED
IN SERIES
k a
D5(k) COM
R10 IN
D3(a) C5
+

SCREENED
WD1 C6 R CABLE
R4 7
WD1+
TR2
R5 b
c
a +
C2 e V+
R
6 X1 D1 VIA S1
OPTIONAL
JACK PLUG
C3 R
k 8
0V
VR1 0V

Fig.4 (below). Wiring from the circuit


board to the optional LED jack
socket and power connector.
OPTIONAL JACK
SOCKET TO CONNECT
TO L.E.D. BOX

258 POWER
+

HOLE TO
ADJUST
RANGE
OF IR

OPTIONAL
POWER
+ CONNECTOR
BUZZER
+

HOLE TO ADJUST
TIME BUZZER OR INSIDE VIEW
L.E.D.S ARE ON

Fig.5 (above). The LEDs mounted in


a separate case and connected via
screened cable and jack plug to the

Fig.3. Printed circuit board topside compo- Fig.5. the remaining chips, correctly
nent layout and (top right) approximately orientated.
full-size underside copper foil master. TESTING Testing of the IR modules
presents a problem as if one
The first check doesn’t work then the other will
with their respective is to make sure the voltage seem not to be working as well.
components. regulator IC4 is the correct way If in doubt use a voltmeter or
around. Connect the circuit to oscilloscope as follows:
The LEDs mounted in their the 12V power supply and then
separate case can be connected check that 5V is present on the Test the voltage on the VT
to the circuit using single output pin of IC4. If it is, then pin (pin 17) on IC3 of the
screened wire, as shown in disconnect the power and insert receiver module. It should

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 170
Maxfield & Montrose Interactive Inc
Constructional Project
know if the receiver IC is
working, and hence determine if
the fault lies in the transmitter or
receiver or both.
If the output from IC1 is
working, test the signal at pin 14
(Din) of IC3 on the receiver
module. It should be at about
0V when no signal is received,
rising to about 1××3V (as seen on
a voltmeter) when a signal is
received. Again, an oscilloscope
will show that the signal actually
pulses to about 5V.
If the VT pin on the receiver
is working then simple voltmeter
tests should establish the
position of any other faults.
Completed circuit board mounted inside its box.
If the circuit is triggered
normally be at 0V but change to oscillating, a voltmeter provides straight away then IC1 may be
about 5V when a signal is a rather approximate guide to receiving IR straight from the IR
received. Now check the voltage. If an oscilloscope is diode D1, through stray
voltage on the pins of IC1. Pin 3 available it should be possible reflection inside the case. If this
should be at 5V and pin 2 at 0V. to view the encoded signal, in happens the transmitter should
When a signal is not being which case the trace will rise be surrounded by a rolled piece
received, pin 1 (the output pin) and fall between 4V and 0V. If of black card.
should be at just under 4V. this test fails then try sending a
When a signal is received this signal from a TV remote control
voltage should fall by about 1V. unit. The signal will not be
SETTING UP
Note that as the signal is decoded, but you will at least The presets VR1 and VR2
can be adjusted to suit the
user’s own particular needs. The
following is a summary of their
functions:
VR1: Adjusts the range of
the IR beam by decreasing or
increasing the power going
through IR diode D1. Reducing
the resistance extends the
range.
VR2: Sets the time the
buzzer and LEDs stay on by
controlling how much
recharging current is input to the
monostable. Reducing the
resistance reduces the time.

The transmitter/receiver case and the smaller LED


COMMON
box with their lids removed. Note the “tube” of black PROBLEMS
card to stop stray reflections from reaching the IR Typical mistakes include dry
receiver chip. joints and bridged pads, i.e.
adjacent pads accidentally

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 171
Maxfield & Montrose Interactive Inc
Constructional Project

Completed remote LED


warning box.
joined together with solder. This Parking Warning
Other problems include failure System should be set up with
to insert wire links. Also check the IR sensors lining up with the
that the components are extremity of the car, e.g.
correctly placed, and the correct bumper. The LED box should
way round. Note again that be positioned so as to be seen
some IR LEDs are unusual in through the rear windscreen.
that the longer lead denotes The time the LEDs and buzzer
cathode (k). are on, and the range of the IR
can easily be changed using a
screwdriver to adjust the presets
IN USE VR1 and VR2.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 172
Maxfield & Montrose Interactive Inc
HIGH PERFORMANCE
REGENERATIVE
RECEIVER by RAYMOND HAIGH
developed across it.
Provides continuous coverage from 130kHz to
30MHz. Capable of receiving broadcast and amateur Armstrong (and others)
discovered that, by connecting
stations from around the world. a triode valve to the tuned
“regeneration”, the technique circuit and feeding back a tiny
ORIGINS OF portion of the amplified signal to
produces a truly dramatic
REGENERATION increase in receiver sensitivity the coil, its Q can be
Almost a hundred years ago, and selectivity. dramatically increased. By this
scientists and engineers in means, Q factors of several
Armstrong filed his patent in
Europe and America were trying thousand can be achieved
October 1913, just two months
to develop more sensitive circuits before the onset of oscillation,
before his 23rd birthday. At this
for the reception of radio signals. and the wanted signal is greatly
amazingly young age he had
amplified.
C. S. Franklin in England and pushed forward the frontiers of
A. Meissner in Germany were technology and made man’s It is this phenomenon which
both working on similar lines, but dream of long-distance radio imparts such a high degree of
the credit for discovering the reception a reality. sensitivity and selectivity to
benefits of applying positive simple regenerative receivers.
feedback to a tuned circuit is
generally attributed to that great
HOW IT WORKS
Tuned circuits, formed by
POPULARITY
American radio pioneer, E. H.
Armstrong. Known as an inductor (coil) and a Regenerative radio sets
capacitor, are crucial to the were produced in large numbers
working of radio receivers. By throughout the ’twenties. Skill is
varying one of the required to get the best out of
components (usually the radios of this kind: in particular,
capacitor), the circuit can be the regeneration control has to
tuned to resonate at a be carefully adjusted when
particular frequency. receiving weak signals. Largely
because of this, the easily
This combination
operated superhet (also
magnifies a signal to which it
invented by Armstrong) began
is tuned. The degree of
to challenge the popularity of
magnification is dependant on
the regen’ in the ’thirties.
the quality of the tuned circuit,
and this is defined by a figure During the Second World
of merit known as the Q- War, Germany manufactured
factor. A figure of 100 is regenerative sets for military
common. If a signal of 1mV is use, and the British
applied to a tuned circuit with incorporated circuits of this kind
a “Q’’ of 100, a voltage of 100 into clandestine transceivers.
x 1mV, or 0××1V will be Manufacture for domestic

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 173
Maxfield & Montrose Interactive Inc
Constructional Project
listeners continued almost to the
end of the valve era, with Ever-

S1A
Ready producing a two-valve

9V TO 12V

BC239C
e b c

BC237
BC238
0V
B1

TO VR8

TO VR8
battery-operated set (their

ON/OFF
Model H) during the ’fifties.

OUTPUT
AUDIO

LEADOUTS FOR ALTERNATIVE TRANSISTORS


+

3SK81
BF981
BF960
BF961
C19
1m
C18
10n
AVOIDING

d
PROBLEMS

+
100m
C17

g2

s
Regenerative receivers are

e
c

g1
easily overloaded by powerful

220W

R12

470W
10k
R11

R14
BC239C
TR4
2M2
R13

b
signals. They are also affected

2N3819
d g s
+
by aerial characteristics.

C16
1m
C15
1m
When an aerial system, +

which is directly connected to

BC557
BC212
e b c
10n
C14
the tuned circuit, is resonant at
the reception frequency (or a

100n
C13
harmonic), it absorbs energy

s
and inhibits regeneration.
100W

R10
10k
R9

Known as “suck-out”, the

BF981
TR3
g2

g1
phenomenon manifests itself as

C8 *
dead spots in the tuning range.

REGEN
VR3
100k

VR4 *
Overload and “suck-out”,

22k
470W
R8

together with an erratic


VR2
10k

+
feedback control, can ruin the

C12
1m
performance of regenerative
+

1M
R7
radios. They are avoided in this
100m
C11

design.

D
100n
C10

10n
C9

WAVE TRAP
VC2*
d

TUNE
FINE

25p
10k

4k7
R5
R4

2N3819
TR2

Powerful local radio


g

transmitters can swamp


R6 *

C8 *
VC1*
365p
100n

TUNE
C6

regenerative receivers (they


C

even cause problems with


+

C7 *
4 m7
C5

superhets of advanced design).


The answer to this is the
SEE TEXT AND TABLES FOR
A

B
SK3/PL3

inclusion of what is known as a


COMPONENTS MARKED
TABLE 2)
L2 *
(SEE

“wave trap”.
An inductor L1 and
100W

100k
22k
R2

capacitor C1 form a parallel


R3
R1

cc

tuned circuit, which presents a


b

100n
ee

high impedance at resonance,


C4
ATTN.

LOG.

BC557
TR1
VR1
R.F.

1k

see Fig.1. When the inductor/


SK2/PL2

capacitor combination is set to


EARTH
100n
AERIAL

C3

the frequency of the offending


C1*

+
220p

transmitter it blocks it out.


33p
TO

100m
C2

The problem is invariably


SK1/PL1

331208NO

encountered on Medium
L1*
RWR

Waves, and suitable component


values to tackle this problem,
should it arise, are scheduled in Fig.1. Circuit diagram of the High Performance
Table 1. Regenerative Receiver.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 174
Maxfield & Montrose Interactive Inc
k
TO AUDIO
+9V TO +12V C23
BB405B
INPUT 100n + S1B
FROM
BANDSPREAD VR5 RECEIVER C24 ON/OFF
a
1k
TO IC1 220m
C19 TDA7052
1 B2
BANDSET VR6 SK1 OUTPUT 6V TO 9V
KV1236 D1 100k VR8 2 5
1/2 OF 4k7
KV1236 LOG.
PHONES
3
a k R15 VOLUME 8 LS1
C22 8W
470k 6
100n
C20
1n C21
TUNING
CAPACITOR
100n 0V
TO TR3 g1 k VR7
D1
1/2 OF
100k
Fig 3. The audio power amplifier stage.
KV1236
a
OV (GND)

Fig.2. Alternative electronic tuning sys- Frequency (kHz) Frequency (kHz)


tem. For fine tuning only, delete VR5 and C1 pF at max inductance at min inductance
(core fully in) (core fully out)
C22, use a BB405B varicap diode, and
33 1300 1700
47 1100 1400
68 900 1200
CIRCUIT DETAILS 120 700 900
The circuit diagram of the 220 550 700
High Performance Regenerative
Receiver is shown in Fig.1. With the use of transistors, better frmoscii.htm, Ed.)
Grounded-base transistor, TR1, results, without recourse to Preset potentiometer VR4 is
acts as a radio frequency (RF) specially designed coils, can be included on the printed circuit
amplifier. Whilst its most achieved by separating them. board (PCB) for use during the
important function is to isolate
Field effect transistor TR2, setting-up process, after which it
the regenerative stage from the
biased by resistor R5 into the is shorted out and replaced by
aerial, it also provides a useful
non-linear region of its fixed resistor R6. Bypass
amount of gain.
characteristic curve, functions as capacitor C8 assists
Signal input is fed to the a sensitive, drain-bend detector. regeneration when the feedback
emitter (e) of TR1, and winding is comparatively small.
Source decoupling at RF and
potentiometer VR1 acts as an It is not required on all coil
audio frequencies (AF) is
attenuator: an essential feature ranges.
provided by capacitors C5 and
that prevents overload on
C6. The output of TR2 is Feedback, or regeneration,
strong signals. Bias is fixed by
developed across drain load is controlled by potentiometer
resistors R2 and R3, and C4 is
resistor R4 and C9, R8 and C14 VR2, which adjusts the voltage
the base (b) bypass capacitor.
remove residual RF. on gate 2 of TR3, thereby
The RF stage is decoupled from
varying its gain. Preset VR3
the supply rail by R1, C2, and
fixes the range of control,
C3. Q-FACTOR capacitor C12 decouples gate 2
The output impedance of a Dual-gate MOSFET TR3 and eliminates potentiometer
grounded-base stage is high provides the modest amount of noise, and resistor R10 and
enough for TR1 to be connected RF gain required for regeneration capacitor C13 decouple the
directly to the tuned circuit, and or Q multiplication. Arranged as a stage from the supply rail.
the use of a pnp device enables Hartley oscillator, feedback from When the tuning coil L2 is
its collector (c) to be taken to TR3 source (s) is connected to a removed for band changing, the
supply negative via the coil L2. tapping on coil L2, via bias signal gates of TR2 and TR3
components resistor R6 and are kept at 0V by resistor R7.
DETECTOR capacitor C8. (Hartley oscillators
were introduced in detail in the
Old valve receivers July 1999 installment of our six- TUNED CIRCUIT
invariably combined the part series on oscillators. For The receiver is tuned by
functions of signal detection and more details bounce over to inductor (coil) L2 and variable
regeneration (or Q www.epemag.com/ capacitors VC1 and VC2. The
multiplication) in a single stage.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 175
Maxfield & Montrose Interactive Inc
Constructional Project
COMPONENTS
Resistors Capacitors (continued) Miscellaneous
R1, R9 100 ohms (2 off) C5 4u7 radial electrolytic L1 RWR331208NO inductor (TOKO),
R2 22K C7 axial polystyrene, see text only required if "wave trap" is
R3 100k and Table 2 (next month) needed (see text)
R4, R10, R12 10k (3 off) C8 ceramic, see Table 2 (next month) L2 tuning band coils (TOKO), (8 off)
R5 47k C9, C14, C18 10n disc ceramic (3 off) see text and Table 2 (next month)
R6 various values (see text and C12, C15, C16, C19 1u radial PL1 to PL8 9-pin D-type plugs for L2
Table 2 next month) electrolytic (4 off) (8 off) see Table 2 for other components
R7 1M *C20 1n (1000p) or 50p polystyrene S1 d.p.d.t. toggle switch
R8, R14 470 ohms (2 off) (see Fig.2) SK1, SK2 screw terminal post
R11 220 ohms C24 220uF radial electrolytic (Aerial and Earth)
R13 2M2 VC1 365p Jackson O-type air-spaced SK3 9-pin D-type socket (for plug-in
*R15 470k tuning capacitor (see text) tuning coils)
All 0.25W 5% carbon film VC2 25p Jackson C804-type air-spaced SK4 switched stereo jack socket
tuning capacitor (see text) B1 9V to 12V battery pack
Potentiometers B2 6V to 9V battery pack
All capacitors 12V working or greater
VR1 1k rotary carbon (logarithmic
law if obtainable) Printed circuit boards available from the
Semiconductors
VR2 10k rotary carbon, linear EPE Online Store, codes 7000254
*D1 KV1236, KV1235, or BB405B
VR3, *VR7 100k enclosed horizontal (receiver), 7000255 (Electronic Tuning),
varicap diode (see text)
preset (2 off) and 7000256 (Amplifier); 9-pin D-type
TR1 BC557 pnp silicon transistor
VR4 22k enclosed horizontal preset plugs (8 off for tuning coils); aluminum or
TR2 2N3819 n-channel field effect
*VR5 1k rotary carbon, linear diecast box; 8-pin DIL socket; plastic
transistor
*VR6 100K rotary carbon, linear control knobs (4 small, 1 large); reduction
TR3 BF981 n-channel dual-gate
VR8 4k7 rotary carbon, logarithmic drive for tuning capacitor; multistrand
MOSFET
Capacitors connecting wire; card for tuning dial; nuts,
TR4 BC239C npn silicon transistor
bolts, washers, and stand-offs; solder
C1 axial polystyrene, See Table 1 IC1 TDA7052 low voltage 1W
pins, solder, etc.
C2, C11, C17 100 uF radial power amplifier
electrolytic (3 off) Note: All components marked with an
C3, C4, C6, C10, C13, *C21, *C22, C23 See also the asterisk (*) are for the optional electronic
100nF disc ceramic (8 off) SHOP TALK Page! tuning system.

Approx. Cost
Guidance Only
(Excluding batteries and tuning capacitors) $56
larger of the two capacitors, bias of audio amplifier, TR4, are
VC1, acts as a coarse (Bandset) fixed by resistors R13 and R14. ELECTRONIC
tuning control. The smaller one, Signal output is developed
VC2, provides fine across collector (c) load resistor TUNING
(Bandspread) tuning. These R12; and R11 and C17 The use of a separate Q-
components are discussed later. decouple the stage from the multiplier stage (TR3) makes
Fixed capacitor C7 limits the supply. the receiver tolerant of
maximum value of VC1 on the The low value of emitter electronic tuning. (The
shortwave ranges. The reduced bypass capacitor C16 results in somewhat modest Q of high
swing makes tuning less critical gain-reducing negative capacitance varicap diodes
and consistent regeneration feedback at the lower audio inhibits the operation of most
easier to achieve. frequencies. This improves regenerative sets).
Details of the coverage clarity. Coupling and DC A suitable, add-on,
obtained with a range of Toko blocking capacitors C15 and electronic tuning circuit is given
coils, together with the C19 have a low value for the in Fig.2. Potentiometer VR6
associated values of C7, R6, same reason. controls the reverse bias on
and C8, are given in Table 2 Response to the higher varicap diode D1 and varies its
(next month). audio frequencies is curtailed by junction capacitance. This forms
capacitor C18. Constructors the coarse, or Bandset, tuning
who find the tone too “bright” control.
AUDIO AMPLIFIER
should increase the value of this Potentiometer VR5 permits
The base (b) and emitter (e) component to 47nF or 100nF. a small adjustment of the bias

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 176
Maxfield & Montrose Interactive Inc
Constructional Project
voltage, and acts as the fine, or operated Bandspread control in are mains powered).
Bandspread, control. Preset a position remote from the The power amplifier current
VR7 fixes the lowest level the tuned circuit. The prototype swings between 6mA and 60mA
bias voltage can fall to, thereby Receiver, shown in the or more when it is being driven
determining the maximum photographs, incorporates this hard. The resulting supply
value of the tuning capacitance. arrangement. voltage fluctuations would
(Diode junction capacitance disturb the operation of the Q-
increases as the reverse bias is multiplier, despite heavy
reduced.)
POWER AMPLIFIER
decoupling.
The varicap diode D1 is The circuit diagram of the
additional, single chip, audio Separate battery supplies
coupled into the main circuit via for the Receiver and Power
DC blocking capacitor C20 and power amplifier stage is given in
Fig.3. This amplifier has its own Amplifier sections are,
resistor R15 isolates the signal therefore, strongly
path from the potentiometer 6V to 9V power supply to avoid
any possible interaction with the recommended. They are
chain. Potentiometer noise is essential when electronic tuning
prevented by capacitors C21 receiver section. Designed
around a TDA7052 low voltage is adopted. A double-pole toggle
and C22. switch, S1a and S1b, connects
power amp IC, the only external
High value varicap diodes components are capacitors C23 the two separate battery packs
have a relatively large minimum and C24 which ensure the into circuit.
capacitance, and an additional stability of the device.
coil may be needed in order to Potentiometer VR8 acts as the
secure continuous coverage. COMPONENTS
volume, or AF gain, control.
Furthermore, performance Before we commence
above 20MHz or so is not quite The power amplifier IC1 is construction, a few words now
as satisfactory as that afforded short-circuit protected, requires on choice of components may
by a traditional variable no heatsink and can deliver a help. Readers are also directed
capacitor. clean 1W of audio into an 8 to our Shoptalk page for details
ohm speaker with a 6V supply. of possible suppliers for some
These disadvantages do not It is also claimed that there are
apply when the electronic tuning off those “hard to find” items.
no switch-on or switch-off clicks
circuit is used with a VHF diode with this device.
solely to provide fine tuning
(VR5 is omitted and the top end
of VR6 is connected directly to POWER
the positive supply rail). This SUPPLIES
arrangement has the advantage
of low cost and conveys a Current drain is
freedom to locate the DC extremely modest, being
only 2mA for the radio
section and 50mA for
the power amplifier when
it is delivering a good
speaker volume (5mA
when ’phones are used).
Battery supplies are,
therefore, eminently
suitable, and any
possibility of hum and
interference from the The chassis of the prototype was fab-
mains is avoided ricated from aluminum and a wooden
(regenerative receivers case with hinged lid holding the loud-
are very susceptible to speaker made to house the receiver.
this and require a The lid can be raised and held up by a
carefully designed
hinged wire frame (shown above)
supply unit when they
when in use.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 177
Maxfield & Montrose Interactive Inc
Constructional Project
Coils gate MOSFETS, including the rate which is too fast, connect a
40673 and the MFE201. The 10pF or 5pF polystyrene
All of the inductors used in 3N201 was not tried, but it capacitor in series with it to
this Receiver are from the Toko should prove satisfactory. reduce its swing.
range. Their frequency
coverage is shown in Table 1 A 2N2905 pnp transistor Inexpensive, polythene
and Table 2 (next month) worked well in the RF stage, dielectric variables, of the kind
together with suitable tuning and a 2N5827 or a 2N5828 used in transistor portables, can
capacitor values. should be suitable for TR4. also be used. Some of these
The alternative devices have comparatively low values,
Coils can also be hand and both sections may need
wound. As a very rough guide, mentioned here have different
case styles to those depicted in connecting in parallel to obtain
when 20mm to 25mm diameter the required tuning range. (A
formers are used, feedback Fig.1, and the lead-outs must be
checked. swing of at least a 10pF to
tappings should be about 10 200pF is needed to give
turns up from the “earthy” end continuous coverage from
on Long waves, 5 turns on
Tuning Capacitors
150kHz to 30MHz with the coils
Medium waves, and 2 or 3 turns A Jackson 365pF O-type listed in Table 2). The 25pF FM
on Shortwaves. air-spaced tuning capacitor is tuning section of one of these
the preferred component for capacitors can act as the
Transistors bandset control VC1, and a bandspread control VC2.
Transistor types are not 25pF Jackson C804 type is
ideal for VC2, the Bandspread If salvaged tuning
critical. The Q-multiplier circuit capacitors are used, make sure
works well with a range of dual- control. If this latter value
produces a bandspread tuning that they are clean and dry, that
the rotor contacts are
satisfactory, and that the vanes
are not shorting.
Varicap diodes are retailed
by a number of suppliers and
should not be too hard to find.
Any 450pF varicap designed for
9V bias, should be suitable for
full electronic tuning.

NEXT MONTH
In Part 2 next month we’ll
go over the constructional
details for this project.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 178
Maxfield & Montrose Interactive Inc
AUTOMATIC TRAIN SIGNAL
by ROBERT PENFOLD

An easy-to-build, low cost starter project for your the track is a DC signal, but its
model radio system. polarity depends on the direc-
tion of the train.
This very simple project, suit- of no practical importance, as To operate the main circuit
able for beginners, is a two-color the state of the signal is irrele- reliably it is important that the
(red/green) signal for input signal has the
a model railway. It correct polarity, and
uses a simple form of TRESHOLD GREEN
the purpose of the
automatic operation, rectifier is to ensure
FULL-WAVE LOWPASS VOLTAGE
and if you stop the RECTIFIER FILTER DETECTOR RED that the main circuit is
train in front of the fed with a positive sig-
signal it automatically nal regardless of the
switches from “green” train’s direction. The
to “red”. When the output of the rectifier
train is restarted the Fig.1. Block diagram for the Automatic Train Signal. is fed to a potentiome-
signal automatically ter that enables the
switches to “green” again. vant except when the train is output voltage to be reduced.
approaching it. This enables the user to adjust
To an onlooker it appears as
though the signal is changing SYSTEM the threshold voltage at which
color and the train is responding OPERATION the signal changes state.
to the change. In reality the train The threshold level used is
The block diagram of Fig.1
and the signal are both respond- not critical, but the signal should
helps to explain the way in
ing to changes in the track volt- not go to red while the train is
which the Automatic Train Sig-
age. The signal will, in fact, go to still moving. On the other hand,
nal functions. The voltage from
“red” wherever the train is some types of train controller
the track is fed to a full-wave
stopped on the layout, but this is never produce an output level
rectifier circuit. The voltage on
S1

ON/OFF
D5 a
GREEN
L.E.D. k
C2 R3
100n 39k
R5
1k5
SK1

7
3
D1 TO D4 B1
ALL 1N4004 D4 D1 R1 R2 IC1 6
9V
10k 2k2 LF351N
2
(6 x AA)
4
D2 D3
R6
1k5
SK2 VR1 R4
C1
22k 22µ 10k
D6 a
THRESHOLD RED
L.E.D. k

Fig.2. Complete circuit diagram for the Automatic Train Signal


Copyright © 1999 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 179
Maxfield & Montrose Interactive Inc
Constructional Project
LED, but with higher input po-
tentials it switches on the green COMPONENTS
LED instead. Resistors
CIRCUIT OPERATION R1, R4 10k (2 off)
R2 2k2
The full circuit diagram for R3 39k
the Automatic Train Signal is R5, R6 1k5 (2 off)
shown in Fig.2. The voltage All 0.25W 5% carbon film
from the rail tracks is connected Potentiometer
to sockets SK1 and SK2, which VR1 22k rotary carbon, linear
feed into a full-wave bridge rec- Capacitors
tifier (D1 to D4). The positive C1 22u radial electrolytic, 25V
DC output signal from the recti- C2 100n ceramic
fier circuit is fed to a volume Semiconductors
control style variable attenuator D1 to D4 1N4004 rectifier
diodes (4 off)
(VR1) and then to a simple low- D5 green LED, 3mm or 5mm
pass filter comprised of resistor diameter (see text)
R1 and capacitor C1. D6 red LED, 3mm or 5mm
diameter (see text)
The cut-off frequency of this IC1 LF351N opamp
filter is low enough to ensure
that there are no problems with Miscellaneous
that is right down at zero volts, B1 9V battery pack (6 x AA cells
flickering of the signal lights in holder)
and the threshold level must be when the track voltage is near S1 s.p.s.t. miniature toggle switch
high enough to ensure that the the threshold level. On the other SK1, SK2 4mm socket (2 off)
signal does go to red when the hand, it is not so low that the
train stops. unit is slow responding to Medium size plastic case (see text);
0.1 inch pitch stripboard, size 20
It cannot be safely assumed changes in track voltage. holes x 20 strips; 8-pin DIL socket;
that the signal across the tracks An operational amplifier, control knob; PP3 battery clip;
is a steady DC potential. The IC1, is used here as a voltage multistrand connecting wire; single-
motor in the train is likely to in- sided solder pins, solder, etc.
comparator. Resistors R3 and
troduce large amounts of noise R4 form a potential divider that See also the
onto the track voltage, which biases the non-inverting input of SHOP TALK Page!
might not be a simple DC signal
IC1 (pin 3) to about 1××8V. The
anyway. Many train controllers Approx. Cost
output of IC1 at pin 6 will go
use some form of pulsed output
signal, where the motor is con-
high if the inverting input (pin 2) Guidance Only $11
is taken below this potential, or (Excluding Batteries)
trolled by varying the average
low if it is taken above the refer-
output signal. Others use the on D5. Things revert to their origi-
ence level.
rectified but non-smoothed out- nal states when the train is
put from a mains transformer. The voltage fed to the in- stopped again, with the red LED
verting input will be very low switched on.
In order to avoid problems
with the train stationary, sending
with noise on the input signal,
the output of IC1 high. As a re-
and to accommodate pulsed
controllers, the output from the
sult red LED D6 is switched on, ON TRACK
but green LED D5 is switched The current consumption of
threshold control is fed to a low-
off. the circuit is about 7mA. A PP3
pass filter. This provides a rea-
sonably smooth DC output sig- When the train is started, size battery is just about ade-
nal at a potential that is equal to the voltage fed to the inverting quate to supply this, but a battery
the average input voltage. input rises, and eventually be- pack consisting of six AA size
comes greater than the refer- cells in a holder will provide
Finally, this signal is applied
ence level at the non-inverting cheaper running costs.
to a simple voltage detector cir-
input. The output of IC1 then Operation from a mains
cuit. With an input voltage of up
switches to the low state,
to about 1××8V the detector cir- power supply unit is made slightly
switching off D6 and switching awkward by the fact that neither
cuit activates the red signal
supply rail can be earthed. This is

Copyright © 1999 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 180
Maxfield & Montrose Interactive Inc
Constructional Project
FLAT
D5

k a
Fig.3. Stripboard component layout, inter-
2 4 6 8 10 12 14 16 18 20
1 3 5 7 9 11 17 19
wiring to off-board components and details
A
B of breaks required in the underside
C
D ON/OFF copper strips.
E
F
SK1
G S1
H
R 20 18 16 14 12 10 8 6 4 2
I 3 C
R 19 17 15 13 11 9 7 5 3 1
J k 2
5
K A
D1 k
L a B
D3 R C
2
a D
N
R E
O k 6 RED
+ R TO F
R 4 B1
Q k D4 BLACK G
1 C1
a H
R D2
S a I
T J
K
L
SK2 k a M
D6 N
FLAT O
VR1 P
Q
R
S
T
THRESHOLD

because one of the input lines 3mm and accept Metric M2××5 the wire trimmed from the resis-
might be earthed, and neither of mounting bolts. There are just six tor leads, but one or two of
these lines connects to a supply breaks in the copper strips. These them might be too long to per-
rail of the signal circuit. can be made using a special tool mit this. They will then have to
Earthing one rail of the sig- or by using a small hand-held be made from 22s.w.g. or
nal circuit could produce an un- twist drill bit of about 5mm diame- 24s.w.g. tinned copper wire. Fit
wanted connection that would ter. single-sided solder pins at the
prevent the unit from working, points where connections will be
The board is now ready for
and could result in a heavy cur- made to the controls, LEDs, and
the components and the three
rent flowing through the input sockets.
link-wires to be added. It is gener-
rectifier circuit. The most practi- ally considered best to start with
cal solution is to use a 9V or the small components and work CASING UP
12V regulated battery elimina- up to the largest, but in this case
tor. These use double insulation the components are all quite If the unit is powered from a
and have neither supply rail small. PP3 size battery it should be
earthed. possible to fit it into practically
It is probably best to work any small plastic box. A
across the board methodically, medium size case about
CONSTRUCTION being careful to get everything in 150mm or so long will have to
the right place. In the cases of be used if an AA battery pack is
The Automatic Train Signal IC1, C1, and the four rectifier
circuit is built up on a piece of to be accommodated.
diodes (D1-D4) you must also be
stripboard containing 20 holes careful to fit them the right
by 20 copper tracks. The com- way round. The LF351N
ponent layout, together with de- used for IC1 is not a static
tails of breaks required in the sensitive component, but as
copper strips, is shown in Fig.3. with any DIL integrated cir-
Construction follows along cuit it is still advisable to
the normal lines with a standard mount it on the board via a
size board being cut down to the holder.
correct size using a hacksaw. It might be possible to
Next drill the two mounting make the link-wires using
holes, which have a diameter of

Copyright © 1999 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 181
Maxfield & Montrose Interactive Inc
Constructional Project

Layout of components inside the small plastic box. Note,


the input sockets must be fed with the track voltage.
est way is to make up a twin
Threshold control VR1 and Provided you know what you lead fitted with 4mm plugs to
On/Off switch S2 are mounted are doing, it would probably be connect to SK1 and SK2, and
on the front panel, while input possible to adapt a ready-made small, insulated covered,
sockets SK1 and SK2 are signal “tower” to work with this crocodile clips at the other end.
mounted on one side or at the circuit. The power connectors on the
rear of the case, see pho- The size of the signal must track are often quite crude, and
tographs. An exit hole for the be varied to suit the gauge of will permit power to be tapped
lead to the signal LEDs is re- the model railway, as must the off using the crocodile clips.
quired in one side or the rear of size of the two LEDs. For the Alternatively, by simply
the unit. usual smaller gauges 3mm di- leaving some bare wire at the
The circuit board is ameter LEDs are the best ends of the leads it might be
mounted in any convenient choice, but for larger gauges possible to make connections to
space, and it is advisable to use 5mm types would be better. The the screw or spring connectors
some extra nuts or short spac- LED current is not very high, so on the train controller, being
ers between the board and the “high brightness” types are careful to leave the connections
case. This avoids any tendency preferable. to the track intact. Failing that, it
for the board to buckle and Unlike filament bulbs, LEDs will be necessary to make up a
break when the mounting nuts will only work if they are con- dual supply lead to enable both
are tightened. nected with the correct polarity. the signal and the track to be
To complete the main unit Having the cathode (k) lead fed from the controller.
the hard wiring is added. This is slightly shorter than the anode With Threshold control VR1
all shown in Fig.3 and is per- (a) lead is the normal way in at a roughly middle setting the
fectly straightforward. which the polarity of a LED is signal should work quite well,
indicated. There may also be a with “red” and “green” signals
“flat” on the cathode side of the being obtained when the train is
SIGNAL BOX encapsulation. respectively stopped and run-
Construction of the “signal” ning fast. The signal will proba-
is left to the ingenuity of individ- bly be at “red” when the train
ual constructors. At its most ba- TESTING moves very slowly, or possibly
sic the signal can just consist of Input sockets SK1 and SK2 at “green” when the train has
a very small plastic box for the must be fed with the track volt- stopped. A little experimentation
two LEDs. However, it should age, and the way in which this is with various settings for VR1
not be too difficult to fabricate a done must be varied to suit the should soon get the signal
more convincing signal from equipment with which the signal switch-
balsa wood, bits of dowel, etc. is used. In most cases the easi- ing

Copyright © 1999 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 182
Maxfield & Montrose Interactive Inc
EPE ICEBREAKER by MARK STUART

A real-time PIC In-Circuit Emulator (ICE), programmer, ging (ICD). This requires a chip
debugger, and development system with special built in hardware
(known as a “Background De-
This project combines Mi- system is called an In-Circuit bugger”) and software which
crochip’s MPLAB development Emulator or “ICE” and profes- can communicate its status via
software with the advanced self- sional systems are available for a serial link.
debugging features of the latest practically every type of micro- The chip is fitted to its work-
PIC chips. The result is a user- controller. ing printed circuit board (PCB)
friendly advanced development The problem with this is and all external hardware is
system for a very low cost. cost. A professional ICE for the connected and active. Code is
PIC series of chips costs a rea- then programmed, run, and de-
sonable 2000 UK Pounds or so bugged under PC control, until it
DEVELOPMENT – not a lot if you are a profes- is running correctly. For Mi-
SYSTEMS sional programmer being paid crochip PIC users, the good
twice that each month – but news is that the PIC16F877 and
Developing projects with mi-
more certainly enough to make its close relatives the ’876, ’874,
crocontrollers is extremely inter-
your eyes water if you are an and ’873 have built in ICD facili-
esting, especially the ability to
amateur! ties and can be used to develop
alter the way hardware responds
just by making simple changes to Just lately a new type of de-
program code. velopment system has ap-
peared called In-Circuit Debug-
The problem is that each
change of code has to be written,
+5V
compiled (converted into suitable R14
form for loading) and pro- 14
10k
OSC 2
grammed into a chip before it can X1 RB0
33
34 PL1
be tested. Several low cost sys- 20MHz 13
OSC 1
RB1
35
tems – such as the EPE PICtutor 2
RB2
36
R12
RB3 1
RA0
are available (see our web page C2 C1
3
RA1
RB4
37 10k 6
38
at www.epemag.com for more 10p 10p 4
RA2
RB5
39 D7
k
R13
5 RB6 5V1 470W
details) and are adequate for the 6
RA3
RB7
40 a
9
RA4 IC1 k 5
development of simple programs, 7
RA5 PIC16F877 D8 R11
5V1 1k
but for larger changes and pro- 11
VDD(+V) MCLR
1 a
32 k
grams it can be tedious, and er- 12
VDD(+V)
RE0
8 D6
VSS(GND) 5V1
rors are almost as easy to intro- 31
VSS(GND) RE1
9 a
10
duce as to eliminate. RE2
LK1 LK2
15 19
RC0 RD0
Better methods of testing pro- 16
RC1 RD1
20

grams rely on more advanced 17


RC2 RD2
21
18 22
software that can “run” in a virtual 23
RC3 RD3
27
RC4 RD4
chip on a PC screen and ad- 24
RC5 RD5
28
25 29
vanced hardware which commu- 26
RC6 RD6
30
nicates with the program in the RC7 RD7

PC, reads input pins, and 0V (GND)

switches output pins to match the


levels of the virtual chip. Such a Fig.1. Minimum circuit for using the PIC16F877 as a
“background” debugger.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 183
Maxfield & Montrose Interactive Inc
Constructional Project
code which can be run in these computers read serial data cor- working code has been devel-
and smaller chips in the range – rectly when 0V to 5V swings are oped and debugged it can be
such as the most popular used. A third connection links loaded and will run alone in any
PIC16F84. the serial port RTS output to the chip in the 16x range – the pro-
VPP or MCLR pin of the chip. tected communication code is re-
PIC IN-CIRCUIT This allows control of the pro- quired only in the chip used for
DEBUGGING gramming voltage debugging.
This article is intended as an (programming at 5V, as op- Connections for suitable se-
easy introduction to ICD with very posed to the 12V normally re- rial leads are shown in Table 1.
simple demonstration programs, quired) and resetting of the chip These are standard connections,
users can then progress to using by the computer. but can be made up with 4-way
the more complicated features of After a Reset, the chip cable (flat telephone cable is
the chips. It is not intended as a checks if pins RB6 and RB7 are ideal) if required. Take care when
programming tutorial, but the op- shorted to 0V. If they are, it ig- making leads to get the pin num-
eration of some programs is de- nores the ICD functions and just bering correct – it is very confus-
scribed in the course of demon- runs the code directly starting ing, the only safe way is to read
strating the ICD hardware. from location 0. Links fitted in the molded numbers on the con-
Simple programs can be the positions marked LK enforce nectors.
loaded, run and debugged without this option. The port connections for the
knowing much about the entire As well as the hardware PIC 16F877/874 and the alterna-
ICD system which is extremely connections, the computer tive connections for the 28-pin
complicated and occupies many needs to run a program to com- PIC16F876/873 versions of the
pages of the PIC data sheets. municate with the chip, and the chip are shown in Fig.2.
The Microchip web site chip must have a program to
(www.microchip.com) provides communicate with the com-
an enormous amount of informa- puter. The program in the chip HARDWARE
tion for those wishing to know is loaded and copy-protected Whilst the minimum system
more. into the upper half of the chip’s could be used, it is unlikely that
8K program memory. any PIC application would oper-
It may seem wasteful to use ate without external hardware.
MINIMUM ICD SET UP Most systems have power sup-
half of the chip’s memory for
The minimum hardware re- protected code, but in practice, plies, input switches, output de-
quired for ICD, using the the 4K remaining is a vast vices and so on. It is irritating and
PIC16F877, is shown in Fig.1. amount of space for the PIC time consuming to have to set up
Communication to a computer program and it is very doubtful these simple hardware require-
serial port is achieved via the that it will ever be filled. Once ments when the object is to get a
Port RB6 and RB7 pins of the
chip, which cannot be used for
other functions. As there are
plenty of other port pins available
this is not a significant limitation.
Port RB6 receives data from
the computer, and RB7 transmits
data to the computer. Both of
these pins operate at simple 0V
to 5V logic levels. Some com-
puter serial port output pins swing
10V positive and negative, and so
limiting resistors and 5××1V Zener
diodes are used for protection.
The serial data sent back to
the computer should also be ca-
pable of swinging 10V, but it has
been found that practically all
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 184
Maxfield & Montrose Interactive Inc
Constructional Project
Table 1: Serial Lead the PIC could be fitted into an- tion is not recommended for
Connections. other board with other hardware ICD use. Other crystal frequen-
and still debugged via the same cies can be used and the com-
9-way to 9-way
computer lead. puter serial port speed altered
ICE Computer
Voltage regulator IC2 allows accordingly. 20MHz gives the
1 7 fastest communication (38,400
2 3 TxD
a range of power adapters to be
used connected to 2××1mm power BAUD) and is best if there are
3 2 RxD
no other special frequency re-
5 5 GND socket SK5. Links 3 and 4 allow
quirements.
positive inner or outer connec-
9-way to 25-way tions to be set. If accidental Stepping motor driving is a
ICE Computer power reversal is possible, the very popular PIC application.
1 4 positive link connection can be Transistors TR1 to TR4 and as-
2 2 TxD made using a 1A diode (e.g. sociated resistors R2 to R5 and
3 3 RxD 1N4001) instead of a piece of protection diodes D1 to D4 pro-
5 7 wire. Power is indicated by light- vide four open collector drivers
emitting diode (LED) D5 via resis- for four-phase unipolar motors.
program written and tested.
tor R8. Connectors PL3 and PL4 allow
EPE ICEbreaker was designed
Switch S1 provides an alter- for 2××54mm and 2mm pitch mo-
to include a number of input and
output devices along with a sol- native hardware reset which can tor connectors. Input to the
derless connection system so be useful for stopping programs drivers is via SK4. The transis-
that many applications could be quickly and for restarting from tors can also be used individu-
tested from a notebook PC with- location 0. ally as simple open-collector
out the use of a soldering iron. npn switches for driving relays,
For ICD operation the PIC lamps and similar loads up to
The full ICEbreaker circuit needs accurate timing. A 20MHz 24V and 400mA.
diagram is shown in Fig.3, crystal X1 together with capaci-
whilst Fig.4 gives the PCB de- tors C1 and C2 provide the stan- Two other output transistors
tails. dard oscillator components. Alter- are fitted. TR5 is a simple open
native positions (X2) and (C3, C4) collector npn device and TR6
Resistors R11 to R13, and drives a double-pole
are to be used with 28-pin chips.
R14, Zener diodes D6 to D8 and changeover relay RLA. These
links LK1/2 are the same as the Resistors R15 and R16 allow two devices are useful for bidi-
minimum system. PL2 allows RC oscillator options to be used if rectional control of a DC motor.
the power and computer con- required for testing or running RLA can be wired as a revers-
nections to be extended so that fully debugged code, but as RC ing switch and the motor can be
oscillator stability is poor, this op-
MCLR/VPP/THV 1 40 RB7/PGD

RA0/AN0 2 39 RB6/PGC

RA1/AN1 3 38 RB5

RA2/AN2/VREF 4 37 RB4 MCLR/VPP/THV 1 28 RB7/PGD

RA3/AN3/VREF 5 36 RB3/PGM RA0/AN0 2 27 RB6/PGC

RA4/TOCK1 6 35 RB2 RA1/AN1 3 26 RB5

RA5/AN4/SS 7 34 RB1 RA2/AN2/VREF 4 25 RB4

RE0/RD/AN5 8 33 RB0/INT RA3/AN3/VREF 5 24 RB3/PGM

RE1/WR/AN6 9 32 +VE(VDD) RA4/TOCKI 6 23 RB2

RE2/CS/AN7 10 31 GND/(VSS) RA5/AN4/SS 7 22 RB1

+VE(VDD) 11 30 RD7/PSP7 GND(VSS) 8 21 RB0/INT

GND(VSS) 12 29 RD6/PSP6 OSC1/CLK IN 9 20 +VE(VDD)

OSC1/CLK IN 13 28 RD5/PSP5 OSC2/CLK OUT 10 19 GND/(VSS)

OSC2/CLK OUT 14 27 RD4/PSP4 RC0/T1OSO/T1CKI 11 18 RC7/RX/DT


RC0/T1OSO/T1CKI 15 26 RC7/RX/DT RC1/T1OSI/CCP2 12 17 RC6/TX/CK

RC1/T1OSI/CCP2 16 25 RC6/TX/CK RC2/CCP1 13 16 RC5/SDO

RC2/CCP1 17 24 RC5/SDO RC3/SCK/SCL 14 15 RC4/SDI/SDA

RC3/SCK/SCL 18 23 RC4/SDI/SDA

RD0/PSP0 19 22
PIC16F876 AND 873
RD3/PSP3

RD1/PSP1 20 21 RD2/PSP2

PIC16F877 AND 874

Fig.2. Port connections for the PIC16F877/874 and the alternative 28-pin PIC16F876/873.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 185
Maxfield & Montrose Interactive Inc
Constructional Project
turned on and off by TR5. very low prices. A standard
Many applications require Pentium 133 without special from one to the other.
display of information, and an sound, graphics or multimedia
intelligent LCD module is an is more than adequate provided
it has a spare serial port (COM CONSTRUCTION
ideal display device. X3 has
standard 4- or 8-bit drive capa- 1 – 4). The EPE ICEbreaker
bility, and requires a minimum The software is designed to printed circuit board component
of six output lines for driving. All be run in conjunction with Mi- layout and (approximately) full
pins are available at connector crochip’s MPLAB software. This size copper foil master are
SK1. Preset VR1 allows the is available from many sources shown in Fig.4. This board is
contrast of the LCD to be al- – the Microchip web site is the available from the EPE Online
tered to suit the lighting condi- ideal one as it allows the very Store (code 7000257) from
tions and viewing angle. latest version to be loaded, al- www.epemag.com
Just two input devices are ternatively the Microchip CD- Assembly of the board is
fitted. S2 and S3 are simple ROM is widely available and straightforward. Begin by fitting
single-pole push-to-make good for those without internet seven 12mm pillars with short
switches with pull-up resistors access. M3 screws before adding any
R6 and R7. MPLAB is used in “editor components. Refer to the com-
only” mode to allow assembly ponent layout drawing and then
Whilst the circuit diagram
language source code to be fit plain uninsulated wire links in
seems simple, the PCB layout
written and then assembled to all of the positions shown. Fit
shows that there are far more
produce the necessary .HEX two-way pin headers in the posi-
connection points, and that a
code for programming into the tion for LK1 and LK2 so that two
prototyping area with a solder-
chip. MPLAB also produces a shorting links can be connected
less breadboard is provided.
.COD file which is used by the if required.
Each side of the main inte-
grated circuit (IC) sockets there ICEbreaker software to keep Links LK3 and LK4 provide
are spaces for rows of turned- track of the program execution the facility to set the input power
pin sockets. The inner two rows when debugging, single step- socket for positive or negative
connect to the adjacent IC pins, ping and running the program. inner connection. For positive
whilst the outer two rows are Like many other PC programs, inner fit the links in position B,
power and ground connections. MPLAB has a lot of features for negative fit them in position
that are not regularly used, how- A. As mentioned previously it is
Turned-pin socket strips can ever the advanced features possible to add a diode in place
be fitted in all rows, but it is don’t get in the way when using of one of the links to protect
more practical to have a single it at the simple level required by against polarity reversal. To do
row of sockets each side of the ICEbreaker. this, fit the cathode of the diode
chip and leave the other spaces
The ICEbreaker software is to the point marked with a +
blank so that pull up or pull
a simple stand-alone application sign, and the anode of the diode
down resistors can be soldered
that can be run directly from a to the appropriate A or B posi-
in position if required. An addi-
floppy disk if necessary. This tion.
tional “patch” area is provided
below IC1 and is ideal for article assumes that the con- Fit the diodes and resistors
adding “permanent” hardware tents of the ICEbreaker disk are next, taking care to identify the
such as LEDs or presets. copied into a new folder type and polarity. Usually the
(directory) on the C-drive, which cathodes are marked with a
has been labeled “icebreak”. black or dark blue band, which
ICEBREAKER The only files required are ice- should be positioned to match
SOFTWARE break.exe and icebreak.ini, but the line on the component lay-
it is also convenient to store out diagram. The transistors
ICEbreaker must be run TR1 to TR6 are all the same
program files in the same direc-
from a PC with at least Win- type and are fitted with their
tory.
dows 95. This helps keep the curved sides as shown in the
software simple, and is not a ICEbreaker and MPLAB
diagram. They should be fitted
serious restriction as PCs that should be run together, and the
close to the board surface so
can run Win95 are available at “Alt” and “Tab” keys or the
that they cannot get bent and
taskbar buttons used to switch
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 186
Maxfield & Montrose Interactive Inc
X3 LK3/4
16 x 2 L.C.D. DISPLAY R6 R7 R8 SK5
4k7 4k7 1k PUSH BUTTON
CONNECTIONS +5V OUT IN
14 13 12 11 10 9 8 7 6 5 4 3 2 1 IC2
SK2 7805

SK3 COM. POWER


S2 S3 INPUT
MCLR R14
a 10k
D5 +5V 0V B7 B6
L.E.D. PL1
k PL2
R11
C5 C6

Maxfield & Montrose Interactive Inc


1k
1 6 100n 100n
VR1
10k
R12
10k
11/32(20)
CONTRAST R15*
(R16) 5 9
+V
R1 R13

Copyright © 2000 Wimborne Publishing Ltd and


4k7 470W
*SEE TEXT 40(28)
13(9) RB7
SK1 OSC1/CLK IN
39(27)
RS RB6
R/W IC1
E
D0 PIC16F877/874
D1 X1 (X2) PIC16F876/873 k
D2 20MHz D6
D3 14(10) 5V1
D4 OSC2/CLK OUT a k
D5 LK1 LK2 D7
D6 1(1) 5V1
D7 MCLR a k
D8
0V
L.C.D. CONNECTIONS C1 (C3) 5V1
a
10p 12/31(8/19)
C2 (C4) S1 LINK FOR
10p FREE
RESET RUNNING

LK5 LK6
STEPPING 0V
MOTOR
CONNECTIONS
PL3
SK6
1 C 2 3 C 4 TRANSISTOR TRANSISTOR RELAY
PL4 BASE COLLECTOR DRIVER NC1
RLA1 POLE 1
SK7/TB SK7/TC SK7/RD
k RLA NO1
D9 2
1N4001 NC2
TR1 TR2 TR3 TR4 a RLA2
ZTX451 ZTX451 ZTX451 ZTX451 POLE 2
c c c c NO2
b b b b

Fig.3. Complete circuit diagram for the EPE ICEbreaker.


e k e k e k e k R9 R10
STEPPER MOTOR TR5 TR6
D1 D2 D3 D4 470W 470W
DRIVER INPUTS
Constructional Project

ZTX451 ZTX451
30V 30V 30V 30V
a a a a c c
R2 R3 R4 R5 b b
220W 220W 220W 220W
SK4
e e
P4
P3
P2
P1

EPE Online, March 2000 - www.epemag.com - 187


Constructional Project
moved around when the board
is handled.
Use turned-pin socket strips
for the 40 and 28-way IC posi-
tions, and position a second row
of sockets alongside. Note that
there is also the option of a
narrow-bodied version of the
28-pin device, and holes have
been drilled to allow for this type
to be used. If required, socket
strips can be fitted for both
types without causing any diffi-
culty. Also fit turned-pin socket
strips for SK1, SK2, SK3, SK4,
SK6, and the three connections
TB, TC, and RD. Also fit two 13-
way strips to the upper and
lower rows of the patch area – Display module removed from the PCB to reveal the regulator
these are the positive and nega- IC mounted underneath.
tive “rails” and make very con-
venient connection points for the board on 16mm long 6BA or Make sure that it is accurately
taking power to the breadboard. M2.5 screws. Fit the four screws positioned (and the right way
Fit pin headers for PL2, PL3 from the track side of the board up) before pressing it firmly into
and PL4 – the holes for these and secure them with nuts. Fit place.
are made tight to give extra four more nuts and position
support and so the pins may them equally so that the LCD
need pressing home against a lies level and approximately TESTING
hard surface. Fit push-switches 10mm from the board. The con- Once the hardware has
S1, S2 and S3, preset VR1, re- nections to the LCD are made been assembled and before fit-
lay RLA and the voltage regula- to allow it to be unplugged for ting IC1, check for dry joints,
tor IC2; an M3 screw and nut access to IC2 and for use in solder bridges and component
should be used to secure the other applications. polarities.
tab. A heatsink is not required Fit a 16-way pin-to-pin con- Once everything looks cor-
for most applications, but there nector to the board, with the rect, connect the power supply.
is space to fit a low profile type, slightly thinner pins upwards. Fit Check that D5 lights and, if a
or even a small piece of alu- (but do not solder) a 16-way meter is available, check the 5V
minum if higher current loads wirewrap turned-pin socket strip regulated supply. The LCD con-
are to be used. to the LCD so that the sockets trast control VR1 should alter
The 20MHz crystal and its face downwards and plug onto the density of a single top row
associated capacitors C1 and the pin-to-pin connector. Make of block characters as the LCD
C2 should be fitted if the (usual) sure the LCD is level, solder the initializes itself for one-line
40-pin device is being used for wire wrap pins to the LCD and mode.
IC1. If a 28-pin version is used cut off the excess. The LCD can Switch off, insert IC1 and
then fit these components to the now be secured by fitting an- connect a suitable lead between
alternative locations X2, C3 and other four nuts. SK1 and the serial port of the
C4. If both types of device may The serial port connector PC, which has MPLAB and the
be used, it is possible to fit two PL2 and power connector SK5 ICEbreaker software (see the
crystals and two pairs of capaci- fit directly onto the board. Make Shoptalk page) installed.
tors. sure that they are pressed fully
home before soldering.
DISPLAY MODULE The solderless breadboard
SOFTWARE
The LCD module fits above is secured to the board simply INITIALISATION
by its self-adhesive backing.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 188
Maxfield & Montrose Interactive Inc
Constructional Project
PL1 POWER IN

a a PL2 MCLR
RESET SK5
B6 B7 0V +5V
9 6 S1
D7 D8
5 1
B
LK2
a k R12 k k
D6 LK1 A
R11 R13
R14 A B
LK3/4 X3
LCD DISPLAY

C6
IC2

IC1 IN
COM.
OUT
(28-PIN) C5

IC1 R1
(40-PIN) 14 1

X2
C4
k C R
3 16 VR1 SK1
D5
a SK6 D7
R8 NC2 D6
RLA2 P2 D5
X1
R NO2 D4
15 NC1 RLA D3
C2 C 2
1 RLA1 P1 D2
NO1 D1
S2
D0
COIL
E
k D9 a R/W
TR1 k a
SK3 SK2 PL4 D1 R10 RS
S3 R2 PL3
P1 1 b
P2 TR2 e b c
C
LK5
RD
c eTR6
R3 e b c k a R9
R7 P3 2 D2 TB b
TR3 k a c e
P4 R4 e b c 3 D3 TC
R6
SK4 TR4
e b c
C
k a
SK7 TR5
R5 4 D4

ICEBREAKER

257

Fig.4. Printed circuit board component layout and (approximately) full-size copper foil
master pattern.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 189
Maxfield & Montrose Interactive Inc
Constructional Project
COMPONENTS
Resistors
R1, R6, R7 4k7 (3 off)
R2 to R5 220 ohms (4 off)
R8, R11 1k (2 off)
R8, R10, R13 470 ohms (3 off)
R12, R14 10k (2 off)
R15, R16 See text
All 0.25W 5% carbon film

Potentiometer
VR1 10k carbon preset
Capacitors
C1 to C4 10p ceramic, 2.5mm pitch (4 off), see text
C5, C6 100n multilayer polyester (2 off)
Layout of components on the completed EPE
Semiconductors ICEbreaker PCB.
D1 to D4 30V 400mW Zener diodes (4 off)
D5 3mm low-current red LED
D6 to D8 5.1V 400mW Zener diodes (3 off) files called ib1.lst, ib1.hex, ib1.cod, and ib1.err in
D9 1N4001 diode the icebreak directory. The ib1.err file will contain a
TR1 to TR6 ZTX451 npn transistors (6 off) few warning messages, which can be ignored.
IC1 PIC16F877P20 microcontroller, pre-programmed
IC2 7805 voltage regulator Leave MPLAB running, but minimize it by click-
X1 (X2) 20MHz low-profile crystal (see text) ing on the appropriate box. Open the icebreak file
X3 16x2 alphanumeric LCD module
and double click on icebreak.exe to start the pro-
Miscellaneous gram. The screen will display the main ICEbreaker
Socket strips to make up the following: 11-way (SK1);
1-way (SK2, SK3 -- 2 off); 4-way (SK4); 6-way (SK6) window as shown in Fig.5, and possibly the Watch
SK5 2.1mm PCB power connector and Source windows (Figs. 7 and 8). In the main ICE-
S1 to S3 s.p.s.t. push-to-make switches (3 off) breaker window click on “Options” and then select
RLA d.p.c.o. 5V coil relay (BT47) “Programmer” this will produce the communications
set up box shown in Fig 6. In this box set up the serial
PCB available from the EPE Online Store code 7000257
(www.epemag.com); breadboard; 9-way 90 o male D-type COM port that you are using. If a 20MHz crystal is
connector (PL1); 6-way 0.1in. pin header (PL2, PL4 -- 2 fitted the Baud box must be set to 38400. Other crys-
off); tal frequencies can be used and the Baud rate ad-
6-way pin strip, 2mm pitch (PL3); 2-way 0.1in. pin header justed proportionally – e.g. a 5MHz crystal would op-
with DP link plug (2 off -- LK1, LK2); socket strips, 20-way
erate at 38400/4 or 9600 Baud. Once set up close the
(4 off), 14-way (2 off), 13-way (2 off); 16-way pin-to-pin
strip box by pressing OK.
for LCD; 16-way long-pin socket strip for LCD. Back in the main
b ox select “File” and
Hardware: 12mm M3 HEX pillars (7 off); M3 screw x 6mm
(7 off); screws CSK (4 off) and 12 nuts (6BA or M2.5) for “ Open”, which will re-
LCD mounting. See also the v eal a standard file
SHOP TALK Page! s elect dialog window
li sting the files in the
ic ebreak directory.
Approx. Cost Guidance Only $60 S elect and load
i b1.asm and then
Run MPLAB, select the “project” tab and then o pen the source code
“new project”. In the directory box select c:\ ice- w indow by selecting
break and set up a project named ib.prj and edit ‘ Window’ and then
the project so that it contains the simple test pro- ‘S ource’. The window
gram ib1.asm which is included on the ICEbreaker s hould contain the
disk. Close the “Project Edit” window then select i b1.asm source file
“File” and ib1.asm. This will open the ib1.asm file w ith numbered lines
on the MPLAB screen. a s shown in Fig.7.
Next select “Project” and “Make project”. This Fig.5. Main ICEbreaker Before the pro-
will then run the MPASM program and produce gr window. am can be run it

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 190
Maxfield & Montrose Interactive Inc
Constructional Project
matter to put the LED and
resistor on the breadboard
and make the two connec-
tions to the turned-pin
socket strips. The row of 13
sockets at the bottom of
the patch area is a good
place to find 0V. Provided
the program has been set
up correctly and loaded
into IC1, the LED should
Fig.6. Setup box. flash when the program is
set to “Run”.
must be sent to IC1 by selecting In order to flash the
“Program” and then “Program” LED slowly, the program
in the main ICEbreaker window. has three nested counting
A progress bar appears and
Fig.7. Source file window. loops. To single step through
ICEbreaker sends the program ing the number of registers in them would take years, and so it
to the first 4K of the program the “Array” box. is impractical to go right through
memory in IC1. Once this is all of the states of PORTA. The
completed, it should be possible The selector box in the alternative to single stepping is
to step, run, and reset the code “Watch Add” window allows a to insert a breakpoint and run
one line at a time using the choice of locations, labels and the program to there.
“Step” button in the main win- registers to be selected. It is im-
portant to understand that some Select “Options”,
dow. In single step mode, at “Breakpoint” from the main ICE-
each step, a highlight line pro- of these options are not what
they seem, for example the W breaker window and set the
gresses through the source value to 24. Fig.10 shows the
code window, and the main ICE- option returns not the value of
the W register, but the number “Breakpoint” setting window. En-
breaker window shows the Pro- tering a breakpoint highlights
gram Counter, the contents of 0 which has been assigned to
the label W in the fifth line of the line in the “Source” window.
the W register and the Status “Reset” and then “Run” the pro-
register bits. the source code.
gram and it will now stop at the
Sometimes the highlight breakpoint. Press run again and
does not track the source code TESTING A it will loop again to the same
exactly, and is one line above PROGRAM breakpoint – each time incre-
or below the current line. This is menting the value at PORTA so
due to the communications be- Once some familiarity has that the LED on PORTA 0 turns
tween the computer and IC1 been achieved with the ICE- on and off alternately. Try con-
and depends upon the way breaker windows, it is time to necting the LED to IC1 pin 3
some of the source code is writ- connect some hardware and PORTA 1 and see that it
ten; it is only a minor inconve- see how it operates. As with all switches every other loop.
nience as the actual line of code good microcontroller hardware
Now that a LED can be
is easily worked out from the systems, the first thing to do is
flashed, it is just a few more
program counter in the ICE- flash a LED! The ib1.asm pro-
steps to controlling all sorts of
breaker main window. gram counts up through
peripheral devices, and whilst
PORTA, which is set to output
Other registers may be set the PIC16F877 cannot run the
mode, and so all that is neces-
up in the “Watch” window – se- proverbial “Power Station” it is
sary is to connect a LED from
lect “Windows”, “Watch” in the capable of an amazing number
pin 2 of IC1 via a current limit-
main window. Fig.8 shows the of very complicated feats. The
ing resistor (anything from
main Watch window and Fig.9 development of longer pro-
the “Add” window. Registers 100W to 2k2) to 0V. grams controlling more hard-
may also be “Watched” by set- Using solid core 1/0·6 con- ware is so much easier when it
ting the first location and enter- necting wire links it is an easy is possible to test the programs

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 191
Maxfield & Montrose Interactive Inc
Constructional Project
quickly in this way. Single step- tor. Connect PORTA 0 to 3 to
ping and watching the program the four stepping motor drive
and data registers allows even sockets P1 to P4 and then fol-
complicated routines to be low the procedures used for
tested and debugged, and sim- ib1.asm to compile, load and
ple changes can be made and run the program. Notes are in-
checked immediately. cluded in the code suggesting
To make a simple change modifications that can be made
to the ib1 program, select to the code for altering speed,
Fig.8. ICEbreaker “Watch” direction, and duration of travel.
“Program”, “Code” from the ice- window.
breaker main menu and then Program ib3.asm runs the
select location 14. The contents LCD. It uses six connections
can be read and should be from PORTC 2 to 8 to connect
30FF, which means MOVLW to RS, E, and D4, 5, 6, and 7 of
FF. Modify the value to 3010 the display in that order. The
which will load the value 10 in- code initializes the display, and
stead of FF and press the then can be set up as a subrou-
“Write” button. Clear the break- tine to write any character to
point, “Run” the program, and any display location. The source
see the change in speed. code has notes to explain the
The program in IC1 has Fig.9. ICEbreaker “Watch operation and to suggest possi-
been modified, but remember Add” window. ble changes for more advanced
that the Source Code has not, applications.
and so will need changing to the
new value once the required COMPLETED
speed has been set. To modify
the source code run MPLAB, PROGRAMS
modify ib1.asm, recompile the Once a program has been
code by selecting “Project”, debugged and is working cor-
“Make project” (or by pressing Fig.10. ICEbreaker rectly, it can be programmed
the appropriate shortcut button) “Breakpoint” window. into another PIC16F877 or any
and then switch back to ICE- other suitable PIC chip using an
breaker . files. Changing register file con- appropriate programmer (PIC
tents is particularly useful when
Select “File”, “Reopen” and Toolkit Mk2 from the May and
combined with single stepping,
the modified source code will June issues of EPE Online is
as it allows routines to be tested
appear in the ICEbreaker ideal – www.epemag.com/
with a range of values, for ex-
“Source” window. To complete 0599p1.htm). The ICEbreaker
ample a timing loop can be set
the operation select “Program”, up with 00 in the loop counting code does not have to be in the
“Program” and the new code will register and single stepped to chip and so any blank chip can
be loaded into IC1. Although the see what happens at the end of be used with this method. The
program in IC1 had already the loop. ICEbreaker board can only pro-
been modified, it is always good gram chips that already contain
practice to reprogram with the Once experience is gained, the special icebreak code – this
newly compiled code to prevent the range of tools available will is necessary because the chip
simple errors creeping in – es- be understood, and it will be- has to communicate with the
pecially when a number of mod- come easy to set up and check PC via the standard serial port
ifications might have been simple routines and combine interface. Chips with icebreak
made. them into full programs. code are readily available – see
As well as changes to the the Shoptalk page.
program memory, the same OTHER PROGRAMS Once programmed, ICE-
procedure can be used to mod- breaker chips will run normally
Program ib2.asm is a sim-
ify the EEPROM, and register in other circuits if required to do
ple driver for the stepping mo-

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 192
Maxfield & Montrose Interactive Inc
Constructional Project
so but it is important to make THE NEXT EPE ICEbreaker allows pro-
sure that the two pins RB6 and STEPS grams that are intended to be
RB7 are connected to 0V. This run on much simpler chips to be
is because the ICEbreaker soft- It is tempting to continue checked and debugged. All that
ware automatically starts to run, and describe the many features is necessary is to ensure that
and immediately checks for of the PIC16F877, but it really is the ports and register addresses
ground connections on these an impossible task because the are compatible with the smaller
pins. If it finds that they are chip is so powerful (see also our chips. Applications for the
grounded, the program jumps to PIC16F87x Mini Tutorial in the PIC16F84 are particularly suit-
location 0000 and starts running Oct ’99 issue of EPE Online). able for development using ICE-
the program from there, as a The beauty of the PIC range of breaker, and so the programs
normal chip would. devices is that it is possible to previously published by EPE
run the same code on many dif- can be used. Note though that
ferent chips. the MPLAB environment uses
MPASM code, and so the PIC
Toolkit Mk2 software will be
necessary to convert the origi-
nal TASM source code to
MPASM assembly language.
ICEbreaker provides an ad-
vanced way to learn program-
ming. Along with the PIC pro-
gramming and data sheets and
back issues of EPE, it will be-
come an indispensable tool for
learning, development, and test-
ing of PIC projects.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 193
Maxfield & Montrose Interactive Inc
ROLL-UP, ROLL-UP! Win a Pico PC-Based Oscilloscope
Ingenuity is our regular round-up of readers' own • 50MSPS Dual Channel Storage
circuits. We pay between $16 and $80 for all material Oscilloscope
published, depending on length and technical merit. • 25MHz Spectrum Analyzer
We're looking for novel applications and circuit tips, not
simply mechanical or electrical ideas. Ideas must be the • Multimeter
reader's own work and must not have been submitted • Frequency Meter
for publication elsewhere. The circuits shown have • Signal Generator
NOT been proven by us. Ingenuity Unlimited is open to
ALL abilities, but items for consideration in this column If you have a novel circuit idea which
should preferably be typed or word-processed, with a would be of use to other readers, then a Pico
brief circuit description (between 100 and 500 words Technology PC based oscilloscope could be
maximum) and full circuit diagram showing all relevant yours.
component values. Please draw all circuit schematics Every six months, Pico Technology will be
as clearly as possible. awarding an ADC200-50 digital storage oscil-
loscope for the best IU submission. In addi-
Send your circuit ideas to: Alan Winstanley,
tion, two single channel ADC-40s will be pre-
Ingenuity Unlimited, Wimborne Publishing Ltd., Allen
sented to the runners up.
House, East Borough, Wimborne, Dorset BH21 1PF.
They could earn you some real cash and a prize!

conduct once the trigger signal


Delay-On Timer – More has been received.
Time to Boot +12V
With the thyristor and RC
A simple circuit was needed values shown, the delay is k
D1
to turn on a computer cooling around 10 seconds before the 1N4001
RLA RLA1
a 1
fan a short period after the relay is activated. Other thyris-
power was applied, and so the tors could be substituted. TO LOAD
R1 (E.G. FANS)
Delay-On Timer of Fig.1 was 220k
The circuit was constructed a
devised. It consists of a thyristor R2
CSR1
on a small piece of stripboard 1k g
CSR1, which acts as a latch to k MCR1000-6
and has been used successfully
turn on the relay RLA. +
in a PC, where it allows the PC C1
1000m/16V
The thyristor CSR1 is trig- to boot up before the fan is
gered by a signal to its gate, switched on. GND
(0V)
and is delayed by the RC net-
work comprising resistor R1 and Abdul Rahman Mansor
capacitor C1. It continues to Penang, Malaysia Fig.1. Delay-On Timer circuit
+3 TO +15V d.c.

555 Power Supply – On


8 4
The Panel V+ RST

7 2
A 555-based oscillator cir- R1
1k
DIS TRIG.
C3
IC1 D2 R3
OUTPUT
cuit is shown in Fig.2, which C1 6
7555
3
680n BAT85
a k
39Ω
9V1
100n THR O/P +
provides an inexpensive DC
GND CV
isolated power supply for digital R2
22k 1 5 Fig.2 Power sup-
k k
panel meters without the need D1 C5 D3 C6
BAT85
a
100µ 9V1
a
1µ ply circuit using a
for transformers or inductors.
The circuit oscillates at approxi-
C2
470p C4 CMOS timer chip
680n

mately 60kHz, as determined by
resistors R1 and R2 and capaci-
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 194
Maxfield & Montrose Interactive Inc
Ingenuity Unlimited
tor C1 as normal. DC voltage isolation is the voltage
ratings of capacitors C3 and C4
Shaky Dice – It’s a
The output square-wave
minus the supply voltage. The cir- Rollover
pulses are fed into a modified
Cockroft-Walton multiplier, cuit runs from 3V to 15V and a low A simple but novel circuit
which features two Schottky drop-out regulator could be used application for a custom die
diodes D1 and D2. The charge for operation at higher voltages (at chip is shown in Fig.4. This cir-
stored on capacitr C5 gives a lower voltages the full 9××1V may cuit imitates a traditional die in
voltage slightly less than the not be achieved). Note that a that it starts “rolling” when you
555 supply voltage, and is suffi- CMOS timer should be used for shake it.
cient to drive most LCD panel IC1. It is based around the
meters which only require a few Holtek HT2070A chip, which will
A.N. Joubert
microamps. generate a traditional style of
Fichardt Park
A 9××1V Zener diode D3 pro- South Africa die readout when the sealed vi-
vides good output regulation up bration switch S2 is operated.
to about 1mA. The maximum The piezo sounder WD1 is a
disc transducer which emits a
sound as well, and it operates
PIC Adapter Socket – from a 3V battery controlled by
a miniature toggle switch S1.
Pinwise
Our own model was housed
After experimenting with
between two semi-transparent
Arizona PIC microcontrollers,
curved colored disco light filters,
using the excellent EPE PIC Tu-
which were bolted together us-
torial circuit board, I needed to ADAPTER
PIC
SOCKET ing nylon fasteners around the
use an external oscillator for ORIGINAL
SOCKET rim. (The filters can be carefully
one of my own experiments.
drilled for this purpose.) The cir-
Rather than modify the board, I
PIC PIN15
cuit was then installed with the
built the simple plug-in adapter PIC PIN16
light-emitting diodes, D1 to D7,
socket shown in Fig.3.
being arranged in an H-shape
Using a pressed contact 18- Fig.3. Simply plug-in as shown.
pin DIL socket (a turned-pin
adapter socket. Andy and Rose Morell
type will not work), I carefully
folded pin 15 and pin 16 out to Winchester, UK
the side. This socket was then
inserted into the existing socket WD1
1
+V
16
PIEZO
already on the board, and the DISC
S1
2 15
PIC pressed into the new a a a
N.C.
ON/OFF
R7
adapter socket. A sliver of plas- D1 D2 D3 470W
3 14 C1
k k k
tic tape prevented any contact R6 IC1
N.C. 100n

between the folded out pins and 470W


4
HC2070A
13
a N.C.
the original socket. D4 R5
470W B1
k 5 12 3V
The external oscillator was VIBRATION
R4 SWITCH
powered from the board and its a a a 470W
6 11
output was connected to pin 16 D5 D6 D7
N.C. S2

k k k R3
of the adapter. Note that in this 470W
7 10
0V
configuration, there is no con- R2
nection to pin 15. 470W
8 9

R1
A. Langton 470W

Aberdeen, Scotland
Fig.4. Circuit diagram for the Shaky Dice.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 195
Maxfield & Montrose Interactive Inc
IAN POOLE INTRODUCES THE MRAM, WHICH (IT IS HOPED) WILL POSE A REAL
THREAT TO “FLASH” MEMORIES AND OTHERS.

Memory is one of the crucial claimed to be faster than Flash, technology a significant
elements in today’s technology. which will be its main competitor advantage.
There have been many when it is launched onto the MRAM has further advantages.
improvements in disk based market. However, as prices fall It does not suffer from the wear
technology over recent years, and MRAM gains wider out mechanism experienced
but there are similar levels of acceptance it is likely that it will with Flash devices. Although
progress taking place in the be used in many more memory great improvements have been
memory more directly applications. made in this area with Flash
associated with the CPU itself. devices, they still have a limited
life and this means that they
To illustrate this, it was less SPECIFICATIONS cannot be used in high usage
than thirty years ago when ferrite areas of a computer’s
For a given speed and
core memory was used. architecture.
geometry the new MRAM
Fortunately this was superseded
technology consumes less
by electronic forms of memory
when the levels of integration of
power and this is a particularly OPERATION
important factor in today’s
circuits grew to a sufficient The operation of the new
technology where many items
degree to allow them to be used. memories is based around a
are battery powered. The power
Now there are a variety of reduction also means that the structure known as a magnetic
different forms of memory that power supply requirements for tunnel junction (MTJ). These
can be used dependent upon the unit as a whole may be devices consist of sandwiches
the exact requirement that reduced, and this can reflect in a of two ferromagnetic layers
needs to be fulfilled. SRAM, decrease in costs – all-important separated by thin insulating
DRAM, EPROM, EEPROM and in today’s fiercely competitive layers.
a variety of others including marketplace. A current can flow across
Flash memories are available, the sandwich arising from a
As the speed of the new
each having their own forte and tunneling action and its
devices is faster than Flash, this
area where they perform to their magnitude is dependent upon
too is another selling point as
best. the magnetic moments of the
the speed of flash devices can
However, if it were possible be such that it impacts on the magnetic layers. These layers
for only one type of memory to operation of the whole unit. can either be the same, when
be used, then this could lead to Although not much faster at the they are said to be parallel, or in
more efficient use of the moment, improvements are opposite directions when they
circuitry, and possible cost anticipated that will give the new are said to be antiparallel.
savings. For this to be feasible, Magnetic tunnel junctions
an all-purpose, yet low cost TOP LEAD comprise sandwiches of two
memory would need to be ferromagnetic (FM) layers
available, and this may be just FREE FERROMAGNET
separated by a thin insulating
TUNNEL JUNCTION
around the corner because a PINNED FERROMAGNET layer which acts as a tunnel
new technology is about to hit barrier (Fig.1). In these
the market. ANTIFERROMAGNET
structures the sense current
Known as magneto SEED LAYER usually flows parallel to the
resistance random access layers of the structure, while the
BOTTOM LEAD
memory, or MRAM, the new current write is passed
memory is creating significant SUBSTRATE perpendicular to the layers of
interest in the semiconductor the MTJ sandwich.
industry. It is a non-volatile form Fig.1. Structure of an The resistance of the MTJ
of random access memory MRAM cell. sandwich depends on the
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 196
Maxfield & Montrose Interactive Inc
New technology Updates
direction of magnetism of the ferromagnetic metals This will bring the final version
two ferromagnetic layers. comprising the electrodes were nearer and ensure that its unit
Typically, the resistance of the made. costs will be such that it can
MTJ is lowest when these It was anticipated that the effectively compete with existing
moments are aligned parallel to magnitude of the MR would technologies.
one another, and is highest largely be dependent on the The new MRAM technology
when antiparallel. interface between the tunnel is an exciting development that
To set the state of the barrier and the magnetic could revolutionize current
memory cell a write current is electrodes. It was found that trends in electronic memory.
passed through the structure. thick layers of certain non- The migration from magnetic
This is sufficiently high to alter ferromagnetic metals could be core memory in the early 1970s
the direction of magnetism of inserted between the tunnel proved to be a major step
the thin layer, but not the thicker barrier and the magnetic forwards. Now the introduction
one. A smaller non-destructive electrode without quenching the of MRAMs could provide similar
sense current is then used to MR effect. However, the MR levels of benefit.
detect the data stored in the cell. was quenched by incomplete
oxidation of the aluminum layer.

CONSTRUCTION
A wide range of structures
OTHER
and materials have been DEVELOPMENTS
investigated to obtain the IBM is not the only
optimum structure. In view of the manufacturer investigating these
potential of the new technology structures. Apart from Motorola,
a number of manufacturers are IMEC, Europe’s leading
investigating different research center for the
approaches. Motorola, IBM and development and licensing of
many others all believe there is state-of-the-art microelectronics
a future for the new idea. technologies, is also making
IBM have fabricated significant developments with
junctions using computer- MRAM technology.
controlled placement of up to They have succeeded in
eight different metal shadow developing a demonstration
masks. The masks were MRAM matrix cell array with a
successively placed on any one DRAM style of architecture. This
of up to twenty 25mm diameter brings MRAM technology a step
wafers with a placement closer to the production of a
accuracy of approximately ± viable alternative to the existing
40um. By using different masks, non-volatile memory. The
between 10 to 74 junctions of a memories produced in this
size of approximately 80 x development used a similar
80um2 could be fashioned on structure to that employed by
each wafer. IBM, i.e. two magnetic layers
The tunnel barrier was separated by an insulating layer.
formed by in-situ plasma Bit-selective addressing was
oxidation of a thin aluminum based around a GaAs diode.
layer deposited at ambient The GaAs technology was
temperature. Using this selected because of its flexibility
technique, large levels of and tolerance relative to silicon.
variation in resistance due to
In the next stage of
magnetoresistive effects were
development it is hoped to use a
seen. Investigations into the
silicon diode or transistor to
dependence of MR on the
reduce the fabrication costs.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 197
Maxfield & Montrose Interactive Inc
TECHNOLOGY TIMELINES
Part 2 - DAYS OF LATER YORE
by Alvin Brown and Clive “Max” Maxfield
Boldly going behind the beyond, behind which no one (meaning 12) and gross
has boldly gone behind, beyond, before! (meaning 12 x 12). The fact that
we have 12 months in a year
and 24 hours in a day (2 x 12)
The purpose of this series is DECIMAL NUMBER are also related to these base-
to review how we came to be 12 systems.
where we are today (technology-
SYSTEM
Throughout history, humans However, the number
wise), and where we look like
have experimented with a system with which we are most
ending up tomorrow. Our first step
variety of different number familiar is the decimal system,
is to cast our gaze into the depths
systems. For example, the which is based on ten digits: 0,
of time to consider the state-of-
ancient Babylonians used a 1, 2, 3, 4, 5, 6, 7, 8 and 9. The
the-art as the world was poised to
base-60 system, which is why name decimal is derived from
enter the 20th Century.
we have 60 seconds in a minute the Latin decam, meaning ten.
In Part 1 we considered As this system uses ten digits, it
and 60 minutes in an hour.
physics, electronics, and is said to be base-10 or radix-
Some people used their fingers
communications prior to 1900. In 10, where the term radix comes
and their toes for counting, so
this installment we shall from the Latin word
first examine the state of meaning root.
computing prior to 1900.
We shall then turn our
attention to the key THE ABACUS
discoveries in The first actual
fundamental electronics calculating mechanism
that occurred in the 20th (at least that we know of)
Century. is the abacus. Some
authorities hold that the
COMPUTING first abacus was invented
by the Babylonians
PRIOR TO 1900 sometime between 1,000
The first tools used as BC and 500 BC, but
aids to calculation were others believe that it was
man’s own fingers. Thus, Napier’s Bones, simple multiplication tables in- actually invented by the
it is no coincidence that Chinese.
scribed on wood or bone. John Napier went on
digit refers to a finger (or to invent logarithms. Courtesy of IBM. Although the abacus
toe) as well as a does not qualify as a
numerical quantity. mechanical calculator, it
Similarly, small stones or pebbles they ended up with base-20 certainly stands proud as one of
could be used to represent larger systems, which is why we still first mechanical aids to
numbers than fingers and could have special words like score, calculation.
also store intermediate results for meaning twenty.
later use. This explains why Similarly, some groups
calculate is derived from the Latin experimented with base-12
THE SLIDE RULE
word for pebble (calculus). systems, which is why we have In the early 1600s, Scottish
special words like dozen mathematician John Napier

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 198
Maxfield & Montrose Interactive Inc
Special Feature
In 1642, Pascal introduced his
Arithmetic Machine, which could
add and subtract numbers
(multiplication and division
operations were implemented by
performing a series of additions or
subtractions).

A modern construction of a mechanical calculator in- STEP RECKONER


spired by a drawing in one of Leonardo da Vinci’s note- Mechanical calculation was
books. Courtesy of IBM. taken a step further in the 1670s
by a German Baron called
invented a tool called Napier’s since been constructed, Gottfried von Leibniz. After
Bones. These were simple although some people believe receiving his bachelor’s degree at
multiplication tables inscribed on the reconstruction is far more seventeen years of age, Leibniz
strips of wood or bone. Napier sophisticated than anything developed Pascal’s ideas and, in
also invented the concept of Leonardo had in mind. 1671, introduced the Step
logarithms, which were used as Reckoner. In addition to
the basis for the slide rule by the performing additions and
English mathematician and FIRST MECHANICAL subtractions, the Step Reckoner
clergyman William Oughtred in CALCULATOR could multiply, divide, and
1621. evaluate square roots.
Sometime around 1625, the
The slide rule was an The mechanical calculators
German astronomer and
exceptionally effective tool that mathematicia
remained in common use for n Wilhelm
over three hundred years. Schickard
However, like the abacus, the wrote a letter
slide rule does not qualify as a to a friend
mechanical calculator in the stating that he
modern sense of the word. had built a
machine that
“…
REDISCOVERED immediately
NOTEBOOKS computes the
Leonardo da Vinci was a given Blaise Pascal’s Arithmetic Machine. Courtesy of IBM.
genius: painter, musician, numbers
sculptor, architect, engineer, automatically; adds, subtracts,
created by Pascal and Leibniz
and so forth. It is well known that multiplies, and divides’’.
were the forebears of today’s
he sketched concept designs of Unfortunately, the original
desktop computers, and
such futuristic devices as tanks machine was destroyed in a fire,
derivations of these devices were
and helicopters, but until quite but working models have since
in widespread use for over two
recently there was no indication been constructed from
hundred years until their
that he had ever turned his mind Schickard’s notes.
electronic counterparts finally
to mechanical calculation. became available and affordable
However, two of da Vinci’s ARITHMETIC in the early 1970s.
notebooks dating from around
the 1500s were rediscovered in
MACHINE
1967. These priceless tomes For reasons unknown, many FIRST MECHANICAL
contain a wealth of drawings, references ignore Schickard’s COMPUTER
some of which may represent a device and instead credit the
In the 1800s, books of
mechanical calculator (see Part French mathematician, physicist
mathematical tables such as
1). Working models of a and theologian, Blaise Pascal
logarithmic and trigonometric
mechanical calculator loosely with the invention of the first
functions were in great demand
based on these drawings have operational calculating machine.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 199
Maxfield & Montrose Interactive Inc
Special Feature
change the flow of a In the early 1990s, more than
program depending on one hundred and fifty years after
the results of previous its conception, Babbage’s
computations. Babbage Difference Engine performed its
worked on the Analytical first sequence of calculations and
Engine from around returned results to 31 digits of
1830 until he died in accuracy, which is far more
1871, but sadly it was accurate than most of today’s
never completed in his electronic pocket calculators!
lifetime.
TABULATING
FIRST MACHINES
COMPUTER These days we can only
PROGRAMMER imagine the problems besetting
the American census takers in the
Augusta Ada
latter part of the 19th Century,
Lovelace, the daughter
because it was estimated that the
of the English poet Lord
1890 census would include more
Modern construction of Babbage’s Dif- Byron, was one of the than 62 million Americans.
ference Engine. Courtesy of IBM. few people who had any
clue what Babbage was The problem was that the
talking about. Ada existing system of making tally
by navigators, engineers, and so
created a program to compute a marks in small squares on rolls of
forth. Such tables were
mathematical sequence known paper and then adding these
generated by teams of
as Bernoulli numbers, which marks together by hand was time-
mathematicians working day
would have been extremely consuming, expensive, and prone
and night on derivatives of the
interesting had Babbage’s to error. In fact it was determined
primitive mechanical calculators
machine ever actually worked. that if the existing system were
invented by Pascal and Leibniz.
used for the 1890 census, then
These mathematicians were Ada is now credited as
the processed data would not be
referred to as computers being the first computer
ready until after the 1900 census,
because they performed all the programmer, and the ADA
by which time it would be largely
computations. programming language was
worthless!
In 1822, the eccentric British named in her honor in 1979.
During the 1880s, a lecturer
mathematician and inventor In fact, one of Babbage’s
at MIT called Herman Hollerith
Charles Babbage proposed earlier Difference Engines was
came up with a solution to this
building a machine called the eventually assembled by a team
problem, which was to use
Difference Engine to at London’s Science Museum
punched cards to represent the
automatically calculate these from his original drawings. The
census data, and to then read and
tables. final machine was constructed
collate this data using machines.
Babbage had only partially from cast iron, bronze and steel,
consisted of 4,000 components, The result of Hollerith’s
completed the Difference
weighed in at a whopping three labours was an automatic
Engine when he conceived the
tons, and was 10 feet wide and tabulating machine with a large
idea of a much more
6·5 feet tall (3m x 2m). number of clock-like counters that
sophisticated machine called an
Analytical Engine. (This is often
referred to as Babbage’s
Analytical Steam Engine,
because he intended for it to be
powered by steam).
The Analytical Engine
included many concepts that
would eventually be featured in
modern computers, including a Gottfried von Leibniz’s Step Reckoner of 1671.
processing unit that could Courtesy of IBM.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 200
Maxfield & Montrose Interactive Inc
Special Feature
the throne of using devices such as
England. Light transformers, or rectification using
bulbs are crystals, the most sophisticated
considered to be form of control prior to the
amazingly cool (but beginning of the 20th Century was
almost no-one has the mechanical switch (or its
electricity in their electromechanical counterpart,
homes). The the relay).
vacuum tube has When it comes to coarse
yet to be invented. control like turning a light bulb on
Rudimentary or off, then a mechanical switch is
telephones are definitely worth considering, but if
available only to the you’re looking for fine control,
favored few, and mechanical switches generally
“computers” are the leave something to be desired.
ill-used Similarly, a mechanical device is
Hollerith’s Tabulator/Sorter unit. mathematicians
Courtesy of IBM. only of use if you only wish to turn
who furiously hand- something off every now and
were used to accumulate and crank their then, but such devices have a
display results. Operators used mechanical calculators in the maximum capability of only a very
switches to instruct the machine dead of night! few cycles per second.
to examine each card for certain Tick-tock, tick-tock . . . the So one key requirement as
characteristics, such as gender, second hand is wending its way we entered the 20th Century (“we”
profession, marital status, towards the beginning of a new meaning the human race, not the
number of children, and so forth. century. Who can guess what authors personally you
An electrically controlled surprises the future will hold? understand) was for a more
sorting mechanism detected any sophisticated way to control
cards that met the specified electricity.
criteria and gathered them into a
separate container. The ability to
quickly and easily collate data in VACUUM TUBES –
this way drove statisticians of
FUNDAMENTAL FLEMING’S DIODES
the time into a frenzy of ELECTRONICS IN As we discussed in Part 1, the
excitement. TH
Following their application to
THE 20 American Inventor Thomas Alva
Edison demonstrated his first
the census problem, Hollerith’s CENTURY incandescent light bulb in 1789
machines proved themselves to (one year after the English
be extremely useful for a wide For our purposes here,
electricity may be considered to inventor Sir Joseph Wilson Swan
variety of applications, and demonstrated his bulb, but let’s
some of the techniques they consist of vast herds of
electrons migrating from one not delve into that debate again
used were to prove significant in here).
the development of the digital place to another through some
computer in the 20th Century. In conducting medium like a Four years later in 1883, an
fact, in February 1924, copper wire. The art of engineer working for Edison –
Hollerith’s company changed its electronics comes in controlling William Hammer – observed that
name to International Business these herds: telling them when he could detect electrons flowing
Machines, or IBM! to start, when to stop, where to from the lighted filament to a
go, and what to do when they metal plate mounted inside the
get there. bulb. Even though Hammer
POISED ON THE However, as with most discovered this phenomena, it
subsequently became known as
BRINK … things (especially small
the Edison Effect, because Edison
children), control is easier to talk
So now we are poised on about than it is to achieve. With was the man in charge.
the brink of the 20th Century. It’s the exception of simple Sad to relate, Edison himself
11:59pm on December 31st manipulation and modulation did not take the time to investigate
1899. Queen Victoria is still on
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 201
Maxfield & Montrose Interactive Inc
Special Feature
fact that these devices are could be used to control a much
created using evacuated glass larger signal flowing between the
tubes, they are still referred to cathode and the anode. The
simply as tubes in America. result was a device that could be
However in England they used to amplify signals, and de
became more commonly Forest used his triodes to build
known as valves, because this many of the early radio
name – derived from transmitters (he also presented
pneumatic and hydraulic the first live opera broadcast and
valves – better reflected their the first news report on radio).
control function.) In addition to acting as an
What Fleming had amplifier, de Forest’s triodes
discovered was that the could also be used in the role of
electrons in his vacuum tube switches (the presence or
only flowed from the cathode absence of a signal on the grid
(the heated filament) to a terminal could turn the output –
positively charged anode. the anode – on or off). This ability
Thus, Fleming had created a to act as switches meant that
Sir John Fleming (1849-1945), form of diode, which is a vacuum tubes were destined to
British physicist and inventor of device that only conducts play a significant role in digital
the thermionic valve. Courtesy of electricity in one direction. computing.
the Science Photo Library. This was of particular As we shall see in a future
interest, because some installment, early digital
electrical equipment like computers (circa 1940) were
the effect any further. This was radios will only work with either mechanical or
unfortunate, because electronics unidirectional, or direct current electromechanical (based on
as we now know it might have (DC), but most electrical relays), but they soon came to be
taken a giant leap forward had supplies are based on constructed from vacuum tube
he done so. alternating current (AC), switches, because these were
In fact it wasn’t until the because this provides a more much, much faster.
Edison Effect’s twenty-first efficient way to transport Unfortunately, vacuum tubes
birthday in 1904 that the English electricity over long distances. have a number of disadvantages,
electrical engineer, John Fleming’s vacuum tube diode not the least that the metal
Ambrose Fleming, filed a patent could therefore be employed in forming the cathode evaporates
for the first vacuum tube device the role of a rectifier to convert over time causing a performance
based on this effect. (Due to the AC to DC. degradation. Also, in addition to
requiring dangerously high
LEE DE voltages, vacuum tubes occupy a
lot of space, they generate a lot of
FOREST’S waste heat, and they are not
TRIODES particularly reliable, which
becomes especially noticeable
In 1907, the when they are used in large
American inventor Lee numbers.
de Forest introduced a
third electrode called For example, the ENIAC
the grid into his version computer, which was constructed
of a vacuum tube. The at the University of Pennsylvania
resulting three-terminal between 1943 and 1946, used
device was called a approximately 18,000 vacuum
triode. tubes. This monster was 10 feet
(3m) tall, occupied 1,000 square
An Audion triode from about 1914. This device was feet (93 m2) of floor space, and
Right: An MO Valve Co. triode from particularly cunning, required 150 kilowatts of power,
about 1920. Courtesy of Radio Bygones because a small signal which was enough to light a small
applied to the grid town at that time.
(www.radiobygones.com).
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 202
Maxfield & Montrose Interactive Inc
Special Feature
advent of the conductors. Other materials resist
vacuum tube most the flow of electricity, and these
people really are known as insulators. What the
couldn’t care less. early pioneers didn’t fully
However, some understand is that by adding
scientists, inventors impurities to certain crystalline
and engineers did structures, it is possible to create
remain interested in a special class of materials known
crystals in general, as semiconductors, which can
especially as they exhibit both conducting and
began to discover insulating properties.
more of the special Sad to relate, serious
properties research into semiconductors did
associated with not really commence until World
different crystalline War II. At that time it was
Part of the ENIAC computer. Courtesy of IBM. structures. For recognized that devices formed
example, in 1907 a from semiconductors had
However, whilst it was a letter from Mr. H.J. Round was potential as amplifiers and
tremendous achievement for its published in the American switches. If it proved possible to
time, ENIAC was painfully Electrical World magazine as create them, these new devices
unreliable due to the vacuum
follows: could be used to replace
tube technology of the day. In
To the editors of Electrical prevailing vacuum tube
fact 90 per cent of ENIAC’s
World: Sirs – During an technology, with the advantages
down-time was attributed to
investigation of the that they would be much smaller
locating and replacing burnt-out
unsymmetrical passage of and lighter, they would consume
tubes – sometimes as many as
current through a contact of much less power, and they would
50 a day!
carborundum and other be far more reliable.
substances a curious
CRYSTAL GAZING phenomenon was noted. On TRANSISTORS
The fact that certain crystals applying a potential of 10 volts
between two points on a crystal In the early 1940s, scientists
have special properties had
of carborundum, the crystal at Bell Labs in the United States
been known for a long time. For
gave out a yellowish light. started to experiment with impure
example, in 1880, the French
physicist Pierre Curie had Mr Round went on to note
discovered the piezoelectric that some crystals gave out
effect. In this case, certain green, orange, or blue light. This
crystalline substances produce is quite possibly the first
an electrical charge if they are documented reference to the
squeezed, and correspondingly effect upon which light-emitting
they change size if an electric diodes (LEDs) are based.
current is applied to them.
Similarly, as far back as
This effect subsequently 1926, Dr Julius Edgar Lilienfield
found many diverse applications of New York filed for a patent on
in electronics, from sensors what we would now recognize
(including microphones) to as an npn junction transistor
actuators (including extremely being used in the role of an
loud alarms). amplifier (the title of the patent
Prior to Fleming inventing was the Method and apparatus
his vacuum tube diode, early for controlling electric currents).
The first ever transistor,
radios relied on the use of created on 23 December
crystals for rectification. At that
time no one really understood
SEMICONDUCTORS 1947. The photo scale is
how crystals could convert an Some substances facilitate approximately twice life
AC signal into its DC the conduction of electricity and size. Courtesy of Bell Laborato-
counterpart, and following the are therefore known as ries/Lucent Technologies.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 203
Maxfield & Montrose Interactive Inc
Special Feature
TIMELINES crystals of germanium. The first commercial products. For
true semiconductor components example, 1952 saw the
1901: Hubert Booth invents the were two-terminal diode appearance of the transistor-
first vacuum cleaner. devices. On the 23rd December based hearing aid, quickly
1902: Robert Bosch invents the 1947, a team comprising the followed by Sony’s pocket-sized
first spark plug. scientist William Bradford transistor radio. It was also
Shockley and the theoretical obvious to computer scientists
1902: America. Millar Hutchin- physicists John Bardeen and that they could now make
son invents the first elec- Walter Brattain succeeded in machines much smaller (the size
trical hearing aid. creating the first point-contact of a room instead of a house), but
1904: England. John Ambrose transistor (whose name was only a very few forward thinkers
Fleming invents the vac- derived from transfer resistor). had any idea as to what was yet
uum tube diode rectifier. Like the triode, this was a to come …
1904: First ultraviolet lamps are three terminal device that could
introduced. be used both as an amplifier INTEGRATED
1904: First practical photoelec- and a switch. Once they had
proved that their creation CIRCUITS
tric cell is developed.
worked, the team broke up to Sometime after the invention
1906: First tungsten-filament celebrate the Christmas of the transistor, people began to
lamps are introduced. holidays, which is why many think that it would be a good idea
1907: America. Lee de Forest (lesser) references state that the to be able to fabricate entire
creates a three-element first transistor did not make an circuits on a single piece of
amplifier vacuum tube appearance until 1948. semiconductor. In fact, the first
(triode). In 1950, Shockley invented public discussion of this concept
1908: Charles Frederick Cross a new type of device called a is generally credited to a British
invents Cellophane. bipolar junction transistor (BJT), Radar expert, G. W. A. Drummer
which was more reliable, easier in a paper he presented as far
1909: Leo Baekeland patents and cheaper to build, and gave back as 1952. However, it was not
an artificial plastic that he more consistent results than until 1958 that a young engineer
calls Bakelite. point contact devices. Then, in called Jack Kilby actually
1909: General Electric intro- 1962, Steven Hofstein and succeeded in creating multiple
duce the world’s first Fredric Heiman at the RCA components as a single device.
electric toaster. research laboratory at Princeton, To a large extent the demand
1910: First electric washing New Jersey, invented a new for miniaturization was driven by
machines are introduced. family of devices called field the requirements of the American
effect transistors (FETs). armed forces and also by rocket
1910: France. Georges Claude research. At that time, one
introduces neon lamps. Although germanium
exhibits more desirable technique that was receiving a lot
1911: Dutch physicist Heike electrical characteristics, for a of attention was the Micro-Module
Kamerlingh Onnes dis- variety of reasons silicon is program, which was sponsored by
covers superconductivity. easier to work with, and so by the US Army Signal Corps.
1912: The Titanic sinks on its the late 1950s silicon had Using this technique, all of the
maiden voyage. replaced germanium as the components were created with a
semiconductor of choice. (As uniform size and shape, and the
1912: America. Dr Sidney Rus- silicon is the main constituent of
sell invents the electric wiring was built into the
sand and one of the most components themselves. These
blanket. common elements on earth – Micro-Modules could then be
1913: William D. Coolidge in- silicon accounts for snapped together to form circuits.
vents hot-tungsten fila- approximately 28 percent of the
Texas Instruments was
ment X-ray tube. This Earth’s crust – we aren’t in any
working on the Micro-Module
Coolidge Tube becomes danger of running out of it in the
program when Jack Kilby joined
standard generator for foreseeable future.)
the company in May 1958. In the
medical X-rays. Very quickly after the first middle of the summer, most of the
1914: America. Traffic lights transistors had been developed plant was to shut down for a mass
are used for the first time they started to appear in vacation, but as a new employee
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 204
Maxfield & Montrose Interactive Inc
Special Feature
(in Cleveland, Ohio).
1917: Clarence Birdseye pre-
serves food using freez-
ing.
1919: The concept of flip-flop
(memory) circuits is in-
vented.
1919: Walter Schottky invents
the tetrode (first multiple-
grid vacuum tube).
1921: Czech author Karel
Capek coins the term
robot in his play R.U.R.
1921: Albert Hull invents the
magnetron (a microwave The first integrated circuit, created by Jack Kilby of
generator). Texas Instruments in 1958.
Courtesy of Texas Instruments.
1921: Canadian-American John
Augustus Larson invents
Kilby did not have any vacation permission to experiment further.
the polygraph lie-
time coming, so he was left to On 12th September 1958, he
detector.
his own devices. powered up his first prototype – a
1921: First use of quartz crys- phase shift oscillator – which
In a desperate attempt to
tals to keep radios from immediately started to oscillate at
avoid being consigned to
wandering off-station.
working on Micro-Modules for approximately 1××3MHz.
1923: First neon advertising the rest of his career, Kilby Although manufacturing
sign is introduced. started pondering the fact that techniques subsequently took
1923: First photoelectric cell is multiple devices such as different paths to those used by
introduced. resistors, capacitors and Kilby, he is still credited with the
transistors could be fabricated manufacture of the first true
1926: America. First “pop-up’’ on a single piece of integrated circuit.
bread toaster is intro- semiconductor and connected
duced. The original bipolar junction
together in situ to form a
transistors were manufactured
1926: America. Dr Julius Edgar complete circuit.
using the mesa process (named
Lilienfield from New York As soon as his boss after flat-topped, table
filed for a patent on what returned from vacation, Kilby mountains), in which a doped
we would now recognize explained his ideas and received piece of silicon called the mesa
as an npn junction tran-
(or base) was mounted
sistor being used in the
on top of a larger piece
role of an amplifier.
of silicon, which formed
1927: Harold Stephen Black the collector. The third
conceives the idea of terminal – the emitter –
negative feedback which, was created using a
amongst other things, smaller piece of silicon,
makes hi-fi amplifiers which was embedded in
possible. the base.
1927: First five-electrode vac- In 1959, the Swiss
uum tube (the pentode) physicist Jean Hoerni
is introduced. invented the planar
process in which optical
1928: Joseph Schick invents lithographic techniques
the electric razor. were first used to
1928: America. First quartz diffuse the base into the
crystal clock is intro- The first microprocessor, Intel’s 4004, of collector, then the
duced. 1971. Courtesy of Intel.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 205
Maxfield & Montrose Interactive Inc
Special Feature
1930: America. Sliced bread cuits is credited to a 1970: America. Intel announce
arrives. British radar expert, the first 1024-bit dynamic
1936: Fluorescent lighting ar- G.W.A. Dummer. RAM, called the 1103.
rives. 1954: America. C. A. Swanson 1971: America. Intel creates
1938: Hungarian Lazlo Biro company markets the the first microprocessor,
patents the first ball-point first “TV Dinner’’. the 4004
pen. 1955: Velcro is patented. 1975: England. First liquid crys-
1938: Walter Schottky discov- 1957: America. Gordon Gould tal displays (LCDs) are
ers the existence of conceives the idea of the used for pocket calcula-
holes in the band struc- laser. tors and digital clocks.
ture of semiconductors 1958: America. Jack Kilby,
and explains metal/semi- working for Texas Instru-
conductor interface recti- emitter into the base.
ments, succeeds in fabri-
fication. cating multiple compo- One of Hoerni’s colleagues,
nents on a single piece of Robert Noyce, invented a tech-
1938: America. Claude E.
semiconductor. nique for growing a layer of sili-
Shannon publishes an
con dioxide insulator over the
article (based on his 1959: Swiss physicist Jean Ho- transistor, and then etching this
Master’s thesis at MIT) erni invents the planar layer to expose small areas over
showing how Boolean process, in which optical the base and emitter. Thin lay-
algebra could be used to lithographic techniques ers of aluminum were subse-
design digital circuits. are used to create tran- quently diffused into these areas
1939: Light-emitting diodes sistors. to create wires. The processes
were patented by 1959: America. Robert Noyce developed by Hoerni and Noyce
Messers Bay and Szigeti. invents technique for cre- led directly to modern integrated
1943: German engineer Paul ating microscopic alu- circuits.
Eisler patents the printed minum wires on silicon By 1961, both Fairchild and
circuit board. (leads to development of Texas Instruments had an-
1945: Percy L. Spensor invents integrated circuits). nounced the availability of the
the microwave oven (the 1960: America. Theodore first commercial planar inte-
first units go on sale in Maimen creates the first grated circuits, comprising sim-
1947). laser. ple logic functions. Only nine
years later in 1970, Fairchild in-
1947: America. Physicists 1962: America. Steven Hofstein troduced the first
William Shockley, Walter and Fredric Heiman at semiconductor-based 256-bit
Brattain, and John RCA Research Lab in- static RAM, while Intel an-
Bardeen create the first vent field effect transis- nounced the first 1024-bit dy-
point-contact germanium tors (FETs). namic RAM.
transistor on the 23rd 1962: America. Unimation intro-
December. Then in 1971, Ted Hoff et al at
duces the first industrial Intel invented the world’s first
1948: First atomic clock con- robot. computer on a chip – the 4004
structed. 1967: America. Fairchild intro- microprocessor. The successors
1950: Maurice Karnaugh in- duce an integrated circuit of this device (the 4040, 8008
vents Karnaugh Maps called the Micromosaic and 8080) heralded a new area
(circa 1950), which (the forerunner of the in computing. Systems small
quickly become one of modern ASIC). enough to fit on a desk could be
the mainstays of the logic 1968: America. First Static created with more processing
designer’s tool-chest. RAM IC reaches the power than monsters weighing
market. tens of tons only a decade be-
1950: America. Physicist
fore.
William Shockley invents 1970: America. Fairchild intro-
first bipolar junction tran- Almost unbelievably, individuals
duce the first 256-bit
sistor. could now own their own per-
static RAM called the
sonal computer. As we shall see
1952: England. First public dis- 4100.
in future parts, the effects of
cussion of integrated cir-
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 206
Maxfield & Montrose Interactive Inc
Special Feature
these developments are still un- NEXT MONTH (MCMs) really deserve an article
folding, but it is not excessive to in their own right. Image capture
say that electronics in general, In Part 3, we shall consider the and display technologies like
and digital computers in particu- development of communications charge-coupled devices (CCDs),
lar, have changed the world in the 20th Century. cathode ray tubes (CRTs), liquid
more significantly than almost crystal displays (LCDs) and so
any other human invention. forth are certainly entitled to be
HUMBLE acknowledged.
APOLOGIES Devices and techniques such as
MORE INFO
Before you reach for your pen or masers, lasers, fiber optics, mag-
The way in which components computer keyboard to send us a netrons (leading to both Radar
like transistors and integrated stern letter of chastisement, we and microwave ovens), mercury
circuits perform their magic is crave your indulgence and ask delay lines and magnetic core
discussed in greater detail in Be- you to accept our humblest stores also deserve a hearing.
bop to the Boolean Boogie (An apologies for all of the things we And of course a tremendous vari-
Unconventional Guide to Elec- had to leave out. The history of ety of other technologies, ranging
tronics), while the history of the cunning devices such as light- from plastics to storage
early computers is discussed in emitting diodes (LEDs), laser (batteries), have all played a large
more detail in Bebop BYTES diodes, phototransistors and part in the evolution of electronics
Back (An Unconventional Guide suchlike would make fascinating as we know it today.
to Computers). By some strange reading. Unfortunately, space limitations
quirk of fate, both of these
Who could deny that intercon- meant that when “push came to
books are available from the
nection and packaging technolo- shove” we had to make some
EPE Online Store at
gies like printed circuit boards stern decisions. And when one
www.epemag.com
(PCBs), flexible circuit boards, peels the outer layers away, it be-
hybrids, and multichip modules comes obvious that the three ab-
solutely core electronics develop-
ments of the 20th Century are the
vacuum tube, transistor, and inte-
grated circuit, as discussed
above. Of course, if you disagree
(or if you simply crave more once
this series is finished), please feel
free to vent your feelings by inun-
dating the Editor with your letters
and emails.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 207
Maxfield & Montrose Interactive Inc
PART PART 5 – Waveforms,
Frequency, and Time
by John Becker

What we are doing during this Teach-In In the first four parts we discussed (and
2000 series (of at least 10 parts) is to lead you gave you practical experience of) several types
through the fascinating maze of what of commonly used electronic components.
electronics is all about! We are assuming that Last month we also showed you how to
you know nothing about the subject, and are interface your experimental circuits to a PC-
taking individual components and concepts in compatible computer, allowing pulse
simple steps and showing you, with lots of waveforms to be displayed on the screen. We
examples, what you can achieve, and without it now discuss other waveforms and how to
taxing your brain too much! observe them on your PC, adding just one
more component to your breadboard.

Greetings again! We expect discuss a little more fully not just parallel port to your breadboard,
you’ve got your breadboard cou- the above two programs, but without the oscillator connected
pled to the computer, all powered- also the preceding one, Parallel to any of the five input points
up and ready to go. But, wait, is Port Data Display/Set. In doing (IN0 to IN4).
the oscillator on your breadboard so we shall also introduce you to
the same as that described in the first of several concepts in
Digital Logic, that of the AND INPUT REGISTER
Fig.4.1 and Fig.4.3 of Teach-In
Part 4 last month? If not, make it function. Now look at the Direct Input
so, then we’re ready to start… From the main menu, call Byte box on the screen (Photo
up the Parallel Port Data Dis- 4.8 last month). What you
play/Set program to your should see is the Original Byte
MAKING WAVES screen. Connect the computer’s value shown as 10000xxx binary
Last month, we left you with (where x can be either 1 or 0).
the suggestion that you should
explore two of our simulation pro-
grams: Computer as Frequency
Counter and Pulse Input Wave-
form Display. (Remember that this
software is available for free
download from the EPE Online
Library at www.epemag.com,
Ed.)
In the second of these pro-
grams, at some stage of your ex-
perimentation, hopefully you pro-
duced a screen display that looks
something like that in Photo 5.1. It
is waveforms that are the main
subject of our discussion this
month.
Photo 5.1. Typical pulse waveforms input to the
Before that, though, we shall computer via the simple interface board.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 208
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
Bit Power Decimal Binary This type of manipulation therefore bit 4 is high. Conversely:
can be extremely useful when
7 27 128 10000000 using the computer as an item Register value = 01001000
6 26 64 01000000 of test gear to monitor a digital (decimal 72)
5 25 32 00100000 circuit. AND value = 00010000
4 24 16 00010000 (decimal 16)
3 23 8 00001000 ANDed answer = 00000000
FREQUENCY
This indicates that the com- (decimal 0)
COUNTER therefore bit 4 is low.
puter’s input port register (a spe-
cial form of digital storage de- It is also possible to read the
status of each register bit by Thus all that is needed to iso-
vice) believes that its eight bits
ANDing it with particular binary late the status of a bit is to AND it
are at the logic states shown.
values (a Binary Logic subject with the required value. If the bit is
Your breadboard interface coming in Part 6), and this is low an answer of zero will result; if
circuit only uses five bits, but what is done in the Computer as it’s high an answer greater than
which five of the eight bits ap- the Frequency Counter pro- zero will result. So you simply
parently available? Probably check whether or not the answer
gram. Call it up from the menu,
from your experiments you al- is zero and act accordingly. The
and couple your oscillator IC1a
ready know the answer, the left- AND command/facility is a power-
pin 2) to IN0 as you have done
hand five, bit 7 to bit 3 are those ful tool in computing and electron-
before. It is best if diodes D2
used in connection with bread- ics.
and D3 are omitted and a 1kW
board inputs IN4 to IN0.
resister used in position D3 Note that in the computer pro-
As far as the computer is (also as you’ve done before). gram that actually controls what
concerned, bits 2 to 0 are not to you are now seeing on screen,
do with data input (what their You will have discovered
binary values cannot be recog-
logic values are depends on that the program only responds
nized as such, consequently the
your computer system – the au- to frequency input signals from
decimal equivalent is that used in
thor’s various computers return one interface input path at a
the Frequency Counter program.
different values). time, and that for this path to be
seen as active by the program, This program has been writ-
What might also be puzzling the Active Bit in the screen box ten to isolate the bit as selected in
you (although you’ve possible has to be appropriately set from the screen box and to detect each
just shrugged your shoulders the keyboard (key <B>). Each time it changes state during a pe-
over it and thought that’s the active bit has an associated riod of one second, dividing the
way it is), is that bit 7 is always AND value stated – each value answer by two to find out how
set at the opposite logic to what is one of the powers of decimal many times the bit has been high
you expect through connecting 2: in that period. This result is dis-
signals to IN4 on the board. played on screen as the
Well, you’re right, that is the way When ANDing one binary
(approximate) frequency at which
number with another, individual
it is, bit 7 is inverted by the com- your oscillator is running.
bits in the answer will only be at
puter. The internationally agreed unit
logic 1 if the same bit in both
Underneath the upper boxes starting values is also at logic 1. of frequency is the Hertz, abbrevi-
is the correction formula used to If either or both bits are at logic ated to Hz, as shown on the
change the value directly re- 0, so the same bit in the answer screen. (Strictly speaking, Hertz in
ceived by the port register (box will also be at logic 0. For exam- this context should be written with
1) to that in box 2, Corrected In- ple, to test for bit 4 being high in a lower-case initial – hertz.) In the
put Byte. The meaning will be- a register that probably has present example we have a fre-
come clear after Binary Logic other bits set as well (bits 3 and quency of 1Hz (one cycle per sec-
has been discussed in Part 6. 6 in this example): ond. Back in history, frequency
Basically, all that is being done was actually defined in cycles per
is to re-invert bit 7 and shift all Register value = 01011000 second – CPS or C/S).
the bits along to the right by (decimal 88)
three places. This allows the AND value = 00010000
correct logic on all five bread- (decimal 16) PULSE DISPLAY
board inputs to be seen as such ANDed answer = 00010000 In the Pulse Input Waveform
in box 2, as the New Byte. (decimal 16) Display program (call it up on
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 209
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
t
screen), AND is again used to HARMONICS (A) TRIANGLE
isolate the selected bit. In this t

case, though, the result causes We would now like to illus- t


POSITIVE-GOING
the drawing of a horizontal line trate a problem that can occur (B) RAMP

to represent the bit’s status, high when monitoring a waveform,


t
or low. The “vertical” line is sim- and one which can also affect NEGATIVE-GOING
(C) RAMP
ply drawn by the program at the the correct response when digi-
detected transition between tal electronic circuits are used in t

logic levels. real-life situations – that of rela- (D) SINEWAVE

tive rates of response between t


Having completed one t
one circuit and another. The ef-
crossing of the screen, the (E) SQUARE WAVE
fectiveness of the illustration on
waveform re-commences on the t
screen, though, rests on how t
next allocated path, erasing any
fast your computer is running. If (F) REGULAR
previous waveform. The rate of PULSE
it runs too slowly, it may be diffi- t
transition is selectable via the
cult for the required effect to be
Display Step option (note that
produced. Nonetheless, let’s try (G) IRREGULAR
PULSE
this does not actually change
it.
the rate at which the register in-
put is examined – sampled – it First, set your oscillator to a (H)
COMPLEX
just changes the distance the slow speed so that the individual
line travels for each sample). It pulses (as square waves – Fig.5.1. Examples of wave-
is not possible to assess fre- equal length highs and lows) are
form types. Frequency mea-
quency from this display (a true clearly seen and with wide spac-
ing. It is probably best to select surements can be assessed
oscilloscope would allow this to
a Display Step value of 10 (use for periods arrowed for (A) to
be done, however).
the <+> key). (F), but cannot be meaning-
The facilities offered by this fully measured for irregular
display and the previous pulse Slowly increase the oscilla-
tor’s rate and watch the pulses or complex waveforms.
counting program can be of
great use when testing other cir- close up to each other (you may that you can probably not distin-
cuits in the future. need to change capacitor C1 to guish between them.
a smaller value). Eventually, the
pulses will be so close together Continue to increase the fre-
quency – what you should see
next (your computer’s sampling
speed permitting) is that as you
increase the frequency, the
waveform spaces start to widen,
probably with uneven spacing
(see Photo 5.2). Why?
The answer is not that your
oscillator has decided to run er-
ratically or more slowly all of a
sudden. What is happening is
that the computer now does not
have time to respond to each
pulse. So what you are seeing
on screen is a sub-harmonic of
the actual frequency being moni-
tored. The unevenness of the
spacing is due to the computer’s
Photo 5.2. Example of “under-sampled” pulse wave- sampling rate and the speed of
forms into the computer via the simple the oscillator not being synchro-
interface board. nized.
If you try this with the Fre-
quency Counter program, you

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 210
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
will see the apparent frequency
rate change downwards as the
transition to sub-harmonic sam-
pling occurs.
It is even possible that as
the oscillator’s frequency is in-
creased still further, sampling
may occur on every third pulse,
or every fourth pulse, and so on,
almost indefinitely. It is unlikely,
though, that our demonstration
program will actually allow you
to go beyond one-in-three.
This situation is one that you
have to consider very carefully
when using a frequency counter
or oscilloscope (whether as true
items of test equipment, or as
computer-based sampling pro-
grams). It is also something to Fig.5.3. Relationships between upper and lower sections for a
be considered when you start uniformly alternating waveform.
designing digital logic circuits –
can all the digital integrated cir- Examples of seven different Press the up-arrow key so
cuits keep pace with the rat types of waveform will be seen that the orange background is
e at which others expect them on screen (see Photo 5.3 and on the square wave.
to? Highly unpredictable results Fig.5.1) as follows: Note the point at which any
can occur if they can’t!
o) Triangle one of the pulses first becomes
Not only does the problem high and the point at which it
reveal itself in digital electronics, o) +VE Ramp (positive-going
ends being low (and the next
but you can also experience al- ramp – upwards)
pulse commences). You will see
lied situations when dealing with o) –VE Ramp (negative-going that the square wave has a
analog signals – a signal at one ramp – downwards) white box around it to indicate
frequency adversely (or desir- o) Sine this period. In Fig.5.1 it is repre-
ably in some cases) affecting a o) Square sented by the “t” arrows.
signal at another. o) R-Pulse (regular pulse) This period is known as a
In a future part we shall o) Complex cycle. On screen you will see
show you how two analog sig- that it takes just one second.
nals respond to each other. In fact an eighth waveform When a waveform consists of
is available via the screen – many equal length cycles its fre-
press the down arrow key three quency is defined as the number
WAVEFORM TYPES times. Where R-Pulse was will of cycles that occur in one sec-
DISPLAY now become I-Pulse (Irregular ond, which, as we said a few
Pulse) and the pulses will be paragraphs back, is expressed
Put your breadboard assem- seen to be very irregular.
bly to one side for the moment in Hertz.
(you’ll need it again for the Ex- In the right-hand box you will
perimental article, though). Let’s SCALING AND CAL- see that the time (t) for one
show you examples of some dif- pulse and its consequent fre-
ferent waveform types. We shall
CULATIONS quency (f) is stated:
also explain how you can do The screen display is
some simple calculations in re- scaled, at present to represent a t = 1 secs, f = 1Hz
spect of frequency and time. period of 10 seconds from the
Press key <X> to change
From the main menu select Fre- start of any waveform to its end.
the screen’s scale to 1 second.
quency and Time (well, what Vertical dotted lines indicate the
Each vertically dotted interval is
else?!). 1-second interval points.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 211
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
now 0××1 seconds. The frequency arate each frequency and its forms. Timing measurements
represented is therefore 10 cycles amplitude out from the main can then be taken between any
per second – 10Hz. The right- waveform requires very complex two or more points where the
hand box confirms this. equipment (such as a frequency horizontal and waveform lines
analyzer – expensive!). cross.
You/we have been able to do
the conversion from time to fre-
quency in our heads, almost in- WELL-DEFINED SELF-TEST
stinctively. As shown in the box,
though, there is a formula for it: It should also be obvious For a bit of timely entertain-
that even with a well-defined ment, we’ve added a Self-Test
f = 1/t waveform, you need to be able option to test your use of time
to time the complete period of a and frequency calculations –
Conversely, if you want to find cycle. It does not matter, though, press <S> to enter or exit it.
out the cycle period (time) of a at which point you actually start
waveform whose frequency you the timing.
know, the formula becomes:
With the square wave you
CYCLE POWER
t = 1/f can start timing as the pulse In Part 3 we explained that
rises (at its leading edge) and the amount of current consumed
Press <F> and this formula end at the start of the leading by a circuit can be defined ac-
will be shown, together with the edge of the second pulse. Alter- cording to the voltage applied
calculated answer. natively, you can start as the across it and the resistance
Press any of the <+ – * /> pulse falls (at its trailing edge) through which it flows, I = V/R.
keys to expand or contract the and end as the next pulse’s trail- When the voltage is at a nice
waveform, and variously swap be- ing edge begins to fall. The steady DC level and the resis-
tween the two formulae using white outline box on the wave- tance is constant, the current
<F>. The units in which f and t are form illustrates this point when drawn is the same at all instants
expressed are changeable by us- you set it to lower frequencies of measurement.
ing <U>. (also see Fig.5.1). If we want to calculate cur-
These formulae can be ap- When looking at a wave- rent (or any of the factors de-
plied to any regular waveform, in- form on a screen (whether it is a fined in Ohm’s Law and its
cluding the first six on screen (and computer screen as in this simu- derivatives – Part 3) in relation
in Fig.5.1). With irregular wave- lation, or an oscilloscope to a changing voltage (e.g.
forms, such as those for I-Pulse screen), the commencement of waveform) rather than steady
and Complex, periodic time and a cycle does not necessarily oc- conditions, the situation be-
frequency for the waveform as cur where you first see the comes more complex.
whole cannot be ascertained. waveform appear; the cycle may For any particular instant,
All that can be assessed from have started long before the we can of course say that condi-
the irregular pulse, for example, is screen responded to it. Always tions are constant at that instant,
the period of any individual pulse. take a measurement when it is and calculate accordingly. How-
In terms of overall frequency of obvious where the exact start of ever, we often need to know the
the waveform, this answer is the cycle occurs. Our simulation current drawn over a period of
meaningless. program, you will notice, takes time, rather than instanta-
this into account. neously.
It is possible, of course, to
use a frequency counter with this Examine the position of the With a square wave or regu-
irregular pulse chain and deter- white box for all the waveforms lar pulse waveform, average
mine the number of pulses that that can display it and observe current can be calculated ac-
occur in any 1 second, but the an- at which points of a cycle mea- cording to the period for which
swer for each 1-second sampling surements may be taken. the pulse is high (full current
period is likely to be different. It is worth noting that most flow) relative to the period for
oscilloscopes have a facility for which it is low (minimum current
With the complex waveform,
placing a horizontal line across flow).
there are in fact a great many dif-
ferent frequencies involved in its the screen. This can be moved When the pulse is changing
make up, but they are all likely to up or down and placed so that it between 0V and a known volt-
be at different amplitudes. To sep- crosses any point on the wave- age value, it’s just a matter of

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 212
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
D C
ratios of the on to off (high to or current) by the length (time)
low) periods of the pulse. (A) and divide by two, e.g.:
For example, if a 0V to +5V A B Iav = Imax x Tcycle/2, or:
pulse is high for 0××5 seconds AREA OF RECTANGLE ABCD = AB x BC OR DC x AD Iav = (Imax/2) per cycle time
and low for 0××5 seconds (i.e. a AREA OF TRIANGLE ABC = AREA OF TRIANGLE ADC
= (AB x BC)/2 OR (AD x DC)/2

square wave), we can say that C Suppose a peak current of


the average current drawn in 100mA is drawn when power is
one second is half that which (B) supplied by a triangular wave-
would be drawn if the maximum form alternating between 0V and
current flowed for 1××0 seconds. A
B
E
+5V and the cycle period is 1
AREA OF TRIANGLE AEC = ((AB x BC)/2) + ((BE x BC)/2) second. The minimum current
If the on-off periods are not OR (AE x BC)/2
drawn is zero. Therefore the av-
equal, the formula used is just:
VE erage current drawn is simply
Average Current = On Period/ (C) VPK
100mA/2 = 50mA per second.
Cycle Period x Maximum Cur- If the waveform is alternat-
0V
rent. T ing between two other levels, a
AVERAGE VOLTAGE FOR PERIOD T = VPK/2 similar principle applies, but re-
For the above example, and SIMILARLY AVERAGE CURRENT FOR PERIOD T = IPK/2
quires just a bit of extra calcula-
assuming a continuous maxi- Photo 5.2. Example of tion. Suppose, for example, that
mum current of 2 amps, this re- “under-sampled” pulse wave- the waveform causes the cur-
lationship becomes: forms into the computer via rent to alternate between 100mA
Iaverage = Ton/Tcycle x Imax = 0×5 sec/ the simple interface board. maximum and 20mA minimum:
1 sec x 2 amps = 1 amp per First take the difference be-
The maximum peak current is tween the two extremes: 100mA
second.
a predictable or measurable value – 20mA = 80mA. The average
(that when the voltage is at its of the current difference for this
TRIANGULATION maximum), so too is the minimum waveform is 80mA/2 = 40mA.
current (that when the voltage is But there is the “standing” cur-
For waveforms such as tri- at 0V, i.e. a current of zero amps).
angle and ramp, the calculations rent of 20mA, which has to be
are just as simple, irrespective Consequently, when a trian- added to the average difference.
of their relative rise and fall gular waveform is alternating be- Thus the overall average current
times. tween 0V and a given maximum drawn = 40mA + 20mA = 60mA.
voltage, the average current What happens, though, if
By definition, the voltage of drawn during one cycle is half that
triangle waveforms rises at one the waveform is evenly alternat-
of the peak current. ing between –6V and +6V, for
constant rate, and falls at an-
other constant rate. This is true Do you remember from example? Instinct might just
irrespective of the relative rates school days how you found the suggest that if 100mA is drawn
of rise and fall for the waveform. area of a triangle having sides of at +6V, then –100mA is drawn
different lengths? (See Fig.5.2.) at –6V, thus the average current
In the case of a uniformly- The principle for finding average drawn is zero. But, you might
shaped triangle (isosceles – current per unit of time in respect wonder, doesn’t that mean the
having two equal sides), rise of a triangular waveform is the battery would never run down?
and fall periods are equal in same: multiply the height (voltage Sadly, not so…
length. Note that a ramp wave-
form is a special case of trian- VE
It’s certainly true to say that
gle, in which the vertical edge VPK (1) the average current or voltage
occurs instantaneously, making 0V value of a waveform which alter-
VPK (2)
the ramp duration the same as nates symmetrically above and
VE
the cycle period. (In fact an in- T below a zero value will be zero if
stantaneous change in level VPK (1) = VPK (2)
measured over a long enough
never occurs in electronics – AVERAGE FOR PERIOD T = VPK (1)/2 period, although this does not
every change takes some Fig.5.3. Relationships be- mean that the power consumed
amount of time, no matter how tween upper and lower sec- is zero.
small, see Part 6 next month.) tions for a uniformly alternat- When it comes to express-
ing waveform. ing an average in relation to a
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 213
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
triangular waveform uniformly NEXT angle VE

alternating above and below a averagevolts = totalvolts / 180 PK x 0 707


PK x 0 636 VPK VPK PK
VAV VRMS
zero point, it is usually taken as PRINT averagevolts 0V TIME
the average over just half of a
cycle, not over the full cycle. The The answer now will be
half cycle can be either on the 0××6366036V (approximately), VE

negative or positive side of the say 0××636V. Fig.5.4. Definition of the four
zero midway level. The effective
answer is same. (See Fig.5.3.) value relationships for a pure
SINE WAVES sine wave.
However, what we can say
with respect to both sides of the Since sine waves are obvi- Vav – as said in the previous
waveform is that it has a peak- ously subject to a different set of section, a sine wave’s
to-peak value twice that of its rules to triangle waves, let’s ex- average voltage is that
peak value. The peak value in amine them a bit more closely. taken over one complete
the previous example is 100mA, From the main menu select Sine half-cycle. We showed
therefore its peak-to-peak value Wave Value Relationships. that it has a value 0××636
is 200mA. Photo 5.4 shows what you times that of the peak
should see displayed. voltage.
WAVING PROOF The relationships we now Vpk-pk – the peak-to-peak volt-
discuss are specifically those age is obviously twice
If your computer has Quick- with regard to pure sine waves. that of the peak voltage
BASIC or QBasic installed, you They do not apply to any other (Vpk).
can prove for yourself that for a type of waveform. Furthermore,
triangle wave the average volt- if you see any waveform rela- Vrms – well, first we had better
age or current for one side of its tionships referred to anywhere explain the concept of
ramp is half the peak value, us- and the shape of the waveform RMS:
ing the following BASIC routine: is not actually stated, then the
ramplength = 10: ’ (seconds) relationships are assumed to RMS VALUES
refer to sinusoidal conditions.
totalvolts = 0 You have discovered in ear-
FOR volts = 0 TO ramplength Looking at your screen dis- lier parts that when a current
STEP 1 play (and Fig.5.4), you will see flows through a resistance,
the representation of a pure sine power is dissipated. We went on
totalvolts = totalvolts + volts wave swinging symmetrically
NEXT volts say that heat is generated by
above and below a zero level that dissipation. For a fixed re-
averagevolts = totalvolts / ram- and plotted horizontally with re- sistance, and steady (DC) volt-
plength spect to time. Four vertical ar- age or current, the heat gener-
PRINT averagevolts rows indicate four major rela- ated is calculable – often ex-
tionships exhibited by a sinu- pressed in watts (see Part 1). In
You will get an answer of soidal voltage waveform:
5V. the Ohm’s Law section (Part 3)
o) Vpk peak voltage you saw that power can be cal-
Now do the same for a half culated in several ways, such as
a sine wave (having an angular o) Vav average voltage
P = I2 x R, P = V2/R, and P = I x
change of 0° to 180°) and whose o) Vpk-pk peak to peak V.
peak voltage is 1V. Remember voltage
An RMS (root of the mean
that the sine of 0° is 0 and that o) Vrms r.m.s. voltage
square) value states the effec-
the sine of 90° is 1. tive value of alternating current
Vpk – the peak voltage is that
relating to just one half of or voltage in terms of the heat
CONST pi = 3.141592653589# /
the cycle. Since a sine that will be generated through a
180
wave is symmetrical resistance. By definition, the
volts = 1 value is that which will produce
above and below 0V, Vpk
totalvolts = 0 is the same whatever the same amount of heat in the
FOR angle = 0 TO 180 half (positive or negative) resistance as would a direct volt-
totalvolts = totalvolts + of the waveform is mea- age or current of the
(SIN(angle * pi)* volts) sured. same magnitude.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 214
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
Any waveform shape can be
related to an RMS value, but the
SELF-TEST
value is really only meaningful Finally for this month’s Tutorial – through the Self-Test option the
when referred to a known computer randomly selects sine wave related questions. You are ex-
shape. For a sinusoidal wave- pected to use your calculator, and then compare your answer to the
form the RMS value is 1××414 computer’s, which will be displayed when you press <A>. You can
times the peak value. cheat a bit if you want by changing the values offered by the com-
puter!
And thinking of changing values, do please read and digest our
SINE WAVE RELA- “measured observations” discussion in Panel 5.1 following the Experi-
TIONSHIP mental section.
The four sine wave units of
measurement listed in the previ- EXPERIMENTAL
ous section have their relation-
ships tabulated at the bottom of In this month’s Experimental section we show you how to add an-
the main screen box displayed. other circuit to the interface board. This allows you to actually view on
screen the various waveforms you’ve been generating with the vari-
The screen display relation- able mark-space oscillator of Fig.4.3 last month,
ships are interactive (although
the waveform itself is not). Each These include triangle, rising ramp, falling ramp, square wave,
formula can be selected using and regular pulse. Sine waves, irregular pulses and complex wave-
the four keyboard arrows. Vari- forms we shall illustrate via your breadboard later in the Teach-In se-
ous values can also be set ries.
through the smaller left-hand
box. Thus you can have the NEXT MONTH
computer calculate relationship
answers in respect of values of In Part 6 next month, we return to Binary Logic (briefly discussed
your choosing. when the Parallel Port Data Display/Set program was described). The
discussion will include Digital Logic Gates – OR, NOR, XOR, XNOR,
On entry to the screen you
AND, NAND. As usual, the screen displays will be interactive.
will see a highlight on Pk x
0××636, allowing you to find the
average value (AV = ) when the
peak value is known. Referring TEACH-IN 2000
to the values box, Pk is shown
as 1V. At the top of the main
box is shown the answer to the
EXPERIMENTAL 5
calculation, in this case the ANALOG-TO-DIGITAL CONVERTER
same answer that we illustrated
earlier with the BASIC sine wave
We are now going to describe a very simple circuit that you can
calculation example.
assemble on your breadboard, and which will allow you to use your
We suggest you experiment computer to view various analog waveforms, such as the triangle and
with the different formulae and ramps discussed in this month’s Tutorial. It is capable of displaying
values of your choice (the op- other waveforms as well.
tions vary depending on the for-
mula). Try to memorize some of However, we won’t try to deceive you – the circuit is highly useful,
the formula (two useful ones are but it’s also very limited!
AV = Pk x 0××636 and Pk = RMS Commercial equipment such as oscilloscopes, or commercial
x 1××414). The scaling of the val- software for computer-based virtual ’scopes will do far more than our
ues is changeable using <X>. simple demo software. The author’s Virtual Scope project of EPE Jan-
Feb ’98 is also an extremely sophisticated item of computer-based
You will find this facility to be test gear, but it has to be said that the construction of its complex
of enormous value when you printed circuit boards is not suited to novices.
design your own circuits in the
future (or wish to analyze those The intention of the Teach-In analog interface is basically to let
of other designers). you view the various waveforms that you create on your breadboard.
However, it can be used not only with the demo circuits we describe
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 215
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
throughout this Teach-In series,
but it will be of use with some of
your own future designs.
Should we have space later
in the series, we’ll describe the
sort of facilities you should ex-
pect from a fully-fledged oscillo-
scope (and which need not be
very expensive).

ANALOG
INTERFACE
A very simple analog-to-
digital converter (ADC) inte-
grated circuit (IC) is the only ac-
tive component in this part of
your interface assembly. The
circuit diagram for its connec-
tions is shown in Fig.5.5. Photo 5.6 Typical analogue waveform as demonstrated us-
We shall discuss the nature ing the complete interface circuit
of the ADC (IC2) later on in this ANALOGUE TO DIGITAL CONVERTER
PIN COMPUTER
article. In the meantime, we 6V BLOCK CONNECTOR
want you to assemble the circuit TB1 SK1
on the breadboard and have a 1 8
REF VE
look at some waveforms on your SIGNAL 2 IC2 7 1 OUT 0 D0
VIN TLC549 CLK 1
screen. INPUT 3 6 12 IN 1 SELECT
REF D OUT 13
The breadboard layout for 4
CS
5 2 OUT 1 D1
2
GND
the ADC (and the computer in-
terface from last month) is 14 GND GND
shown in Fig.5.6. Assemble the 0V 16
components into the bread- (BATTERY VE)

board, following the latter’s num- Fig.5.5 Circuit diagram for the serial analog-to-digital con-
bered holes. verter interface.
The oscillator should be
same as that referred to at the
start of this month’s Tutorial (i.e.
with diodes D2 and D3 in-
cluded). Use a 100uF capacitor
for C1 and adjust preset VR1 to
a midway position.
Connect the resistor/capaci-
tor junction on the oscillator
(IC1a pin 1) to the ADC at its
input pin 2 (Signal Input as
shown in the breadboard lay-
out). Also connect the ADC’s
data output pin 6 (D OUT as
shown in Fig.5.5) to IN1 on the
computer interface part of the
board. Crocodile-clipped links
will do in both cases.
Photo 5.5. Detail of the interface board with the ADC included.
Power up the board and run
the Analog Input Waveform Dis-
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 216
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
play. On entry to the display, a than does the Direct method. single 8-bit byte. Parallel ADCs
yellow line should be seen The drawback is that there is a are much faster to read than se-
traversing the screen from left to pause between each full screen rial types, but require more com-
right, its vertical position moving change of data (computer speed puter control and data lines than
up and down. Adjust VR1 (or dependent). we have (readily) available for
change the value of C1) until the Experiment with different your Teach-In breadboard.
moving line begins to show sev- oscillator frequency rates and To start each voltage level
eral cycles of a triangular-like waveforms, using preset poten- sampling and digital conversion,
waveform, as you saw demon- tiometer VR1, and different val- the computer sets the ADC’s CS
strated in the simulation pro- ues for capacitor C1. Also find input (chip select) high via out-
gram Frequency and Time, see out how Direct/Capture and Dis- put data line D1. This action
Photo 5.6. play Rate settings have their causes the ADC to “read” the
Should the yellow line just benefits. Note that each time the voltage present on its signal in-
be sitting towards the bottom of Display Rate is changed, the put (Vin) at that moment.
the screen, check that the Port waveform line restarts from the The ADC has an internal
register selected is still the cor- left of the screen. high-speed oscillator that then
rect one (as discussed in Part Also see whether you can controls the data conversion
4). Also double-check that your replicate some of the stranger process. (Incidentally, chip is a
ADC’s breadboard assembly waveforms you have seen term frequently encountered in
corresponds to the connections through the ADC-Demo pro- electronics and is colloquially
shown in Fig.5.6, and that the gram. (It has to be said that used to mean any integrated cir-
oscillator is still correctly assem- those of you with higher-speed cuit device.)
bled. computers will fair more easily The result of the conversion
Towards the top right of the since the waveforms will be is a binary number between
screen is shown the Display traced faster on the screen.) 00000000 and 11111111
Rate, 10 at the moment. Using Just for interest, try connect- (decimal 0 to 255). A conversion
the <+> and <–> keys, this can ing the oscillator’s digital output value of zero results from an in-
be set to any value between 1 (F OUT, IC1a pin 2) to the ADC put voltage of zero. The maxi-
and 10 and controls the rate at instead of the analog waveform. mum conversion value of 255
which the waveform line crosses occurs (in this breadboard as-
the screen. The slower the rate, sembly) when the input is at the
so more waveform cycles are SERIAL ADC DEVICE same voltage level as the ADC’s
shown. power supply. This conversion
As the Analog-to-Digital
Note that changing this rate Converter’s name states, it al- range is determined by the volt-
also changes the rate at which lows an analog signal (e.g. volt- age levels to which the ADC’s
data is acquired (sampled) from age waveform) to be input, and +REF and –REF pins are con-
the ADC. We shall discuss ana- converts the voltages to equiva- nected (6V and 0V in this case).
log sampling in a moment. lent binary numbers. You saw in In other applications, the
Also at the top right of the Part 4 the representation of a pins may be connected to other
screen is the single word DI- number in both binary and deci- reference voltages to provide a
RECT. This means that data is mal (Parallel Port Data Display/ different conversion range. The
being sampled in real-time (here Set). reference voltages must lie at or
and now). The ADC is capable of between the power supply volt-
By pressing <C> the word “reading” the voltage level at ages. (Note that the maximum
CAPTURE appears instead. In many thousand times per sec- voltage at which this ADC can
this mode, the computer sam- ond and is controlled by logic be powered safely is +6××5V.)
ples the data as fast as it can level signals from the computer
and temporarily stores it in (or other device in other applica-
memory. Once a full set of sam- tions). The ADC used in this READING BITS
ples (640) has been received, Teach-In demo is a serial ADC, Once conversion is com-
the computer then plots them as which means that its output data plete, the binary data can be
a screened waveform. is read one bit at a time. read bit-by-bit by the computer.
This technique allows higher Parallel ADCs also exist, in It is read in order of bit 7 to bit 0
speed waveforms to be sampled which the 8-bit data is read as a of the binary conversion value.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 217
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
(In theory, about 40,000 conver-
sion and data-read cycles per
second can take place – but not
with this Teach-In demo!)
To read each bit, the com-
puter takes the ADC’s CLK
(clock) pin high via output line
D0 (OUT0). The data is then
read from the ADC’s Dout pin
via the breadboard’s IN1 path –
computer parallel port register
bit 4.
The data on register bit 4
will either be at logic 1 or logic 0.
As discussed when we de-
scribed the data input process in
Part 4, the value of the bit is iso-
lated from the other register bits
(using an AND command) and
set into the rightmost (bit 0) po-
sition of the 8-bit binary value Photo 5.7. Analog-digital-analog demonstration screen. You
being assembled by the com- can observe each bit being “assembled” to a binary number,
puter. Between each bit, the
value is multiplied by two to shift
and change the sampling step rate.
all the bits left by one place. be referenced so as to generate
ADC DEMO
The computer then sets the an output of 0 for 0V and 255 for
ADC’s CLK line low, causing it Run the Analog-Digital- +5V.
to set the next bit of its binary Analog Demo program from the
The ADC is shown con-
conversion onto the output pin. main menu to see the animated
nected to the computer. At pre-
Taking the CLK line high again principle of how the ADC con-
sent, the immediate ADC binary
allows the computer to now read version is output from your
value is repeated as the com-
this bit, and so on for all eight breadboard to the computer
puter’s received value. The
bits. (see Photo 5.7).
computer then feeds this value
At this point, the computer The left-hand box (Input) into a Digital-to-Analog Con-
does whatever it has been told shows a single sine wave, cy- verter (DAC). DAC devices will
to do with the data, in our case it cling between 0V and +5V. It is be discussed another time – this
either stores it or draws a shown feeding into the serial one converts the 8-bit binary into
screen line in relation to it. After Analog-to-Digital converter, an equivalent output voltage, in
which the next sample can be where the present voltage level this example having the same
taken. is given, together with the ADC scale as the ADC.
conversion value in both decimal
As an example of the com- Also at present, the DAC
and binary. For the sake of this
puter’s data acquisition routine, shows the same values as the
demo, the ADC is assumed to
take the conversion value of bi- ADC, and the resulting wave-
nary 10010111 (decimal 151). ADC Assembled form is displayed in the right-
The computer first sets its data Step hand box (Output).
Value Value
storage value to 0 (00000000). To see how the computer
The reading routine results in 0 10010111 00000000
reads in the ADC’s binary con-
the following binary values of the 1 00101110 00000001
version value bit, press <B>.
chip and the assembled data 2 01011100 00000010
3 10111000 00000100 Note how the left-hand ADC
storage:
4 01110000 00001001 bit (bit 7) drops down and
The computer’s assembled moves right to insert itself into
5 11100000 00010010
value at step 8 is the same as bit 0 of the computer’s storage
6 11000000 00100101
that of the original ADC conver- value (which starts off at zero for
sion value. 7 10000000 01001011
each cycle of eight bits).
8 00000000 10010111
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 218
Maxfield & Montrose Interactive Inc
TEACH-IN 2000

Photos 5.9 and 5.10. Exam-


ples of the screen demo set
for different waveform and
sample rates.

Press <*> a few more times


and observe the increasing dis-
Photo 5.8. Another example of the ADA demo screen, this tortion.
time showing (right) the result of using fewer sampling steps.
What is happening is that
Note also how the ADC and fests itself. the output waveform is being
storage values shift left by one “traced” horizontally across the
With binary step sampling
binary place during the copying screen at a given rate. The
off, first note the shape of the
process, with the previous bit 7 movement represents the Time
two sine waves (Waveform Rate
being “lost”. A zero value enters axis we discussed in the
1, Sample 1, as stated in the
the ADC value at bit 0 at each Resistor-Capacitor Charging
bottom text line).
shift left. Graph of Part 2, and in the
Although you will notice that waveform period timings discus-
When all eight bits have the waveforms have slightly sion in this month’s Tutorial.
been input to the computer, the rough edges, they are as close
final byte value is copied to the The sampling rate, though,
to sine waves as we can get
DAC, and the process starts is not fast enough to keep pace
with the program that creates
again by the ADC taking another with the trace, which continues
the display you are watching.
sample, with the Input waveform to show the vertical value last
Just for background interest –
having shifted slightly to the sampled until the next one is
the waveforms are plotted as
right. taken. The steps become even
180 steps (pixels) across the
more pronounced the more you
Please be aware that the screen, and 140 steps vertically
press <*>, and the less recog-
process illustrated is not in- between top and bottom wave-
nizable the output waveform be-
tended to represent the behavior form extremes.
comes.
of any particular serial ADC de- For every step made by the
vice, it is a very generalized in- input waveform, the output
terpretation. waveform makes the same step, RATEABLE LESSON
To terminate the bit-shifting i.e. the sampling rate is just right The lesson we hope you will
process, press <B> again. in order to replicate the original. take in from this is that when
However, the output wave- sampling an electronic signal,
form will become an imperfect whether it’s digital or analog, the
SAMPLING RATES copy of the input if its sampling sampling rate should be care-
While discussing pulse fre- rate is reduced – press the <*> fully chosen to obtain the opti-
quency counting in Part 4, we key once, to set a sampling rate mum results. Too slow a rate is
referred to the problems of sam- to half that of what it was obviously undesirable.
pling data at rates slower than (Sample 2). Now observe the A further example of sam-
ideal. We can now illustrate one extra jaggedness of the output pling is discussed next month
way in which the problem mani- shape. when we illustrate Logic Gates
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 219
Maxfield & Montrose Interactive Inc
TEACH-IN 2000
The word superhet is de-
PANEL 5.1 – MEASURED OBSERVATIONS rived from the term, although the
You might think, perhaps, that in order to know the true state of full term in the radio reception
affairs regarding component values, timings, voltages and currents context is actually supersonic
etc., all you need to do is take some measurements. True, measure- heterodyne – a superhet re-
ments of anything that happens in electronics can be taken, though ceiver mixes the incoming radio
for some of them extremely sophisticated equipment is needed. frequency with a local oscillator
But, and this is a big “But”, no measurement can be taken instan- frequency, to produce a specific
taneously, it’s spread over a “window in time”. Consequently, the (fixed) intermediate frequency
measurement does not show the actual state of the condition being (IF) from the which the desired
measured at a specific point in time, it simply shows an averaging-out signal can be more easily ampli-
of what might be numerous values occurring within the period of mea- fied and extracted.
surement.
Furthermore, the value reading shown on the measuring instru- DIVERSION END
ment only reveals the value to within so many decimal places, or
After that diversion, and
within an estimated fractional distance from a marker on a scale. For-
coming back to the ADC sub-
tunately, in many electronic circumstances, only a close approxima-
ject, you should now have a
tion to the actual value is needed, although there are instances when
greater understanding of what it
greater precision would be desirable.
can achieve and what its failings
There is a further important factor which affects the accuracy of can be.
measuring some aspects of electronic circuits – the measuring instru-
In addition to the subjects
ment itself can affect the characteristics of the circuit point being mea-
listed at the end of the Tutorial,
sured; significantly so in some instances, and sometimes it is neces-
next month we shall examine
sary to take ingenious steps to try to circumvent the problem, but
Sampling in greater detail. Be-
even then a degree of interference will still exist. Electronics is riddled
fore then, see what you can dis-
with practical examples of the Principle of Uncertainty!
cover for yourself about the sub-
ject with the aid of your digital
(program Digital Sampling and (from the Greek heteros, mean- and analog waveform sampling
Logic Demo is the one we shall ing “other”, and dynamis, mean- displays.
discuss in this context – see the ing “strength”).
Till next month, the author
main menu). Suppose, for example the waves goodbye and exits
Play around with other input two base frequencies are 2kHz screen-right!
Waveform Rates (<*> and </>) and 3kHz, the sum of the fre-
and Sample values (<+> or <–>) quencies is 5kHz, and the differ-
and see what you observe. ence is 1kHz. These two new CORRECTION
You’ll come across some quite frequencies replace the original Part 4, Feb. ‘00, Fig.4.6.
remarkable output waveforms. base frequencies. SK1 pin 23 should read pin 32.
In some cases, especially at It should be pointed out that SK1 pin 16 should read pin 23.
higher input waveform rates (25, the reason for the Input display The PCB is correct.
26, 44 and 59 for example – also showing heterodyning is
with Sample = 1), you will notice because it too is actually created
that another waveform appears through sampling, in this case in
to be superimposed on the top the computer simulation pro-
and bottom of the overall input gram, where the sine wave is
screen display. This illustrates calculated according to an angle
another by-product of how two count being incremented – small
frequencies can react with increments for slow waveforms,
(modulate) each other. greater for higher rates.
The result is two new fre- Nonetheless, heterodyning
quencies, one that is the sum of is a very real effect; undesirable
the originals and one that is the in some cases (audio sampling
difference between them. The for example), but highly benefi-
effect is known as heterodyning cial in others (e.g. radio recep-
tion).

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 220
Maxfield & Montrose Interactive Inc
SURFING THE INTERNET

By Alan Winstanley
Radio Bygones Message the magazine is about. Ameri- would then be cataloged and
Board can and Canadian readers are added to the enormous Al-
welcome to have a look at taVista database back home.
Welcome to our monthly www.radiobygones.com and You could also add your own
column related to Internet is- an on-line version will hopefully URL manually just to be sure,
sues. On the web site for the be produced in the very near and indeed the task of register-
print edition of EPE at future. ing one’s own URL into all the
www.epemag.wimborne.co.uk relevant search engines – there
you will find indexes listing the are some 1,500 or more of them
projects contained in issues dat- Search and you will – is now an important element
ing back to 1996, and also fur- find... an advert when creating new web sites.
ther details, including color pho- If you type in the URL (Apparently only I see the joke in
tos, of the constructional pro- www.altavista.digital.com you AltaVista’s “Add URL” confirma-
jects which have appeared in will of course be redirected to tion message stating that “this
EPE within the last 18 months or the popular search engine of Al- URL was retrieved in 4.997 sec-
so. Some readers will also know taVista, now at onds and will be added in a day
from the EPE Chat Zone that a www.altavista.com. Apart from or two.”)
full redesign is now being con- a web site refresh, the develop- In January 1998, Compaq
sidered, as the site has evolved ment of this interesting and im- (www.compaq.com) acquired
over the past four years and is portant search engine has DEC along with its Alpha micro-
getting ready for a total rebuild. largely gone unnoticed by many processor technology and the
A shopping cart system is under UK users. For the benefit of AltaVista engine, and nearly two
trial, as well. We welcome your newcomers, AltaVista was origi- years later in November 1999
suggestions and feedback by nally created by the computer Compaq announced a new line-
email regarding our Internet manufacturer Digital Equipment up of “supercomputer” Alpha-
presence to webmas- Corp. (DEC) as a showcase for based servers and workstations
ter@epemag.demon.co.uk their Unix and NT mainframes for 3D, CAD and Internet server
We have also just opened a and servers. Digital Equipment applications. Compaq hadn’t
message board system for Ra- saw their powerful search en- been idle with AltaVista though,
dio Bygones readers – check in gine as a good advert, to and the trusty old search engine
at (deep breath) demonstrate the power of their was destined for greater things.
www.epemag.wimborne.co.uk Alpha processors and servers to Very early last year Compaq an-
/radiobygones/wwwboard to search their enormous database nounced the development of Al-
leave messages or to follow up of the world wide web, and to taVista as a separate company
regarding antique radio sets or sally forth with the closest – and at about the same time it
just share your nostalgic memo- matches to a search enquiry. announced that it had pur-
ries. Advertisements from the Indeed AltaVista has always chased www.shopping.com, a
antique radio sector are also been a personal favourite, partly very popular online retailer in the
welcomed – and they’re free! because it offers Boolean com- US.
mand search options that come
Still on the subject of Radio Then in the middle of last
as second nature to many elec-
Bygones, we can announce that year Compaq announced that it
tronics enthusiasts (especially if
we have now obtained the do- had sold a majority stakeholding
you followed our series Teach-In
main of in AltaVista to the Internet busi-
98: An Introduction to Digital
www.radiobygones.co.uk and ness development and manage-
Electronics).
a web site related to our sister ment group CMGI
magazine will be open in the AltaVista’s powerful “spider” (www.cmgi.com), formerly Col-
near future. You will be able to (a network search and retrieval lege Marketing Group Informa-
subscribe online using a secure program) would traverse the tion Services. CMGI will develop
server and generally see what web in search of links, which AltaVista further into what they

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 221
Maxfield & Montrose Interactive Inc
Net Work
hope will become the world’s Disappearing URLs fledgling mail service and Inter-
largest portal. net Content Provider. This was
One potential problem immediately branded a prime
Coupled with the fact that seems to be surfacing with Al-
Compaq Internet-ready desktop example of Microsoft’s own
taVista: users are complaining (failed) attempts at Internet
PCs were to include a ready- that their own web site seems to
made link to AltaVista, it be- empire-building.
have disappeared from its list-
came clear how Compaq was ings, and this can be attributed Users and manufacturers
starting to embrace the com- to the rebuild at the end of last complained even more when
mercial forces of the Internet year. Webmasters should do a Microsoft’s Internet Explorer
and steer business the way of quick search for themselves browser was being foisted on
AltaVista. Compaq said that they (literally) on AltaVista and resub- them, to the alleged detriment of
would meld their consumer Pre- mit their URL. This option is Netscape, yet they seem happy
sario Internet PCs with CMGI’s buried in the Advanced Search for consumers to be steered
Internet services, by providing page (Add/Remove a URL). from their home desktops to-
keyboard and web browser ac- Some users have quoted a pe- wards a portal site which, with a
cess to AltaVista and other riod of up to six weeks before bit of luck, will ultimately entice
CMGI web offerings. their URL appears again, which them into breaking out their
An updated AltaVista web obviously means that they will credit cards in a “seamless infor-
site was mooted in June ’99. lose traffic or business opportu- mation and shopping experi-
The old logo and layout would nities during that time. ence” as Compaq calls it.
be replaced by a fresh new For those of you wishing to Nevertheless, AltaVista re-
number in cheerful yellow along ensure that your web pages re- mains a firm favourite as a
with all the usual portal offerings ceive a higher scoring in search search engine, although on my
of news, travel, shopping, jobs engine listings, you should have own recently redesigned web
and so on. The shopping.com a look at site (http://home-
site would also be restructured www.searchenginewatch.com. pages.tcp.co.uk/~alanwin)
and enhanced. This provides details on most of there is a Google search engine
AltaVista has already grown the commonest engines and installed on my “Links” page.
into a key portal site, which was other tips. Google is tremendously fast and
rated at the ninth largest domain slick, with none of the portal
It is interesting that there
on the entire Internet in early padding of AltaVista.
seems to be no objection to
1999, and conveniently accessi- Compaq’s eagerness to provide You can contact me, as al-
ble from Compaq desktop PCs. a direct link to AltaVista, which ways, by email at
A quick look at the Compaq Pre- by Compaq’s own admission is alan@epemag.demon.co.uk
sario web pages also intended, in turn, to route
(www.compaq.com/mypre- consumer Internet traffic to e-
sario/internetservices/) on commerce sites (to the tune of
“How to Search” takes you di- several million hits over Christ-
rectly (surprise) to My AltaVista, mas 1998 alone). Yet many PC
where users are encouraged to users rebelled when Windows
configure a start-up page. 95 included a direct and un-
wanted desktop link to MSN, its

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 222
Maxfield & Montrose Interactive Inc
its operation. The symmetry is
by ALAN WINSTANLEY and IAN BELL so important that in order for this
circuit to work well the two
Our surgery writers continue their exploration of transistors must have exactly
operational amplifiers by delving into the innards of the same characteristics, i.e.
typical devices to explain basic opamp principles of they must be matched.
operation. These characteristics must
remain matched all the time –
A few months ago now compensation, and finally an something that, given the high
readers Mohab Refaat and output buffer providing power temperature sensitivity of
Tony Soueid inquired about the gain to drive external loads, semiconductor devices, can only
use of one of the most but with no voltage gain. All of really be achieved if the two
fundamental building VOLTAGE transistors are
GAIN
blocks of electronics, physically close
the operational amplifier + DIFFERENTIAL
OUTPUT OUT together on the
BUFFER
or opamp. Mohab asked AMPLIFIER (POWER AMP.) same piece of

about choosing opamps silicon. Also,
and we explained all the Fig.1. Typical opamp block diagram. integrated circuit
major opamp designers use
characteristics in the special layout
Dec ’99 and Jan ’00 issues. these stages are direct- techniques to make sure that
coupled, which means they are transistors that should be
We now go on to address connected without coupling
Tony’s main point: “I don’t know matched do indeed have the
capacitors. Direct coupling same characteristics, despite
what is inside that ‘black box’… means that opamps are able
it’s based on a differential pair of temperature variations and any
to amplify DC and very low imperfections in the
transistors, but it’s far from being frequency signals.
that simple. Can you please semiconductor manufacturing
supply me with some The circuit diagram for the process.
information?” basic differential pair is shown This would seem to make
in Fig.2a. Notice the symmetry life difficult for the hobbyist or
This is a big topic, one that of this circuit – it is the key to student who is interested in
can and does fill whole
experimenting with these
textbooks, but we will try to give +VCC
circuits using individual
a brief overview of some
components, however it is
important points.
RC RC possible to purchase matched
transistors (such as the
IDENTICAL TWINS VO1 VO2
National Semiconductor
Tony is right to say that TR1 TR2
c c 1 8
opamps are based on the b b
“differential pair”, which we’ll Vi1 Vi2

look at in detail in a moment, but e e 2 7


first look at Fig.1 which shows a
general block diagram of an 3 6
opamp.
The circuitry of an LM394
IE N.C. 4 TOP VIEW 5 N.C.
operational amplifier often
comprises: a differential input
stage, with voltage gain Fig.2b. Pinout details of the
followed by one or more further, LM394 supermatch pair
–VEE
single-ended voltage gain (National Semiconductor).
stages, often with frequency Fig.2a. Basic differential pair.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 223
Maxfield & Montrose Interactive Inc
Circuit Surgery
If we
LM394 “Supermatch pair” in as a common-mode input signal) change the (still equal) input
Fig.2b) and some transistor then the symmetry will not be voltages by a large enough
arrays also contain differential disturbed and IE will still split amount then the circuit will
pairs (e.g. the CA3086 “npn equally between the two cease to function as just
array”) for just this kind of role. transistors. You may think that described. For example, if we
changing the input voltage must take the input voltages down to
change the collector and emitter near VEE then the current source
SINGLE-MINDED currents, but it does not have to, may no longer function properly.
The basic differential pair because the emitter voltage is This would determine the
(Fig.2a) has two inputs Vi1 and free to change whereas IE is opamp’s common mode input
Vi2 and two outputs VO1 and VO2. fixed by virtue of the constant range. Any lack of matching
Each transistor has a collector current source. between the transistors would
resistor RC as a load. Small The ability of the matched- probably result in some shift in
differences in the input voltages transistor circuitry to reject output voltage as the inputs
cause relatively large changes in signals which are the same on varied together, which would
the output voltages, also in a both inputs (common mode) is manifest itself as a non-ideal
differential manner (i.e. as one not only important because it common-mode rejection ratio
output voltage increases, the gives us the function of a (CMRR) for the opamp.
other will decrease by the same differential amplifier, but also
amount). We can, however, because it makes the design of
choose to use only one output high-performance, high-gain DC INVERTED VIEW
(referred to as taking a “single- amplifiers possible. For The high sensitivity of the
ended output”). example, if the temperature of a transistor’s collector and emitter
Key points to understanding single transistor amplifier currents to base voltage comes
the circuit’s operation are firstly changes then the bias currents in to play when we make the
that a transistor’s collector and change too, and so therefore do voltages at the two inputs
emitter current are very sensitive the circuit voltages. slightly different. This breaks the
to changes in its base voltage, In capacitively coupled (i.e. symmetry and causes a larger
and secondly that the emitters AC) circuits this does not matter proportion of IE to flow in one
are connected to a constant because the temperature transistor than the other.
current source. The following changes are slow and are below For example, if we increase
discussion assumes that both the cut-off frequency due to the Vi1 slightly and decrease Vi2 by
transistors are switched on – coupling capacitor. However, if the same amount, then more of
that is, their base-emitter there is no capacitive coupling IE will flow in transistor TR1 than
voltage is greater than about (as in an opamp), any changes in TR2. This will cause TR1’s
0××6V. in voltages due to temperature collector to fall lower than TR2’s,
The constant current source (or other forms of “drift”) are so output VO1 will be lower than
means that the sum of the two effectively indistinguishable from VO2. Thus, if we take a single-
emitter currents must always be the required low frequency ended output from the collector
equal to IE. If the two base signals and will be amplified by of TR2, Vi1 will act as the non-
voltages are equal, and the subsequent stages. inverting input (+) and Vi2 will
transistors are identical, then it However, if the temperature act as the inverting (–) input.
follows that IE will split equally of a properly matched This denotes what effect a
between the two transistors, differential pair changes, both signal on either input has on the
they will draw the same base transistors are affected equally polarity of the output: increase
current, and their collector and there is no change in the the non-inverting input and the
currents will be equal. As the output (the drift is a common output effectively increases too.
two collector resistors are equal, mode signal). The worst place to Increasing the inverting input at
the voltages dropped across get drift is in the first stage as Vi2 will cause the output VO2 to
them will also be equal the error is amplifier by all fall (invert).
(assuming there is no output subsequent stages, so having a Note that differences over a
current). differential pair as the first stage few tens of millivolts (mV) result
If the two input voltages is a good way of reducing drift. in most of IE flowing in one or
change together (this is known other of the two transistors.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 224
Maxfield & Montrose Interactive Inc
Circuit Surgery
PROPORTION OF IE +VCC
IN EACH TRANSISTOR

1.0 R1 R2 R3

OUTPUT VO2
TR2 TR1

OUTPUT VO1
TR1 c c TR2
b b
INPUT Vi1

e e IREF
0.5

INPUT Vi2
IE

c TR3 TR4 c
b b

e e
Vi1 – Vi2 /mV

–100 –75 –50 –25 0 25 50 75 100 –VEE

Fig.3. Typical characteristics of a basic Fig.4. Basic differential pairs – simple current
differential pair. mirror biasing.
Over a large input difference IE = (VCC – VEE – VBE(TR4)) / R3, over a range of 1uA to 1mA.
range the response of the circuit
is exponential (see Fig.3), but where VBE will be typically
for just a few millivolts difference 0××6V to 0××7V. To choose the RC OPAMP SELECTOR
between the inputs the change collector resistors (R1 and R2) Table 1 shows a
in the output voltage difference for maximum swing, set the comparison between a number
is near-enough directly quiescent (“idle”) output voltage of popular opamps. It is by no
proportional to the input to half the positive supply. Thus means comprehensive, as
difference (the central part of the quiescent voltage across the thousands of opamps are
Fig.3). So we have the linear collector resistors is VCC / 2. available, but it will at least
differential amplifier that we Since we set IE above and enable you to compare the
require for an opamp input the collector current is specifications of many well-
stage. approximately IE / 2, then RC for established types. You can use
To turn Fig.2a into a each transistor in the pair can the information we have
practical circuit we need a be calculated using: provided in previous issues to
current source, this can also be decipher the meanings of the
RC = (VCC / 2) / (IE / 2) data: expressions such as
achieved using a couple of
matched transistors such as the = VCC / IE. “Open Loop Gain” and “Slew
Supermatch pair, although there Rate” should now be readily
So if the supplies are ±9V understood (we hope).
are also more sophisticated
and we chose a bias current of
current sources employing more The manufacturers’ data
about IE = 1mA then we get R3 =
transistors. For a more detailed must be consulted for more
18K and R1 = R2 = 9K.
discussion of current sources design information as needed,
please refer to Circuit Surgery For any given transistor IE / as our figures may often only
May and June 1999 in which we 2 should be chosen to give apply under certain conditions
discussed these types of circuit optimal performance (transistor (supply voltage, temperature
in depth. gain etc. varies with bias etc.). The World Wide Web
current). The supply current offers for the first time the
required may also be a possibility of readers fetching
MIRROR CURRENT consideration when choosing IE. data directly from the
A basic differential pair with Although a device such as the manufacturer. It’s usually in
current mirror biasing is shown LM394 Supermatch pair has a Adobe Acrobat PDF format,
in Fig.4, which will hopefully be maximum collector current which needs the free Acrobat
familiar to regular readers. The rating of 20mA, National reader from www.adobe.com
emitter current can be set using: guarantees most parameters
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 225
Maxfield & Montrose Interactive Inc
Circuit Surgery
Next month we will look at a generously-sized heatsink and it scant knowledge of Nuffield
how gain can be improved by will perform fine. Proper thermal Physics (as my schoolteacher of
using transistors instead of resistance calculations are the the time would testify), meant
resistors as loads, and consider best way of determining what size that I started out in electronics
the problem of getting all the heatsink to use. ARW. knowing that electric current
bias voltages right when you flowed towards the most positive
cannot isolate stages using electrode. It all made sense.
coupling capacitors. IMB. CONVENTIONAL
The trouble is, in modern
CURRENT semiconductor electronics we
HOT REGULATOR Do you know why the plate of talk in terms of “conventional
a valve (vacuum tube) is called an current flow”. We all do this
I built a 1A power supply without thinking, but it’s
anode whilst the plate on a
with a 317-type variable extremely bizarre to anyone
semiconductor diode is called a
regulator. The data says that it coming into electronics from
cathode? Most confusing. E.J.
is a 2A regulator but when I other sciences (notably physics
Bibby.
draw 1A, the regulator gets very and chemistry). Under this
hot and the voltage slowly When I first started reading convention, electric current is
drops. Why? up on electronics in the early deemed to flow from positive to
1970’s, my very first text book negative, although in real life it
So asked a reader in the
started with valves (but hey, I’m flows in the other direction.
EPE Chat Zone on our web site
not that old!). Their operation was
(www.epemag.wimborne.co.u described in terms of real electron More than one Physics
k) recently. flow, i.e. what actually happened teacher has torn a strip off me
Regulators are usually in terms of the physics of the for apparently not knowing
protected against excess current electron. The simplest vacuum which way current flows in a
and thermal overload. It sounds tube is the diode, consisting of a circuit: my apologies to Physics
as though you haven’t cathode (which is a piece of metal teachers everywhere but
heatsinked the device properly warmed up by a heating element) unfortunately the convention is
(if at all). It’s imperative that the together with an anode “plate”. now so well entrenched around
regulator is allowed to dissipate the world that it will never
Electrons boil off the hot change. (Can you imagine the
any power efficiently, to prevent cathode and, being negatively
the chip from overheating. chaos if it did? Which way round
charged, are attracted towards would you connect your
Fortunately, the LM317 – the anode, which when positively multimeter?)
like many other three terminal biased will “accept” these
regulators – will suffer no negative electrons. The current of In a semiconductor diode,
immediate damage from electrons which flows through the conventional current flows in the
inadequate heatsinking, valve in this way is called the direction of the arrowhead
because it will simply current- anode current. symbol – from anode to
limit and gradually shut itself cathode. In a silicon diode, the
By placing an electrode anode (a) must be 0××7V more
down. As you saw, the output between the cathode and anode
voltage slowly falls during this positive than the cathode (k) for
and applying a grid bias voltage to
shut-down process. However, a “forward current” to flow from
it, the anode current can be
any repeated cycling like this anode to cathode. However, the
controlled – thus a triode valve is
can stress a device over time, anode (electron) current in a
created which can be used as an
ultimately leading to some vacuum tube flows from cathode
amplifier. This, together with my
lasting damage. Simply bolt it to to anode.
I’m afraid that we have
history to blame for this
conundrum, but in practice
everything works fine. After all,
we know what we mean, don’t
we? ARW.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 226
Maxfield & Montrose Interactive Inc
V/uS

Input
uVoC

Output

Supply
(GBW)

current
current
ratio dB
rejection

Slew rate

Maximum
Maximum
Input bias
CMRR dB

resistance

gain V/mV
Open loop
Bandwidth

diss. (mW)

Differential
Max power
Input offset
Input offset
voltage mV

voltage drift

Output short

input voltage
input voltage
circuit current

voltage swing
Supply voltage

supply voltage
TL071 +/-18V +/-30V +/-15V 680 1.4mA +/-13.5V -- 200 65pA 1012ohm 18.0 3.0 100 13.0 3MHz 100 Fast slew, jFET input, low noise

TL081 +/-18V +/-30V +/-15V 680 1.4mA +/-13.5V -- 200 30pA 1012ohm 18.0 3.0 86 13.0 3MHz 86 Low power, jFET input

-0.3 to
TLC27M2C 18V +Vdd 725 285uA -- -- 275 0.7pA -- 2.1 1.1 94 0.62 650kHz 93 Dual, low voltage, precision
+Vdd
-0.3 to
TLC27M7 18V +Vdd 725 285uA -- -- 275 0.7pA -- 2.1 0.19 94 0.62 635kHz 93 Low offset, low power
+Vdd

Maxfield & Montrose Interactive Inc


Vcc- -5
LT1013AC +/-22V +/-30 -- 0.7mA +/-14V 28mA 2500 -12nA 400M 2.5 0.04 117 0.4 800kHz 120 Dual, single rail, high gain
to Vcc+

OP07C +/-22V +/-30V +/-22V 500 -- +/-13V -- 400 +/-1.8nA 33M 0.5 60.0 120 0.3 600Hz 103 Low noise, bipolar input

Copyright © 2000 Wimborne Publishing Ltd and


Low noise, low offset, low drift,
OPA27GP +/-22V +/- 0.7 +Vcc 500 3.3mA +/-13.8V -- 1500 15nA 2G 0.4 0.025 122 1.9 8MHz 120
precision instrumentation

OPA177GP +/-22V +/-30V +/-Vs -- 1.3mA +/-14V -- 12000 0.5nA 45M 0.7 0.02 115 0.3 600kHz 115 Precision, bipolar, instruments

V+ +0.7
OPA544T 70V -- -- 12mA -- 4.0A -- 15pA 1012ohm -- 1.0 106 8.0 1.4MHz -- High voltage, high current, TO220
to V- -0.7

AD711JN +/-18V Vs +/-18V 500 2.5mA -- 25mA 400 20pA 3x1012ohm 7.0 0.3 88 20.0 4MHz 95 Precision, high speed, low offset

AD744JN +/-18V Vs +/-18V 500 3.5mA -- 25mA 400 30pA 3x1012ohm 5.0 0.3 88 75.0 13MHz 95 Precision, FET input

741 +/-18V +/-30V +/-15V 500 1.7mA +/-14V 25mA 200 80nA 2M 15 1.0 90 0.5 1.5MHz 96 Obsolete general-purpose bipolar

LM10 45V +/-40 -- -- 270uA -- -- 400 10nA 500k 2.0 0.3 102 -- -- 96 Low voltage, reference output

Low voltage, battery operation,


LM308 +/-18V -- +/-15V 500 150uA +/-14V -- 300 10nA 40M 6.0 10.0 100 -- -- 96
precision

Table 1: Opamp Selector.


LF411 +/-18V +/-30V +/-15V 670 1.8mA +/-13.5V -- 200 50pA 1012ohm 7.0 0.8 100 15 4MHz 100 Low offset, jFET input

LF441 +/-18V +/-30V +/-15V 670 150uA +/-13V -- 100 10pA 1012ohm 10.0 1.0 95 1.0 1MHz 90 Low power, jFET input

LMC6001- -0.3 to
+/-Vs -- -- 750uA 14.6V +/-30mA 1400 25fA >1T 10.0 0.35 75 0.8 1.3MHz 80 Ultra-low input, instrumentation
AIN +16V

LMC6081 15V Vs -- -- 450uA 14.5V -- 1400 10fA >10T 1.0 0.35 85 -- 1.3MHz 94 Precision, low offset CMOS

EL2044 +/-18V +/-10V Vs -- 5.2mA +/-13.6V 75mA 1.5kV/V 2.8uA 15M 10 0.5 90 325 60MHz 80 Low power, low voltage
Circuit Surgery

EL2001 +/-18V -- +/-15V -- 1.3mA +/-11V +/-100mA 998 1.0uA 8M -- 2.0 -- 2000 70MHz 75 High slew rate, high speed buffer

NE5534 +/-22V 0.5 +Vs 1150 4.0mA <+/-16V 38mA 100 400nA 100k 5.0 0.5 100 13.0 10MHz -- Low noise, audio, instrumation

+V +8 to
CA3130 16V 8.0 -- 300uA <15V 20mA 100 5pA 1.5T 10.0 8.0 90 <30.0 4MHz 74 MOSFET input, rail-to-rail output
-V -0.5
+V +8 to
CA3140 36V 8.0 -- 1.6mA 13V +40mA 100 2pA 1T 6.0 5.0 90 7.0 3.7MHz 80 MOSFET input, bipolar output
-V -0.5
+V +8 to
CA3420 22V 15.0 9.0 150uA -- 2.6mA 100 0.05pA 150T 4.0 5.0 80 0.5 0.5MHz 90 Low voltage, portable instruments
-V -0.5

EPE Online, March 2000 - www.epemag.com - 227


Robert Penfold looks at the Techniques of Actually Doing it!
In a previous Practically omega symbol up to 999 ohms). millimeter in diameter.
Speaking article we considered Any lettering on a compo-
the subject of capacitors, and either kilohms (k or just k) or nent this small would have to be
this month we move on to that W minute, and would also be easily
other humble component – the kilohm is equal to 1,000 ohms, obliterated. Color codes are rel-
resistor. atively easy to read, and even if
ohms. they become damaged it should
At a guess, in most projects
about half the components are still be possible to read the val-
resistors, so beginners have to ues of components correctly.
COLOUR BAR
get to grips with resistors right The normal resistor color
from the start. One immediate problem code has four bands, with three
facing the beginner is that most bands grouped together. It is
The basic unit of resistance resistors are not marked with
is the Ohm, but this is a small these three that indicate the
values using normal text charac- value of the component while
unit of measurement. Hence the ters. Instead a system of “color
cir- the other one shows the toler-
coding” is used, and there are ance rating of the component.
cuits often have values of four or five colored bands
sands or even millions of ohms. The tolerance is simply the max-
marked around the body of each imum deviation from the marked
The usual abbreviation for component. value given as a percentage.
This may seem to be an un- Thus, if a 100 ohm resistor has
(W necessarily awkward way of a tolerance rating of five per-
case letter “R” is sometimes handling things, but you have to cent, its actual value would be
(In and EPE bear in mind that the average between 95 and 105 ohms.
resistor is an extremely small The group of three bands
component. You indicates the first two digits of
will often be deal- the value and the multiplier.
ing with resistors Fig.1 shows the function of each
that are no more band. Table 1 shows the mean-
than about one

Table 1: Resistor Color Code


Color Band 1 Band 2 Band 3 Band 4
Black 0 0 x1 --
Brown 1 1 x10 1%
Red 2 2 x100 2%
Orange 3 3 x1000 --
Yellow 4 4 x10000 --
Green 5 5 x100000 0.5% Fig.2. Two methods of five-band
Blue 6 6 x1000000 0.25% resistor color coding.
Violet 7 7 -- 0.1%
Gray 8 8 -- --
Table 2
White 9 9 -- -- 1.0 1.1 1.2 1.3 1.5 1.6
Gold -- -- x0.1 5% 1.8 2.0 2.2 2.4 2.7 3.0
Silver -- -- x0.01 10% 3.3 3.6 3.9 4.3 4.7 5.1
None -- -- -- 20% 5.6 6.2 6.8 7.5 8.2 9.1
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 228
Maxfield & Montrose Interactive Inc
Practically Speaking
ing of each color when it ap- are only available in the E12 se- ored band is therefore black.
pears in each band. ries, which is every other value To compensate for this ex-
As an example, suppose in the E24 series (1××0, 1××2, 1××5, tra zero the multiplier value is
that a resistor has red–violet– etc.). Most electronic projects reduced by a factor of ten. Tak-
orange–gold as its color code. only use resistors having values ing our earlier 27k example, this
The first two bands indicate the from the E12 series. would become red–violet–
first two digits of the value, and black–red–gold. This gives 270
in this case red and violet re- x 100 = 27,000 ohms.
spectively indicate that these are
BUNCH OF FIVES
two and seven. The third band is Rather unhelpfully, many of
orange, which means that the the resistors now sold to ama- COMPOSITION
first two digits must be multiplied teur users have five band codes. In component catalogs you
by one thousand in order to give These operate in the manner will find resistors described as
the value in ohms. shown in Fig.2. The first of these “carbon film” and “metal film” or
is quite easy to use because the “metal oxide”. The simplest re-
This gives 27 x 1000 and an
first four bands give the value sistors are the carbon composi-
answer of 27,000 ohms (27 kilo-
and tolerance rating in the nor- tion type, which are basically just
hms (27k)). The color of the
mal way. The additional fifth pieces of carbon with an elec-
fourth band is gold, and the re-
band shows the temperature trode attached to each end.
sistor therefore has a tolerance
coefficient of the component,
rating of five percent. These have now been re-
which is not something that is
normally of any relevance. If the placed by carbon film resistors,
which consist of a former made
PREFERRED fifth band is ignored, the other
from an insulating material hav-
four give the value and tolerance
VALUES rating in the usual fashion. ing an electrode at each end. A
film of carbon is deposited on
Resistors are normally avail- The second form of five the former, and the resistance
able in what is called the “E24” band coding is probably the value obtained depends on the
series of values. The basic E24 more common one, and is thickness and the exact compo-
series of values is listed in Table slightly more difficult to deal sition of the film. Carbon film re-
2, but values ten times higher, a with. Again, it is not that far re- sistors are adequate for most
hundred times higher, etc. are moved from the four-band applications, and are the type
also available, up to a normal method. normally specified in compo-
maximum of 10 megohms
The first two bands indicate nents lists.
(10M). Values one tenth and
one hundredth of the basic val- the first two digits of the value, Metal film resistors are the
ues are also available, but are and the last two bands provide usual choice for more demand-
relatively difficult to obtain. the multiplier and the tolerance ing applications. They are simi-
rating. The difference is that an lar in construction to carbon film
This range of values might additional middle band is used resistors, but the film is based
look rather random at first to indicate the third digit of the on a metal oxide instead of car-
glance, but each value is value. bon. Resistors of this type nor-
roughly ten percent higher than
This method of coding can mally have close tolerances of
the previous value in the series.
handle non-standard values two percent or better, and gen-
Together with the inclusion of
the same values in various such as 26××7k, but as these are erate less electrical noise than
not used in amateur electronics any form of carbon resistor.
decades, this means that one of
this is irrelevant to the electron- Their values are also affected
these “preferred” values will al-
ics enthusiast. The normal four- less by temperature changes
ways be close to the required
band method of coding is all that and aging.
value for a resistor. In fact the
ideal value calculated by a cir- is needed. Metal oxide resistors are
cuit designer should never be Nevertheless, this form of needed for some demanding
more than about five percent five band coding does seem to applications, such as in critical
away from a preferred value. be used on the resistors sold to stages of test equipment and in
amateur users. When applied to low noise audio preamplifiers.
Most resistors are available
normal E24 values the third digit They can be used in place of
in the full E24 series, but some
is always zero, and the third col- carbon resistors for general use,
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 229
Maxfield & Montrose Interactive Inc
Practically Speaking
but it makes sense to use and a value of 0××47 ohms would
cheaper carbon resistors in any be marked as “0W47’’ (or
application where they will suf- “OR47”).
fice.
There will usually be other
marks as well, some of which
HIGH POWER might simply be the makers
name, a batch number or some- Fig.3. High power wirewound
Some resistors do actually
thing of this type. Of more use, resistor in an aluminum heat
have the values written on the
there will probably be a wattage
body using ordinary text charac- dissipater.
rating and a letter to indicate the
ters, but in recent years this is
tolerance rating of the compo- has three terminals, and be-
something I have only encoun-
nent. Table 3 shows the corre- tween two of these there is a
tered on higher power resistors.
sponding tolerance rating for fixed resistance. There is a vari-
Most of the resistors used in
each of the code letters used. able resistance between these
electronic circuits have to dissi-
pate very low power levels, and High power resistors have terminals and the third one.
small resistors having ratings of various compositions, but the A potentiometer consists of
about 0××25 watts are perfectly wirewound variety is by far the a track of carbon with a terminal
adequate. most common. This consists of at each end of the track. The
a coil of resistance wire wound third terminal connects to a
Some circuits have the odd around what is usually a ceramic
resistor or two that has to handle wiper that can be moved along
former. the track by means of a spindle.
higher power ratings. Compo-
nent lists normally indicate a One slight problem with There are also preset poten-
suitable power rating for all the wirewound resistors is that the tiometers that have no spindle,
resistors anyway, but a suitable coil of wire also acts as an in- but can be adjusted using a
rating should certainly be given ductor, although most compo- screwdriver. With an open con-
for any high power types. nents of this type are con- struction preset potentiometer
structed in a fashion that mini- the track, wiper, and terminals
It is very unusual for resis- mizes this problem. Even so,
tors having power ratings of are all clearly visible (see Fig.4).
wirewound resistors are less The greater the amount of track
more than about one watt (1W) than ideal for some applications,
to have the value marked using between the wiper and one of
and if a different type is indi- the fixed terminals, the greater
colored bands. The larger physi- cated in the components list it is
cal size of these resistors advisable to use the specified
makes it possible to mark the type. Table 4
value using text characters of
reasonable size. Very high power resistors Potentiometer
have metal fins to help conduct Letter
Type
The value is invariably heat from the component into
marked on the resistor in the the surrounding air (Fig.3). Many A Linear
same form that it appears on a of these resistors also have to B Logarithmic
circuit diagram. In other words, be mounted on a substantial C Anti-logarithmic
the letter used to indicate the piece of metal, which acts as a
unit of measurement is also heatsink and provides further the resistance between them as
used to denote the position of cooling. With resistors such as well.
the decimal point. A value of this, the article should give guid- The normal way of using a
2××7k would be marked as “2k7” ance on using the resistors, and potentiometer is with an input
this must be followed “to the let- voltage across the track, and a
Table 3 ter”. variable output voltage is then
Letter Tolerance available from the wiper (moving
contact) and one of the track
F 1% POTENTIOMETERS terminals. Strictly speaking, the
G 2% The terms “potentiometer” components you buy are always
J 5% and “variable resistor” tend to potentiometers having three ter-
K 10% cause a certain amount of con- minals, but in some applications
M 20% fusion. A potentiometer (“pot”) it is a variable resistance that is
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 230
Maxfield & Montrose Interactive Inc
Practically Speaking
required. It is then only neces- Anti-logarithmic controls are dif-
sary to use the wiper terminal ficult to obtain and are only
and one of the track connec- needed for a few specialist ap-
tions. plications. If you use a poten-
Potentiometers are available tiometer of the wrong type the
in three types, which are the lin- circuit will still work, but the con-
ear (lin), logarithmic (log) and trol will be awkward to use.
anti-logarithmic varieties. A lin-
ear potentiometer gives approxi- AS EASY AS ABC
mately equal resistance be-
tween the wiper and the two The values of potentiome-
track terminals when it is at a Fig.4. “Open Track” preset ters are marked using text char-
central setting, as one would ex- acters, together with the type
potentiometer. “log”, “lin” or “anti”). These days
pect.
advanced slightly from zero. many potentiometers are
A logarithmic potentiometer marked with a code letter to indi-
produces vastly different resis- Further advancement then
seems to have little effect. This cate the type.
tances under the same condi-
tions. So does an anti- is due to the way we perceive This works in the manner
logarithmic potentiometer, but sound rather than a problem shown in Table 4. Note that po-
with the high and low values the with the potentiometer. tentiometers are only produced
other way around. When used as a volume in a very limited range of values.
When used as a volume control, a logarithmic poten-
control a linear potentiometer tiometer gives a much better
gives an odd control characteris- control characteristic. Logarith-
tic, with the volume seeming to mic potentiometers are used for
jump to a high level when it is little other than volume controls.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 231
Maxfield & Montrose Interactive Inc
A ROUNDUP OF THE LATEST EVERYDAY NEWS
FROM THE WORLD OF ELECTRONICS

DIGITAL FINGERPRINTING
Digital cameras can now not only assess vehicle speed limit violations, but also
detect fingerprints on banknotes - Barry Fox reports.

Criminals beware. An ad- on the quality and integrity of the and approved on 1 April 1999
venturous local police force in photos. for private data networks. Cam-
the West of England is pioneer- High intensity white light is eras use infrared flash to log the
ing the use of electronic imaging focussed on the print area by time taken for a car to travel a
to lift faint fingerprints from ban- fiber optics, and the image cap- mile. They were catching 4000 a
knotes and check. The system tured on disc by a high resolu- day but no summonses were
relies on watermarking technol- tion digital camera with 3648 x issued. Now that the cameras
ogy developed for electronic 4623 image sensor; 12-bit are Type Approved the police
speed trap cameras but spurned monochrome coding captures and local councils can install
by the Home Office. The mark subtle grays in a 13 Megabyte them – but they are expensive.
stops lawyers discrediting finger- file. Says Signum’s Marketing
print evidence by arguing that Because the image is in dig- Manager Alan Bartlett, “The UK
digital images can be easily doc- ital code, the lab can use Fourier authorities are working on the
tored. Transform analysis to separate principle that most motorists will
Three years ago Esther the regular pattern of banknote not go to the expense of legally
Neate, senior fingerprinting de- printing from the irregular finger- challenging a speeding fine. In
velopment officer at the Wilt- print. Labs have tried to do this the US people just shoot the
shire Constabulary, persuaded with film and color filters, but speed cameras to pieces any-
the force to go out on a limb and electronic analysis produces way. But 30 year jail sentences
replace the ageing film equip- much clearer pictures. can hang on fingerprint evidence
ment in her lab with an all-digital which will be challenged.”
An identifying watermark,
system. with date, time and place, is em- The Wiltshire Constabulary
“The FBI and a few forces bedded in the image using Veri- will not identify individual cases
round the world are mixing film Data iDem software from British that have relied on digitally
and digital technology, but we company Signum Technologies recorded evidence. “But for the
are first to replace film com- of Witney. The mark is invisible last 18 months all cases this lab
pletely,” says Neate. to the eye but can be detected has handled have used the pro-
by analysis of the image file. If cess,” says Esther Neate.
even one pixel in the image is Wiltshire’s camera can work
Chemical Integrity altered, it shows. with a laptop PC running Win-
Prints from a sweaty finger dows NT, to capture fingerprints
are 95 percent water and five or footprints at the crime scene.
per cent salts, amino acids and
Speed Trapping
Police forces in Singapore,
fats. Suspect banknotes and Signum developed VeriData Turkey, Australia, New Zealand,
checks are serially treated with for electronic speed traps, but in Belgium and the US are now
14 different chemicals such as April ’99 the Home Office ap- asking the fingerprinting labora-
ninhydrin, and a photograph proved the use of SVDD (Speed tory in Devizes to help them set
taken at each stage because Violation Detection Deterrent) up similar systems.
each chemical reacts with a dif- digital cameras as long as the
ferent sweat component and de- images are securely encrypted
stroys the previous reaction. By or carried by the closed data
the end of the treatment, the pa- networks used on motorways.
per is stained, toxic, and useless SVDD was tested on the M1
as evidence. So any case hangs and M20, in Leicester and Kent

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 231
Maxfield & Montrose Interactive Inc
NEWS......
to 2Mbits/s, but will not be ready
until 2002.
Orange recently launched a
new service called High Speed
Circuit Switched Data, which
hikes the speed to 28××8Kbps.
One-2-One will wait a year until
different technology, called Gen-
eral Packet Radio Service, is
ready. Both systems are autho-
rized by ETSI, the European
Telecommunications Standards
Institute, but are not fully com-
patible.
HSCSD uses less error cor-
CORDLESS SOLDERING IRON rection to increase the basic
BS Manufacturing tell us that their latest soldering iron, the P100, GSM data rate to 14××4Kbps, and
sets a completely new standard by offering precision heating power in then gangs channels together to
the form of a tiny pen-style tool. The P100 is 19cm long and weighs give 28××8Kbps or higher.
just 57g, delivering up to 120W output – double that of some GPRS works on the as-
competitive irons, allowing it to be used for heavy duty electrical work sumption that most users do not
and silver soldering, in addition to precision electronics and model need constant data speed. A
making applications. pool of capacity serves several
The fuel used is liquid butane/propane gas, stored in the users at the same time, with bits
translucent handle. The tank can be refilled from a standard gas allocated as and when they are
canister (cigarette lighter type). Typically each refill provides around needed. One-2-One plans a
45 minutes of continuous use. Gas is ignited by means of a spark GPRS service for September
from a flint inside the tool’s cap, with its flow regulated using a slider, 2000, with speeds up to 56Kbps,
allowing fine adjustment down to 20W. rising to 112Kbps by 2001.
A wide range of attachments for the P100 are offered, to “HSCSD is a technology cul-
configure it for soldering, hot knife cutting, slicing, heating, igniting, de-sac” says Craig Tillotson,
shrink wrapping, melting, shaping and other uses. A rich choice of tips One-2-One’s Director of Strat-
for soldering/desoldering is available, from 4××8mm wedges to chisels egy. “GPRS hardware will cope
and angles as small as 1mm. with HSCSD, but HSCSD hard-
The iron costs around 18 UK Pounds and may be purchased ware will not handle GPRS. And
online (via the web site below), or from distributors. if Orange pass on the true cost
to subscribers, HSCSD access
For more information contact BS Manufacturing Ltd., Strawhall will cost at least ten times as
Industrial Estate, Carlow, Ireland. much as GPRS.”
Tel: +353 (0) 503-41340 “Not so”, says Stuart Scott,
Fax: +353 (0) 503-40363 Orange’s Manager of Internet
Products. “We have not yet set
Email: sales@vulkangt.com
tariffs, but our target is to add
Web: www.vulkangt.com only a very small premium”.

war that will replicate round the


CELLPHONE world. Most countries now use Filter Software
Europe’s digital GSM system but
DATA WAR email and Internet access, at – Free!
9××6Kbps, is painfully slow.
By Barry Fox Microchip, those ingenious
The completely new Univer- PIC manufacturers, have told us
Rival British cellphone net-
sal Mobile Telecommunications that you can now download
works Orange and One-2-One
System promises data rates up some filter design software from
have started a GSM data speed

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 232
Maxfield & Montrose Interactive Inc
NEWS......
their web site, free! FilterLab is a
software design tool that simpli-
fies the design of active filter PORTABLE POWER
systems using opamps as ana-
log filters. It provides full
schematic diagrams of filter cir-
cuits with component values and
display of the frequency re-
sponse.
FilterLab supports the de-
sign of low-pass filters up to 8th
order, with Chebyshev, Bessel,
or Butterworth responses, from
frequencies of 0××1Hz to 10MHz.
Once the filter response has
been identified, FilterLab gener-
ates Bode plots and the circuit
diagram. It also generates a
Spice model for time domain
analysis, streamlining the design
process.
To download Filterlab, ac-
cess Microchip’s site at:
www.microchip.com

Power Lines “Run virtually anything in your car!” exclaims a Press Release
from Merlin Equipment. Merlin’s Cherokee unit simply plugs into a
and Health car’s cigarette lighter and converts low voltage battery power to stan-
The National Radiological dard 230V AC mains power. A normal UK 13A socket on the unit al-
Protection Board (NRPB) is to lows direct connection to appliances.
investigate recent claims that a The Cherokee 150 is capable of supplying up to 150 watts of
causal link between power lines power continuously. For appliances that require a surge of power
and human health can be estab- (TVs for example), it can provide 300 watts instantaneously. The con-
lished. It states that these claims verter is overload, overheat and short-circuit protected. In the event of
need to be compared with the the input battery voltage dropping below 10××8V, the unit will cut out –
findings of the first paper from ensuring that you can re-start your car’s engine!
the UK Childhood Cancer Study
(UKCCS) which shows no in- Merlin have a large range of other products designed for in-car,
creased risk of childhood cancer caravan or boat use.
associated with magnetic fields For more details, contact Merlin Equipment, Dept EPE, Unit 1,
from the electricity supply. This Hithercroft Court, Lupton Road, Wallingford, Oxon OX10 9BT, UK.
definitive study, looking at actual Tel: +44 (0)1491-824333
cases of childhood cancer and
controls, is the largest of its type Fax: +44 (0) 1491-824466
in the world. Email: sales@the-merlin-group.com
For more information, con- Web: www.the-merlin-group.com
tact NRPB, Chilton, Didcot,
Oxon OX11 0RQ, UK.
Electronic Purse
Tel: +44 (0) 1235-822744
One of the many documents that have come to us in connection
Fax: +44 (0) 1235-822746 with the Smart Card 2000 exhibition and conference (8-10 Feb 2000,
Web: www.nrpb.org.uk Olympia, London), highlights the question “Have Europe’s banks in-
vested millions developing a product no-one wants?”. The product re-
ferred to is the “electronic purse”.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 233
Maxfield & Montrose Interactive Inc
NEWS......
Electronic purses have been is not ecstatic about the con-
coins in our pockets in 10 years
the cherished goal of banks and cept, neither are many of Eu-
time? As we go to press, such
other global organizations for rope’s bankers who are facing
matters are due to be discussed
around 10 years. Apparently, losses of up to two euros per
by delegates at the conference.
though, in many markets con- purse card per annum. In some
sumer feedback indicates they countries the costs of persuad-
are not a viable proposition. ing the customer to load and
The concept of a cash-less use the card exceed incomes by
society is proving difficult for the several times.
consumer to accept. If the public So will we be jingling the

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 234
Maxfield & Montrose Interactive Inc
John Becker addresses some of the general points readers have raised. Have
you anything interesting to say? Email us at editor@epemag.com!

many words changes amongst I have subscribed to the On-


WIN A DIGITAL the general population. There line version of your magazine
MULTIMETER are many cases, too, where and am looking forward to every
words have acquired different issue. I have a few suggestions
meanings depending on the which I would like to see if possi-
The DMT-1010 is a 3 1/2 digit context in which they are used. ble.
pocket-sized LCD multi-meter It’s worth remembering (or is I enjoyed the PDF files be-
which measures a.c. and d.c. it?!) what Alice’s Wonderland ing separate files so that I could
voltage, d.c. current, and re- friend Humpty-Dumpty said (in a save the Teach-In 2000 from the
sistance. It can also test rather scornful tone), “When I Nov ’99 issue to a floppy disk to
diodes and bipolar transistors. use a word it means just what I view it at work on breaks and
choose it to mean – neither between service calls.
Every month we will give a
more nor less”! (Remember the “paperless of-
DMT-1010 Digital Multimeter fice” hype?). I am not able to do
to the author of the best Read- that with the Dec ’99 issue. The
out letter. TEACH-INS PLUS EPE only way to carry the information
ONLINE with me now is to print those
Dear EPE, pages out as the whole file is
over 3MB. I hope you have
Thank you for not only the
* LETTER OF THE new Teach-In 2000 series, but
plans to make the complete se-
ries and the previous Teach-In
MONTH * for the Teach-In 1998 series as series available for purchase via
well. I credit knowledge gained the Internet as well. This would
from that for helping to secure a be most helpful to readers like
A-LIVE-A-LIVE-OH! new job. Many companies are myself in Macon, USA, whose
Dear EPE, now giving a written skills test only source for EPE is one
A friend recently drew my at- for technical positions and I bookstore which stocks four
tention to the current series you would not have been able to copies. I missed some of the
are running on Oscillators (since pass the electronic and digital PIC Tutorial because it was sold
July '99). Having obtained the portions without your magazine. out.
September issue, I sent for the (My experience is in hydraulic
and pneumatic systems.) The Thanks for a great publica-
previous issues. What interesting tion.
reading they make! series was so well written, I
learned enough basic electron- Alan Craig
I have been pleasantly sur- ics as well as digital to be hired. Macon, Georgia, USA
prised by the exchange of infor-
mation with readers in Readout, I have since completed a
and the informative level of Circuit well-known correspondence
Alan E-mailed his comments
Surgery. course in basic electronics for
to our On-Line Editor Alan Win-
which my employer will reim-
Arthur Lawrance stanley, who E-mailed back:
burse me. I found your Teach-In
via the Net series to be better written and We’re really pleased to hear
more understandable than that Teach-In 98 was of benefit
theirs. I also wish they had been to you, your compliments are
It is an interesting fact that, much appreciated. Writing that
able to provide the interactive
despite attempts at standardiza- series was hard work! We tried
software I downloaded for the
tion, English continues to evolve to mix together the essential the-
Teach-In 2000 series. It is al-
and, irrespective of “official” defini- ory along with some practical
ways useful to reinforce what
tions, the perceived meaning of work. It was also difficult to co-
you have read with practice.
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 235
Maxfield & Montrose Interactive Inc
Readout
ordinate the material originating Furthermore, we’re also chronization and indeed the cor-
from four writers, to a very tight planning on offering the entire rect operation of the PIC. Mak-
monthly deadline. The advent of set of EPE 1999 issues on these ing this suggestion to Steve, he
digital cameras helped a lot. mini-CDs for ease of reference. later replied:
The development and pro- Watch our web page at
duction time for Teach-In 98 www.epemag.com for more
details in the near future. Thanks for your suggestion.
was shorter than that of Teach- The problem was with the PIC
In 2000, which has been in programming. Why, remains a
preparation for at least a year. mystery, data transmission
There has therefore been much PERSEVERENCE speed? A preprogrammed chip
more time available to develop Dear EPE, from Magenta cured all, how-
the Teach-In 2000 programs (It ever. Thanks for the excellent
hasn’t felt like it! JB), and its au- I have had the PIC Electric
project (Feb-Mar ’96) hanging magazine – and the back-up
thor John Becker is very skilled support.
at producing QBasic electronics around for some time, and much
demo or test and measurement to my irritation I have been un-
software. able to resolve a problem with it: PIC16F877 PROBLEM
the LED display continually SOLVED
It is possible to buy photo- shows flashing FFFF. The mid-
stats of any out-of-print EPE dle FF are fairly stable, but the Here’s another tale with a
Back Issue articles direct from outer two FF segments are dim- happy ending. First the problem:
the UK. These can be ordered mer and flash in a more pro-
via our secure server, accessi- nounced fashion.
ble from the EPE web site at Dear EPE,
The circuitry has been con-
www.epemag.wimborne.co.uk Many thanks for the
structed on PCBs purchased
PIC16F87x Mini Tutorial (Oct
from you, using recommended
’99). It was just what the doctor
Alan W also forwarded Alan components obtained through
ordered, the inclusion of the Ba-
C’s queries on EPE Online to its RS. I have checked connections
sic program was a master-
Editors Max and Alvin in Al- and component layout and can
stroke, my attempts to calculate
abama, USA, from whence the find no problem with these. I
baud rates had produced some
electronic version is served out. have tried down-loading the pro-
improbable results, most of
Max responded: gram for the PIC a number of
which would not have fitted into
times, from a ‘486 66MHz PC.
an 8-bit register.
Using both the on-board compo-
Thank you for your kind nents, Simple PIC Programmer However, I am experiencing
comments – it’s always great to and also the PICtutor board, I difficulties re-programming a
receive positive feedback. Sorry always end with the same re- PIC16F877. I’ve built a board
to hear that you would prefer to sults. Adjustment via the calibra- along the lines of your Data Log-
receive the Online magazine as tion buttons appears to do little. ger (Aug-Sept ’99), minus provi-
multiple small PDFs. In fact, the The +15V, –15V, +5V and TP7 sion for EEPROMs, and con-
main reason we decided to check out OK. The A-D refer- nected it to my EPE PIC Tutorial
move to a single large PDF is ence voltage has been adjusted (Mar-May ’98) board and all
that a lot of readers requested it as advised. Please could you went well. I ran the input port
that way (to make it easier to offer some suggestions? test program of Toolkit Mk2
print out the entire issue in one (May-Jun ’99), all voltages pre-
go). However, you will be happy Steve Gooch sent and correct, plugged in my
to know that once the Teach-In via the Net ’877 and compiled and pro-
2000 series is finished, we are grammed TKTEST4 into the
planning on offering the whole PIC. It ran and the LEDs
I wondered if Steve had a flashed.
series on a single CD (actually a power supply regulation prob-
mini-CD that would fit into your lem, the rectified output of REC1 I then compiled (with no er-
wallet, so that you can easily not providing sufficient voltage rors) my own program (well ac-
read the articles whilst on the when the display has many dig- tually most of it was yours from
road). its active. This could affect syn- Mini Tut) intended to initialize
the USART with a baud rate of
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 236
Maxfield & Montrose Interactive Inc
Readout
31.250kHz and loop 10101010 to straight away. The problem with throws up lots of errors and it
give a nice square wave out of the my program was due to having takes a while to sort them out.
port. I re-configured the PIC and already defined PAGE1 and At first this wasn’t too bad, but
then programmed it with my own PAGE0 in the header. I then re- as the progs move on its all get-
program. Nothing appeared to be equated them to suit the SET- ting a bit too much.
working, so I assumed that there BAUD routine in your Mini Tut. I Now, I did download
was a problem with my program assumed that it would be OK to MPASM from Microchip’s web-
and re-loaded TKTEST4. Nothing use either routine, to select site and thought that would be it.
happened, the PIC appeared pages. Apparently not. After re- (Ha, as if!) Of course MPASM
dead. It seemed impossible to moving the equates for RP0 and converts my .ASM files to .HEX
program it now. In case the PIC RP1 from the header, the pro- files. But when it comes to
had developed a fault I plugged in gram ran. downloading to the chip,
another. TKTEST4 went straight Many thanks for your con- SEND.EXE needs to see .OBJ
in and ran. I then attempted with cern. files. (Dare I ask what the differ-
my own program again and I have ence is?) which is fine with
exactly the same problem i.e. I TASM but no good with the hex
cannot re-load TKTEST4 suc- An interesting situation and files of MPASM. So what do I do
cessfully. solution – from which all us PIC with these hex files?
I have thoroughly checked my programmers should learn a les-
Next I downloaded MPLAB
board, PIC Tutorial board, etc. son!
from Microchip. This is fine and I
and can see no dry joints. I have could probably get used to that.
checked the clock with an oscillo- TASM, MPASM MEANS The thing is I’m not sure if that
scope and the 4MHz clock is run- has something built in that will
ning, I have re-checked all volt-
SPASM
do something with the hex files
ages with the input port test pro- Dear EPE, and then download them. Maybe
gram of Toolkit Mk2 again and all Recently I got hold of the its Picstart Plus.
voltages are present and correct, Simple PIC Programmer as fea- Any reference to program-
the 12V programming voltage tured in EPE Feb ’96. Once built ming the chip seems to refer to
switches between 12V and 5V as it has all worked fine and has serial connection, and guess
it should. spurred me on to delve deeper what – my TASM thingy plugs
into PIC programming, How- into the parallel port. Is my kit a
Derek Johnson
ever, I would appreciate it if you bit of a dinosaur? How do I get
via the Net
could just clear up a couple of my MPASM generated hex files
things that are driving me to the chip? Do I now need a
That, then, is the outline of bonkers. serial programmer instead? (I
Derek’s PIC problem, and he had Firstly, the kit came with bet this is where free downloads
obviously taken the correct steps TASM. I assume that TASM is a end.)
in trying to determine the cause of forerunner of MPASM which I Is there another EPE project
the problem. The only thing that see and hear about wherever I that gets around these prob-
occurred to me was that it might go, and a specially written lems.
be a PIC configuration problem – (guessing again) program called
the settings having become cor- SEND.EXE. The prog is com- Mick Tinker
rupted in some way. I suggested piled with TASM and down- via the Net
such to Derek and recommended loaded to the chip via the paral-
that he reconfigured as I de- lel port, all well and good.
scribed in Mini Tut. Such confusion Mick! First
Next I decided to get let me say that you seem not to
Then comes the following re- “EASYPic’n” to start learning. have been a regular reader of
ply back from Derek a couple of This is where it’s all got a bit
EPE, otherwise your knowledge
weeks later: cloudy. EASYpic’n writes out the
of PIC programming require-
code ready to be compiled by
ments and techniques would
MPASM. Undeterred by this I
Have cured my problem! – by have increased through reading
tried to use TASM instead (it’s
accidentally re-compiling TK- the several articles that we have
all I have!). Of course doing this
TEST1 and loading it. It ran published on the subject since

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 237
Maxfield & Montrose Interactive Inc
Readout
the Simple PIC Programmer. have digital inputs, and certain only PICs you are limiting your
CD Players have digital outputs? magazine’s resources. Some
In particular you should read
So if a CD player disregarded good projects with other micro-
the PIC Tutorial series of Mar-May
the false error correction code controllers will definitely open
’98 (which discusses PIC pro-
would the false code be sent your magazine to a much wider
gramming at some length), PIC
through the digital outputs? audience.
Toolkit Mk1 of July 98 (which dis-
cusses not only programming but (Hmm, I wonder). I am not saying to throw
also the differences between But that aside, pirates would away the PIC, it should be in-
MPASM and TASM), PIC Toolkit just sample from a CD player’s cluded, as it is very good for first
Mk2 of May-June ’99 (which is a audio outputs to a PC’s audio time programmers, and a lot of
much enhanced version of the inputs, and using a good PC your loyals also use PICs, but
Mk1 and has many of the features sampler, save on to a hard drive loyals like myself feel that we
you obviously have need for, in- track by track. After doing so should not be confined to a sin-
cluding the ability to translate be- they could (without the false gle subject but rather explore all
tween MPASM and TASM – it code) be put on a CDR disk and the possibilities.
also allows the newer PIC16F87x then copied as many times as Let me tell you what hap-
series to be programmed, as well they liked. All in the time it takes pened to me, I am a student and
as the ’84 series). to play a regular CD, so it seems my professor gave an assign-
the pirates will still be one step ment, to design a data logger
We strongly recommend that
ahead, and that it just merely but to design it from any other
you, and other readers in a similar
slows them down. microcontroller except PICs.
position, should read these arti-
cles, which I am sure will clear up I think true anti-piracy will None of my colleagues along
a fair number of your problems. I come when CD media is old hat with me were able to do that.
would comment, though, that as (I predict in about 10-15 years), We had to hear a long lecture
you have MPLAB you should and solid state memory sticks or on how we have gotten used to
make an in-depth attempt to get to cards are the norm. Using en- spoon-feeding, and had con-
know it, and to also obtain the cryption and digital ID tags, the fined all our attention on a single
other hardware associated with it. consumer when buying music topic. After graduating and get-
As good as Toolkit Mk2 is, it does from a store would have his ID ting a job we might be asked by
put onto the card, this ID would our superiors to design a project
not cover the full range of PICs
come from the manufacturer of from Atmel AVR, then what will
that are manufactured, whereas
the card player and would be we do?
Microchip’s hardware/software
suites are designed to do so (after unique, therefore not allowing it
to be played on any other player Ziyad Saeed
all, Microchip are the manufactur- via the Net
ers of the PICs and so provide a even if copied.
full backup for their use in indus- Darren Portsmouth
try). Rather than discuss it all fur- via the Net Editor Mike Kenward replied
ther here, do read the above- directly to Ziyad:
mentioned articles, available as I can understand that as a
back issues (or photocopies in An interesting point, Darren, student you will need to learn
some cases) from the EPE Edito- and one I am not qualified to about other microcontrollers, but
rial office. comment on. Any readers care you should realize that for the
to comment further? type of projects we publish the
FLAWED PIRACY- PIC is usually the best and easi-
PIC vs AVR ETC est solution.
PROOFING?
Dear EPE We have published projects
Dear EPE,
for the Atmel AVR microcon-
I found the Pirate-Proof CDs PICs are definitely excellent trollers, but few readers were
(News, Dec ’99) interesting but microcontrollers, but it does not interested. Whilst we do publish
flawed. Have the people at C-Dilla mean they are the only micro- a range of educational items we
forgotten that a computer comes controllers. There are other cannot undertake to teach you
with an Audio Line-in and some good microcontrollers like Atmel about all the subjects you will
more expensive sound cards AVR or Scenix SX. By using undertake – sometimes you will

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 238
Maxfield & Montrose Interactive Inc
Readout
need to find resources else- I would like to say that I find FTP PLUS TI2K
where. the Teach-In series excellent. It
Dear EPE,
explains concepts in a clear,
thorough and practical way, and In Readout it seems some
To which I will add my own I have really enjoyed learning folks have a problem download-
comment that I was personally through it. ing from the FTP site, or they
very disappointed that the AVRs are getting corrupted code. I al-
did not receive the reader re- John Thornton ways use WS_FTP, which is a
sponse I had hoped for. I had Sunderland free shareware FTP program.
felt that we should actively It’s very easy to use for both
demonstrate that microcon- down and up loading!
trollers other than PICs were in The Teach-In circuits should
function even with voltage levels I have downloaded the
commercial use and I was quite Teach-In 2000 software and
prepared to learn about them for well below 5V, even as low as
4V. When new, your 6V battery have to say I like it, it will prove
myself and on behalf of you all! very useful. The pots screen is
But, as so few readers have ex- will probably deliver about 6××5V.
useful and the cap-resistor time
pressed an interest in AVRs, I I would probably regard 5××5V as constants, can’t wait to see how
too shall stick with PICs, which I being the level at which I would you convert the printer port to a
must add, are not only “good for replace the battery, and so set frequency counter! What I would
first time programmers”, but are one threshold for a little above like to see added is a 555 timer
widely used by professional de- that, and another for about 6V time-freq calculator and basic
signers in industry. as advance warning that “fuel” is opamp configuration with gain
beginning to get a bit low. But in calc, etc.
many ways, it’s a somewhat ar-
VOLTAGE MONITOR bitrary matter since the amount Mel Saunders
Dear EPE, of current being consumed will via the Net
I am writing in regard to the determine what may be re-
Voltage Monitor Starter Project garded as a reasonable life ex-
pectancy for the power remain- Hopefully, you should know
in the Feb ’00 issue. Since I am
ing in the battery. by now – details were given in
a beginner and am following the
Feb ’00 issue, easy isn’t it?!
Teach-In 2000 series, I thought It’s like with car driving: my Sorry to disappoint, though, I’m
that this would be an excellent fuel light comes on when the not covering 555s in TI2K. The
project to build and use to en- tank is down to a quarter full. It aim of the series is to achieve a
sure that the voltage level of the is typically a 500 mile tank and broader sweep without getting
battery I am using when doing so I know that I probably still into specific named devices. Be-
the practical experiments does have well over a hundred miles sides which, there’s been
not fall below a critical level. before having to walk! A hun- enough published on 555s to fill
You give very clear and dred miles on the motorway is the British Library twice over
easy-to-follow instructions for less than two hours of fuel re- (much of it originating in EPE) –
determining threshold voltages maining. Driving locally to the I’ve no wish to add to the glut!
of the detectors when using the shops and back, the same fuel
device to monitor batteries of probably represents several
voltages different to 12V. But days.
what are these threshold volt- If you really feel in danger of
ages for a 6V battery? I would “running out”, keep a back-up
assume the upper threshold fuel supply available, in your
level to be 6V, but I have no case keep another battery
idea what the lower one should handy. I compliment you,
be. I would be most grateful if though, on your initiative in this
you could recommend to me matter. Building the Voltage
suitable threshold voltages, Monitor will not only prove to be
bearing in mind that the project useful constructional experi-
is to be used in conjunction with ence, but using it will also help
the power supply for your reinforce your concept of elec-
Teach-In series. tronic power consumption.

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 239
Maxfield & Montrose Interactive Inc
with DAVID BARRINGTON 9-way PC serial lead (25-way
extra), and all other
components. They have even
Some Component RF Solutions (UK)
included a low-voltage stepper
Suppliers for EPE Online Tel: +44 (0) 1273-488880
motor and UK mains adapter,
Web: www.rfsolution.co.uk “plug” type, power supply.
Constructional Articles
RS (Radio Spares) (UK) All this for just 34.99 UK
Antex Web: www.rswww.com
Web: www.antex.co.uk Pounds plus 3 UK Pounds post
Speak & Co. Ltd. and packing. For full details
Bull Electrical (UK) Tel: +44 (0) 1873-811281 contact Magenta Electronics
Tel: +44 (0) 1273-203500
Email: sales@bull- 2000.co.uk or E-mail:
electrical.com EPE ICEbreaker sales@magenta2000.co.uk.
Web: www.bullnet.co.uk Apart from the specially Finally, we understand that
programmed PIC16F877 some overseas readers
CPC Preston (UK)
microcontroller chip, most of the (particularly in USA) may have
Tel: +44 (0) 1772-654455
other components needed to difficulty in obtaining the ZTX
EPE Online Store and Library construct the EPE ICEbreaker transistor. The designer informs
Web: www.epemag.com project are fairly common items. us that most general purpose
Electromail (UK) The “firmware” program in the npn types rated at 1A 60V
Tel: +44 (0) 1536-204555 chip is loaded and copy- should work (though not tried) in
protected (in the upper half of this set-up.
ESR (UK)
Tel: +44 (0) 191-2514363 the 8K program memory) and is
Fax: +44 (0) 191-2522296 not available in any other way – High Performance
you must purchase the
Email: sales@esr.co.uk
preprogrammed PIC chip to
Regenerative Receiver
Web: www.esr.co.uk Some of the components
build this project.
Farnell (UK) needed for the High
We have reached a special
Tel: +44 (0) 113-263-6311 Performance Regenerative
agreement whereby we are able
Web: www.farnell.com Receiver may be hard to track
to offer a ready-programmed,
Gothic Crellon (UK) down. We have not included the
20MHz version, PIC16F877 chip
Tel: +44 (0) 1743-788878 Jackson type tuning capacitors
together with a floppy disk
in our pricing for this project, as
Greenweld (UK) containing the ICEbreaker
it will depend on the condition
Fax: +44 (0) 1992-613020 software and the printed circuit
and “newness” of these
Email: greenweld@aol.com board (code 7000257) -- see the
variables. We suggest you shop
Web: EPE Online Store at
around for these items as they
www.greenweld.co.uk www.epemag.com
could add as much as 30 UK
Maplin (UK) Also, the ICEbreaker pounds, or nearly double the
Web: www.maplin.co.uk software, including the simple price, of this Receiver. Try Bull
test program and demo Electrical or J&N Factors (Tel:
Magenta Electronics (UK) programs, is available for free +44 (0) 1444-881965), who may
Tel: +44 (0) 1283-565435 download from the EPE Online be able to offer a good price, if
Email: Library at www.epemag.com they still stock them. You can
sales@magenta2000.co.uk also try Mainline Surplus Sales
A special package has been
Web: (Tel: +44 (0) 870-241-0810).
put together by Magenta
www.magenta2000.co.uk
Electronics, which contains the We found that some of the
Microchip following: preprogrammed type numbers quoted for the
Web: www.microchip.com 16F877 (20MHz version), TOKO tuning range coils did not
Rapid Electronics (UK) printed circuit board, solderless tally with our information and
Tel: +44 (0) 1206-751166 breadboard, LCD display could have caused real
module, floppy disk, BT47 relay, problems. However, thanks to
Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 240
Maxfield & Montrose Interactive Inc
Shop Talk
the designer’s, Raymond Haig, 1677-425840) purchased some
efforts in double-checking with specially and, at the time of PLEASE TAKE NOTE:
the TOKO suppliers, we now going to press, we understand Scratch Blanker Jan '00
have the correct type numbers. they still have stocks.
We have been informed that
The TOKO coil numbers The rest of the components,
the MN3004 delay-line and the
and ranges used in the Receiver including the ceramic resonator,
MN3101 clock generator ICs
have been set out in a table should be readily available
called for in the Scratch Blanker
(next month) and were items. Just one point, specify
are no longer produced or
purchased from Bonex Ltd (Tel: the L suffix when ordering the
stocked by Maplin. However we
+44 (0) 1753-549502). Type BC184L general-purpose
understand that Sky Electronics
numbers and order codes are as transistor, because other types
(Tel +44 (0) 20-8450-0995) have
follows: CAN1A350EK, 380-350; have differing pinouts to this
some.
RWO6A7752EK, 357-752; one.
RWR331208NO, 351-208; The single-sided printed
154FN8A6438EK, 356-438; circuit board is available from
KANK3426R, 363-426; the EPE Online Store (code
KANK3337R, 363-337; 7000258) at www.epemag.com
MKXNAK3428R, 363-767.
The rest of the components
for this project should be widely Automatic Train Signal
stocked. The three Receiver All parts, including the
printed circuit boards are LF351N IC, for the Automatic
available as a set and are Train Signal, this month’s
obtainable from the EPE Online “starter project”, should be
Store at www.epemag.com stocked by our regular
We could not close without components advertisers. The
saying that the author has choice of LEDs, 3mm or 5mm,
produced a really “professional” will depend on gauge and size
Regenerative Receiver – almost of your model railway layout.
a piece of nostalgic art! The LED current is not very
high, so “high brightness” types
are preferable.
Parking Warning System
A few dedicated parts are Teach-In 2000
called up for the Parking
Warning System and may not No additional components
be obtainable from your usual are called for in this month's
local component stockist. The installment of the Teach-In 2000
PIC260435 infrared sensor/ series. For details of special
amplifier/demodulator came packs readers should contact:
from Farnell, code 139-877.
(This device has nothing to do ESR Electronic
with PIC microcontrollers.) Components – Hardware/Tools
and Components Pack.
Turning to the HT12B or
HT12A encoder and the HT12D Magenta Electronics –
decoder ICs, these caused Multimeter and components, Kit
considerable sourcing problems 879.
last time they were used in a FML Electronics (Tel +44 (0)
published design. At that time, 1677-425840) – Basic
they appeared in a well-known component sets.
company’s catalog, but, in fact, N. R. Bardwell (Tel +44 (0)
they had discontinued stocking 114 255-2886) – Digital
them. To solve this problem Multimeter special offer.
FML Electronics (Tel: +44 (0)

Copyright © 2000 Wimborne Publishing Ltd and EPE Online, March 2000 - www.epemag.com - 241
Maxfield & Montrose Interactive Inc

You might also like