SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By gmarsh
#32947
I completed a project like this a few years ago for a 120x7 LED sign with a dead controller. To do this, I wired the sign as a 28 anode/30 cathode array and designed a controller that would refresh a 32x32 LED array.

The main "guts" were:

- four ST STP08CL596 IC's sinking current from the 32 array cathode lines.
- four ST STP08CL596 IC's sinking current from the bases of 32 MPS751 PNP transistors, to enable individual anode lines.
- an ATMega8L, later a Mega168, doing control duty.

The eight STP parts were connected in series and connected to the AVR SPI port, and the /OE pin was driven by one of the AVR timers. I used the 8MHz internal RC oscillator on the AVR, SPI frequency was 2MHz, and the scan ("next anode") frequency was 2400Hz yielding a 75Hz overall sign refresh rate. It took up surprisingly little CPU time on the AVR.

The AVR emulated a 20x1 serial HD44780 LCD, custom characters and all. Worked great with Winamp. ;)

If you're going "big" (500+ LEDs) then an implementation like this might be what you're after. I'll post design/schematics/pictures/etc if anyone's interested.
User avatar
By bigglez
#32948
gmarsh wrote:If you're going "big" (500+ LEDs) then an implementation like this might be what you're after. I'll post design/schematics/pictures/etc if anyone's interested.
Greetings (No Name Supplied),

Your solution might be of interest to the OP, who was trying for approx 500 LEDs. I was on a parallel track (for a smaller array), and decided to use the MAX7219 device to save component count (on an array of 64 LEDs).

I'd be interested in your solution - it sounds very similar to how I would have tackled a scrolling sign project. Any PIX of yours?

I'm tempted to do a second MAX7219 PCB (same footprint) with 128 LEDs and two MAX7219s in series. The first PCB for the MAX7219 was to run with the VB utility from Maxim (hence the configuration and addition of a header for connection to the PC's parallel port), and then use an AVR to drive it (which is where I am now).

I've used the '595 logic SRs in other LED interfaces, along with the TPIC6C595 Power Logic (more current), they make the work easier and affordable.

Comments Welcome!
By gmarsh
#32952
Here's a pic of the board, almost stuffed:

Image

I'll post Eagle files and source code shortly.
By Lucien
#33285
bigglez wrote:The serial 3-wire interface requires a clock and data to send the data to the MAX ic. When all the serial data is read in the third line is used to load the new data (MAX7219). The CS/ line is used to select (activate) the device (MAX7221), which is structured differently to the MAX7219 to make it compatible with published bus structures (microwire, SPI, QSPI).

My personal choice would be the MAX7219 with DIN,CLK, LOAD as I've used this format before, and don't plan to interface with the other standards that require a CS/ line.
Are there any practical differences between using the two interfaces? It seems to me that for daisy-chained devices, it might be easier to use the 7221 and tie all CS/ lines to GND, to avoid having to toggle LOAD on a 7291. Plus the 7221 is slew rate limited, which might be useful in some cases.
User avatar
By bigglez
#33320
Lucien wrote:Are there any practical differences between using the two interfaces? It seems to me that for daisy-chained devices, it might be easier to use the 7221 and tie all CS/ lines to GND, to avoid having to toggle LOAD on a 7291. Plus the 7221 is slew rate limited, which might be useful in some cases.
Greetings Lucien,

I read it that either was offered to make these parts compatible
with other devices sharing the uC serial bus. I went with the
MAX7219 so that I can control the load pin, ensuring that all the
data is clocked out first. I wrote my own driver firmware (trivial...)
so there's a chance it could be interrupted by other uC activity.

The slew rate limited part (MAX7221) is probably to reduce
EMI/RFI should the part be used in an instrument or radio
environment. The MAX7221 goes to hi-z outputs when not
operating, suggesting portable (battery) apps.

It is possible that MAXIM did more than these two versions
(the numbers are not sequential) and possibly from customer
inputs. There may be other versions that are house marked
for volume customers, or the other versions were dropped by
marketing to consolidate the production volume. I guess
we'll never know...

Comments Welcome!
By gmprops
#33853
Hi everyone!

I have been following this thread very closely and making a lot of notes. I am looking at a project that is similar to those posted here but it uses 32 RGB SMT LEDs. I like the Maxim chips and have already downloaded all of the spec and application docs from their site.

What I need to figure out is which uC would be best for this project. I have been playing with TI's MSP430's, but I am not sure if this is the best one for the job. What do you guys recommend?

The company I am doing this work for wants all of the LEDs mounted on a 1" strip of flex-circuit strip approximately 30" in length. This strip is connected to the main controller board by an edge connector. If I have to use a matrix, do you think the 1" strip could accommodate this? (The connector to the controller board is located at the middle of the strip.)

Thanks!

Gerry
By LittleTyke
#33927
[quote="bigglez"]No doubt others will jump in here with application hints!
[/quote]

My suggestion: Arrange "matrix" (using "no decode" option) in a single row of LEDs across a piano keyboard, one LED per key, then write some VB code to switch each LED on or off (max 10 simultaneously) in order to provide a rudimentary "guide lights" feature such as found on expensive Yamaha keyboards.

This is similar to MIDI decoder boards/circuits, except that MIDI isn't needed to just switch LEDs on/off. Also, MIDI isn't ideal, since you need to switch an LED on just before the note plays, so it's no good waiting for the MIDI event to trigger the LED.
By LittleTyke
#34002
bigglez wrote:No doubt others will jump in here with application hints!
My suggestion: Arrange "matrix" (using "no decode" option) in a single row of LEDs across a piano keyboard, one LED per key, then write some VB code to switch each LED on or off (max 10 simultaneously) in order to provide a rudimentary "guide lights" feature such as found on expensive Yamaha keyboards.

This is similar to MIDI decoder boards/circuits, except that MIDI isn't needed to just switch LEDs on/off. Also, MIDI isn't ideal, since you'd need to switch an LED on *just before* the note plays, so it's no good waiting for the MIDI event to trigger the LED.

Use MIDI by all means to send MIDI data, including all the "gubbins" such as running status, active sensing, but if only an indication is desired of which key to press, the simplest software routine would suffice. Many people don't like guide lights, but for beginners/adult restarters they can be a boon towards helping to learn a piece of music slowly.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]