Driving a non-rectangular LED matrix

Hi arduino forums! I have a project involving an LED matrix which I already soldered that has an uneven amount of LEDs in each row. Here is a picture:

.

It's configured with anode columns and cathode rows. So anyway, I originally thought I could multiplex this with a 4017 decade counter by cycling through the rows, but then I found that a) it doesn't really drive enough voltage and b) I need a way to change the voltage if, say, I'm driving only 1 LED in a 7 LED row (so it doesn't get fried). I know this is probably a very classic problem for you all on the multiplexing forums.

So I'm considering getting a MAX7219. My question is, this chip is configured to power an 8x8 square matrix. Will there be problems if some rows only have 1 LED and some have 7? Will it adjust the voltage accordingly? I'm not entirely sure how it works, but I understand you just hook up the rows and columns to the matrix and data to the arduino.

I've also seen people use chips like the UDN2987 with shift registers. For my application, is there a better chip than the MAX? Also, is there a way to make this work with only my 4017 and simple components?

Thanks you guys in advance!

Yes, use max7219. It will adjust the voltage/current for each led, so that it does not matter how many LEDs are on the same row.

You will need 2 x max7219. Plus 2 x 0.1uF caps, 2 x 10uF caps and 2 x 10K resistors. You must change your matrix so that it is wired as 2 matrixes, with no more than 8 x 8 in each matrix.

Another possibility is ht16k33. You would need only one of these, and I do not think you would need to change the way you have wired your matrix. They are commonly available as convenient breakout boards.

To use your 4017 is possible but would require many other components and a more complex sketch. Using max7219 or ht16k33 is simpler.

Thank you! I hadn't considered the ht16k33, and it looks perfect. I think I'm going to go with that.

I found that a) it doesn't really drive enough voltage and b) I need a way to change the voltage if, say, I'm driving only 1 LED in a 7 LED row (so it doesn't get fried). I know this is probably a very classic problem for you all on the multiplexing forums.

No it is not a classic problem but it sounds like it is the case of a very bad design. What is I place for limiting the current ( it is current that is the problem not voltage ). From your description it suggests the answer is nothing but the output impedance of the driver. Given that, a driver chip that regulates the current is the answer. Is the design yours or did you get it from some source?

PaulRB:
You will need 2 x max7219. Plus 2 x 0.1uF caps, 2 x 10uF caps and 2 x 10K resistors. You must change your matrix so that it is wired as 2 matrixes, with no more than 8 x 8 in each matrix.

If you divide the present array across the middle and separate out the single LED, you can wire the two parts (and the lone LED) so that they can be driven by one MAX7219. :grinning: