Re: Controlling hundreds of Leds

From: Rodney Josey (rjos_at_dodo.com.au)
Date: 01/05/05


Date: Wed, 05 Jan 2005 14:21:06 +1000

On Tue, 21 Dec 2004 17:41:51 +0000, Danny T <danny@nospam.oops> wrote:

>Hi All,
>
>I'm trying to control hundreds of LEDs from my parallel port (8 data
>pins - will soon be replaced with the output of a programmed PIC, also 8
>pins).
>
>I'm not an electronics guy (I'm a software developer), so trying to
>control x00's of LEDs from 8 pins looks a bit tricky...
>
<snip>
>
>What are my options? And what components would I need to achieve
>something like this (I imagine right down at the end, I'll need a number
>of registers for the LEDs. If these come in chips with 8 output legs, I
>guess I'll need 38 for 300 LEDs. The bit between my 8 data pins and the
>computer isn't my area though, so I'm stuck!
>
>Oh, and this is just a hobby thing, so the cheaper the better. I'm sure
>I can already buy scrolling screens, but I don't have the money, and I
>want the fun of building one! :)

------------------
Hi Danny,

Came across your initial post a few days ago - & have followed the threads avidly. Most
interesting!!! The majority of the replies have been suggesting you use the 'serial-to-parallel'
data transfer method and that you also use either a PIC or an AVR micro - well I agree with the
later (in principle) BUT (there's always a but, isn't there ...). you need to be aware that most of
the PIC's and the AVR micro's have a "limited" amount of memory available - especially when you most
probably need to store the message or graphic before you output it to the LED display - now in most
of these micro's your control program takes up a fair chunk of the memory thus leaving a small (in
some micro's - VERY samll) amount of free memory space to store the other things like 'variables',
'tables', as well as your 'message/graphic' data.

I agree with the many suggestions regarding 'multiplexing' of the LED array BUT driving the array by
using the venerable 74LS595 (or 74HC595) serial-to-parallel shift register method is OK if you have
plenty of speed and time to do the data setup & transfer in - with most of the micro's in question
you may find this method a bit tight on time &/or speed - AND - the other thing to keep in mind is
that your chip count CAN BE fairly large (38 or so 595's plus several control chips - already over
45 chips) which also means a larger PCB for your system, more costs, etc.

After a few days twiddling with the concept I came up with the following - you might want to
consider another method which could save you in costs as well as lower chip count and more
FLEXIBILITY in what & how the LED MATRIX can be utilised.

The proposed method uses around 18 or so IC's; 72 FETS for row & column drivers; 1 x power FET - for
PWM control of the LED supply; approx 90 resistors; a handful of small value capacitors; 384 LEDs -
in a 8 x 48 matrix; plus either 1 or 2 PCBs.

As can be seen from the circuit diagram below - the 2 main IC's are the 62256 SRAM (32K x 8 bits
static ram) & the microprocessor - an PICAXE 28X. The LED MATRIX uses 6 x 74LS574s for column drive
& 1 x 74LS574 for row drive (these are 8 bit parallel tri-state registers).
The "flexibility" spoken about above is - each LED in the matrix can be turned on or off
individually - e.g. ALL on, 1 on, combination on, many on (in any position), PLUS a 'moving' display
- right / left / up / down, etc, are all possible display options.

The row & column drive FETs are 2N7000 N-Channel fets - 60 VDC (max), 400mA current (continuous) or
2A (pulsed), Rds(on) = 1.2 ohms, gate drive 2.4V, in a TO92 package. With each LED drawing 20mA
'on' current - column FETs drive 8 x LEDs = 160mA (total - all on); row FETs drive 16 x LEDs (@ 3 x
FETs per row) = 320mA (total - all on). 2N7000 @ $0.35 in qty's 25+
 
1 x MTP3055V N-Channel Power MOSFET is used to PWM the LED positive supply to the LED MATRIX - freq
= 250 Hz, pulse width varies for brightness / dimness. With ALL leds on the max current drawn from
the LED supply is approx 7.8A - the MTP3055V can handle 12A @ 60V DC.

The 62256 SRAM is used for storing the data to be displayed on the LED MATRIX - 32K x 8 bits
provides for up to 4600 different graphics displays - the matrix is setup as 8 x characters @ 8 bits
high x 6 bits wide (= 384 LEDs). A full (384 LEDs) graphic/character display takes up only 7 x data
bytes in the SRAM - 6 bytes for column drive; 1 byte for row drive.

