Max7219 - 19 LED

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Max7219 - 19 LED

#1 Post by wanabo » 09 Sep 2023, 13:43

Hi everyone !

I'm tryind to make a screen display based on MAx7219.
I used a Wemos D1 with a 4LED MAX7219. It works fine. I use a external powersupply for the max7219 (5V - 6 A)

Now I'm trying to make it bigger. I bought "https://fr.aliexpress.com/item/10050050 ... pt=glo2fra" This is 2x8 LED display. But I can't make it work.

Fist of all : are both LED line connected ? Where do i ha to plug the wemos : the first or the second line ?

I appreciate any help. Thanks.
Attachments
IMG_20230909_133939.jpg
IMG_20230909_133939.jpg (3.46 MiB) Viewed 2062 times
IMG_20230909_133944.jpg
IMG_20230909_133944.jpg (3.46 MiB) Viewed 2062 times

wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Re: Max7219 - 19 LED

#2 Post by wanabo » 09 Sep 2023, 14:09

Is this correct ??
Attachments
Sans titre.png
Sans titre.png (21.94 KiB) Viewed 2057 times

User avatar
Ath
Normal user
Posts: 3357
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Max7219 - 19 LED

#3 Post by Ath » 09 Sep 2023, 15:04

Does the part of this new display, that you connected from ESP to DIN, working?
I have a couple of these 2x8 module displays, and once I connected the top DIN to my ESP, they all worked, as there seems to be a connection from the DOUT of that part/half to the DIN of the bottom part, but yours may be wired differently. When not powered, you can use a multi-meter to check if there is an electrical connection (short/0-ohm) from most left, top DOUT to most right, bottom DIN.

The schematic looks fine, especially as you already have another module working, but you might want to check your welding, as not all pins seem to have a cleanly soldered connection.
/Ton (PayPal.me)

wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Re: Max7219 - 19 LED

#4 Post by wanabo » 09 Sep 2023, 15:46

Thanks for your help. I can see no connection between line up and line down but it seems working as I succeed in lighting them all.

But I have lines going up to down. I do not know if I have to plug the top line or the bottom one....

In fact, the other module (1x4 led) is not working anymore. I'm going crazy :twisted:
Attachments
IMG_20230909_154345.jpg
IMG_20230909_154345.jpg (1.64 MiB) Viewed 2046 times
IMG_20230909_154347.jpg
IMG_20230909_154347.jpg (1.55 MiB) Viewed 2046 times
Capture d’écran 2023-09-09 154548.jpg
Capture d’écran 2023-09-09 154548.jpg (153.74 KiB) Viewed 2046 times

User avatar
Ath
Normal user
Posts: 3357
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Max7219 - 19 LED

#5 Post by Ath » 09 Sep 2023, 16:55

wanabo wrote: 09 Sep 2023, 15:46 Thanks for your help. I can see no connection between line up and line down but it seems working as I succeed in lighting them all.
There should be a connection, as I wrote, from DOUT on the top set of modules in your 2nd photo in the first message to the DIN connection of the bottom row. Checked one of my modules, and I measured a resistance of ca. 3 ohm, so that's close enough to 0 :?
wanabo wrote: 09 Sep 2023, 15:46 But I have lines going up to down. I do not know if I have to plug the top line or the bottom one....
When you only connect to the bottom modules, the top 8 modules won't work. These modules have to be sequentially connected. I ended up connecting ca. 50 of these modules on a single ESP8266 task, with all kinds of different content. Somebody else did a rather huge display using this plugin over here
wanabo wrote: 09 Sep 2023, 15:46 In fact, the other module (1x4 led) is not working anymore. I'm going crazy :twisted:
That may need to have the soldering joints checked as well... :shock:
/Ton (PayPal.me)

wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Re: Max7219 - 19 LED

#6 Post by wanabo » 09 Sep 2023, 19:02

