Need help: How to make my own 24x16 LED Matrix display

That's the exact display board I'm trying to create, in monochrome of course

The schematic is publicly available, and it uses the HT1632C (which you can buy on ebay for $4 or so).

plastygrove:
I've tried looking up the HT1632C driver, but I don't think it's a standard breadboard size IC.

You're right on that one. It would be hard to connect to a 52-pin Quad Flat Pack without a custom circuit board and some surface-mount soldering experience.

funkyguy4000:
I would recommend looking on instructables for LED Matrix display. There are numerous amounts of instructables on that very topic, at least last I checked.

I did look around the instructables, but didn't find any that involved building a 24x16 display. I'll take another look around.

Thanks for the link! I really love the detailed explanation. :slight_smile:

johnwasser:
Even if you wire them as 8 rows of 48 you can place them as 16 rows of 24.

Now that's a very neat idea. Instantly reduced the number of bit shift registers. The more I think about it, the more I think that bitshifts are the way to go, rather than use the 7219. I'll try to decide by the weekend.

But on that note, how do I ensure that I have enough current to be able to light up 16x24=384 LEDs? I know that the arduino's 20mA limit won't be enough. How would I use an external power source to power up the LEDs? Is it as simple as plugging in a higher power source into the arduino?

plastygrove:
Is it as simple as plugging in a higher power source into the arduino?

No.

The good news is that each of the 48 columns will only have one LED turned on at a time. The row outputs will need to drive up to 48 LEDs at a time so that's nearly 1 Amp (0.96) if each draws 20 mA. A resistor per column will be needed to limit current.

johnwasser:
No.

The good news is that each of the 48 columns will only have one LED turned on at a time. The row outputs will need to drive up to 48 LEDs at a time so that's nearly 1 Amp (0.96) if each draws 20 mA. A resistor per column will be needed to limit current.

Correction, max current supplied by the arduino is 40mA. But with fast switching, wouldn't the net power usage be the same as powering them all together? I've used an HCF4094 with an 8x8, it doesn't do very well when an entire column of 8 LEDs are lighted together. I guess the 595 allows more current through the pins than the 4094.

But even the way you say it, assuming each LED requires about 3mA (1.3 V drop across LED, 1K res, 5v Power supply), 48 LEDs goes to 144mA which is more than the 40mA supplied by the arduino. How do I fix this? I don't want the LEDs working with some of them dimmed out.

Going at it the hardway.
Use 5 shift registers - 3 to make the 24 bits, and 2 to make the 16 bits.
I just did a 12x8 that way (didn't need 16 x 8), will post the schematic when I get home.
Simple to expand it 1 more part high and 1 more across.
Concept is simple - resistors pull up individual anodes, shift register at the bottom pulls down common cathode for column to turn on - shift register at the side pulls anode low if an LED is to be off.
No mucking around sourcing current from PNP or P-channel MOSFETs.

CrossRoads:
Use 5 shift registers - 3 to make the 24 bits, and 2 to make the 16 bits.

That's a very cool idea. So effectively join the anodes in the columns and cathodes in the rows. So 3 shift registers for the columns and 2 for the rows. But with this circuit also, wouldn't the current drag be more than the arduino can provide? It's possible to have all 384 LEDs switched on at the same time by making the columns high and the rows low. How do I power it?

"It's possible to have all 384 LEDs switched on "
Only if you screw up! The idea is that no more than 1 column is turned on at a time, the column whose cathode is pulled low.
Here's the start of the array, 5x16 shown so far.
The Anodes get there current via the pullup resistor.

The cathode are all driven high.
The anode are pulled high/low.
ONE cathode is turned on, the LEDs with Anodes not pulled low turn on.
the cathode is turned off.

The anode are pulled high/low.
ONE cathode is turned on, the LEDs with Anodes not pulled low turn on.
the cathode is turned off.

repeat.

What I did was out put the array in memory, and every 500uS read out the anode info, turn off the current cathode, write out the anodes, and turn the next cathode on.
Then during the 500uS, read the serial port, buttons, do math, whatever to update the array as needed.

For a first matrix I really would recommend the MAX7219 chip for simplicity as it deals with all the scanning for you. As you want 24x16 just use 6 chips daisy chained together (1 chip = 8x8 matrix). This shows how to wire them up Arduino Playground - MAX72XXHardware and attached is the schematic I did for my first arduino project. I would use a 10uF/100nF per chip if your driving 6 of them.

Clock5013.pdf (67 KB)

CrossRoads:
What I did was out put the array in memory, and every 500uS read out the anode info, turn off the current cathode, write out the anodes, and turn the next cathode on.
Then during the 500uS, read the serial port, buttons, do math, whatever to update the array as needed.

Thanks! Let me try this out. I've attached a schematic of the display based on your input. Once I can get it to work on the simulator, I'll probably try to get a PCB manufactured for the 8x8 displays and for the bit shifts. Pretty hard to fit all of them on a breadboard. Btw, really like the boards you have on your website, esp the Bobuino :).

