Max7219 8x32 arduino scrolling text issues and troubleshooting!

This site gives you update on how to troubleshoot your max7219 8 x 32 scrolling text using Arduino Nano and Parola MD example. Been reading so many now a days making projects involving the Max7219 8 x 8 dot matrix modules and the 8 x 32 version. I also read their comments and as much as possible look for an easy solution how to fix, wrong position of text, wrong direction of scrolling, and all related to failures that sometimes unforgiving to all who are starting with Arduino like I do. Yes you read it. I just been recently having a good time playing with arduino and software sketching. I do not have any problem interfacing connection of modules since I am born as an electronic junky, and connecting and making circuits is not new to me anymore, but software and codes wasn't built for it. I am learning, It all started there. Just like going to school again and study it.

The problem with forums, They all have different solutions that so often conflicts the one seeking solution thus ending nowhere. Not all people uses the same approach. Other tends to misguiding beginners. What I do know, they also started from scratch. There was no one in this world born as if they know entirely the platform.

In this article, I will go basic since I am a beginner too but then when I found out something maybe who are also starting the same path, then my solution most probably be the simplest and be the same as you are. All you will find here are those that i encountered and found the solution to make them working.

LET's begin, All circuits now are made simple. There is no need to build one, just buy one. Connect it to their proper route. Apply the right power source. Always bear in mind with starting with projects. READ FIRST!!! Study them. do some writing. Do not just go on with it without the basics. Many you Tube tutorials are damned irrelevant. They advances it. More often they just do it for one purpose. If they do not reply to your query about solution, then you are at the wrong place. They will muffed you out. So teach yourself not to ask too much. Just read!!!

BUY the items needed for this Tutorial.

1pc- Arduino Nano (clone original does not matter, Arduino IDE will provide the right configuration)

1pc- 8 x 32 Max7219 dot matrix panel (Just look at the picture)


1pc breadboard + connecting wires

1pc power supply sources (with 5 volts and 3.3 volts capability )

SOFTWARE NEEDED

Arduino IDE 
 https://www.arduino.cc/www.arduino.cc › main › software

Get the latest version as much as possible install it on your PC.

CH340 USB driver
http://www.wch.cn/www.wch.cn › download

Get the right version for your PC OS.


LETS BUILD CONNECT MATERIALS 

If the arduino nano pins not yet soldered to the board, soldered it first, but i know you don't know how. find someone who can do it for you. So often when you buy it online like from Shopee, Aliexpress and or Banggood or any other online shopping site you have in your country. The pins are not yet soldered to the board. Soldering is not for beginners. Keep away from those youtube videos saying it is easy. It is not. but you can practice it if you want to. But just don't jump into conclusion of what you see on their videos sounds easy.
Practice it first if really want to using veroboard like this. You'll get by it. Just make sure you are safe from burning your skin, solder fumes inhalation. KEEP in MIND the word SAFETY FIRST!!!

If you know how to solder then skip it.

Put the Arduino nano (soldered pins) to your breadboard.Get your 8x32 dot matrix module. straight forward, there is nothing much to with it but just connecting the wires bundled with it. You will see 5 (five) pins labeled as shown.

