Resistors when connecting 8x8 LED matrix

I am connecting 8x8LED matrix to Arduino.
It is common cathode matrix.

I connected it in this way that I have 330OHM resistors connected to Raws(Cathodes) and no resistors at columns (Anodes).

It works but is this a right way? Is 330Ohm ok as the resistor value?

Hi,
Can you post a basic schematic?
What is your Vraw voltage?

What model Arduino are you using?

Thanks.. Tom..

Well to draw the diagram would tak me a lot of time.
Let me post you a code which sums the connectivity up

Raws are matrix cathodes and columns are matrix anodes
So I have resistor between Arduino pin and Matrix pin for
Matrix Arduino
R1 2
R2 3
R3 4
R4 5
R5 6
R6 7
R7 8
R8 9

I use Arduino Nano

// Raws 
#define R1 2
#define R2 3
#define R3 4
#define R4 5
#define R5 6
#define R6 7
#define R7 8
#define R8 9
//Columns
#define C1 10
#define C2 11
#define C3 12
#define C4 13
#define C5 A0
#define C6 A1
#define C7 A2
#define C8 A3
void setup() {
   pinMode(R1, OUTPUT);
   pinMode(R2, OUTPUT);
   pinMode(R3, OUTPUT);
   pinMode(R4, OUTPUT);
   pinMode(R5, OUTPUT);
   pinMode(R6, OUTPUT);
   pinMode(R7, OUTPUT);
   pinMode(R8, OUTPUT);
   pinMode(C1, OUTPUT);
   pinMode(C2, OUTPUT);
   pinMode(C3, OUTPUT);
   pinMode(C4, OUTPUT);
   pinMode(C5, OUTPUT);
   pinMode(C6, OUTPUT);
   pinMode(C7, OUTPUT);
   pinMode(C8, OUTPUT);
  digitalWrite(R1,HIGH);
  digitalWrite(R2,HIGH);
  digitalWrite(R3,HIGH);
  digitalWrite(R4,HIGH);
  digitalWrite(R5,HIGH);
  digitalWrite(R6,HIGH);
  digitalWrite(R7,HIGH);
  digitalWrite(R8,HIGH);
  digitalWrite(C1,LOW);
  digitalWrite(C2,LOW);
  digitalWrite(C3,LOW);
  digitalWrite(C4,LOW);
  digitalWrite(C5,LOW);
  digitalWrite(C6,LOW);
  digitalWrite(C7,LOW);
  digitalWrite(C8,LOW);
}

Dziubym:
I am connecting 8x8LED matrix to Arduino.
It is common cathode matrix.

Ah! New project now! How are you going with the Nixies? You haven't commented in a while. :astonished:

"Common cathode" does not apply to a matrix because it has both common cathodes and common anodes.

Dziubym:
I connected it in this way that I have 330OHM resistors connected to Raws(Cathodes) and no resistors at columns (Anodes).
It works but is this a right way? Is 330Ohm OK as the resistor value?

Well, probably not!

The general idea of driving a matrix by multiplexing is that you switch on a row or column, and then activate a number - which may actually be none, some or all - of the LEDs in that row or column, them switch it off and switch on the next, repeating this continuously.

Well, if you pull down your cathode column with the 330 Ohm resistor, the resistor will limit the current and that current will be shared by however many row LEDs you drive HIGH, so it will be much brighter if one row LED is lit than if all eight are. So that really is not going to work.

If alternatively, you pull one row of anodes HIGH at a time and pull a number - which may be between one and eight - column LEDs LOW with their 330 Ohm resistors, then the current of each is limited by the 330 Ohm resistors. Or you thought it would be except that it isn't. :astonished:

The problem here is that you presume to pull each row HIGH using an Arduino pin, but Arduino pins can only handle one or two LEDs with their 330 Ohm resistors. Any more and you are overloading the Arduino pin. So if you do this, you must use 1k resistors, not 330 Ohms.

And actually, this will work, and the LEDs will in general be bright enough, but there is a fair bit of careful work involved in writing code to do this properly.

Let me explain that the right way to drive your 8 by 8 LED matrix is to use a proper matrix driver such as a MAX7219. And the most practical way to do this is to buy two or three of these kits:

Or these ones

which used to be more expensive but are now actually cheaper and more useful if you wish to stack matrix arrays. Well, they used to be cheap until the plague and ridiculously high postage costs from greater Wuhan area.

OK, checked Aliexpress which presently seems to be much better than eBay and located these.

The point is that you do not install the matrix arrays from the kits themselves or their socket pins if you are using your own-built matrix, but just solder to the positions on the PCB and you have a durable and reliable assembly to drive your own matrix arrays or seven-segment displays in custom mounting.

Why did I say two or three? Well, you can fully assemble the first one as the matrix with which it comes and practice programming it. Then the second one for your current project and the third one - for the next! :grinning:

Considering the cost, it makes no sense to just buy one!


If you cannot see the pictures there, just click on them or right click and "view image". eBay is apparently being bloody-minded about links.

Hi,
Sorry, "Raws" == "Rows"

Tom... :slight_smile:

Yeah, I knew that. :sunglasses: