figshare
Browse
2012-05-02_14-51-14_427.jpg (1.95 MB)

Final Project-4x5 LED Matrix with Arduino

Download (0 kB)
figure
posted on 2012-05-12, 00:26 authored by Stephen PietromonacoStephen Pietromonaco, Anthony Salvagno, Anthony SalvagnoAnthony Salvagno

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] = {
 {B1111,
  B1010,
  B1101,
  B1010,
  B1111,},
};

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);
#define MULTIPLEX_DELAY_MS (3);

void setup(){
int pinset=0;
 Serial.begin(9600);
 for (pinset=0;pinset
 pinMode (ROW_PINS[pinset],OUTPUT);
 }
 for (pinset=0;pinset
  pinMode (COL_PINS[pinset],OUTPUT);
 }
}

void loop() {
ShowPattern(PATTERN[0]);
}

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);
SetColumn(pattern[row]);
delay(MULTIPLEX_DELAY_MS);
}
}


Results:


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.

History

Usage metrics

    Licence

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC