8×40 LED display panel

Introduction

In this project the main cope was to design low cost LED signage system as a display.Signage is any kind of visual graphics created to display information to particular audience. This is typically manifested in the form of give an idea in places such as streets or inside or outside of buildings.

As the demand for electricity going higher, and the demand for the low power consuming electronic devices also getting higher demand. As time goes, instead of high power consuming neon display signs went down. Another reason for that was they can only designed for single color and shape. When once it designed, modification on color and design were totally a dream for customers.

fig 01: a neon display

So, nowadays the demanding LED displays getting much more familiar with the market, as their long lasting behavior in both indoor and outdoor uses and made their demand sky high. Hence, more competitive and attractive monochrome LED displays are using both industry and household for digital merchandising solutions, now. They are used to use dot matrix LED modules to display messages, values and signs as both indoor and outdoor billboard such as banks, hotels, restaurants, hospital and highways etc…Electronic signs are dynamic in their ability to take the electronic sign to a whole new level of uses. Modifications to the message of display can also easily done by using simple program which is compatible with a PC.

fig 02: a LED display

High level design

When using a PIC microcontroller to such a project, it is advisable to check the suitability of PIC to it. Such as,

•    Memory management (FLASH, Data, and EEPROM)
•    Hardware stacks
•    Power consumption
•    Oscillator options
•    Programming options
•    Operating voltage range
•    Working temperature range etc….

Generally, this type of LED displays are made using PIC Microcontrollers such as PIC16F84A and PIC16F877A etc… because of programmable memory helps to design and display more customizable signs and characters. But when considering memory capabilities it is highly recommended to use PIC16F877A as it has more I/O ports, In Circuit Serial Programming capability and all that. Actually, more memory means it can handle longer length words and more I/O pins help to handle more LEDs simultaneously.

However, PIC16F877A also has 33 I/O pins. When designing long LED display to drive LEDs it is a great question to tackle how to drive them?

So in this project it is expected to build such like moving LED display system using PIC microcontroller with ICSP (In Circuit Serial Programming). Then after the programming PIC it can be use to display messages etc. In general the optimal display size of LED system per character is 7×5 and 8×5. Then using 8×5 LEDs display per character it can be design 8 characters length in 8×40 LED display. Probably these 8 rows will handle by 8 I/O pins. Then remaining is (33-8) equal to 25. Then problem is how to drive 40 columns by using this Microcontroller?

Generally columns in display used to scanning options. It is regardless whether how it scanned… when displaying message. And it is important to state this “only one row of display will enlighten at once” so that power consumption also will lower by a great amount. Option is multiplexing.
So that, there are some options to overcome this problem using less number of I/O pins. One is using register ICs. And the other option is multiplexing I/O pin output to a higher number by using multiplexer. Generally option is Decoded counter circuits as we called Johnson counters. (HCF4017BE- Decade counter with 10 decoded outputs)
Driving the current for display LEDs is one of the major tasks that must do by designer for this type of Display to overcome lowering the brightness of pixels (LEDs).one option is design custom made floating current drivers using LM317 type ICs, plus transistor switching systems for outputs to isolate the current thorough the display to the microcontroller circuit. It can be also done by using Darlington pair ICs.
Finally the LED display system is probably made as a different circuit to reduce the complexity and size of circuit. It is advisable to use 8X5 dot matrix segment to this system as it will make lower budget for completion. And to ensure this device user friendly, it’s designed to support serial programming with MS Excel interface for bit map to shown in it.

fig 03: design diagram

Design and construction

Hardware design basically categorized to 3 major circuits. they are,

1.    [ Microcontroller + power supply + ICSP + Row current drivers ] = PRO ROW
2.    [ Johnson counter multiplexers with transistor array ] = PRO COLUMN
3.    [ LED Matrix Board ] = LED DISPLAY

Microcontroller

PIC16F877A
Core features
•    High performance RISC CPU
•    Only 35 single word instruction to use
•    Operating speed: DC- 20 MHz clock input
•    Up to 8K×14 words of Flash Program Memory
•    Up to 368×8 bytes of Data Memory
•    Up to 256×8 bytes of EEPROM Data Memory
•    Interrupt capability
•    Power on Reset
•    Power up Timer and Oscillator Startup Timer
•    Watchdog Timer
•    In-Circuit Serial Programming via two pins
•    High sink/source current:25mA
•    Low-power consumption:     <0.6mAtypical @3V,MHz
<1µA typical standby current

MAX 232

MAX 232 is an integrated circuit that can build a TTL-to–RS232 level converter that totally complies with RS232 electrical specification. The IC generates the high power positive and negative voltage (+ 10 and -10 Volts) from TTL power supply (5V DC) using switching capacitor. The switching circuitry is provided inside the chip, so user needs only few caps for external components.

fig 04: MAX232 circuit design


LM317 Current driver
LM317 is a adjustable 3-terminal positive voltage/current regulator is capable of supplying in excess of 1.5A over a 1.2V to 37V output range. They are exceptionally easy to use and require only two external resistors to set the output voltage.In here it is used as current regulator to enhance and control the current through the LED. When this is working in normal condition only one LED will drive from one regulator. So that 8 current drivers added to the circuit when designed.This is a floating current driver which has no connection with ground terminal. The resistor value should be calculated as voltage of Vout pin is 1.25V higher than Adjuster pin. Then applying ohm’s law to the voltage different of resistor will give resistor value at defied current value.

Pro Row Circuit


fig 05: PCB design of Pro Row Circuit


fig 06: Finalized pro row circuit

Pro Column Circuit

HCF4017BE