Riva:
For a first matrix I really would recommend the MAX7219 chip for simplicity as it deals with all the scanning for you.[/url] and attached is the schematic I did for my first arduino project. I would use a 10uF/100nF per chip if your driving 6 of them.

That was my first impulse. I've even ordered one to play around with. But, it's way cheaper with bit shifts at least where I'm staying. I've been able to wire a single 8x8 to a bit shift register already, so I have a basic understanding.

Looks like a good start. Hard to tell which are anodes & which are cathodes.

CrossRoads:
Looks like a good start. Hard to tell which are anodes & which are cathodes.

I'm not sure myself :). The actual 8x8 LEDs that I have are far worse. They've got them all mixed up. i.e. Pin 1 is for column8 and pin2 is for row6 and so on :astonished:

One of the other members posted this URL to Nerdkits over here: NerdKits - DIY Marquee LED Array Display

I think it's a very interesting idea to connect 2 LEDs between the same terminals so that I alternate the polarity between the terminals in quick succession and light both of them. This should allow me to reduce the number of bitshifts by half. Theoretically, I should be able to run a 24x16 or even a 32x16 LED array with just 3 bit shift registers (2 for columns and 1 for rows). Of course, this would require twice the number of processing cycles by the MUC, but I think the Atmega is capable of doing it fast enough to avoid any flicker.

What do you think?

Seems like you'd be taking on a lot of hassle to save 2 parts.

CrossRoads:
Seems like you'd be taking on a lot of hassle to save 2 parts.

No hassle at all since I'm doing this for fun :). I think it's just amazing that with some thought, we can reduce the number of bit shift registers for a 24x16 display down from 12 to 7 to 5 and now to 3.

Of course this is theoretically speaking. I'm sure getting the algorithm to convert an array using 3 bit shifts will be a bit challenging. And I lose the benefit of the pull-up resistor to the +5V pin on the arduino, thereby limiting it to just 40mA max. I think bad code might actually introduce a flicker here since it takes twice the number of cycles to power the pattern.

Well, I may have been wrong. I've tried to bring it down to 3 shift registers, but I can't do it. The best I could do using the reverse polarity trick is to bring it down to 4. I've attached an image of the circuit I could come up with. The Anodes and Cathodes of the 8x8 displays are shown in the image. Anyone know of a way to bring it down to 3 shift registers?

Premature optimization is the root of all evil. - Donald Knuth

florinc:

Premature optimization is the root of all evil. - Donald Knuth

Agreed :). I'm not saying I'll do it this way in my project. I'm just curious to see how the difficulty increases. Honestly, I'm much better at coding than electronics. So, why not try to push the MCU to it's limits? Trying to code for this is like a real brainteaser.

why not try to push the MCU to it's limits

Beside the display, you may need your MCU to perform other operations, like reading buttons, getting time from RTC etc. If the MCU is busy most of the time with the display, it may look unresponsive to the user.

florinc:
Beside the display, you may need your MCU to perform other operations, like reading buttons, getting time from RTC etc. If the MCU is busy most of the time with the display, it may look unresponsive to the user.

Let me try it and see.