This is only a preview of the February 1996 issue of Silicon Chip. You can view 26 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Woofer Stopper Mk 2 - Now It's Even Better!":
Articles in this series:
Items relevant to "Computer Bits":
Articles in this series:
|
Build This
Basic Logic Trainer
And learn all
about digital ICs
This Basic Logic Trainer from Dick Smith
Electronics is just the shot for teaching digital
electronics and demonstrating digital logic
concepts. It’s easy to build, easy to operate
and runs from a 9V DC plugpack supply.
Design by REX CALLAGHAN
As shown in the photograph, the
Basic Logic Trainer is built around a
central prototyping board. The trainer
provides the necessary power supply
rails (5V DC), clock signals and logic
inputs to this board, while a number
of LEDs are used to indicate logic
outputs.
The connections to and from the
prototyping board are made using
single strand telephone cable, as are
the connections between IC pins on
the board itself. You can make the test
12 Silicon Chip
circuit as simple or as complicated
as you like – anything from just one
digital logic IC to 10 or more ICs.
Two large banana plug sockets are
used for the power supply terminals
and these are located directly above
the prototyping board. This regulated 5V supply is current limited and
is there
fore protected against short
circuits. Because it has no heatsink or
securing bolt, the regulator will thermally shut down somewhere near its
rated current if there is an overload.
The choice of a single 5V DC supply makes this unit suitable for use
with 74 series TTL integrated circuits
(74xx, 74LSxx, 74HCxx, 74Cxx, etc)
and with 4000 series CMOS logic ICs.
The latter will operate over a supply
range from 3-15V DC and therefore
will work from a 5V supply without
problems.
All logic inputs to the test circuit
are buffered and these are set by four
switches immediately to the left of the
prototyping board. When a switch is
in the up position, the corresponding
logic input is high. Conversely, when
a switch is in the down position, the
corresponding logic input is low.
These buffered inputs are labelled
B0-B3 and are brought out via a 5-way
vpin header socket.
The fifth terminal on the header
socket provides the clock pulses
from an additional circuit hidden
behind the front panel. The pulse
Fig.1: IC1 (a TLC555 timer) is used to provide the clock pulses, while IC3a and
IC3b form a window comparator to provide the logic probe function. IC2b-f
and IC4a-d buffer the logic signals to and from the test circuit.
is high or low, or is alternating between
these two logic states.
How it works
output provides either a single pulse
if its associated switch (at top, left) is
pushed down momentarily, or a stream
of clock pulses if the switch is in the
clock position.
At the other end, the logic output(s)
from the test circuit are fed to a 4-way
pin header socket. Each output is then
fed to a buffering circuit and these in
turn drive four LEDs (labelled Q0-Q3)
to show the logic states at up to four
different points on the test circuit.
By the way, the fact that the outputs
from the test circuit are “buffered”
means that they do not need to be
driven with the full LED current.
That’s taken care of by the buffering
circuitry. Each buffer stage has a high
input impedance, to avoid loading the
outputs of the test circuit.
Logic probe
Another very worthwhile feature is
the provision of a simple logic probe.
This uses a standard multimeter test
lead which plugs into a 3.5mm socket on the front panel. The probe can
be used to establish the logic states
at various points on the test circuit.
Connecting the probe to a logic 0 level
will cause a green LED to light. Conversely, connecting to a logic 1 level
will illuminate a red LED.
The two indicator LEDs are immediately to the right of the probe socket.
They simply indicate whether a point
Refer now to Fig.1 for the circuit
details of the Basic Logic Trainer. As
stated above, power for the circuit
comes from a 9V DC plugpack supply.
Diode D1 provides protection against
reverse supply polarity. Its output
feeds 3-terminal regulator REG1 which
produces a regulated +5V DC rail at its
OUT terminal. LED 1 provides power
on/off indication, while R101 limits
the current through the LED.
The output from the regulator is also
connected directly to the +5V output
terminal and it supplies the ICs. The
negative output terminal connects to
the negative supply line.
IC1, a TLC555 timer, is used to
provide clock pulses. It is wired as
February 1996 13
Take care with the orientation of polarised components (ICs, diodes, LEDs
and electrolytic capacitors) when assembling the PC board. The LEDs and pin
header sockets are soldered after the board is secured to the front panel.
an astable oscillator, the frequency
of which is determined by the total
resistance present between pin 3 and
the 0.47µF capacitor (C2) on pin 2.
Normally, when SW1 is in the
centre-off position, pin 3 of buffer
stage IC2a is held low by R1 and so
pin 4 (reset) of the timer is also held
low. This effectively holds IC1 in the
reset state, with its output at pin 3
remaining low.
When SW1 is in the CLOCK position,
pin 4 of IC1 is pulled high via SW1a
and IC2a and the reset is released. At
the same time, SW1b shorts out R3
and so the timing for the circuit is set
by R2, R4 and C2. This causes IC1 to
oscillate at a 2Hz rate.
Conversely, when SW1a is in the
PULSE (spring loaded, momentary
contact) position, R3 is switched in
series with the timing circuit. As a
result, IC1 runs much more slowly
than before, to produce one pulse
about every 1.6 seconds. Thus, by
momentarily flicking SW1 to the
PULSE position, IC1 outputs a single
clock pulse.
Diode D2 ensures that C2 rapidly
discharges when SW1 returns to its
centre-off position.
The output from IC1 is fed to pin
14 of non-inverting buffer stage IC2b.
This in turn drives the PULSE terminal,
to provide either a continuous clock
signal or a one-shot pulse signal.
Switch logic
The PC board is mounted on the rear of the lid using 12mm tapped spacers
and secured using short machine screws. Note how the 1000µF electrolytic
capacitor is mounted.
The remaining gates in IC2 (IC2cIC2f) are used to buffer the logic
setting switches (SW2-SW5). When a
switch selects the +5V rail, the output
of its corresponding buffer is high.
Conversely, when ground is selected,
the output of the buffer is low. The
RESISTOR COLOUR CODES
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
No.
1
1
2
1
1
8
1
1
1
1
4
6
14 Silicon Chip
Value
1MΩ
470kΩ
390kΩ
150kΩ
130kΩ
100kΩ
62kΩ
47kΩ
36kΩ
10kΩ
2.7kΩ
220Ω
4-Band Code (1%)
brown black green brown
yellow violet yellow brown
orange white yellow brown
brown green yellow brown
brown orange yellow brown
brown black yellow brown
blue red orange brown
yellow violet orange brown
orange blue orange brown
brown black orange brown
red violet red brown
red red brown brown
5-Band Code (1%)
brown black black yellow brown
yellow violet black orange brown
orange white black orange brown
brown green black orange brown
brown orange black orange brown
brown black black orange brown
blue red black red brown
yellow violet black red brown
orange blue black red brown
brown black black red brown
red violet black brown brown
red red black black brown
buffered logic outputs appear at pins
10, 6, 12 & 4 of IC2 and are fed to the
B0-B3 terminals respectively.
LEDs 2-5 are used to indicate the
logic states. These LEDs are driven
using inverting buffer stages IC4a-IC4d
via 220Ω current limiting resistors.
Normally, R13-R16 hold the inputs
to these buffer stages low. This means
that their outputs are all normally high
and so the LEDs are all off. However,
if any of the Q0-Q3 inputs is pulled
high, the corresponding buffer input
is also pulled high and so its output
switches low and lights the relevant
LED. Resistors R9-R12 protect the
inputs of the 4049.
Logic probe
IC3a and IC3b form the logic probe
circuit. These two op amps are wired
in a standard window comparator
configuration and drive two logic indicator LEDs (LED6 & LED7).
Resistors R22-R26 set the bias
voltages on the op amp inputs. As indicated on the circuit, pin 5 is biased
to +2V, pins 6 & 3 to +1.4V and pin 2
to +0.9V. As a result, the non-inverting input of each op amp is normally
above the inverting inputs and so the
op amp outputs are normally high and
the LEDs are off.
If, however, the probe input is connected to a logic high (ie, 2- 5V), pin 6
of IC3a will also be pulled high. As a
result, pin 7 of IC3a switches low and
this lights LED7 (red) to indicate that
the high logic state has been detected.
IC3b will not change state and so LED6
will remain off.
Conversely, if the probe input is
connected to a logic low (ie, less than
0.9V), pin 3 is also pulled low and the
output of IC3b switches low instead.
This lights LED6 to indicate that a logic
low has been detected. Diode D3 is
there to clip any large negative-going
pulses that might be picked up via the
probe input, to prevent damage to the
op amps.
Construction
Construction of the Basic Logic
Trainer is easy, since virtually all the
parts mount onto a single large PC
board. The exceptions are the banana
sockets which mount directly onto
the front panel and the 3.5mm panel
socket for the plugpack supply.
Refer to Fig.2 when installing the
parts on the PC board. Begin by installing the resistors, followed by the
Fig.2: install the parts on the PC board as shown here. Note particularly that the
1000µF electrolytic capacitor is mounted on the copper side of the board.
February 1996 15
PARTS LIST
1 console case
1 front panel
1 prototyping board
1 PC board (© DSE)
1 test lead (for logic probe)
1 9V 200mA plugpack supply
4 SPDT miniature toggle switches
1 DPDT centre off, momentary on
toggle switch
1 red banana socket (large)
1 black banana socket (large)
1 yellow banana socket
4 12mm tapped spacers
1 3.5mm DC panel socket
1 14-pin wire-wrap socket
4 self-tapping screws (to secure
front panel)
Semiconductors
1 TLC555 timer IC (IC1)
1 4050 hex non-inverting buffer (IC2)
1 LM393 dual op amp (IC3)
1 4049 hex inverting buffer (IC4)
1 78M05 3-terminal regulator
(REG1)
1 1N4004 silicon diode (D1)
2 1N4148 silicon diodes (D2,D3)
6 5mm red LEDs (LED1-5, LED7)
1 5mm green LED (LED6)
Capacitors
1 1000µF 16VW electrolytic
1 0.47µF monolithic
5 0.1µF ceramic
1 .01µF ceramic
Resistors (0.25W, 1%)
1 1MΩ
1 62kΩ
1 470kΩ
1 47kΩ
2 390kΩ
1 36kΩ
1 150kΩ
1 10kΩ
1 130kΩ
4 2.7kΩ
8 100kΩ
6 220Ω
Wire & cable
1 200mm-length 0.71mm tinned
copper wire (for links)
1 500mm-length single strand
telephone cable
2 400mm-lengths of hook-up wire,
red & black
WHERE TO BUY A KIT
A kit of parts for the Basic Logic
Trainer is available from Dick Smith
Electronics stores & by mail order
from PO Box 321, North Ryde,
NSW 2113. Phone (02) 888 2105.
The cost is $129 + $8 p&p. Please
quote catalog number K3010 when
ordering.
Note: PC artwork copyright © Dick
Smith Electronics.
16 Silicon Chip
ceramic capacitors, the diodes and the
ICs. Note that D1 is a 1N4004 type,
while D2 and D3 are 1N4148s.
The five wire links can be installed
now, using the off-cuts from resistor
leads. This done, install the 7805
3-terminal regulator, noting that its
leads are bent through 90° so that its
metal tab sits flat against the PC board.
The 1000µF electrolytic capacitor is
installed on the underside of the PC
board. Its leads are also bent through
90°, so that it can be laid flat against
the board surface. Be sure to install
this part the right way around.
The five toggle switches are mount
ed directly on the PC board. Push
them right down onto the board before
soldering their leads and note that S1
must be oriented with its momentary
(ie, spring-loaded) position towards
the bottom. The switch nuts can be
either omitted or screwed all the way
down.
By this stage, the board will be
complete except for the LEDs and the
pin headers. The LEDs can be installed
now (the green one is LED 6) but do
not solder their leads yet, as they must
first be adjusted for height when the
front panel is in
stalled. Take care
with the orientation of the LEDs – the
cathode (K) lead will be the shorter of
the two. In addition, the cathode lead
is adjacent to a flat edge at the bottom
of the LED body.
The 4-way and 5-way pin headers
are obtained by cutting down a single
14-pin wire-wrap socket. To do this,
first cut the wire-wrap socket in half
using a pair of sharp sidecutters, to
obtain two 7-pin sockets. The unwanted pins can then be removed and the
socket bodies carefully trimmed and
filed to size to that they fit the slits in
the front panel.
Do not mount the pin headers yet;
that step comes later when the front
panel is fitted.
Hardware assembly
Begin the hardware assembly by
attaching the prototyping board to the
front panel using double-sided tape.
This done, fit the three banana sockets
to the front panel. Use the red socket
for the positive terminal, black for the
negative terminal and yellow for the
logic probe terminal. Do these sockets
up tight and connect appropriately
coloured leads (eg, red for positive,
black for negative) to their solder
lugs. These leads should all be about
60mm in length, so that they can be
run to their respective points on the
PC board.
The 3.5mm DC socket is mounted on
the bottom lefthand hand side of the
rear panel (as viewed from the rear).
This socket is wired via two 150mm
long leads (red for positive, black for
negative) to the plus (+) and minus (-)
inputs on the PC board. Twist these
leads together to keep things neat
and tidy.
Note that the positive lead must go
to the tip terminal of the DC socket,
while the black lead must go to the
collar (or sleeve) terminal.
Now for the final assembly. First, fit
the four 12mm-long spacers to the PC
board and secure them with the short
screws supplied. This done, fit the
4-way and 5-way pin headers to the
PC board, then fit the front panel and
secure it in position.
The various LEDs and the pin headers can now be pushed through their
respective holes on the front panel and
carefully aligned. When everything
looks OK, solder the leads to secure
them in position. Finally, fit the lid to
the case and secure it using the four
self-tapping screws supplied.
Testing
When power is applied, the red
LED next to the +5V socket should
illuminate. If it doesn’t, then the LED
is either in backwards, there is a fault
in the regulator circuit, the supply
polarity is incorrect, or the regulator
output is short-circuited to ground. In
particular, check that D1 and REG1 are
correctly oriented.
The 5V DC output terminals are
a convenient place to check the 5V
supply at any time. The power on/
off LED will provide a handy quick
visual indication of the state of the
5V supply; eg, you may see this LED
dim if a heavy load is placed across
the supply, or extinguish if the power
supply is inadvertently short-circuited
on the protoboard.
Assuming that the power supply is
OK, the next step is to check out the
logic probe circuitry. To do this, simply plug the probe in and touch the
positive and negative supply terminals
in turn. Check that the red LED (High)
lights when the positive terminal is
touched and that the green LED (Low)
lights when the negative terminal is
touched.
If the logic probe doesn’t work, first
check that the voltages on pins 2, 3, 6 &
5 of IC3 match those marked on the cir
cuit. If they don’t, then it’s likely that
one of the bias resistors (R22-R26) is
incorrect or D3 is back to front. Check
also that D3, IC3 and the two LEDs are
correctly oriented.
Once the logic probe is working correctly, it can be used to check the rest of
the circuit. For example, by touching
the probe on the PULSE terminal, you
can check the clock circuitry (IC1).
The green LED should light when S1
is in the centre-off position, while
the red LED should flash at a 2Hz rate
when S1 is in the CLOCK position; ie,
the logic probe should show the indi
vidual positive going clock pulses as
they occur.
You should get a much slower rate
if S1 is held in the PULSE position (ie,
one pulse about every 1.6 seconds).
If you don’t get any clock pulses,
check the circuitry around IC1. Similarly, use the logic probe to confirm
that SW2-SW5 can be used to set their
corresponding outputs (B0-B3) high
or low.
The output indicator circuitry can
be tested by setting B0 high and connecting a lead from this terminal to
Q0, Q1, Q2 & Q3 in turn. In each case,
the corresponding output LED should
light. If it doesn’t, check the resistor
values at the inputs to IC4a-IC4d.
Using the trainer
By this stage, you have checked
that the individual components of the
Basic Logic Trainer are functioning
correctly. Having done this, you will
have a basic knowledge of how to use
these components; ie:
(1) the logic switches (SW2-SW5) are
used to set the logic states on B0-B3
(high or low);
(2) the Q0-Q3 terminals are continually monitored and their status indicated
by individual LEDs;
(3) the clock/pulse generator switch
can provide either a train of clock
pulses or individual pulses as required; and
(4) the logic probe can be used at any
time to check the logic state at different
positions on the test circuit.
We recommend using the insulated
single-strand wire to make the various
wiring connections. One length of
500mm can be cut into many smaller
lengths, each of which should have
about 5mm of insulation stripped back
SC
at either end.
Basic Logic Trainer Demonstration
As an example, we’ll wire up a
common CMOS flipflop and exercise
it. The device is the 14-pin CMOS
4013 which is a dual D-type flipflop.
Its pin connections are shown in
Table 1.
Table 1: 4013 Pin Connections
Function
Pin No.
Function
Pin No.
Q1
1
Vdd (+)
14
Q1
2
Q2
13
Clock 1
3
Q2
12
Reset 1
4
Clock 2
11
Data 1
5
Reset 2
10
Set 1
6
Data 2
9
Vss (-)
7
Set 2
8
The step-by-step procedure is as
follows:
(1) Insert the IC into the proto
board, such that pin 1 is at the top
left and pin 14 at the top right. The
IC should be inserted so that the two
vertical columns of pins are either
side of a channel in the prototyping
board, so that they are not shorted
together.
(2) Using suitable leads, connect
the +ve and -ve supply terminals to
the +ve and -ve supply buses on the
prototyping board. A short lead can
then be connected from the +ve bus
to pin 14, while a second lead can
be connect from the -ve bus to pin 7.
You can check that these two
connections are correct by using
the logic probe. This should show a
low state at pin 7 and a high state
at pin 14.
(3) Configure flipflop 1 by connecting:
(i) a wire from pin 6 to B0;
(ii) a wire from pin 4 to B1;
(iii) a wire from pin 5 to B2;
(iv) a wire from pin 1 to Q3;
(v) a wire from pin 2 to Q2; and
(vi) a wire from pin 3 to PULSE/
CLOCK
The above procedure connects
the four inputs and the two outputs of
flipflop 1 on the 4013. Table 2 shows
these various test connections.
Now let’s explore the basic operation of the flipflop:
(1) set B0-B2 to logic 0;
(2) push the Pulse switch once.
LED Q3 should be off (logic low or
0) and LED Q2 should be on (logic
high or 1);
(4) set switch B2 to a logic 1; and
(5) Push the Pulse switch once.
This should clock the new data (ie,
a logic 1 from B2) through to the
outputs and so the logic states on
Q3 and Q2 should reverse (ie, Q3
now on, Q2 now off). Further pulses
should not alter this, until the DATA 1
input (B2) is altered again.
This shows the basic operation of
a D-type flipflop; ie, the logic level on
the Data input is transferred through
to the Q output (pin 1) on receipt of
a clock pulse.
What this means is that you can
get the flipflop to automatically toggle
on the receipt of each clock pulse
by connecting its Q-bar output to its
Data input. To do this:
(1) remove the wire between B2
and pin 5 of the 4013; and
(2) connect a wire between pin 2
and pin 5 of the 4013.
Now when you work the pulse
switch or switch to the CLOCK position, the two output LEDs should
flash on and off alternately.
Further experiments
(1) Connect an additional wire
between pin 3 of the 4013 and LED
output Q1. This will allow you to observe the relationship between the
clock input to the 4013 (on LED Q1)
and the 4013 Q and Q-bar output
levels (on LED Q2 and LED Q3).
Because the Q-bar (inverted) output of flipflop 1 is fed into the Data
input, each clock pulse will change
the existing state of the Q output.
This is the classic divide-by-two
configuration of the basic flipflop and
is used in many circuit applications.
Table 2: Test Connections
Protoboard
Connections
IC Pin
Function
Pin No.
Clock/pulse Switch
Clock 1
3
Switch B1
Reset 1
4
Switch B2
Data 1
5
Switch B0
Set 1
6
LED Q3
Q1
1
LED Q2
Q1
2
February 1996 17
|