4x 8x8 LED Matrixes as eyes in 2x 16x16 bit config

Hello all,

Thanks for taking the time to help with my project. I am trying to create 2 eyes with the use of LED matrixes, specifically with 8x8 matrixes in an arrangement of 2x2. Together I would be running a total of 8 matrixes, with half of them (one eye) mirroring the other one. I have purchased the materials (both sourced locally in the Czech Republic and through AliExpress).

My issue is I haven’t properly read the full specs up until now, and so I am in a bit of a sticky situation right now. The LED matrices I have are common anode, and I have bought MAX7219s to run them (which from my understanding are common cathode only).

So my first question is how would/could I go about wiring these, if the solution would be as ‘simple’ as swapping some connections, or adjusting something in a sketch, or another solution?

My second question is about the set up (and subsequent sketch) of the eyes. I’ve found some useful posts on here (eg. @marco_c ’s Parola library , or the helpful comments of a few people here on hooking up 4 matrixes together), but my issue is that nearly everyone here uses the LED Matrix as a scrolling display, and those are all the examples I’ve found… I do not want to scroll whatsoever, though I do want the displays to work together. Orientation of the displays is also a question, though I assume this could be accounted for in the sketch.

I’ve used this website to draw the code through a GUI, so that’s set. An example of a blinking eye would be as follows:

TL

const uint64_t IMAGES[] = {
  0x3c7cfcf8f0c00000,
  0x3c7cfcf800000000,
  0x3c7c000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x3c7c000000000000,
  0x3c7cfcf800000000,
  0x3c7cfcf8f0c00000
};
const int IMAGES_LEN = sizeof(IMAGES)/8;

TR

const uint64_t IMAGES[] = {
  0x3c3e3f1f0f030000,
  0x3c3e3f1f00000000,
  0x3c3e000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x0000000000000000,
  0x3c3e000000000000,
  0x3c3e3f1f00000000,
  0x3c3e3f1f0f030000
};
const int IMAGES_LEN = sizeof(IMAGES)/8;

BL

const uint64_t IMAGES[] = {
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c0000,
  0x0000183c00000000,
  0x0000003c00000000,
  0x0000183c00000000,
  0x0000183c3c3c0000,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c
};
const int IMAGES_LEN = sizeof(IMAGES)/8;

BR

const uint64_t IMAGES[] = {
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c0000,
  0x0000183c00000000,
  0x0000003c00000000,
  0x0000183c00000000,
  0x0000183c3c3c0000,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c,
  0x0000183c3c3c3c3c
};
const int IMAGES_LEN = sizeof(IMAGES)/8;

The resulting animation is attached to this post.
All of these could be easily turned into a bit array:

BR

const byte IMAGES[][8] = {
{
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00000000,
  B00000000,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00111100,
  B00000000,
  B00000000,
  B00000000
},{
  B00000000,
  B00000000,
  B00000000,
  B00000000,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00000000,
  B00000000,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
},{
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00111100,
  B00011000,
  B00000000,
  B00000000
}};
const int IMAGES_LEN = sizeof(IMAGES)/8;

Link to LED Matrix i bought
MAX7219 datasheet

Appreciate any pointers, links, comments, advice that I can get.

normalni-blik-1.gif

MAX7219 can be used with the parts you bought.

You need to change wiring.

For example, pin 13 of your BS part is connected to the pin on the MAX7219 that would normally be connected to pin 5 of the AS part.

BS      AS
==      ==
13  ---  5
 3  ---  2
 4  ---  7
10  ---  1
 6  --- 12
11  ---  8
15  --- 14
16  ---  9

 9  --- 13
14  ---  3
 8  ---  4
12  --- 10
 1  ---  6
 7  --- 11
 2  --- 15
 5  --- 16

I had to do this myself.

Once you do that you don't have to change the code.

Some additional info here as well: Robot Eye Expressions using LED Matrix Display – Arduino++

Hi Guys, thank you so much for your helpful tips. I'll be sure to test out the rewiring and the library over the weekend!

Appreciate it!

marco_c:

Mi Marco, I understand I have to edit the MD_RobotEyes_Data.h file with the arrays I've created.. Just wanted to ask; would you recommend connecting the 4 separate matrixes together and working with it as a 16x16 display, or having them separate and working with it as 4 separate displays?

You need to plan the animation as 16x16 but the data you send has to be per matrix, so I would store it that way to make it easier.

ieee488:
You need to change wiring.

Just to be safe and sure, this is the adjusted wiring between the IC and the LED pins, rewiring them fro the AS to the BS pinout on the LED matrix? (and thank you again so much for doing this!)

marco_c:
You need to plan the animation as 16x16 but the data you send has to be per matrix, so I would store it that way to make it easier.

Alright, that's what I thought, which is why I used the GUI animator to get the animation codes for each matrix separately. thank you!

Is there a simple HW way to mirror the displays, or would it be advisable to wire all to the Arduino and do the mirroring via SW?

tommyjay:
Just to be safe and sure, this is the adjusted wiring between the IC and the LED pins, rewiring them fro the AS to the BS pinout on the LED matrix? (and thank you again so much for doing this!)

Yes.

You are re-mapping.

You can see what is happening if you take a printout of the BS "schematic" (what you have) and rotate it to 90 degrees to match up with the AS "schematic".

However, if you are going to use the Parola library, then you don't need to do the re-mapping.
The Parola library expects the BS part.

Other examples use the AS part such as Arduino Playground - HomePage.
That's when the re-mapping is needed.

.

Is there a simple HW way to mirror the displays, or would it be advisable to wire all to the Arduino and do the mirroring via SW?

I would always wire things up in a 'standard' way and then use the software to make adjustments. More flexibility.

For example, all the row/column adjustments for the LED matrices wiring is done in the MD_MAX72xx library, which allows it to be used with all the LED matrix configurations, unlike most other libraries.