The PICAXE 28X micro controls the LED display functions as well as the updating of graphics data to
the SRAM. PWM output 2 (pin 13) of the PICAXE 28X is used to drive the MTP3055V MOSFET.

The 74LS138 IC's provide gating & control signals to the rest of the circuit as directed by the
relevant PICAXE 28X Output portC pins.

I also suggest that the i2c pins (pins 14 & 15) of the PICAXE 28X be utilised to provide
communication with an external PC via an PICAXE 18X chip (i2c pins 7 & 10) and a few extra IC's -
all configured as a PC Parallel port - to - i2c converter.

I hope this gives you some more useful insights into how 'multiplexing' displays can be designed!!

The Circuit Diagram:
----------------------------------------------------------------------------------------

                    Ic9 LED MATRIX
                    .--. (8 x 48 = 384)
                    | | Col Col
     PICAXE o--o +--------------------+ 1 48
        28X | | | | o|-/-------------------------------/-- Rw1
     .------. | '--' 62256 | Ic7 o|-/-------------------------------/--
     | | | .-------. | .--.o|-/-------------------------------/--
     | | | .--.Ic10 | | | | |o|-/-------------------------------/--
     | o----o | | |A0 D0| | | |o|-/-------------------------------/--
     | | o--o +------+ +-----|----+ |o|-/-------------------------------/--
     | | | | | |A7 D7| | | |o|-/-------------------------------/--
     | | | | | |A8 | | '--'o|-/-------------------------------/-- Rw8
     | o--o | '--' +---+ | | | |
     | | | | .--. | |A14 | | ######## ######## ########
     | Ic14 | | | | | | | | | .-------. .------. .------.
     '------' | o--o +--+ | | | | Ic1 | | Ic2 | -------- | Ic6 |
               | | | | | | '---+---' '---+--' + + + '---+--'
               | | |Ic11 | Ic8 | | | | | | | |
               | '--' '-------' +---\--------+---------+-----+-+-+-------+
               | 8
               | .--.Ic12 Data Bus
               | | |
               o----o | ----------------------------------------------------------------
               | | | | LED MATRIX Set-Up:
               | '--' | Col X
               | .--. | +Vled +
               | | | | o--o-o-+^+-+------+ Rw1a |
               o----o | | o = | ||| # = +
                    | | | | === FET 1 ||-+
                    '--'Ic13 | | | ||<- FET X
                               | +--------+ o---o-||-+
  Ic1-7,10,11 = 74LS574 | | | Rw X |
                               | | o--o+^++-------+ Rw1b |
  Ic8 = 62256 SRAM | | | ||| ===
                               | | | === FET 2 GND
  Ic9 = 74LS244 | | | | Col X
                               | +----------+ Rw X +
  Ic12,13 = 74LS138 | o/p | | / = o-|-----------|---o
                               | 1 | o--o+^++-------+ Rw1c +-->|---+ |
  Ic14 = PICAXE 28X | | ||| Led X | |
                               | | === FET 3 ___ | |
  FETs = 2N7000 | | | +-|___|+ |
                               | +--------+ +----------+
                               | Res X +
                               |
(created by AACircuit v1.28.4 beta 13/12/04 www.tech-chat.de)

Oz-Rod



Relevant Pages

  • Re: Controlling hundreds of LEDs
    ... Regarding your original problem of controlling LEDs: ... You say that eventually a PIC will control the LEDs. ... If the compatibility between parallel port and PIC is the overriding ... You would use 8 shift register chips in parallel, ...
    (sci.electronics.design)
  • I am hopeless, how to hook up an LED to my computer.
    ... I need to be able to control an LED from my computer, ... Should I be able to drive it from the parallel port ... (it'd be convinient to be able to control these LEDs with USB from my ... Do I need to use the ground pin on the parallel port? ...
    (sci.electronics.misc)
  • Re: Controlling hundreds of LEDs
    ... >I'm trying to control hundreds of LEDs from my parallel port (8 data ... >of registers for the LEDs. ... If these come in chips with 8 output legs, ... christmas light strings via the parallel port. ...
    (sci.electronics.basics)
  • Re: STP24DP05 (I dont get it)
    ... numbers of high-brightness LEDs saves bill-of-materials costs compared to ... the driver also enables higher display ... I can't for the life of me figure out how this chip works;/ 5mA min ... commands are or what they control. ...
    (sci.electronics.design)
  • Re: STP24DP05 (I dont get it)
    ... numbers of high-brightness LEDs saves bill-of-materials costs compared to ... the driver also enables higher display ... I can't for the life of me figure out how this chip works;/ 5mA min ... commands are or what they control. ...
    (sci.electronics.design)