Final Project-4x5 LED Matrix with Arduino

<p>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.  </p> <p>The physical set-up of my project is as seen above in the image.  The materials are:</p> <p>-- One Arduino Uno</p> <p>--  Four 400 Ohm Resistors</p> <p>--  Four Proto-Boards (or one large bread-board would do as well)</p> <p>--  20 LEDs</p> <p>-- and finally, a handful of wiring </p> <p> </p> <p>This is the code I used:</p> <p><strong>byte PATTERN[][5] = { <br>  {B1111,<br>   B1010,<br>   B1101,<br>   B1010,<br>   B1111,},<br>};<br><br>int ROW_PINS[] = {13, 12, 11, 10, 9};<br>int COL_PINS[] = {5, 4, 3, 2};<br><br>#define ROW_COUNT (5)<br>#define COL_COUNT (4)<br>#define PATTERN_DELAY_MS (3000);<br>#define MULTIPLEX_DELAY_MS (3);<br><br>void setup(){<br>int pinset=0;<br>  Serial.begin(9600);<br>  for (pinset=0;pinset<br>  pinMode (ROW_PINS[pinset],OUTPUT);<br>  }<br>  for (pinset=0;pinset<br>   pinMode (COL_PINS[pinset],OUTPUT);<br>  }<br>}<br><br>void loop() {<br>ShowPattern(PATTERN[0]);<br>}<br><br>void SetColumn(byte pattern) {<br>  for (int i = COL_COUNT-1; i >= 0; i--, pattern >>= 1) {<br>digitalWrite(COL_PINS[i], pattern & 1 ? LOW : HIGH);<br>  }<br>}<br><br>void ShowPattern(byte pattern[]) {<br>  int last_row = ROW_COUNT-1;<br>  for (int row = 0; row < ROW_COUNT; last_row = row++) {<br>digitalWrite(ROW_PINS[row], HIGH);<br>digitalWrite(ROW_PINS[last_row], LOW);<br>SetColumn(pattern[row]);<br>delay(MULTIPLEX_DELAY_MS);<br>}<br>}</strong></p> <p><strong><br></strong></p> <p><strong>Results:</strong></p> <p><strong><br></strong>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.  </p> <p>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.  </p> <p><strong><br></strong>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. </p>
Comments are currently unavailable