Vous êtes sur la page 1sur 3

the total number of prize-winning tact address is provided, and we these may be obtained.

Some projects
designs is o v e r 1 0 0! All these designs encourage information exchange are ready-to-go and suitable for direct
have been collected and transferred between authors and CD-ROM users. A reproduction, while others may serve as
on to a CD-ROM which will be available readme file on the CD-ROM provides a source of inspiration for your own
through our Readers Services by the the name of each project and its applications.
end of January 1998. The tile of the CD- author, along with its location in a sub-
ROM is P-C Hardware/Software 97- directory on the CD-ROM. Highlights on the CD-ROM include:
98, order code 986001-1, price 16.50. As a matter of course, all projects IC Tester (Int.), Gyroscope (F), Cable
Users of this CD-ROM should note that come complete with unabridged Tester (G), PIC on the Rocks (UK), Pene-
all projects are supplied as is, that is, source code files (PIC, 8051/32, 8751, lope Robot (UK), AVRc Parallel Pro-
they have not been extensively tested Atmel AVR, 68HC11, Z80 and many oth- grammer (UK), Solar Controller (G), Intel-
by our laboratory as is usual with pro- ers), so heres a unique opportunity for ligent Cable Tester (F), Video DVM (UK),
jects submitted by free-lance authors. you to learn the tools of the trade. Cer- PIC Simulator (G), Speech Controller
Also, some of the file formats used by tain authors have also supplied the (G), Monitor Refresh Meter (NL), Loco-
the Contest competitors may be associated assemblers, compilers or motive Decoder (NL), 3-Phase Sinewave
unusual. In all cases, however, a con- debuggers, or information on how Generator (F).

FIRST NATIONAL PRIZE GERMANY


1997 International Microprocessor Competition
Cables for information traffic are usually marked by a
large number of wires, which have to be connected
in the proper order. If all wires have the same colour,
or if the cable ends are at a considerable distance
from each other, a lot of patience is needed to
a ila
establish the wire allocation. w a r eav P- b
har C

le
o n cd
by U. Reiser (Germany) sof d &
twa
'97 re

Cable Tester
ft

-'9
-r 8
o m so
IC4
LM2940CT

The cable tester described here is


D3
capable of performing a continuity test 1 1 C4 C5
IC2 IC3
on 12 wires at a time, and find out 8 8 100n 47 2x
5V1
which wire ends belong together. This is 1N4148 0W5
zie tekst
achieved by installing a transmitter * see text D1 R3
* siehe Text
100

device at one end of the cable, and a * voir texte R1


D2
D4
receiver, at the other. The transmitter
10k

* T1
provides 12 outputs which supply differ- C3 R2
rot
10k red
ent pulse codes. The receiver detects 100n
14 4
rouge
MCLR rood
the code and indicates it on a 7-seg- RA4
3 BC547B

ment LED display. Apart from the wire 1 7


10 9 18 1 7 6
RA1 RA2
under test, another connection has to
2 IC1 8
be present between the transmitter and 12 11 17
RA0 RA3
2 5 4 S1

the receiver (cable braid, screening, or 3


15 14 10 9 3 2
9
RB4 RB3
a reference wire). To help you find this 4 PIC16C84-4 10
6 7 11 8 9 10
additional connection, the receiver fea- RB5 RB2

tures an acoustic continuity tester. 5


4 5 12
RB6 RB1
7 11 12
11

6 12
2 3 13 6 14 15 6...9V
Transmitter and receiver M
RB7
OSC2 OSC1
RB0

M
IC2 15 X1 16 5
IC3
Both the transmitter and the receiver CD4050
* CD4050
*
are based on a RISC microcontroller C1
4MHz
C2

(PIC) type 16C84, which was chosen 15p 15p

because it slashes the component 982022 - 11

count in these circuits. Outputs RA0


Figure 1. Circuit diagram of the transmitter.
through RA3 and RB0 through RB7 of the

MICROPROCESSOR DESIGN CONTEST Elektor Electronics EXTRA 9 - 1/98


IC4 transmitter shown in Figure 1 supply
LM2940CT active low pulses with a length of 1 ms,
5V the number of pulses being dependent
BZ1
C2 C3
D4 on the port line number. Logic high
pauses, also with a length of 1 ms, are
100n 47 2x
1N4148 5V1
0W5
inserted between the active-low pulses.
* zie tekst
D2 R4 To make sure the transmitted code
T2
* see text R3
sequences are properly copied at the

100
* siehe Text

1k
D3
* voir texte D5 far end of the cable, a run-in start bit is
T2
BC547B rot
5V transmitted (1 ms low/1 ms high), as well
red
rouge
as a stop bit, which is a 4-ms long
BC547B rood
pause (high). The total length of a pulse
C1 R5 R6 b
a sequence is 29 ms.

3k3

3k3
LD2
100n 14 4
1
3
CA
8
CA
c The PIC outputs are connected to
MCLR g
RA0
17 2
f
drivers (type 4049 using the TRANSM49
R2 RA1
18 4
e
S1 program, or type 4050 if you use the
1 5
RA2 d
TRANSM50 version). These buffers
68k

2 R7 7
RA3 820 c 5V
R8
820
9
b ensure that sufficient drive current is
IC1 10 a
dp available for relatively long cables. By
PIC16C84-4 6 HD1105 * b way of constant-current source T1, out-
a
R1
10k
3
RA4 RB0
6 LD2 3 8 c
put RA4 (RTTC) causes the power on
RB1
7 R9
820
1
g
CA CA LED, D4, to flash at a rate of 0.5 s (i.e.,
8 R10 2
RB2
9 R11
820
4
f during the high pause of the test rou-
RB3 820 e
RB4
10 R12
820
5
d
tine). The zener diode makes it impossi-
D1 11 R13 7
RB5
12 R14
820
9
c ble for the LED to light when the battery
RB6 820 b
RB7
13 R15
820
10 a 6...9V voltage drops below the zener voltage.
6V1 dp
0W5 OSC2 OSC1 6
In this way, the LED also acts as a use-
15 X1 16 5
HD1105
* ful low-battery indicator. The transmit-
C4 C5
ter operates off a regulated 5-V supply,
4MHz with only the on indicator being pow-
15p 15p
ered directly by the battery.
982022 - 12
In the receiver (Figure 2), the trans-
mitter signal is evaluated by a
Figure 2. Circuit diagram of the receiver. PIC16C84. The signal
picked up by the test
probe is applied to
Schmitt-trigger input RA4
via a current-limiting
resistor, R1. R2 pulls the
non-used input high,
while D1 eliminates input
voltage surges. The PIC
is constantly busy evalu-
ating the received pulse
trains. If a particular
sequence is recognised
twice in a row, the rele-
vant wire number
appears on the two-digit
LED display. If the test
Figure 3. PCB copper track layouts and component overlays. probe remains logic
high longer than 3 s, the
display is cleared and
the power on LED
flashes (current saving
mode).
Pulses (1 ms low, 1 ms
high) are recognised by
means of three level
measurements. In
standby mode (input
high) the software exe-
cutes a delay loop. If a
low level is detected, the
signal level is checked
again during the pulse
time (after 0.776 ms), to

10 - 1/98 Elektor Electronics EXTRA MICROPROCESSOR DESIGN CONTEST


