Matrix problem

so i have to start from scratch... great, can you help me make at least one character so at least i have a foundation ?

You do not want to alter your matrix. I guess a lot of time went into building it. Would you consider cutting your matrix in half, so 2 x 8x8? Then you could use max7219 chips and one of the popular Arduino libraries for use with the max chip such as LEDControl or Parola.

If you truly want to continue with your current design, you could remove the series resistors on the columns and instead have 8 x 750R series resistors on the rows. But this would always be dim, as only 4mA will flow through each led with a duty cycle of 1/16, or 1/24 if you extend your matrix.

A better solution would be to scan the matrix row-by-row instead of the column-by-column used now. This would be brighter because the duty cycle would be only 1/8. Also, you could use a UDN2980 chip to boost the current available from the '595 driving the rows. You would keep the series resistors on the columns but you could reduce them to 750R.

Well, the easiest solution for me is to put resistors on the rows, and we can modify the code for row scanning, i will not extend the matrix, besides i have some red leds, even at 4mA they are bright enough for the experiment, i will keep the 1k for now and do some measurements after this is working properly.

No. For row scanning, the resistors should be on the columns. For column scanning, the resistors should be on the rows. This is one of the problems with your current circuit: you are column scanning but the resistors are on the columns.

Whenever LEDs are connected in parallel, each led should have it's own series resistor. When scanning the matrix column-by-column, you are lighting a column of up to 8 LEDs at a time, so for each led to have its own series resistor, those resistors must be on the rows. When scanning the matrix by row-by-row, a row of up to 16 LEDs could be lit in parallel, so the resistors must be on the columns.

In terms of brightness, it will make no difference whether you scan by row or by column. You hit the same limitation either way: the 35mA limit of a '595 pin. If scanning by column, that 35mA can be shared between 8 LEDs, so around 4mA each. But the duty cycle is 1/16, so the average led current is 0.25mA. if scanning by row, the 35mA is shared by up to 16 LEDs, so only around 2mA per led. But the duty cycle is 1/8, so the average current is also 0.25mA.

ooh, now i understand, so i leave the matrix just like it is, with the resistors on each column, and we modify the code so we can do row scanning.
le: i was wondering why people choose different position for their resistors, now i know, thank you.

One change to the circuit I would suggest would be to chain the '595 driving the rows to the other two '595s. i.e. the Serial Out of the second '595 driving the columns is connected to the Serial In of the '595 driving the rows. All three '595s can share the same clock and latch lines. Then, you can connect all three '595s to the SPI pins on the Arduino. This should make the circuit less likely to flicker and make the best of the inevitably low brightness.

ok, that is an easy change i can make, only 2 wires to move, so after this the 3rd 595 will be the one driving my rows, consider it done, since it takes 5 minutes.

bogdan666:
i was wondering why people choose different position for their resistors, now i know

You would have known sooner if you would have read the link in reply#1

i did read it

"The other point is that current through the LED must be limited some how. The simplest way of doing this is with a series resistor. However, the resistor must be in the line that only takes the current for one LED"

this is what they say, it got me a bit confused, i did not understood this at first, English is not my first language, maybe that played a part in there as well, sorry, i am still on the learning path of all this.

bogdan666:
only 2 wires to move, so after this the 3rd 595 will be the one driving my rows

But do you understand what I meant when I said the SPI pins? They are particular pins on the Arduino. Which pins depends on which type of Arduino. But they are almost always marked "MOSI" and "SCK". You can't just use any pins. This is because the Arduino has a dedicated circuit on the chip itself which is designed to send data at high speed to chips like the '595, and that circuit is connected to only those pins.

bogdan666:
i did not understood this at first, English is not my first language

In my opinion, you English is very good. Using "understood" instead of "understand" there was the first mistake I have noticed.

mosi 11 miso 12 and sck 13 yes, however i don't know what they stand for, or if it makes any difference which i connect to which.

mosi 11 miso 12 and sck 13 yes, however i don't know what they stand for

Master out slave in
Master in slave out
Serial clock

They tell you what direction the data goes in.
So MOSI is an output pin for an Arduino acting as a master device and an input for a shift register acting as a slave device.

They tell you what way round things should be wired.

ok,that makes sense, except for the latch pin of the 595, does that has a special output as well ?

When using the SPI feature on Arduino, its important to make sure that the "SS" pin is an output not an input. This tells the Arduino that it is the SPI master not a slave. So you might as well use that pin for the '595 latch pins.

bogdan666:
ok,that makes sense, except for the latch pin of the 595, does that has a special output as well ?

The latch pin has nothing to do with the SPI protocol, you add it as an extra pulse after you have shifted data into the shift register.

ok, i understand.

ok, final rewiring
-data digital pin 11
-clock digital pin 13
-latch digital pin 10

Next I would suggest writing a new, very simple sketch to light all LEDs using the SPI library.

well, since i never used a library before, i will do some research about it.