Ath wrote: 09 Sep 2023, 16:55 There should be a connection, as I wrote, from DOUT on the top set of modules in your 2nd photo in the first message to the DIN connection of the bottom row. Checked one of my modules, and I measured a resistance of ca. 3 ohm, so that's close enough to 0 :?
Okay. The results are from top to bottom :
VCC, GND, CS, CLK --> OK (3 Ohm)
Din to Dout --> NOK.

I tried with the 1x4 LED Module. Exactly the same...

The same test "with power". I died the same when module plugged and I get 3 ohms on everey pin including DIN/DOUT
So it's okay for me

wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Re: Max7219 - 19 LED

#7 Post by wanabo » 09 Sep 2023, 19:23

Ath wrote: 09 Sep 2023, 16:55 When you only connect to the bottom modules, the top 8 modules won't work. These modules have to be sequentially connected. I ended up connecting ca. 50 of these modules on a single ESP8266 task, with all kinds of different content. Somebody else did a rather huge display using this plugin over here
So it seems to me that bottom and top line are well connected. But I don't know if the bottom line is the start or if it's the top line :?:

wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Re: Max7219 - 19 LED

#8 Post by wanabo » 09 Sep 2023, 20:00

Okay, I'm progressing.

I do not use the external power supply and it works. I can display some texte on the bottom line and on the top line.
For the record, I plug the bottom line wich seems to be the DIN.

It seems the powersupply is not needed.

TD-er
Core team member
Posts: 8584
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Max7219 - 19 LED

#9 Post by TD-er » 09 Sep 2023, 21:23

Those displays can require quite a lot of current.
So make sure the GND of both the ESP and the display are well connected and use thick enough wires.
(the same for the 5V, but it is more important the GND is the same on both)

Since both GNDs will be connected, you must make sure you won't cause issues here.
For example when the USB cable is still connected to the PC, you will effectively connect the GND of the power supply and the PC.
This can cause issues as you can create a 'ground loop', which you may have experienced before when connecting audio equipment and heard some 50 Hz noise.
The same kind of noise may also cause issues when sending data between devices.

In short:
Better try to power all parts from the same power source.

wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Re: Max7219 - 19 LED

#10 Post by wanabo » 10 Sep 2023, 09:46

Thanks for the advice.

As everything works without any external powersupply, do you think it's not safe ?

User avatar
Ath
Normal user
Posts: 3357
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Max7219 - 19 LED

#11 Post by Ath » 10 Sep 2023, 09:57

Well, having another look usually makes things somewhat clearer.
In the documentation I've drawn a level converter for all signals from ESP to the display, and that's missing here. Most likely when powering the display with 5V, the 3.3V signal levels from the ESP are not enough to have the display respond properly, as demonstrated (AFAICS) by powering it from the ESP.
After you have installed a level converter, I expect this dual power supply setup to work as intended.
/Ton (PayPal.me)

wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Re: Max7219 - 19 LED

#12 Post by wanabo » 10 Sep 2023, 10:59

Thanks a lot for your help !!

TD-er
Core team member
Posts: 8584
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Max7219 - 19 LED

#13 Post by TD-er » 10 Sep 2023, 11:00

wanabo wrote: 10 Sep 2023, 09:46 Thanks for the advice.

As everything works without any external powersupply, do you think it's not safe ?
Even though Ton already suggested a much more likely cause of what was truly happening, I still want to reply to your question about powering stuff.

You have to realize that whenever you connect two separately powered devices together, there might be a difference to what each considers "ground" level voltage.
And even if both are powered from the same power supply, there will be losses in the cables due to the current flowing through these cables.
When you have thin cables for power (and ground), the voltage drop may become significant when you have a larger current flowing through these cables.
This may cause a voltage difference between grounds on both ends and thus the signal level of your data may appear lower (or higher) on the other end.

I made a quick drawing to illustrate:
Ground Voltage Difference.png
Ground Voltage Difference.png (79.62 KiB) Viewed 1902 times

The resistors illustrate the internal resistance of the (thin) wires.
100 Ohm isn't close to the true resistance, but just for illustrative purposes.

Let's assume the lamps L1 ... L4 each have an internal resistance of 300 Ohm.
The part with L1 consumes 1/3rd of the energy consumed by the part with L2 ... L4.
So L1 symbolizes the ESP board, L2 ... L4 symbolizes the LED display as this one probably will consume more than the ESP when all LEDs are on.


The current through R1, L1, R2 = 5V / (100 + 300 + 100) = 10 mA.
Thus the voltage over each of these parts is:
1V over R1 and also over R2.
3V over L1. (Volt meter P3)

Now the other part...
Rv of L2...L4 = 100 Ohm, since all three have the same resistance and are in parallel.
The current through R3 and R4 = 5V / (100 + 100 + 100) = 16.7 mA
Thus the voltage drop over R3 and R4 each is 1.67V

As you can see the voltage between GND (on the power supply) and GND1 = 1V
Voltage between GND and GND2 = 1.67V
Voltage between GND1 and GND2 = -0.67V (measured by volt meter P1)
N.B. GND2 will have a higher voltage than GND1, that's why I marked the voltage as being negative.

Thus the GND of each part differs because of different currents being drawn by each part.

When the ESP sends a signal on a GPIO pin, its level will be compared to GND of the ESP (thus GND1)
Let's assume this signal is a pulse of 3V.

For the device receiving this signal, it appears to be 2.33V as it is comparing it to GND2. (Volt meter P2)
This is probably too low.

TL;DR:
Make sure to have thick(er) wires for power lines and GND and also make sure to have a properly connected GND between the parts.
Also it is better to have a direct power connection between connected parts instead of each powered via a separate set of power cables. Like 'daisy-chaining' the devices.
If you use separate power lines, you can create a "ground loop" which will cause all kinds of other issues.
Last edited by TD-er on 10 Sep 2023, 11:18, edited 1 time in total.

wanabo
Normal user
Posts: 12
Joined: 12 Aug 2023, 17:23

Re: Max7219 - 19 LED

#14 Post by wanabo » 10 Sep 2023, 15:14

What an explaination :!: :!: I think i understand mostly of what you said. It's hard cause i'm not a electricien and english is not my birth language.
But I think I get the point.

I'll try with thicker wires (but it's hard to solder on a little wemos !) and proper soldering with a unique power source.
Thanks again !!!

TD-er
Core team member
Posts: 8584
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Max7219 - 19 LED

#15 Post by TD-er » 10 Sep 2023, 16:18

2 wires in parallel also reduces resistance.
But you can also simply measure the voltage between GND pins on both the ESP and the LED matrix module and see how much it is.
This way you get an idea whether this may be an issue or not at all.

timoline
Normal user
Posts: 22
Joined: 03 Jul 2016, 10:17

Re: Max7219 - 19 LED

#16 Post by timoline » 07 Feb 2024, 11:19

Usually, for these larger displays, you'd connect your Wemos to the first line, and it should manage the cascade to the second line if the module is designed to work that way. It's key to check the datasheet or any documentation that came with your display for specifics on wiring and connections.

dcjona
New user
Posts: 7
Joined: 13 Dec 2017, 14:05

Re: Max7219 - 19 LED

#17 Post by dcjona » 11 Feb 2024, 19:23

Troubleshooting these setups can be a bit of a puzzle, but patience and careful review of your wiring and power supply usually reveal the solution.

andyrepay
New user
Posts: 2
Joined: 09 May 2019, 16:48

Re: Max7219 - 19 LED

#18 Post by andyrepay » 13 Feb 2024, 14:36

Solving issues with these configurations can feel like solving a puzzle, yet with a bit of patience and a thorough check of your connections and power source, you'll likely find the answer.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest