[REVIEW] LED Matrix 4x64 Module with MAX7219

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
User avatar
jph
Posts: 2853
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: [REVIEW] LED Matrix 4x64 Module with MAX7219

#11 Post by jph »

Here is the diagram for the digit addressing using the nexopixel lib. It is simply 1 to 320 addressing so my MP lib will work directly.
Also no worries for the neopixel standard lib in arduino.
Glad you brought this up Gilles as it peaked my interest in these. I have been using single strips (144 per mtr) for indicator / annunciator led's for ages but these units for scrolling are super and cheap and great fun

They simply follow a logical path of addressing as seen here - (note the simple pathway)
WS2812B Matrix.jpg
Again, if you want a messageport lib to play with I did one a while back for the neopixel and I can certainly let you have for use on anything you like with the only stipulation that it must not be published to any 'discord' server due to some of their totally unacceptable 'rules' regarding claiming code 'ownership and rights'
On AM forums ? no issue at all.
Joe
Joe. CISSP, MSc.

SimPassion
Posts: 5338
Joined: Thu Jul 27, 2017 12:22 am

Re: [REVIEW] LED Matrix 4x64 Module with MAX7219

#12 Post by SimPassion »

Hi Joe, after reading your posts, I have a few questions more and a lot to say, just waiting for headache to disappear already from day one of this year, in order to get clear ideas in mind ... :lol:

SimPassion
Posts: 5338
Joined: Thu Jul 27, 2017 12:22 am

Re: [REVIEW] LED Matrix 4x64 Module with MAX7219

#13 Post by SimPassion »

jph wrote: Sat Dec 31, 2022 8:35 am Hi Gilles and good morning. :)
Let me try to answer these in order.

1. There is no need to add a cap to the first input unless you use excessively long DC power supply leads as the output stage of a switching supply (buck or boost) would have adequate smoothing capacitance (meaning most non branded units). By all means, add a cap in this position if you would like to though.
I tested with a Meanwell 5V 20A supply with around 0.75M of cable to connect to the unit. Absolutely no issue. However, the Meanwell not only has the appropriate output stage capacitance but also the appropriate inductance. As we say in the UK 'Suck it and see' :lol:

Image

Also, the power line run to the 'second' added cap is only about 35 to 40mm in total so the cap on the 'second' stage is actually working well on the 'first stage' (hope that makes sense ?)

I actually tested it with 3 complete 4 block units chained at 10MHz SPU using a Pico and I found I actually only needed a cap on each second 7219. To b fair, the caps are so cheap tht you may as just well add one to each stage :D

THE biggest limiting issue will almost certainly be the noise (crap) coming from your DC PSU). Again,, that is why I would always use a Meanwell unit and no other.

Indeed my Power Supply is sometime in a distance from and depending on each specific mockup
I'm using a Velleman PS2122A Power Supply, which already bring good output filtering and stability on 3/4.5/6/7.5/9/12V DC output and if not enough I'm using a Velleman LM2577 DC-DC Voltage Step-Up Boost module (vma402), which provide great strength and stability, with input from 3.5 to 35V and output from 5 to 55V. Velleman has lastly replaced it by WPM402, where they lowered output up to 40V, as some may have encountered issues in the upper limit


LM2577_DC-DC_Voltage_Step-Up_Boost_Module_vma402_front.jpg

---------------------------
2.
The SX1509 is remarkable. 16 I/O units, all outputs are individually and independently PWM addressable. CHEAP. All I2C.

A genuine 15mA sink on all outputs - AT THE SAME TIME. all again, pwm selectable individually as LED drivers etc.
What appears to be limited numbers of I2C address allocations is easily solvable via the TCA9845A I2C expander. Less than a euro and 8 channel. SO each 16 channel SX unit can be access via an 8 channel dirt cheap TCA unit giving 16 x 8 = 128 individually controlled PWM output units to 15mA, with INPUT select ability.
As the address of the TCA is also selectable you can keep on expanding the units to 256, 512 etc etc.
This aspect is in reference to the original point you made about using the 7219 units in matrix mode to drive individual LEDs. This is the way I have chosen after looking at both. I2C isn't an issue when you use a port expander.

I will have a look further into this solution later. I was just wondering about the latency along a chain using I2C, though you've partly answered to this already

-------------------------
3.
That is a great example video. :D

But take a look at something like -
https://www.aliexpress.com/wholesale?ca ... .1000002.0

Lot's to play with. ;)

It's the site to pick some great solution

Cheers,
Joe


jph wrote: Sat Dec 31, 2022 8:54 am After just looking at the latest (your fault haha :lol: ) I just ordered a couple of these 8 x 32 units of the WS2812B units in a semi flexible matrix -

seems good value at around 14 euros per sheet of 8 x 32 unit. So only 28 euros for a true 8 x 64 unit. Nice. 8-)

https://www.aliexpress.com/item/1005002 ... 18024r6otM

You can use the neopixel lib as they are simply wired as sequential order - my MP lib support this ok.

Very attractive. Just wondering the technical background : is only the library is needed, to be able to address each individual LEds with RGB value, together with the LED #ID location for addressing, or does it rely on semi-intelligent LEDs with already µLogic in it ? I could have investigated before, but not already searched the background specs of these modules

