Controlling many discrete LEDs

I have a project I would like to run by you. The short version is I want to do a marquee sign, but in a circle. This will be on a mask that goes around my face. My first estimate is that it will take a circle about 9" diameter, about 30" circumference. At 1/2 inch spacing, that's 30" X 2/" X 5 rows = 300 LEDs. My working notes of the product can be found at http://wiki.thekramers.net/Main/GitsMask (I'm keeping it up to date as I learn more) and I'll ask that you look at that to fully understand what I'm doing.

My current design (no pun intended) is to use a Mega 2560 with charlieplexing on 30 ports for the "columns" (radii, since it's a circle), and 5 ports for the rows, with two opposing LEDs for each intersection, making the 300 control points. Since this is a marquee, an arbitrary number of LEDs must "appear to be on" at the same time. At 16MHz and no input polling required, I assume I'll be able to cycle through plenty fast for it to look right.

  1. Does this sound feasible, or am I missing something drastic, like being able to sync that much current (I don't need super bright LEDs and I'm actually only lighting at most half a row (because of the charlieplexing) of LEDs at a time if I understand the design right)? What about heat (or is that a silly concern?)

  2. What am I going to need besides the Mega 2560, a buttload of wire, and a bucket o' LEDs? I assume I would want to use a prototype shield to attach the wires to so I can use the Mega for something else if I wanted, but the one listed on the website doesn't say what boards it fits. It certainly doesn't look like it has enough pins to match the Mega. Some others I've found don't look like they have any pins, and I'm not sure what it would take to solder in that many pins with a handheld iron.

  3. I think it would be pretty time-consuming to come up with the "font" for the letters (what pattern of LEDs need to be on for each characters), though I know how I would do it if I had to. I found this project NerdKits - DIY Marquee LED Array Display, but I have to contact them since there's no copyright notice in the source. Are there any other wheels already invented that happen to be open source? Again, I can do this part, but it would be time-consuming.

  4. I would like to have this ready for an event in mid-April. Assuming the construction of the rest of the mask is NBD, and a slightly-better-than-amateurish speed soldering, and very good programming skills in a language similar to ones I already know, is that reasonable? I plan to work on the software with just a couple of "columns" to start to speed up development, then wire up the rest of the columns as the software progresses.

  5. I'm a big Agile guy. In fact one of my biggest embedded project was creating a unit test suite framework for gcc/gdb. I see Google Code Archive - Long-term storage for Google Code Project Hosting., which looks promising. Is it ready for prime time?

Thanks in advance. If you're interested in following my progress, I'll be updating http://wiki.thekramers.net/Main/GitsMask as I go.

About me: I haven't done any Arduino work yet, though I've done some embedded work about a decade ago. I have decades of software experience and can still solder pretty well. I also have a few people already offering me advice on the hardware side, but not the software side.

Are you trying to mix Charlieplexing and standard row/column multiplexing? Doesn't sound right to me... Also 30 pin Charlieplex array will have maximum duty cycle of 30:1 which won't be very bright (and that's it you have current amplification on the outputs which is doable but tricky, one-LED-at-a-time will be extremely faint). Having shift register strings for rows and columns might be better - and some drivers for either rows or columns.

Like I said, it's been a while, but every example I've seen of charlieplexing combined it with multiplexing, like the NerdKits - DIY Marquee LED Array Display example I sited in the original post. Does that not work?

Also, I was thinking I could power one half-row at a time instead of one column at a time. in other words, power one row and the columns that need to be powered in one direction, then reverse those signals to power the LEDs facing the other way, so there will be 5 X 2 = 10 steps, not 30. Again, I haven't even touched the board yet, so I may be talking Ex Recto.

Lastly, I did look into shift registers, and didn't think I could get enough density. But looking at Arduino Platform - Working with Shift Registers - CodeProject, I see I can chain them, controlling 16 LEDs with 3 wires. I don't think even that's enough though, because 54/3=18 and 18x16=288. Am I missing something? I guess I can overflow 3 chips instead of 2, but that means even fewer on at one time.

Thanks for your input.

Look at this link

That ic can do 4 5x7 , which means 140 leds each ic so you can almsot do 300 leds with 2
however to have all the 66 characters on you'd need more like 66x5x7 leds or like 16 ics

winner10920, thank you for suggesting LED matrixes. That's an interesting idea I haven't considered.

On the upside, it would look MUCH better than discrete LEDs, take fewer wires, and take up a lot less space.

On the downside, most of them are about $4, so 60 of them (which isn't really enough) would cost $240, or about 5 times as much as the Mega Arduino board that will drive them :stuck_out_tongue_closed_eyes:. Also, at 4 pins per MAX chip driving 4 character, I could only control 54 characters. That may be acceptable, though, since it would look so much better. I think the cost may be a deal-breaker for the Wife Acceptance Factor.

Thanks again. I would love to hear more ideas. I plan to buy the Arduino Mega tomorrow, since that board seems to be appropriate for all electronic solutions so far.

15 of these at $2.95 each
http://www.mpja.com/2in-5-X-7-LED-Dot-Matrix-Bi-Color-Red-and-Green/productinfo/18459+OP/
and make your own controller would be a big time savings.

Little denser than you planned.

A board I am getting ready to do would be ideal - 8 high current shift register. With 5 output pins to supply current to the 5 rows, and the 64 shift registers to sink current from 1 row at a time and rapidly cycled, coud be a real easy way to control it.
Then just have and array that was 5 x 64, update with your message, move the character data an LED along at a time to give the appearance of moving.
Don't even need a Mega then, just a 3 lines (or SPI) to control the 64-bit shift register 5 output pins, and a couple pins for buttons for message/pattern selection.
Maybe even just glue down surface mount LED on a plastic strip, with 5 wires around to connect the anodes, and 1 wire to connect the common cathode at each column to a shift register output.

Start of 5x64 array

It would probably look a lot more authentic to have a mechanically rotating ring of posterboard with the quote printed on it, unfortunately :slight_smile:

@CrossRoads: I studied Arduino Platform - Working with Shift Registers - CodeProject more closely, and I see that not only can you use the same clock pin for all shift register chips (meaning 2 pins per cluster instead of 3, plus 1), but I can chain as many shift register chips together as will be sufficiently performant. Is that similar to what you're talking about for your board? What chips are you using for shift registers?

That really means I can drive pretty much as many discrete LEDs or 5x7s as I can afford. It would make programming 5x7 matrixes that much more funky, but that much more doable. By the way, I found Jameco has some 5x7s for about $2. In a perfect world I would use blue ones to match, but it doesn't look like anyone makes affordable ones in blue.

@macegr: Yes, my original concept was all mechanical. I agree that would look more realistic, and certainly MUCH cheaper. That too would have been a bit tricky because you have a sliding ring just behind a fixed ring, and the whole thing needs to sit on my face in a way where the motor isn't bonking me in the nose. A crazy inventor and Engineer friend of mine got me thinking about doing it electronically. Here's my reasoning:

  • The mechanical design is likely to be a bit noisy. Even if I don't have any issues of noise from friction between the stationary piece and the rotating piece, there's the motor and gearbox to slow it down.
  • I can't think of a physical arrangement whereby the motor is not on my face, yet not showing from the front, and not taking so much depth that the mask is too far from my face. Aside from the aesthetics, I planned on putting screen where the eyes are in the picture to look through, so the further the mask is from my face, the less I can see
  • While less realistic, the LED idea would be "cooler". And if I use the 5x7 matrixes, someone might even be able to read it!
  • I would like to get back to doing some embedded work anyway. I've had a dream project for about a dozen years of building my own lighting board, and I can reuse this board for that if I ever go through with it.

If you have ideas on how to get around those physical problems, I would love to hear them.

Again, thank you all for your continued advice.

dj_segfault,
Did you look at the schematic? The shift registers are TPIC6B595, 83 cents at avnet.com. 8 of those and the equivalent circuit of a promini on a board and you'd be golden. Data sheet at ti.com.
Board might look like this.
Code would be simple conceptually,
like this and flesh it out some more, add some control to move the data thru the display array, change message, control how fast it moved across, etc.

// define dataArray (5 rows, 64 columns)
void loop(){
// check 5x64 array for updates, moving data along etc.
// set up bytes for next column to go low
shiftData = 0;
// cycle thru the columns
for (column = 0 to 63){

// write the row
for (row - 0 to 4){
digitalWrite (dataArray(row, column);
next row;}
// shift a 0 into the first column the first time, then 1 after that so the 0 scoots across the columns, turn them on 1 at a time in sync with the row data
digitalWrite (serialDatapin, shiftData);
//toggle shiftClock;  
digitalWrite (shiftClock, LOW);
digitalWrite (shiftClock, HIGH);  // moves the 0 across
// turn the shift register output off so don't have ghosting from column to column
digitalWrite (outputEnable, HIGH); // (active Low)
//toggle outputRegisterClock;
digitalWrite (outputRegisterClock, LOW);
digitalWrite (outputRegisterClock, HIGH); // puts the 0 at the next output
digitalWrite (outputEnable, LOW);  // turn the output on
delay(1); // sets the row On time
//make it high for next time
shiftData = 1;
next column;}
} // end void loop