[SOLVED] LedControl, Nano and MAX7219 8-digit 7-Segment display

This looked like a straight forward task, but now I'm scratching my head because I can't make it work...
I have several MAX7219 8-digit 7-Segment displays I got from ebay/amazon.

When I connect them to an UNO and try the example from the LedControl library, everything works fine (in the example it spells "A-r-d-u-i-n-o", scrolls some digits and repeats). Also successfully tested the example on a Mega.

Now I want to use a Nano (clone) to control the display - and it seems to work in the beginning (the 'A-r-d-u-i-n-o' text is starting) but randomly, after a few seconds the display stops working, shows some random segments or switches off completely.

It makes no difference how I power the setup - via USB or using a PSU, powered through Vin or the 5V pin of the Arduino and even using a PSU for each the Nano and the display. I tried several Nanos, MAX7219-Displays and power supplies - all the same.

Does anyone have an idea what maybe causes this?

[Solution:] add a resistor to the display module's DIN pin

The main difference between a Uno and a Nano relevant here is in the power handling.
Anyway, the problem may be the unpredictable behaviour of some MAX7219 copies (a.k.a. fakes).
Here is a long thread on the subject https://forum.allaboutcircuits.com/threads/long-chain-of-max7219-matrix-displays-fail.151773/page-2 but see post #38 where the problem appears to be solved by putting a 2k (or so) resistor in series with the clock and load lines to each MAX7219 chip.

Well, you probably realise you should not be operating an Arduino (UNO/ Nano/ Pro Mini/ Leonardo/ Pro Micro) from the "Vin"/ "Raw" or "barrel jack" for any project requiring parts additional to the Arduino, such as a display, but there really should be no difference between UNO and Nano.

If it is the same display you are using, then it is not particularly likely to be faulty and while as 6v6gt says, there have been reports of dud ICs, few of us have actually had any problems with these parts.

While you presumably know what you are doing, I do have to suggest you give us some photos of how you are setting this up and what code you are using. The forum instructions tell you how to post code and photographs must be brightly lit (such as outside daylight) and perfectly focused.

Perhaps more practically, you need to add diagnostic print statements to the serial monitor to determine whether your code is baulking or the display itself.

6v6gt, thank you for the link. That actually makes sense and I will try adding resistors later today.

And thanks for the schooling, Paul__B. But mainly my question was about differences between UNO and Nano because there obviously are some.

But mainly my question was about differences between UNO and Nano because there obviously are some.

Not in any respect that is significant to your project. :roll_eyes:

Just waiting on your further information.

Generally, Nanos and their clones have a Schottky diode in the in the USB power line which reduces the voltage by up to 0.4 volts. UNOs and clones generally don’t. But it sounds anyway like you have tried a number of power options.
If you disconnect just the Vcc to the MAX7219 and it still appears to “work” (powered via load/cs) you may have one of the copies. It could be that there are a number of varieties of MAX7219 copies in circulation, each exhibiting different characteristics.

Finally I had the time to read through the thread that 6v6gt linked.
The case described there is a bit different to mine but it made me think in the right direction.

Turns out the data lane suffers from noise when using the Nano. So in the end I only added a 0.5K resistor to the display module's data-in pin and now the display behaves normally and just like the UNO does.