How to Control MAX7219 LED Matrix with ESP8266 WiFi Module

About this Project:
In this project we will learn how to interfacing ESP8266 module with MAX7219 matrix display to scrolling text message from web user interface. We will use Arduino IDE to program ESP module in this project. I am using MajicDesigns MD_MAX72xx library for running this project, also the code is very similar to included example in the library with some improvements in web user interface html code.




Components:

  1. MAX7219 8×8 LED Matrix
  2. ESP8266 Node MCU
  3. USB Cable for programming and power

 

Circuit Diagram:

 

Steps:ย 

      1. Connect the circuit as shown above.
      2. Install Arduino IDE form arduino website. After that install ESP8266 board and library in Arduino IDE.
      3. Download and install MD_MAX7219 Library from download section for driving MAX7219 matrix. For using this library you will need to edit MAX72xx.h file for configure the type of LED matrix you are using. In this project we are using FC-16 Chinese module.
      4. Download code ino file from download section and open it with Arduino IDE.
      5. You will need to edit WiFi network SSID and Password inside your code before flashing it in ESP module.
      6. Select board to NodeMCU and flash the code in ESP module.
      7. Power up the circuit and you will see IP address of your ESP module allocated by your WiFi network on Matrix display. (watch video)



    1. Now open that IP address in any browser connected in same network. And you will see web user interface to enter text.
    2. For detailed procedure of configuring WiFi module with your home network and using web interface, please watch embedded YouTube video linked at the bottom of this page.





    Downloads:

    1. Arduino IDE
    2. ESP8266 Arduino Library
    3. MajicDesigns MD_MAX7219 Library
    4. Code.ino

     

  1. Video:ย 

 

How to solve mirror image and orientation problems of matrix display if you are using old MD_MAX72xx library.

27 Comments

  • Kailash Giri

    (December 18, 2017 - 7:02 am)

    Thank You.

  • Bogdan

    (January 31, 2018 - 1:36 am)

    Thanks for the tutorial. After a few hours of searching online, your was the only one to work. Managed to have it running in a few minutes on an ESP8266 12-F.

  • Cialis 20 mg

    (March 25, 2018 - 11:41 pm)

    You can certainly see your expertise in the work you write. The world hopes for more passionate writers like you who are not afraid to say how they believe. Always follow your heart.

  • Daruosh

    (May 7, 2018 - 9:46 am)

    Hi, I made your project,but it is mirror,How can I correct it,by the way I put my ip addres on browser but,that page you show on video don’t come,could you please let me know how to do that. thanks again

    • psadminetechpath

      (May 7, 2018 - 10:12 pm)

      In that case, you need to change the MD_MAX library setting according to your LED matrix model.

      • LegendaryZAYNE

        (November 15, 2018 - 8:29 pm)

        How can I do that?

  • Manuel McLure

    (May 23, 2018 - 1:01 am)

    Thanks for the tutorial. I implemented this with a SN74AHCT125N as a 3.3-5V level shifter for the signals and it works great.

  • Frank

    (June 1, 2018 - 12:35 am)

    Thanks a lot, this works great with my nodemcu.
    What I was really trying to do though was to use MQTT messages to feed the display instead of the website. I got this working with pubsubclient for an IR sender that switches on/off my old AV Receiver. But not succeeding with the 8×8.
    Any chance you will give this a try and make it work? (Please)

  • Brian

    (June 2, 2018 - 2:02 pm)

    Hi,
    Thanks for your work and sharing this program. I played around with it, and found that I was unable to connect to port 80 on the ESP8266, when it was on my Apple Airport accesspoint but when connected to a hotspot on my android phone it worked.
    I also notised that the ESP8266 starts its own AP – atleast when I was not able to connect to the ESP8266 on port 80.
    So I added this line before “WiFi.begin(ssid, password);” and it solved my issue.
    WiFi.mode(WIFI_STA);
    It makes the ESP8266 act as a client to the network only, meaning it won’t start an AP own.

    • psadminetechpath

      (June 2, 2018 - 8:37 pm)

      Great job, and thank you for sharing your code modification.
      It would be great if you can copy paste your full code in comments of this post so that other visitors can try your code too.

    • amen

      (September 13, 2018 - 1:21 am)

      hi there, can you send to me your source code and it might help me to solve my problem. Thank you

  • Brian

    (June 9, 2018 - 10:15 pm)

    Below is the code, its mostly unchanged:
    1. I did remove some log/serial output, when debuging is enabled. But everyone can just take the original code and add the mods I made if they wan’t to ๐Ÿ™‚
    2.
    Added:
    WiFi.mode(WIFI_STA);
    Due to my tests I will start adding this in all my future programs where I only want clientmode.
    3.
    mx.control(MD_MAX72XX::INTENSITY, 0);
    Added the line above – it lets you change how bright you want the display to be. Default is half intensity meaning 7. Valid values are 0-15.

    Code: https://pastebin.com/0X68XJ3n

  • Dani

    (July 24, 2018 - 4:53 pm)

    I made this fabulous message display to show me some text information from domoticz.
    but the question now is..: How can i send a http command complete with message to display?
    Must i make a script which logs in and places the text and send a return ?
    Anybody who can assist me?

    Cheers Dani

  • Matko

    (August 14, 2018 - 4:15 pm)

    Did not work

  • amen

    (September 12, 2018 - 11:57 pm)

    hi sir, can i have your source code since the file that you attached to cannot be use. thannk you

  • psadminetechpath

    (October 2, 2018 - 8:55 am)

    Yes, you can share this on Twitter ..

  • psadminetechpath

    (October 7, 2018 - 7:36 pm)

    send me some more details of your hardware and the code, i will help you out. Find contact-us link on upper right corner of this website to reach admin.

  • tutuap downlod

    (October 9, 2018 - 7:02 pm)

    This helps. Thanks!

  • LenK13

    (November 11, 2018 - 9:17 am)

    Unfortunately this doest work for me. I am sinply trying to create a weather station clock using hardware NodeMCU ESP8266 and the Max7219. Seems all the examples I come across have outdated libraries and when complied errors come up. This is the 11th eample code I have attempted and none of them work. I know this is not that difficult to do, just I am not a programmer and rely on program support. Can someone show me where I can go today and find some example code that will work.

    • psadminetechpath

      (November 27, 2018 - 9:26 am)

      You can download updated library from github, and trust me all examples are working very well without any changes.. you may check your hardware and esp8266 board setting in arduino IDE.

Leave a Reply

Your email address will not be published. Required fields are marked *