Fads to Obsessions and Beyond...

Free domain for life, exceptional technical support, website transfer

Animated Scrolling Text Bar Sign

An animated scrolling text sign is constructed from a DIY 8x36 inch dot-matrix display (formed from individual LEDs) interfaced via MAX7221 drivers with a PIC16F876 microcontroller. Fonts/scrolling messages for a bar are demonstrated.

The genesis of this project begins with the desire to construct a 3D LED light cube after seeing the fantastic video's on the web. However, in order to start with something initially simpler (and perhaps more useful, athough something just being 'cool' is useful enough in a way!) to test likely construction requirements and develop necesssary skills/knowledge, instead thought building a large scrolling display for my bar would be a good starting point.

I previously constructed downlighting for my bar from 1W white LED's. So an animated scrolling text display would be a nice enhancement. The rear drinks cabinent of the bar (see Photographs Section) has a mirrored section that is a convenient location for a scrolling display. The glass shelving is adjustable, so a space 8 inch high by 60 inch wide would be available. LED dot matrix displays this large are not readily available (well not inexpensively at least), so the project also involves investigating the construction of a DIY dot matrix display from individual 3mm/5mm LED's.

Such a large dot matarix display would involve in the order of hundreds of individual LED's. This is because sufficient LED's need to be present to enable recognisable characters to be displayed and identified at reasonable distances. A 8x8x8 3D LED light cube involves 512 LEDs, so the animated scrolling text display is a good initial project of similar scale/complexity, but simpler in terms of dealing with two dimensions only.

In order to control such a quantity of LED's to produce animated displays, a microcontroller is required. However, additional components will be necessary to provide sufficient output control ports, support the necessary multiplexing and provide power supply etc. One approach is using shift registers for example HC595, or alternatively, dedicated LED driver chips for example MAX7221.

Both of these components were seperately evaluated/tested (links in previous paragraph/page menus), and the MAX7221 was choosen as the basis of the animated scrolling text display (with a PIC16F876 microcontoller). The MAX7221 allows a smaller part count considering the number of LED's involved and potentially simpler firmware. Also, since the MAX7221 can be daisy-chained, only three control lines (plus power and ground - so in total five lines) are required. This greatly reduces the amount of 'cabling' to produce/control the DIY display, enabling the PIC microcontroller and associated circuitry to be conveniently packaged remotely if necessary.

The final result of this project, documented in the various Sections on this page, is a 8 inch high by 35 inch wide display constructed from 340 3mm red LED's on a perspex frame. The controller is a PIC16F876 with 5 x MAX7221 powered by a salvaged wall-wart.

The Photographs and Video Sections demonstrate the operating display installed on my bar, and also various stages of the construction. Schematics and circuit details are also provided in the relevant sections.

The circuit involves the usual minimum components (crystal oscillator and 5V power supply) to enable the operation of the PIC microcontroller with the addition of a series of MAX7221 LED drivers connected via a SPI 3-wire interface, and in turn each MAX7221 connected to a 8 x 8 LED matrix.

Power Supply

A typical "wall-wart" power-supply is used (a surplus telephone charger in this case) in conjunction with a voltage regulator (LM7805) to provide the regulated 5V required by the PIC microcontroller.

Circuit Operation

The schematic diagram shows the PIC microcontroller interfaced with two MAX7221 LED drivers, each of which is connected to a 8 x 8 LED matrix. The actual physically constructed circuit consists of five MAX7221 drivers and associated LED matrices. Each additional MAX7221 is daisy chained analogous to the connection of U2 (and Z2) in the schematic diagram presented.

The LM7805 provides the 5V circuit voltage, in this case, stepping down from the 12V input from a "wall-wart" power-supply.

The crystal X1 and associated capacitors C1 and C2 provide the oscillator for the PIC16F876A microcontroller. Incircuit serial programming (ICSP) of the PIC16F876A microcontroller is provided via connector J1 with switch SW1, resistor R1 and diode D2 providing voltage protecting during loading code into the PIC microcontroller.

Control signals from the PIC16F876A microcontroller are sent from port C (pins 12, 14 and 16) to the MAX7221 LED driver using SPI protocol. Via the SPI interface, the PIC16F876A can send the necessary commands to instruct which LED's are to be enabled by the MAX7221 (described in the Testing/Experimental Results Section).

The MAX7221 has the necessary internal circuity to enable driving individual LED's, multiplex scan circuitry, segment and digit drivers, and an 8x8 static RAM to store data.

R2 sets the peak current on display LED's controlled by the MAX7221 as 100 times the current entering the ISET of the MAX7221 (pin 18). The datasheet recommends 9.53ohm, which then typically sets the LED current at 40mA. While R2 could be replaced with a potentiometer to enable brightness adjustment, LED intensity can also be controlled digitially via SPI/commands. The digital option for controlling LED intensity was adopted in this case.

Decoupling capacitors C5 and C6 as close to the MAX7221 as possible were required on the large DIY 8x36inch display to stop 'glitching' as the power supply lines are long in this case. As recommended by the datasheet a 10uF electrolytic and a 0.1uF ceramic capacitor were used.

Note both GND pins (4 and 9) of the MAX7221 must be connected to ground.

DIY Matrix Display

The matrix displays (refer to layout diagram at the end of the Printed Circuit Board Section) show how individual LEDs are connected with common anodes/cathodes in a rows by columns type arrangement. This means in order to turn on individual LED's, each row is scanned sequentially (i.e., the 'row' anode connected to Vdd) and the 'column' cathodes of desired LED's connected to ground. The MAX7221 handles the necessary multiplexing, which by the datasheet is typically 800Hz.


The PIC16F876A interfaces via SPI and therefore requires firmware to handle the data transfer and provide the logic/data to enable the desired display functionality.

SPI 'bit-banging' routines are described in the Testing/Experimental Results Section, together with example code that enables animated text scrolling on the large (8x36 inch) DIY 320 LED display. See the Video Section for examples of the display in operation.

Note: Image loading can be slow depending on server load.

  • Animated Bar Sign SchematicAnimated Bar Sign Schematic

    Silver Membership registration gives access to full resolution schematic diagrams.

    Animated Bar Sign Schematic

Note: Image loading can be slow depending on server load.

  • Animated Bar Sign - PCB All Layers

    PCB All LayersPCB All Layers

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB All Layers

  • Animated Bar Sign - PCB Bottom Copper

    PCB Bottom CopperPCB Bottom Copper

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB Bottom Copper

  • Animated Bar Sign - PCB Top Copper

    PCB Top CopperPCB Top Copper

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB Top Copper

  • Animated Bar Sign - PCB Silk

    PCB SilkPCB Silk

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB Silk

  • Animated Bar Sign - DIY LED Matrix

    DIY LED MatrixDIY LED Matrix

    Silver Membership registration gives access to full resolution schematic diagrams.

    PCB DIY LED Matrix

Qty Schematic Part-Reference Value Notes
1R1, R210K1/4W, 10% 
1R35601/4W, 10% 
1R4 - R14101W, 10% 
1D1Red LED 
Integrated Circuits
1U1LA6358NDual Op-Amp 
1 fan12V fan
2 MetersMini DC 0V To 99.9V LED Digital Panel Voltmeter  

The majority of the testing simply involves exploring/developing the PIC16F876A code library to provide the necessary interfacing and control. The Video Section shows the developed code in operation scrolling animated text across the DIY matrix display.

Some initial testing was performed to ascertain the maximum distance between LED's within a matrix, that still enabled recognisable characters to be displayed and identified at reasonable distances. This 'reasonable distance' was taken as ~4m which is the width of the room in which the display was to be installed. This initial testing used cardboard as the support material for the DIY LED matrix display (in order to enable convenient and relatively quick alteration of the matrix). This indicated a spacing of 1 inch (~2.5cm) with a 8 x 8 matrix allowed a reasonable compromise between 'visual clarity' of displayed character fonts and minimising the number of LED's required.

A number of materials were considered for the 'backing' or 'support frame' of the DIY LED matrix. The material has to enable a 'doubled sided PCB' arrangement as the individual LEDs are connected with common anodes/cathodes in a rows by columns type arrangement. Initially it was considered that a transparent material was desirable so that components of the LED matrix (other than lit LED's) would be unobtrusive against the mirrored background in which it was to be installed (see Photographs Section).

With this in mind, an initial 'single' matrix of 8 x 8 red 3mm LED's was constructed on 3mm thick perspex to enable display of constructed fonts, check developed software and visually determine the 'aesthetics' once installed. The web page reporting testing of the MAX7221 shows this initial test matrix. This testing showed that the ~2.5cm spacing of the LED's within the matrix made displayed characters difficult to recognise against the mirrored background, particularly when scrolling text.

One alterative was to decrease the spacing of the LED's. However, this is detrimental to the physical size of characters that can be displayed (if the number of LED's was to be minimised). Laptop computers and other similar devices face an analogous problem with display screens which is solved by the use of diffuser screens ('plastic' materials that spread out light). An old non-functional laptop was stripped down and the diffuser material from the screen salvaged. This material placed in front of the DIY LED matrix nicely solved the problem of making a ~2.5cm LED spacing produce clearly discernable characters (see the Photographs Section).

The diffuser material is a 'milky' translucent appearence and so the requirement for the 'backing' or 'support frame' of the DIY LED matrix to be transparent material as mentioned above was redundant. The diffuser material still gave a pleasing aesthetic look to the matrix when not in operation. However, the 3mm perspex was still used as the backing material for the DIY matrix as it is relatively cheap, light weight and easy to drill and cut.

The actual construction of the LED matrix involved drilling 1mm diameter holes following the "PCB pattern" given. Then coated copper wire salvaged from old signal/audio transformers from junked PCB's/equipment was used as the connecting wire. This salvaged copper wire is thin yet strong enough that it can be 'wound' through the 'circuit' (see Photographs Section). This is sort of analogous to 'wire wrapping' as an alternative to a copper PCB. The holes through the 3mm perspex allowed both sides to be used so that a 'doubled sided' PCB effect could be obtained. Note that when a wire within the LED matrix circuit needed to change direction, additional holes were used to enable tensioning of the wire by 'weaving' between both sides of the perspex.

The 1mm diameter 'though holes' (or vias) in the perspex, in conjunction with the wire from the old signal/audio transformers also had another fortuitous effect. The resultant size of the 'though hole' was such that the leads of the 3mm red LED's, capacitors and the IC sockets for the MAX7221's could be 'press fitted' and no soldering was necessary. The component pins when pressed into the through holes scrapped through the enamel coating of the old signal/audio transformer wire forming electrical contact and a firm fit.

Even when severely shaken, the installed components remained firmly in place without the need for soldering. This 'wiring wrapping' approach made the construction of the large DIY matrix relatively quick. The eventual full size matrix constructed consists of 320 LEDs (3mm red 20mA) with five MAX7221's and the associated bypass capacitors and connection for cabling to the microcontroller/power supply. This construction (drilling of perspex and 'wire wrapping' of the circuit) was completed over a single weekend (in between watching the football!).

Software/Display Font

Maximum Current Draw/Number of LED's simultaneously on

The actual microcontroller/power supply part of the circuit is relatively simple and no particular difficulties, other than the usual care and attention required when constructing any electronic circuit, should be expected.

The major task is the construction of the DIY matrix display. Attention to detail is required to ensure all holes are accurately placed. As noted in the Testing/Experimental Results Section, additional 'vias' (through holes in the perspex) were used whenever a 'wire' in the matrix circuit was required to change direction. This enabled the wire to be 'threaded' tightly between both sides of the perspex at the point of a direction change, thus tensioning the wire.

This is important, as the tension enables the wires to maintain 'straight tracks' avoiding shorting between wires etc. Further, additional 'vias' were used near where leads from components were to be inserted. This enabled the wire to be threaded a number of times through the hole into which a component was to be placed. Thus ensuring the maximum likelihood of an electrical connection when inserted, and a tight, snug fit.

If diffusor material is not available from a disused laptop or similar, I tried a number of other materials such as translucent plastics. This identified 'baking paper' as a reasonable (if not particularly attractive) readily available substitute. Another alternative may be to increase the current (i.e brightness) of the LED's.

In the version of the matrix I constructed (320 LEDs), approximately half were on at any one time with the messages/animation employed. This with the ~800Hz multiplexing from the MAX7221's, resulted in a measured average current of ~100mA for the circuit in total (as measured at the output of the LM7805). Note I was using the minimum digital brightness setting available on the MAX7221 drivers.

Note: Video loading can be slow depending on server load.

The video below demonstrates the animations/scrolling messages on the DIY LED dot-matrix display interfaced via MAX7221 with PIC 16F876A. The demonstration code is discussed in the sections above.


No comments yet.

Add Comment/Question

Only Logged-In Members can add comments

"If we could sell our experiences for what they cost us, we'd all be millionaires".

Please donate any amount to help with hosting this web site.

If you subscribe (only $2/annum) you can view the site without advertisements and get emails abouts updates etc.



Only logged-in users with Silver Membership and above can download.

Silver Membership is only $2, so join now!