All 8x32 matrix module has the same pin label. Notice the IN <-------- label. the connecting pins must start there not at the other side (for beginners who does not have an idea..(more on that later)

VCC.
GND
DIN
CS
CLK


 Connect the wire. irregardless of colors, your preference does not matter but if you have the wire colors 

(green, yellow, orange, red, brown) use the red as your Vcc and brown as Gnd for a start. Supply is important when dealing with power sources. so make sure they go to the right path.

If your matrix has wire of

(black, white, gray, violet, blue) use black as ground and white as Vcc. There are five pins that will go to the arduino nano. The VCC pin will go to the power that I will discuss here.

VCC pin will go to the 5V supply of your power sources.

QUESTION: Why not go to the 5V pin of the Arduino Nano? 


ANSWER: Safety, upon inspection of the matrix and when all 256 leds of the matrix is ON or lighted. The module consumes 1.6Amps, The USB power of a computer mostly are just 500ma and so not enough to Initialize the matrix that you will think it it defective or you have a wrong connection. We are isolating the beginner problem. if it was a single 8x8 led matrix. There will not much of a problem using the 5V pin of the arduino nano. so bear that in mind.


Getting with it.

VCC will go to 5 volts of the power supply
Gnd will be connected to ground pin of arduino (any GND label you see will be the Ground)

-------gnd of power supply sources will also be connected to Arduino nano GND pin also.
DIN will go to pin D11 of arduino nano
CS will go to pin D10
CLK will go to D13

QUESTION: Why D11, D10 and D13 of all available pins of the ARDUINO NANO?

ANSWER: The connection method using here was SPI *serial peripheral interface* It is a type of connection that uses 5 wires. If so happen you want to know all about SPI. try this
https://en.wikipedia.org/en.wikipedia.org › wiki › Serial_Peripheral_Interface

Will not discuss it here.

Getting along. 

When connection and finished and had double check it. Hardware is finished.

Do not connect your ARDUINO NANO to the USB port. Study first the Arduino IDE environment for there are lots to do with it and configure it to work smoothly.

Software needs to be ready. after downloading what should have to be downloaded and installed. OPEN now your Arduino IDE.

You will see this at first. blank sketch. This is your Arduino environment. be familiar with it. If you want to know more about it. take a look. https://www.arduino.cc/www.arduino.cc › Guide

Will not discuss it here. We are straightforward here not backwards. You will not write any on that blank sketch.We are going to use examples.

QUESTION: Why don't we just write the code?
ANSWER: We beginners tend to not know every command, syntax, variables, by just reading them. We are not developer. There are too many of them now. I am not trying to steal information on what they have done. THEY ARE ACTUALLY the BEST TEACHERS on this world, and thus we STUDENTS are just applying what they have learn and did. If we directly ask them the step by step process. you'll end up bored and give up. When you see something and want to do something. Don't start from srcatch. Use them. After all, they are also just expressing their selves of what they discover. So learn it from them.

So then we now have to configure everything for the necessary example. where to get.

GITHUB website. It is the SCHOOL I been talking about. Our teachers. Our savior as beginners.

For this article..we skip the BLINK LED BLINK LED tutorial. There are lots of them. I started there yes. but after dealing with it. what happened next? I needed more information, thus i went for EXAMPLES..

And here 

The PAROLA SCROLLING TEXT for ARDUINO NANO

You'll be amazed and be intrigue more than BLINK LED.

NOTE: You need an internet connection on this of course.

Setting this up.

STEP 1:

 On the blank sketch
click SKETCH above the menu. Then Include Library. Click Manage Library.
Wait for the blue loading bar below to download everything. Be patient. 

When done. 
JUST type MD on the blank bar and wait for it as it will search LIBRARIES needed.

Library needed are 
MD Parola
MD 72xx

Install both and wait for the installed text to pop besides their name and you are done..Latest version will be installed automatically so no need to select what version.

Now click EXAMPLES drop down,
find MD_Parola..above it must be MD_max72xx since you installed it. At MD_Parola select Parola scrolling.
And the original sample code will be loaded. as shown. You will not input anything.

Click Verify first to see if all included libraries that are define was loaded and installed. Check progress at the bottom. If no error the code is ready to be uploaded.

STEP 2:

Plug your Arduino nano with complete hardware onto any USB 2.0 port. (USB port 3 will not work)..Since the CH340 usb driver was installed already at the start of this article, It will not seek drivers anymore. To confirm,

GO TO PC device manager
Expand Ports.
Check if you see "USB-Serial CH340 (COMx) where x is your arduino port ( NOTE THE PORT)...when you see one..the driver is up and running.

GO BACK to ARDUINO environment.
CLICK tools drop to Board
select ARDUINO NANO---(board we are using).
Then click PROCESSOR now select ATmega328p (old bootloader) --(used on clones and not original keep in mind. Original I think has no CH340 usb serial chip.
After that Click Port and select what was the PORT I mentioned to note it.

And your done with this step..

READY for CODE INSERTION on the ARDUINO NANO..

STEP 3:


CLICK UPLOAD as shown,
wait for progress at the bottom and express UPLOAD COMPLETE.

As you are uploading the code. You will notice on the board that a led will be blinking either Red or Green..(depends on the maker of the board, no particular color)

When Done. 

The Arduino nano will run the code and you'll see something happening on the Led matrix.

QUESTION: The Arduino is running but the Display is scrolling Vertically and not Horizontally.?
ANSWER: Don't be stressed out, Just a little tweaking of the code will fixed it. No need to go to any code. The code is fixed and all you need is a code to be replaced on the sketch environment. You tube videos did not help me. That is why I wrote this article for beginners. Videos are conflicting for there are so many reasons why they ended different from ours.

A little TIDBITS of the MATRIX max7219..Not all of them are created equal, the same and or original. Clones are clones but can work as original with some twist. Some are Generic like what Iam using. There is the the common model printed with a name FC_16 dot matrix board.

So for whatever reason Chinese made different boards of the matrix. as long as the driver chip is MAX7219..you will not get lost.

GO back to the Sketch that you uploaded and find

#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW

Sypnosis: All generated examples from our great DEVELOPER teachers out there at GITHUB. There's also documentation of the code. header files,cpp files, too many and if u are willing to read about it will take you at least a day or so. No need to understand what with all of the syntax. As of the writing here. I myself is exploring them. changing parameters and values will not harm your hardwares. It will simply not able to work if theres an error during uploading and halt it.

According to their documentation..The original code uses PAROLA_HW. This is a kind of MATRIX as shown and different from what we used here. see photo. I think Parola type matrix was the one the developer use during this process. But written there was among other hardware including such as

GENERIC
ICSTATION
FC_16

All of them have different orientation on how the 8x8 led matrix was made. Therefore If the original was supposed to scroll horizontally, it will scroll differently on other modules like this PROBLEM we have.

So we will try to use other HARDWARE parameters. by JUST CHANGING that part of a sentence..

Go back to Sketch environment

And replace PAROLA_HW 

with

GENERIC_HW as shown. 


Then Upload it again.

And VOILA!!! congratulations. it is a success..

And so now that you have the correct hardware for your module. Explore the code and try changing it to ICSTATION_HW and or FC 16_HW and see what happens.

The solution I have was a part of reading the documentation of the PAROLA example.

By the virtue of this solution I hope it teach you the correct and easy way.

About MCircuits

0 comments:

Post a Comment

If you have any inquiry about the post, you can contact me directly at my email address. Click ABOUT above and drop to contact to reveal it.Thank you.