LED controller for Tetris screen

I'm new to Arduino with some electronics and decent code.
I want to make a game of Tetris using a screen made of 8x24 LEDs.

my plan was(is?) to use 4 shift registers.
3 Row shift registers (1st controls rows 0-7, 2nd controls rows 8-15 & 3rd controls rows 16-23)

  • output HIGH for all 24 lines except 1 at a time
  • cycling through all 24 "Rows" of the screen setting that one row to ground (LOW).
    1 Column shift register powers the LEDs that need to be lit for any given row
  • (with 1 330ohm resister for each output).

essentially the anodes of all the LEDs in each column are tied together to one of the 8 Column SR outputs
and all the Cathodes of the LEDs in each row are tied together to one "output" of the 3 Row SRs

I tested connecting one LED between two shift registers and controlling it with the HIGH LOW combinations and that worked fine.

when I did a proof of concept test with one column of 16 LEDs using 1 Column SR & 2 Row SRs my project was having power issues. The Arduino has limited current but no current is flowing except through a maximum of 8 output lines of the one Column Shift Register.

the power supply I'm using is a 5V adaptor rated at 2.6A with a max 13W output

I'm confident my code is fine but my electronics is weak.
why is my project having power problems?

This is what is sometimes called a "Shakespeare diagram". The problem with verbal descriptions is that it's easy to omit details that you take for granted, and it requires the reader to construct a diagram in their head. It's not that we can't read this - it's that misunderstandings can waste a lot of time. Please post an actual schematic or wiring diagram. If there is no design problem, sometimes there is a problem in construction. So please also provide clear images of your test setup.

thank you for your reply,
I've since taken it apart but will take the time to put it back together again and do the same in TinkerCad to show you my set-up

Happy Quaranduinoing!

Christ

TinkerCad URL

how to I post a schematic or PNG?
do you want my code?

Happy Quaranduinoing!

Christ

Please read these two posts at the top of the Programming Questions forum:

How to use this forum - please read.
and
Read this before posting a programming question ...

There, you will find answers to your questions about posting.

thank you for your post,
I noticed I'm using far more RAM memory than necessary and will optimize it to reduce the size of

const int NumScreenDebug = 24;
byte bytScreenDebug[NumScreenDebug][NumRows];

as that is unnecessarily large.

the posts you linked to were helpful and I have tried several different ideas to fix the problem so I'm not sure what else you expected me to pick up from them. (thanks for the Ctrl-T formatting, that'll come in handy I'm quite particular and hate that the IDE doesn't do that as I type)

can you access the TinkerCad project I linked in my last post? because that is the entire project
otherwise, I still don't know how to post schematics on this website.
I was up at 3h30 this morning and worked on this implementation for five hours before disconnecting two of the three row-Shift-registers and deciding that the problem was a want-of-Voltage (or current) issue when the only row-SR was producing the results I wanted. but that doesn't follow my logic that no current flows between the HIGH 'output' lines of the one Column-SR and the three Row-SRs. So I don't know what the problem is.

Happy Quaranduino
Christ Kennedy

I've made a few new TinkerCad designs (all of them - so far - only use 2 74HC595s)

all these work pretty good ... the problem with real-life implementation was with 3 74HC595s (1col+2rows)

Christ Kennedy

I followed your TinkerCad link. There shouldn't be a power problem with that, but there is a problem with the way the LEDs are connected. You have 24 LEDs sharing one current limiting resistor. That means the current will always be shared equally between the 24 LEDs. If one LED is enabled via the shift register IC's, it will be on full brightness. If 24 LEDs are on, each one will have 1/24 the brightness. Is that your "power problem"? What you need is a separate resistor on each LED anode.

OK, please forget using 74HC595s.

Tinkercad diagrams - Euccch!

To drive LED matrices, you use MAX7219s. 8 by 24 is three of them.

Just buy one of these.

Your whole project assembled for you and ready to program.

OK, so it is actually 8 by 32 rather than 8 by 24. Would you complain?

ok, ok,
thank you for your post, I know about these displays. I just like to get my hands dirty.

Christ

Christ_Kennedy:
I know about these displays. I just like to get my hands dirty.

OK, OK, as long as you deliberately want to make it hard for yourself with the multiplexing and a poor display with uneven brightness, that's just fine. :grinning: