Instructables

16x8 LED dot matrix with MAX7219 module

Picture of 16x8 LED dot matrix with MAX7219 module
BL-M12A881 diagram.png
MAX7219 pinout.png
BL-M12A881 pinout.png
BL-M12A881.jpg
MAX7219_8x8_red_dot_led_matrix_1.jpg
MAX7219_8x8_red_dot_led_matrix_2.jpg
MAX7219_8x8_red_dot_led_matrix_3.jpg
MAX7219_8x8_red_dot_led_matrix_4.jpg
16x8 LED dot matrix with MAX7219 module


The objective of this project is: to show off the use of the module "MAX7219 dot matrix display module MCU control DIY"
In order to using it you will need the module that can be purchased on ebay:

http://www.ebay.com/itm/171048735052?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

And you will need the MaxMatrix libraries files (which are 3):

https://docs.google.com/file/d/0B_YlEklLDDS7MDhRdWJKdmZQTnc/edit?usp=sharing

https://docs.google.com/file/d/0B_YlEklLDDS7WE9lQ1F1aFhnYlE/edit?usp=sharing

https://docs.google.com/file/d/0B_YlEklLDDS7djd5T2JDeFVsaVE/edit?usp=sharing



The sketch with the code can be found on the link below:

https://docs.google.com/file/d/0B_YlEklLDDS7WTF0c2hlVzFCZWc/edit?usp=sharing



See in the attached picture the interconnection diagram between Arduino module and MAX7219 module (it was used only 2 MAX7219 modules in this case):


Arduino pin 13 (alternative: pin 10) connected to the CLK pin of the module MAX7219
Arduino pin 11 (alternative: pin 8) connected to pin DIN module MAX7219
Arduino pin 10 (alternative: 9 pin) connected to pin CS module MAX7219
GND and VCC (+5V)

To expand the number of modules, you should just connect Dout pin of one MAX7219 module  with the Din pin of the another MAX7219 module... and so on.

The MAX7219 Dout pin is at the top of the module while Din pin is at the botton of the module.


Remembering that you can connect modules as you want, just connecting  the output of one module with the input of the other and leaving the other signals in parallel.
In the sketch, you should to modify the parameter "maxInUse" for the amount of modules that  you will use.





The video is just demo.
Remember that you can modify the messages in the code itself, or use the serial console to enter the message.

http://youtu.be/uG88Tt6Apoo




A second video using four MAX7219 modules.

http://youtu.be/yFx4r-WUp5g



Questions, suggestions and for any trouble with the files, please contact by email:

marcelo.moraes.1971@gmail.com


Thanks.
RFOA22 days ago

Gostaria se possível mostrar com liga dois módulos, a gente não acha material nenhuma ensinando, só fala por auto, vi materiais que diz que é só conectar a saída de cima na entrada do outro que da certo, in no out do outro, mas não consegui se possível poste fotos e um exemplo de código, ajudará muitas pessoas deste forum obrigado pela atenção.

BIGDOG1971 (author)  RFOA2 days ago
Olá

Todo o esquema está na matéria.

Realmente é só ligar a saída de um módulo com a entrada do próximo e assim por diante. os outros pinos ficam em paralelo.

Dá uma olhada no esquema.


Atenciosamente.

Marcelo
rinthesun1 month ago

For anyone else trying to build a banner display with these modules here are some comments. 1) I have followed davebodna software suggestions for code changes with success, i.e., the second 32's. 2) I have been linking the modules with the jumper wires provided in a daisy chain and found that the banner becomes unstable at 6 units. I note that davebodnar is bussing power, grd, CS and CLK and, in my case, suspect that the daisy chaining is the problem, so take note.

davebodnar2 months ago

Good news! I spent some time experimenting today and have the software working well with up to 9 modules. Details of how this can be done are on my web page here:

http://www.trainelectronics.com/Arduino/LED_Matrix...

I was unable to get more than 9 working but hope that I or someone else will figure it out!

Again, Marcelo, thanks for your project!

dave

index.2.jpgindex.4.jpg
davebodnar made it!2 months ago

Good news! I spent some time experimenting today and have the software working well with up to 9 modules. Details of how this can be done are on my web page here:

http://www.trainelectronics.com/Arduino/LED_Matrix...

I was unable to get more than 9 working but hope that I or someone else will figure it out!

Again, Marcelo, thanks for your project!

dave

index.2.jpgindex.4.jpg
davebodnar2 months ago

Marcelo - First I would like to thank you for an excellent project! I have a number of units working well and find them fascinating!

Unfortunately I have the same problem as "perryscope" when I get above 5 modules. Even after editing the code (changing 32 to 64, etc) the display shows only upper case and some characters are not represented accurately at all.

Can you help with code that works reliably with six or more modules? I have materials to go to 10 modules and hope to get it working soon.

I apprecaite your help!

dave

perryscope2 months ago

I am having problems using any more that 4 modules?

Up to 4 and its working great!

If I add a fifth module then i get corrupted columns on the first module, iF i add a sixth I get more corrupted columns on the second display as well as corruption on all of the first?

I tried the change to the printCharWithShift Function as sugested to..

void printCharWithShift(char c, int shift_speed){
if (c < 64) return;
c -= 64;
memcpy_P(buffer, CH + 7*c, 7);
m.writeSprite(64, 0, buffer);
m.setColumn(64 + buffer[0], 0);

for (int i=0; i<buffer[0]+1; i++)

delay(shift_speed);
m.shiftLeft(false, false);
}
}

...and this then used all six modules correctly but everything was in upper case and no spaces were shown?

Can anyone share some there code thats working for more than 4 modules?

Cheers

sweet_coffee made it!2 months ago

Wonderful! Done with five 8x8 arrays, the next target is fifteen or even twenty :-)

Dude you re great!

10314556_10204003808921649_7728854692234660514_n.jpg10169174_10204003809521664_6395581929923837895_n.jpg
pisler4 months ago

Goal achieved

http://youtu.be/u0E5JSqfUfU

BIGDOG1971 (author)  pisler4 months ago
Awesome!

Well done!!! Congratulations. You did a perfect Daft Punk Helmet.
Do you plan to market this project?


Cheers!
VSS4 months ago

Hello !

I have the same problem as makini_kini:

Build options changed, rebuilding all
MAX7219_5:135: error: 'MaxMatrix' does not name a type
MAX7219_5.ino: In function 'void setup()':
MAX7219_5:159: error: 'm' was not declared in this scope
MAX7219_5.ino: In function 'void printCharWithShift(char, int)':
MAX7219_5:196: error: 'm' was not declared in this scope
MAX7219_5.ino: In function 'void printString(char*)':
MAX7219_5:221: error: 'm' was not declared in this scope

