This is only a preview of the February 1997 issue of Silicon Chip. You can view 25 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 "Computer Controlled Dual Power Supply; Pt.2":
Items relevant to "Control Panel For Multiple Smoke Alarms; Pt.2":
Articles in this series:
Articles in this series:
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
PC-controlled moving
message display
Have you got an old PC sitting around
gathering dust? You can use it to control this
moving LED message display which plugs
into the PC’s printer port. All you have to do
is type the message in on the keyboard.
Design by JOHN WESTERN
Moving LED message displays are
common in shops and clubs and are
very effective as advertising signs.
Now you can have your own by build
ing this unit. All you need to drive it
is an old XT (or better) computer and
you can easily set the unit up to repeat
a message or a number of messages.
While LED message displays use a
variety of formats, this one employs
characters which are seven LEDs high
by five LEDs across and these move
along the LED array at a fixed rate.
As presented here, the display con
sists of a 48 x 7 LED matrix arranged
10 Silicon Chip
on a single large PC board. This board
basically consists of three 16 x 7 LED
modules: a master module which also
contains the necessary parallel port
interface circuitry, and two extension
modules. Each module has enough
LEDs to display three characters,
which means that the basic unit can
display up to nine characters at any
given time.
If you wish, you can increase the
display width by adding another one
or two extension modules. This will
allow either 12 or 15 characters to
be displayed at any one time. The
additional extension modules are sim
ply cut from a second PC board and
connected to the lefthand end of the
message display using 12 wire links.
Conversely, you can reduce the
display width by cutting off one of
the extension modules, to give a 32 x
7 (6-character) LED display.
Of course, the length of the message
is not limited by the number of char
acters that can be displayed at any
one time. Basically, you can make the
message as long as you like. In opera
tion, the leading characters appear on
the righthand side of the display and
scroll across to the lefthand side before
disappearing off the “edge”. The mes
sage continues scrolling until all the
characters have been displayed and
can easily be set up so that it repeats.
Our prototype was built to the stand
ard 9-character configuration; ie, a sin
gle PC board with three modules. This
is housed in a folded smoked-Perspex
case to produce an attractive display.
It is powered by a 12V AC plugpack
and is connected to the parallel port
of the PC via a DB25 socket mounted
on one end of the board.
How it works
Each character to be displayed is
produced by turning on all the appro
priate LEDs in a row for a short period
of time. This is repeated for each of the
seven rows, to make up the character
in a multiplexed fashion. Because
this happens at a very high rate, all
the LEDs appear to be turned on at
the same time.
Fig.2 shows the circuit diagram of
the Moving LED Display. Each row of
LEDs is driven by a Darlington tran
sistor pair consisting of a BC549 and a
BC639; ie, Q1 & Q2 for row 1, Q3 & Q4
for row 2, etc. These seven Darlington
transistor pairs are in turn driven by
the printer port data lines.
Note that each line from the printer
port is filtered by an RC network con
sisting of a 47Ω resistor and a 220pF
capacitor. These filters prevent noise
pulses from disturbing normal opera
tion of the display.
The LED columns are controlled by
separate BC549 transistors (Q15, Q16,
etc), in turn driven by 74LS164 shift
registers (one for each group of eight
columns). These shift registers accept
the serial data applied to their A & B
data inputs and convert it to parallel
format at their Q0-Q7 outputs. So each
shift register controls eight transistors
Fig.1: this diagram gives a breakdown of the basic operation just to
light one LED. In this case, we want to light the LED at row 4 column
3 (ie, R4,C3). This involves clocking a logic 1 into the shift register
and then moving it until the third output goes high, represented here
by the closed switch between the shift register and C3. Switch SW3 is
then closed to light the row
and thus eight LED columns.
Note that, for the sake of clarity,
our circuit only shows the first eight
LED columns, their corresponding
transistors (Q15-Q22) and one shift
register (IC1). The circuitry for each
successive eight columns is identical,
with pin 13 of IC1 clocking the data
inputs of the next shift register, and so
on down the chain.
IC1 is driven by one of the parallel
printer port data lines, while two
other data lines drive the clock and
reset pins (pins 9 & 8). Basically, data
is shuffled into IC1 in serial fashion
and its appropriate Q outputs go high,
thereby turning on the corresponding
column transistors. One of the row
data lines is then briefly taken high
to light the required LEDs.
In greater detail, the character to
be displayed is broken down into
the required pattern of dots for each
row. Initially, the shift registers are all
cleared by applying a pulse to the MR
line. This sets all outputs to a logical
low condition, turning all columns off.
The required data is then applied to
the A & B data inputs and the CLK line
pulsed to move the data into the first
shift register. Successive data is sub
sequently applied in a similar fashion
until the required pattern of dots for
a particular row is set up in the shift
registers. Once the data is ready, the
row is turned on for a short period of
time after which the shift register is
cleared (reset) and the process starts
again for the next row.
Fig.1 gives a breakdown of the basic
operation just to light one LED. In this
case, we want to light the LED at row
4 column 3 (ie, R4,C3). This involves
clocking a logic 1 into the shift regis
ter and then moving it until the third
output goes high, represented here by
the closed switch between the shift
register and C3. Switch SW3 is then
closed to light the row, in this case the
single LED at R4,C3.
February 1997 11
Where To Buy The Parts
The parts for this design are available from Oatley Electronics, PO Box 89,
Oatley, NSW 2223. Phone (02) 9584 3563; fax (02) 9584 3561. The options
are as follows:
Complete Kits (does not include case)
(1) PC board, all on-board parts, software on 3.5-inch disc, a surplus plugpack
& bright red, green or amber LEDs (you specify): $165
(2) Above kit with super bright LEDs (narrow viewing angle): $200
Shortform Kits & Accessories
(3) PC board only plus software on 3.5-inch disc: $75
(4) 336 bright LEDs (red, green or amber – please specify): $45
(5) 336 super bright LEDs: $90
(6) Suitable small 10.6V 1.4A surplus switchmode power supply in case: $12
Note 1: none of the above options includes a case or the Perspex channel
shown in the photos. Please add $6.00 p&p to any combination.
Note 2: the PC board associated with this design is copyright Oatley Electronics. In addition, the software supplied is copyright John Western and must
not be altered in any way or used for other purposes without permission.
Note, however, that the basic circuit
of Fig.1 works in the opposite sense to
the circuit of Fig.2. In reality, the shift
registers drive transistors and these
provide logic lows, while the printer
port data lines and their associated
Darlington transistors pull the rows
high.
To sum up, the printer port data
lines pull each row high in succes
sion to light the appropriate LEDs.
And in between times, the shift reg
isters are reset and new data appro
priate for the next row is clocked in.
Add to this the fact that the display
moves from left to right and you can
see that the timing process is quite
complicated.
Fortunately, that’s all taken care
of by a machine language program
which is called LEDs.COM. This
program manipulates all the control
lines from the printer port to control
the LED display.
Power supply
The display is powered from a 9-12V
DC plugpack rated at 1A. The DC rail
from the plugpack is applied to REG1,
which delivers a regulated 5V rail to
power the LED arrays and the shift
registers.
The 10µF and 1µF capacitors at
the input and output of REG1 are
there to ensure regulator stability. In
addition, the supply pins of all the
12 Silicon Chip
shift registers are filtered using 0.1µF
capacitors
Construction
This design is available as a com
plete kit of parts from Oatley Electron
ics, who own the copyright on the PC
board (see pricing panel).
The board is double-sided with
plated-through holes which means
that there are no links to install. It
is also solder-masked and carries a
screen printed overlay to make the
job of assembly as straightforward as
possible.
As mentioned earlier, the basic con
figuration is a 3-section board with a 48
x 7 LED array. Each section (or module)
contains 16 LED columns plus a pair
of matching shift registers. In addition,
the master module carries the DB25
socket plus the Darlington transistors
and power supply components.
Fig.3 shows the parts layout on the
PC board. Note that this only shows
the master module plus part of the
first extension module. The pattern
of LEDs, shift register ICs and other
parts simply repeats towards the left.
Begin the assembly by installing
the resistors and capacitors, then add
the transistors and the ICs. The use
of IC sockets is recommended here,
since a dud IC (rare) is very difficult
to remove if it is soldered directly to
a double-sided board. Take care with
the polarity of the ICs – they are all
installed with the notched end to
wards the right.
Similarly, take care to ensure that
the transistors are all correctly ori
ented and note that Q2, Q4, Q6, Q8,
Q10, Q12 & Q14 (ie, the transistors
immediately adjacent to the LED rows)
are all BC639s.
Now for the LEDs. There are 336
LEDs in all, so installing them will
take some time. The main thing to
watch out for here is to ensure that
they are all correctly oriented. You can
identify LED polarity in two ways: (1)
the anode lead is the longer of the two;
and (2) the cathode lead is adjacent to
a small flat section on the bottom lip.
Push the LEDs down onto the board
as far as they will go before soldering
their leads.
Once all the LEDs are in, you
can install the DB25 socket and the
7805 regulator (REG 1). The latter is
installed with its leads bent at right
angles and its metal tab bolted to the
PC board along with a small finned
heatsink.
The prototype board was installed
in a smoked Perspex channel (470mm
long x 150mm high) and secured using
machine screws and nuts at the back.
This Perspex channel was bent up by
a local plastics supplier. Alternatively,
you can make up a suitable wooden
or metal case with a Perspex viewing
window for the LED arrays.
Software & testing
The software for the Moving LED
Display comes on a 3.5-inch floppy
disc and consists of six main files plus
a brief readme file. The files leds3.com,
leds4.com and leds5.com are for dis
plays with from three to five modules
(including the master module), while
the ledset.com file configures the basic
setup.
First, copy the correct leds_.com
file to the hard disc (or to another
floppy), along with the ledset.com file.
Next, rename the copied leds_.com
file to leds.com, then run ledset.com
Fig.2 (right): the Moving LED Display
is controlled via the PC’s parallel port.
The rows are driven by Darlington
transistor pairs, while the data in the
shift registers (IC1, etc) controls the
column switching transistors (Q15,
Q16, etc).
February 1997 13
Silicon Chip
BINDERS
These beautifully-made binders
will protect your copies of SILICON
CHIP. They feature heavy-board
covers & are made from a dis
tinctive 2-tone green vinyl. They
hold up to 14 issues & will look
great on your bookshelf.
★ High quality
★ Hold up to 14 issues
★ 80mm internal width
★ SILICON CHIP logo printed in
gold-coloured lettering on spine
& cover
Price: $A14.95 (includes postage
in Australia). NZ & PNG orders
please add $A5 each for postage.
Not available elsewhere.
Silicon Chip Publications
PO Box 139
Collaroy Beach 2097
Or fax (02) 9979 6503; or ring (02)
9979 5644 & quote your credit
card number.
Use this handy form
Enclosed is my cheque/money order for
$________ or please debit my
Bankcard Visa
Mastercard
Card No:
_______________________________
Card Expiry Date ____/____
Signature ________________________
Name ___________________________
Address__________________________
__________________ P/code_______
14 Silicon Chip
Fig.3: follow this diagram when installing the parts on the PC board. Note that
only the master module and part of the first extension module are shown here.
The pattern of LEDs, shift register ICs and other parts simply repeats. Note that
a heatsink should be fitted to REG1 (see photo).
The basic PC board includes a master module (at right) plus two extension
modules to make up a 48 x 7 LED array. Up to two extension modules, each
with a 16 x 7 LED array, can be added to the lefthand end of the board. Note
the heatsink fitted to the 7805 regulator (REG1).
Fig.4: the ledset.com program lets you
configure the ledsx.com program to
suit your computer. The values shown
are good starting points for a 133MHz
Pentium machine (see text).
to configure the display driver to the
required parameters.
Fig.4 shows the setup that appears
when ledset.com is run. There are
three parameters that can be varied: (1)
the printer Port address; (2) the Delay;
and (3) the Duty cycle. The latter sets
the speed at which the message move
across the screen, while the Delay sets
the period between messages. The
up and down arrow keys select the
parameter to be altered.
In most cases, the default printer
port address of 0378H will be cor
rect. If not, the address can either be
gleaned from the system BIOS or by
running the Microsoft Diagnostics
program (type msd at the command
prompt).
Often, too, the address will be dis
played at some stage during the com
puter’s boot sequence. If you are using
Windows 95, double click the System
icon in Control Panel, then click the
Resources tab, select the printer port
and click Properties and Resources to
view the address.
The numbers for Delay and Duty
will depend on the speed of the PC
used. A Delay of 00500 and a Duty of
001 are good starting points for an XT
but these numbers should be increased
for higher speed PCs. We found that
a Delay of 02500 and a Duty of 250
produced good results on a 133MHz
Pentium machine. Note that you have
to type in each digit in an entry, start
ing from the leftmost digit, until the
number is correct.
The display can now be plugged
into the PC and the leds.com program
run from the DOS prompt. The mes
sage to be displayed must be included
on the command line; eg, to display
the message DOES YOUR DISPLAY
WORK?, you type leds does your display work? at the command prompt.
Note that all characters are displayed
in upper case, regardless as to how
they are typed.
The above command will display
the message once before returning con
trol to DOS. If you want the message
to be displayed repeatedly, you simply
use a full stop as the first character of
the message.
For example, the command leds
.silicon chip will repeatedly cycle the
message SILICON CHIP across the
display. The display can be stopped
at any time by pressing Ctrl C on the
computer keyboard.
Assuming that the unit works cor
rectly, you can now experiment with
the Delay and Duty values in the
ledset.com program. If a row of LEDs
fails to light, check the associated
Darlington transistor pair. Similarly, if
a column of LEDs fails to light, check
PARTS LIST
1 double-side PC board with
plated-through holes, 414 x
107mm (incl. three modules)
1 smoked Perspex channel case
with Perspex window or (see
text)
1 mini U-shaped heatsink to suit
TO220 regulator, 19 x 19 x
11mm
1 PC-mount DB25 male socket
1 DB25 cable, male-to-female
1 9-12V DC 1A plugpack supply
6 14-pin IC sockets
Semiconductors
6 74LS164 shift registers
7 BC639 PNP transistors
55 BC549 PNP transistors
1 7805 5V 3-terminal regulator
336 LEDs
Capacitors
1 10µF 25VW electrolytic
7 0.1µF monolithic ceramic
10 220pF ceramic
Resistors (0.25W, 5%)
10 10kΩ
48 68Ω
48 4.7kΩ
10 47Ω
the associated column switching
transistor.
Finally, a batch file can be used to
allow a sequence of messages are to be
displayed continuously. An example
of this is as follows:
:start
leds message 1
leds message 2
leds message 3
goto start
These lines must be created in an
ASCII text editor and the file saved
with a bat extension; eg, message.bat.
February 1997 15
|