The HCF4017BE is a monolithic integrated circuit fabricated in MOS technology available in DIP packages. It is 5-stage Johnson counter having 10 decoded outputs. Input includes a CLOCK, a RESET and a CLOCK INHIBIT signal. Schmitt trigger action in the clock input circuit provides the pulse shaping that allows unlimited clock input pulse rise and fall times. This counter is advanced one count at the positive clock signal transition if the CLOCK INHIBIT signal is low. Counter advanced via the clock line is inhibited. This is used to multiplex 1 line to 10 lines as an answer for controlling columns.

fig 07: truth table for decade counter

fig 08: Pro column PCB design
fig 09: pro column Circuit

Pro LED Circuit

column cathode row anode type 6mm* 6mm 8*8 LED matrices used to design the PRO LED circuit.

fig 10: a 8*8 LED matrix

fig 11: pin configuration of LED matrix


fig 12: Finalized PRO LED circuit

Software Used

  1. Orcad cadence software version 9.2 – for designing schematics and PCB layouts
  2. MPLAB IDE Software – for design code using C langauge
  3. Win PIC800- to download .hex file to PIC

fig 13: LED check

fig 14: character check

Device finishing

fig 15: Perspex cabinet finish for the device

fig 16: black vinyl finished device

Results

1st calculation to adhere in this project was suitable resistor value for current driver circuits.
It was done by simply applying ohm’s law.

V(Vout)-V(Adj) = 1.2V
Optimum current value for single LED     = 20×10-3A (20 mA)
Hence Resistor value for current driver     = 1200/20 Ω
= 60 Ω

There are no standard 60Ω resistors. then most suitable was 56Ω.
Current through the LED @ 56Ω applied resistor = 1200/56 mA
= 21.42 mA

If ICSP taking 50mA at working + current driver taking maximum of around 170 mA + PIC’s working current + column driver circuit’s current consumption = not exceeding 500mA

So it was ok to apply single LM7805 voltage regulator for whole circuit as it was not exceeding the level of 1A.
And it is advisable to use 500mA transformer with 230V to 12V. Power supply design was also ok.
Then biggest problem was when PIC was attached after programming, there was no enough current through LED’s and voltage also dropped. Second thing is it was floated.

Then all current drivers were checked for their consistency. And then check the voltage values at PIC PORTB outputs….and voltage inputs. Problem was, no considerable voltage was not found yet. Then checked for the crystals activity and it was ok.

Then checked for whether MCLR was supplied the high voltage value… then got the error it was not made to high voltage value (+5v). After that LED columns were checked for connectivity. Errors identified and hardware was recovered.

Now LED circuit and PRO ROW circuit was ok. Then the other circuit misbehaved when PORTA was programmed. Connectivity mistake again was identified. In 4017 ICs reset pin is 15th and clock is 14th. Connection interchanged carefully.
Now the major problems of circuit were recovered up to some extent.

Conclusions

There was a major error on this hardware design. When using 4017 as Johnson counter to multiplex a line, it is recommended to leave the Q0 output (pin3). Because of according to its data sheet it stated that when clock inhibit was grounded regardless of clock and reset then Q0 was activated. I made a big mistake as I already have used this function to check compatibility of CMOS4017 and TTLPIC.

So, for a design like this if one who going to make more than 10 columns using 4017 counter please make sure that better to leave pin #3.  Otherwise, designer will be at a big trouble.

It is wiser to use single IC for single 8×8 matrix. Then it will be easy to debug errors.(leaving pin3 and pin11). There can be more method to overcome these failures.

Another thing is when clock inhibit was grounded only clock determines the counting. So that, IC addressing is also be disabled. So it is wise to use that pin also.

And when using high speed crystal and high speed scanning ratio, it is wise to increase the current to LEDs by decreasing resistor value at current drivers. When high speed clocking is used, the LEDs lit only for a very small time interval so that it is more chance to increase the current through as it has low probability to burn out. Then there can be achieved more brightness for LEDs.
Finally, better to use standard code delays which are correspond to crystals

Further Enhancements

enhancements above designed device was monochromatic LED display(RED). but this can be further developed to more colors. there are bi-color LED matrix and RGB LED matrix devices in market.

for example,
if i used another 8 I/O pins to control another 8 anodes… with using bi color (green and red) LED matrices, it can be more beautiful.
RED
GREEN
ORANGE(RED n GREEN simultaneously).

fig 17: a tri-color LED Display

Appendix A – Schematic Diagrams

Pro Row

fig 18: Schematic diagram for pro row

Pro Column

fig 19: Schematic diagram of pro column

Pro LED

fig 20: Schematic diagram of Pro LED

Appendix B – Code listing

The c code for LED display attached here with attachments.

Appendix C – Component lists

Component list for PRO ROW

 Component  Quantity
 PIC16F877A  1
 MAX232  1
 LM317  8
 LM7805  1
 40 pin DIP socket  1
 16 pin DIP socket  1
 1uF electrolytic condensors  5
 100nF capacitors  2
 1000uF electrolytic conden:  1
 DB9 female PCB mountable socket  1
 22pF capacitors  2
 20MHz crystal  1
 330 ohms  8
 56 ohms  8
 10 kohms  1
 D400 transistors  8
 8 way wire connectors  1
  6 way wire connectors  1
  2 way wire connectors  2
 Suitable heat sink for LM7805  1


Component list for PRO Column

 Component  Quantity
 HCF4017BE  4
16 pin DIP Socket  4
 2.2k ohms  40
 BC547 Transisors  40
 10 way wire connectors  4

Component list for PRO LED

 Component  Quantity
 6mm*6mm – 8*8 LED matrix  5
 8 way IC bar  8
 8 way wire Connectors  5

Appendix D – References