I deleted the contents of the directory libraries. It does not work still. I installed the Arduino again. I still have a problem :(

Please help

Artur

BIGDOG1971 (author)  VSS4 months ago
Hi,

This kind of issue is due to libraries installation failure.
To solve the problem, proceed as shown below.

Remove all project libraries from the "libraries" folder.
To install the libraries, follow the steps below:
1 - take sure that the Arduino's IDE is closed;
2 - unzip the libraries in the "libraries" folder of the Arduino's IDE;
3 - open the .ino file and compile it..

90% of people with this kind of problem, have solved it by following the procedure above.
If not, please re-install the arduino's IDE.


I hope I have helped you.

Feel free to send me your questions.


Best Regards


Marcelo Moraes
arduinobymyself.blogspot.com.br
arduinobymyself@gmail.com
pisler made it!4 months ago

Hello,

I'm trying to make a replica of the daft punk helmet for my daughter.

I have a problem of display with 6 MAX7219.

You see on these video you can see my wiring, and the part of code used for display the strings.

http://youtu.be/1DcY2Yp2T1g

First problem (with the first part of code):

When MaxinUse is > 4, on the right, after 4 characters displayed there on the first and second matrix some lines and not the following characters.

Second problem (with an other part of code):

It's not the correct characters displayed (A is replaced by !) etc... and i have never the small characters (abcdef...).

Question:

Is my wiring correct (the first maxtrix connected to arduino is at right), could you help me ?

Thanks

Diapositive1.jpg
makini_kini4 months ago

HELP ME PLEASE

Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Uno"

MAX7219_5:135: error: 'MaxMatrix' does not name a type
MAX7219_5.ino: In function 'void setup()':
MAX7219_5:159: error: 'm' was not declared in this scope
MAX7219_5.ino: In function 'void printCharWithShift(char, int)':
MAX7219_5:196: error: 'm' was not declared in this scope
MAX7219_5.ino: In function 'void printString(char*)':
MAX7219_5:221: error: 'm' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

BIGDOG1971 (author)  makini_kini4 months ago
Hi Makini_kini.

This kind of issue is due to libraries installation failure.
To solve the problem, proceed as shown below.

Remove all project libraries from the "libraries" folder.

To install the library(ies), follow the steps below:
1 - take sure that the Arduino's IDE is closed;
2 - unzip the library(ies) in the "libraries" folder of the Arduino's IDE;
3 - open the .ino file and compile it..

90% of people with this kind of problem, have solved it by following the procedure above.
If not, please re-install the arduino's IDE.


I hope I have helped you.
Feel free to send me your questions.

Best Regards

Marcelo Moraes
arduinobymyself.blogspot.com.br
arduinobymyself@gmail.com
Hello Marcelo
I am trying to do scrolling text with two pieces of MAX7219 module.
The sketch code for this ....is your and found it here
https://docs.google.com/file/d/0B_YlEklLDDS7WTF0c2hlVzFCZWc/edit?usp=sharing the link found it here
i want to do something like this http://youtu.be/uG88Tt6Apoo
But i do not found the sketch ....i have arduino Uno and the last arduino software .
I was trying all your solutions without results .....always problem.....
Please help me.
BIGDOG1971 (author)  makini_kini4 months ago

Hi Makini,

Send me an email requesting the code and libraries and I will share the files with you.

email adrress: arduinobymyself@gmail.com

Thank you Marcelo for your time i will send you asap..........

saleemqamar5 months ago

Hi,

I have 7 modules working but when I start the power, sometimes all or some modules are coming ON. How can I switch OFF all the modules at reset/start up?

Thx

Sal

BIGDOG1971 (author)  saleemqamar5 months ago
Hi Sal,

There is not any function to reset the matrix.
Maybe you can set the intensity to zero at the start-up.


Best regards.

Thanks a lot, I will try this.

Sal

Elsoy5 months ago
What i make wrong?

http://www.youtube.com/watch?v=qTn29zvH750&feature=youtu.be
BIGDOG1971 (author)  Elsoy5 months ago
Hi Elsoy,

Check if the "maxInUse" parameter is set to 4 modules.
And check all connections between modules.


Best regards.


Marcelo Moraes
arduinobymyself.blogspot.com.br
arduinobymyself@gmail.com
lmantovan6 months ago

Hi Marcelo, great project!!! But I'm trying to make a 8x64 matrix by using 8 MAX7219 and something doesn't work. As you suggested I changed the maxInUse parameter to 8 and the first 4 modules don't show any message but only strange figures.

Please, can you help me? Have you ever tried to put together more than 4 modules?

thx in advance!

Luca

BIGDOG1971 (author)  lmantovan5 months ago
Hello Luca,

Do you need to change the code lines below on the printCharWithShift() function.

void printCharWithShift(char c, int shift_speed){
if (c < 64) return;
c -= 64;
memcpy_P(buffer, CH + 7*c, 7);
m.writeSprite(64, 0, buffer);
m.setColumn(64 + buffer[0], 0);

for (int i=0; i {
delay(shift_speed);
m.shiftLeft(false, false);
}
}

Try this code and tell me the results.


Best Regards


Marcelo Moraes
arduinobymyself.blogspot.com.br
arduinobymyself@gmail.com
ctakai7 months ago
Hello!
You brazilian:
BIGDOG1971 (author)  ctakai7 months ago
Yes, I am Brazilian.
Sim, eu sou Brasileiro.
ctakai BIGDOG19717 months ago
Oi, Marcelo - estou começando no arduino agora.q mes atrás (meu novo Hobby)

Meu interesse veio pelo meu vizinho que montou uma impressora 3D.
Parabens pelo seu Instructables e o seu blog, bem didático..
Agora vou montar um cubo de led de 8x8x8 (já montei um de 3 e 4)

Valeu! forte abrs
alexkirlian8 months ago
Marcelo will.
How can I insert special characters in the table so that they appear in the array?
Kind hearts and arrows.
BIGDOG1971 (author)  alexkirlian7 months ago
Hi Alexkirlian,

Yes, you can insert these types of characters in the array and replace characters not normally used by him (example: the character "}" could be the symbol "Heart".
Obrigado Marcelo, vou tentar, pois comprei o módulo, consegui colocá-lo para funcionar, porém não consegui inserir nenhum caractere diferente, como letras acentuadas (exemplo: á, é). Queria também poder desenhar um coração e outras coisas e fazer scroll com eles. Poderia, por favor, me dar mais algumas dicas de como faço isso ?? Obrigado amigo. Abraços "from Cabo Frio - RJ". ;-)
BIGDOG1971 (author)  alexkirlian7 months ago
Alex,
Envia me um e-mail e eu ensino como alterar um padrão
arduinobymyself@gmail.com

Send me an email and I will teach you how to modify a pattern.
arduinobymyself@gmail.com
omeier9 months ago
Hi Marcelo,
Many thanks for your great library and sketch. It helped me a lot to finish my personal ideas, in this case my
"Poor Men's Word Clock"
Please refer to http://electronicfreakblog.wordpress.com/
and
http://arduino-hannover.de/
where I will publish very soon my latest articles based on your input.
Regards from Germany
Olaf
Testaufbau_MAX7219_Dot_Matrix_Modul.JPG
joenhemato9 months ago
Tank' sir,....i want it work in my first job
lovelyazka10 months ago
hi ... thx for you're tutorial.

and my question how about if im not using module led dot matrix in schema, just MAX7219 2 piece and 2 piece led dot matrix 8x8 ?

thank you ..
you respone im really appreciate that :)
BIGDOG1971 (author)  lovelyazka10 months ago
Hi,

You can use the the MAX-7219 IC and a LED dot Matrix, just make the connections of these components as you can see in the pictures above.
You will need:
1 x MAX-7219;
1 x LED dot Matrix 1088AH or equivalent;
1 x 0.1 uF ceramic capacitor;
1 x 10 uF electrolitic capacitor;
1 x 10K resistor;
1 x 27k resistor.

Put all together on a breadboard and you can use it as a MAX-7219 MCU Module

Regards.
priyaaank11 months ago
Seriously rocking...
mikeboss941 year ago
THANK YOU!!! IS WORKING!
20130728_173057.jpg
mikeboss941 year ago
Hi man, an excelent work here! i sent you an email with a few questions, hope you can help me thanks!
-Standby1 year ago
Lol, i was planning to order this same matrix too ! Happy to watch this product working good !