COMPONENTS LIST X1 = 4MHz quartz crystal C4,C5 = 15pF
TRANSMITTER S1 = miniature switch, on/off, PCB C3 = 47F 10V
mount
Resistors: Semiconductors:
Case (Conrad 522864-77)
R1,R2 = 10k D1 = zener diode, 6V 0.5W
14 test prods (Conrad 737691-77)
R3 = 100 D2,D3 = 1N4148
9-V PP3 battery with clip-on lead
D4 = zener diode, 5V1, 0.5W
Capacitors:
D5 = low current LED, red, 3mm
C1,C2 = 15pF
T1,R2 = BC547B
C3,C4 = 100nF (5mm) COMPONENTS LIST
IC1 = PIC16C84
C5 = 47F 10V RECEIVER
IC2 = LM2940CT
Semiconductors: Resistors:
Miscellaneous:
D1,D2 = 1N4148 R1 = 10k
X1 = 4MHz quartz crystal
D3 = zener diode 5v1, 0.5W R2 = 68k
S1 = miniature switch, on/off, PCB
D4 = low current LED, red, 3mm R3 = 1k
mount
T1 = BC547B R4 = 100
LD1,LD2 = HD1105
IC1 = PIC16C84-04 R5,R6 = 3k3
Bz1 = d.c. buzzer, 140
IC2,IC3 = 4049 or 4050 R7-R15 = 820
Case (Conrad 522864-77)
IC4 = LM2940CT
Capacitors: 2 test prods (Conrad 737691-77)
Miscellaneous: C1,C2 = 100nF (5mm) 9-V PP3 battery with clip-on lead

make sure the first pulse was not Figure 3. The only point to note in the probe to ground, whereupon the buzzer
caused by interference. After a second construction of the transmitter is that the should sound.
period of 0.776 ms, the software assembly code file matches the buffer The circuits are fitted in ABS (strength-
checks that a logic high level is pre- IC you want to use (4049 or 4050). The ened plastic) cases (1016026 mm)
sent. If so, the pulse is considered valid. receiver board allows you to use either having a battery compartment. In the
Next, it is registered in a counter, and common-cathode or common-anode transmitter case, drill one 6-mm hole for
then, after a high period of at least 7-segment displays. In the first case, the miniature toggle switch, fourteen 1-
2 ms, compared with the result of the you fit wire jumpers a-c, else, a-b. Here, mm holes for the outputs plus ground,
previous count. If the result is a match, too, two different programs are avail- and one 3-mm hole for the LED. The test
the wire number is sent to the LED dis- able (receiano.asm and receicat.asm), wires are made from short lengths of
play. If not, the previous result is over- and your choice must match that of light-duty flexible wire and miniature
written by the current one. the displays fitted on the board. test prods or crocodile clips. Inside the
Apart from the pulse interrogation Having finished the soldering work, transmitter case, each wire should have
and the high-level monitoring, the low you may connect the circuits to a its own strain relief in the form of a knot.
duration at the IN input is also under benchtop supply and check that the In the receiver case you should drill
constant examination. If the input supply voltage is 5 V behind the low- holes for the switch and the LED. Also, a
remains low longer than 48 ms, the dis- drop regulators. You may also check 20 by 13 mm rectangular clearance is
play is cleared, D5 is switched off, and the operation of the Low-Battery func- required for the 7-segment displays. Two
RA0 supplies a 2.5-kHz signal to T1. The tion by turning down the supply volt- additional 1-mm holes are required for
transistor, in turn, drives a piezo sounder. age. If the on LED starts to flash after connecting wires to the test probe and
This is the previously mentioned conti- you switch on the transmitter, you may the ground connector. As with he trans-
nuity tester function of the circuit. safely assume that this circuit is func- mitter, these wires should have knots
Meanwhile, the software examines the tional. The different pulse trains sup- acting as strain reliefs at the inside of
input every 0.4 ms. If a high level is plied by the transmitter outputs are eas- the case. (982022-1)
detected, the routine is left. ily observed if you have an oscillo-
The transmitter and the receiver are scope.
each powered by a 9-V PP3 battery. At power-on, the receiver first performs
Both circuits incorporate low-drop volt- a test routine on the displays. If every-
age regulators which enable the batter- thing works as it should, the following dis-
ies to be used until they are almost flat. play segments are switched on one after
another, at 0.6 s intervals: 0b, 0c, 0a, 0d,
Construction 0g, 0e, 0f, 1b, 1c. The piezo buzzer
sounds when the last segment lights. The
The two copper track layouts and com- on LED also lights all the time. As a fur-
ponent mounting plans are shown in ther test, you should connect the test

MICROPROCESSOR DESIGN CONTEST Elektor Electronics EXTRA 11 - 1/98

Vous aimerez peut-être aussi