Final Project-4x5 LED Matrix with Arduino

Share this:
Cite this:
Pietromonaco, Stephen; Salvagno, Anthony; Salvagno, Anthony (2012): Final Project-4x5 LED Matrix with Arduino. figshare.
Retrieved 18:50, Jul 29, 2014 (GMT)


I did this project as a final for Electronics Lab 308L at the University of New Mexico.  All semester long, I got a ton of help from Steve Koch and Anthony Salvagno.  

The physical set-up of my project is as seen above in the image.  The materials are:

-- One Arduino Uno

--  Four 400 Ohm Resistors

--  Four Proto-Boards (or one large bread-board would do as well)

--  20 LEDs

-- and finally, a handful of wiring 


This is the code I used:

byte PATTERN[][5] = {

int ROW_PINS[] = {13, 12, 11, 10, 9};
int COL_PINS[] = {5, 4, 3, 2};

#define ROW_COUNT (5)
#define COL_COUNT (4)
#define PATTERN_DELAY_MS (3000);

void setup(){
int pinset=0;
 for (pinset=0;pinset
 pinMode (ROW_PINS[pinset],OUTPUT);
 for (pinset=0;pinset
  pinMode (COL_PINS[pinset],OUTPUT);

void loop() {

void SetColumn(byte pattern) {
 for (int i = COL_COUNT-1; i >= 0; i--, pattern >>= 1) {
digitalWrite(COL_PINS[i], pattern & 1 ? LOW : HIGH);

void ShowPattern(byte pattern[]) {
 int last_row = ROW_COUNT-1;
 for (int row = 0; row < ROW_COUNT; last_row = row++) {
digitalWrite(ROW_PINS[row], HIGH);
digitalWrite(ROW_PINS[last_row], LOW);


I had one main issue after I thought everything was up and running.  The LEDs weren't lighting up very brightly.  So I switched to much, much weaker resistors.  I was originally using 1.2 KOhm resistors and switched to 400 Ohm resistors.  This fixed the problem.  However, the data I have to report is a problem with the current being sucked down very quickly, causing the LEDs at the end of the chain to be very dim.  They are still lit up, just very dim.  

The current after the first line of LEDs was 21.05 A and the current just before the last line of LEDs got sucked down to 8 A.  

I'm not too sure how to fix this, all I can think of is maybe having more Arduinos powering the set up. Also, I attached a link to my YouTube video of the working final project. Sorry for the poor quality, it was taken off of an old cell phone. That is all I had at my disposal.


Comments (0)

You must be logged in to post comments.

Cite "Filename"

Place your mouse over the citation text to select it

Embed "Final Project-4x5 LED Matrix with Arduino"

Place your mouse over the embed code to select and copy it

Claim article

You claim request was sent. I will be handled in the next 24 hours.

Close window


We appreciate all your comments, questions, suggestions or gratitude.


The username or password entered are wrong.

Reset password

Your password will be sent to your registered e-mail address.

Create account

I agree to the Terms & Conditions *