Re: Controlling hundreds of Leds

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... > >There's no way to change them all at the same time, so I reckon I'll >need some sort of "addressing" system. Using some of the pins to select >which LED I'm controlling, and one for the data. > >Trouble is, even using 7 bits as the "address", I've only got 128 >channels, but I imagine I'd need a bit for "send" too, so I can set the >address and the data, then have it read in one go. > >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 awhile 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 .--. (8x48=384) | | col col Picaxe +--+ +-------------------+ 1 48 28X | | | | o -/----------------------------/- rw1 .-----. | '--' | o -/----------------------------/- | | | .--.Ic10 62256 | Ic7 o -/----------------------------/- | | | | | .------. | .--.o -/----------------------------/- | +--+ | | |A0 D0| | | |o -/----------------------------/- | | +--+ +-------+ +----+---| |o -/----------------------------/- | | | | | | D7| | | |o -/----------------------------/- | o-o| | | +----+ | | '--'o -/------------------------------ rw8 | | || '--' | | | | | | || .--. | |A14 | | ######## ######## | | || | | | | | | .------. .------. .------. '-----' |+--+ +--+ | Ic8 | | | Ic1 | | Ic2 | ------ | Ic6 | Ic14 | | | '------' | '---+--' '---+--' + + + '---+--' | | |Ic11 SRAM | | | | | | | | '--' +---\--------+--------+-----+-+-+-----+ | Data Bus | .--.Ic12 | | | ---------------------------------------------------------------- o---o | | LED Setup | | | | Col | '--' | +V 1 | .--.Ic13 | o-o-o-+|+-o-----o + | | | | o = | |V| (Ic1-Ic2) # = | o---o | | | === Fet1 + | | | +--------+ ||-+ '--' | | | ||<- Fet X1 | | o-o-+|+-o-----o +--+-||-+ Ic1-7,10,11 = 74LS574 | | | |V| (Ic3-Ic4) o/p | | | | === Fet2 Ic1 | Ic8 = 62256 SRAM | +--------+ === | | | GND Ic9 = 74LS244 | | o-o-+|+-o-----o Col | | |V| (Ic5-Ic6) | x Ic12-13 = 74LS138 | | === Fet3 | | +---+--------+ / = o-+-----------|-o Ic14 = Picaxe 28X | o/p | | Rw1X | Ic7 +->|-+--+ | Fets = 2N7000 | NOTE: Each o/p of Ic7 Led .-. | (Total = 72) | drives 3 x Fets | | | | for each ROW line Rx r | | | '-' | +---+ | + (created by AACircuit v1.28.4 beta 13/12/04

formatting link

-----------------------------------------------------------------------------------------------------

Hope this helps...:)

Oz-Rod

Reply to
Rodney Josey
Loading thread data ...

There's a sneaky trick that lets you individually control 56 LED's from one 8-bit port with ZERO external hardware.

See

formatting link
for details.

Reply to
Don Lancaster

And, if you are only going to light a few of the LED's at once, you can individually control 132 LED's from 12 port lines or 240 LED's from 16 port lines.

Again, with ZERO external hardware.

Reply to
Don Lancaster

Hello Don...

Thanks for providing info, however I cannot find the trick you refer to (56 leds, 8 bits) in the reference you provided. Is it there?

Regards

Eric Pearson

Reply to
Eric Pearson

There are n*(n-1) ways to connect LEDs across n different lines. If you do just that and tristate all but two lines you can direct current through any one LED at a time.

However, this is irrelevant for a PC printer port as you cannot individually tristate the port pins.

Best regards, Spehro Pefhany

Reply to
Spehro Pefhany

Oops. Make that MUSE152 as in

formatting link

Reply to
Don Lancaster

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.