You should be able to make a complete scrolling 16 million colour display with these.
Again, I do have a simple Messageport lib for this for AM if you would like it. You can always expand on it.
Joe.
[EDIT] Additionally, great direct plugable power supply for power rail on breadboard. I guess it exists on Aliexpress as well as the already mentioned Step-Up modules :

https://www.velleman.eu/products/view/?id=459190


Image
 
Last edited by SimPassion on Mon Jan 09, 2023 4:52 pm, edited 1 time in total.

SimPassion
Posts: 5338
Joined: Thu Jul 27, 2017 12:22 am

Re: [REVIEW] LED Matrix 4x64 Module with MAX7219

#14 Post by SimPassion »

jph wrote: Sat Dec 31, 2022 9:11 am Here is the diagram for the digit addressing using the nexopixel lib. It is simply 1 to 320 addressing so my MP lib will work directly.
Also no worries for the neopixel standard lib in arduino.
Glad you brought this up Gilles as it peaked my interest in these. I have been using single strips (144 per mtr) for indicator / annunciator led's for ages but these units for scrolling are super and cheap and great fun

They simply follow a logical path of addressing as seen here - (note the simple pathway)
WS2812B Matrix.jpg

Again, if you want a messageport lib to play with I did one a while back for the neopixel and I can certainly let you have for use on anything you like with the only stipulation that it must not be published to any 'discord' server due to some of their totally unacceptable 'rules' regarding claiming code 'ownership and rights'
On AM forums ? no issue at all.
Joe
I agree to check what can be done on existing MAX7219 units, the one for LED Matrix as well as standard ones, using your own Library Joe

User avatar
jph
Posts: 2853
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: [REVIEW] LED Matrix 4x64 Module with MAX7219

#15 Post by jph »

Hi Gilles,
Let me try to explain the 2812 LED units.

'in the beginning' (not bliblical :lol: ) there were LED tri and wand colour units - RGB and RGB (W)
These had R G and B and also the others had a white LED as well as RGB (RGBW) ... although RBG at the same brightness is more or less white,,,,

However, to control these combined LED units needed a controller IC - usually A 5050 OR SIMILAR. This did all the decoding and driving of the multiple leds contained in the same units.

The we came to a state where the 5050 unit was built into the LED units - hence reaching a unit such as the WS2812B etc.
A combined multi LED unit WITH an intelligent controller IC built in.
This is effectively what we have today.

It is easy to send data to the n'th LED unit in a serial chain by applying an 'address' and the led 'parameters' .

It can be as easy as serial data (as in SIPO).

It happens extremely fast ! - if you want to address the 300th LED in the chain then you send the data directly - extremely quickly.
You need, for good results, a super quality and incredibly FAST micro. pico for example - running at 240Mhz ! - this is child's play. A standard arduino has no real chance. The timing is absolutely critical.
It is a similar (but subtly different) way to addressing multiple 7219 units where - if we want to address the second 7219 in the series chain we send 8 x NOP (no operation) commands to the first and then the info is read by the second, the same for the third, we send 16 NOP and read the 17th onward.

That is simplified but more or less covers how,, at least, the 7219 in series - works.
The ws2812 is very similar,
You just need a VERY VERY quick micro - like the pico at 240mhz (PER CORE !) and it is easy.

Have a look first at the adafruit neopixel library.
https://github.com/adafruit/Adafruit_NeoPixel

This is the gold standard. I use it for all my code and AM libs.
What you see with the eye - in colour representation -i s not what you actually get - then you also need to take into account gamma correction.
This way, you can use direct numerical conversion from standard RGB colour charts.
I also use a modified version of their gamma correction code as in -

Code: Select all

//  Gamma correction table - see https://learn.adafruit.com/led-tricks-gamma-correction/the-quick-fix
//  this table converts the led gamma to approximate the actual human eye's perception of colour
//  hence you can use 'colour numbers' R,G,B from any source as a colour guide 
/*
    Accessing the table - as is
    result = pgm_read_byte(&gamma8[input]);
    or as a rountine in -
  pixel.setPixelColor(pixelNumber,
  pgm_read_byte(&gamma8[red]),
  pgm_read_byte(&gamma8[green]),
  pgm_read_byte(&gamma8[blue]));


*/
const uint8_t PROGMEM gamma8[] = {
  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,
  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,
  2,  3,  3,  3,  3,  3,  3,  3,  4,  4,  4,  4,  4,  5,  5,  5,
  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  9,  9,  9, 10,
  10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16,
  17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25,
  25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36,
  37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50,
  51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68,
  69, 70, 72, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89,
  90, 92, 93, 95, 96, 98, 99, 101, 102, 104, 105, 107, 109, 110, 112, 114,
  115, 117, 119, 120, 122, 124, 126, 127, 129, 131, 133, 135, 137, 138, 140, 142,
  144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 167, 169, 171, 173, 175,
  177, 180, 182, 184, 186, 189, 191, 193, 196, 198, 200, 203, 205, 208, 210, 213,
  215, 218, 220, 223, 225, 228, 231, 233, 236, 239, 241, 244, 247, 249, 252, 255
};
because what you program is not what you see unless you correct for gamma.

These things are amazing.
Joe
Joe. CISSP, MSc.

Post Reply