Go Down

Topic: 3x3 Cube light wont light :/ (Read 1 time) previous topic - next topic

TheColdest

I'm doing this for a robot project as the finish line for a drag race. The cube will light as a celebration for the winner of the race. I don't understand why my other lights won't turn on on the cube! I did wire all the levels of my 3x3 LED cube, and they seem to not light up. I guess schematics or advice is what I'm asking for...

Im using:
-orange LEDs (x27)
-Adruino Uno (x1)
- 270 ohm resisters (x3)
- 1k ohm resistors (x9)
-ULN2003A transistors (x2)
-solderless breadboard
-transistors (x9)

Hippynerd

1k ohm resistor seems a bit much, the 270 ohm on your planes with no resistors on your columns sounds closer to what you probably want. I dont really see the need for the ULN 2003a Darlington arrays in your setup there, You should be able to run 27 LEDs without all those parts, heck I have a 64 LED cube that ran on an uno and 4 resistors (it works better with 16 resistors on the columns.)

Just a guess, you could probably put 150 ohm resistors on the columns( 9 ), and do away with the rest of the parts, and have a fine working cube.

The exact resistor value depends on how much current you need to fully illuminate but not damage the LED. Typically with 5mm LEDs they are often 20ma, and the forward voltage is about 2volts, You are sending it 5v, which could damage the LED, so you should resist it down to about 2v (or whatever the datasheet for that specific LED says).

You may want to do a little testing with different resistors, or a small pot to find the brightness level/voltage/resistance you like, and keep it within safe levels.

Once you get your cube working, adding complications like transistors, darington arrays and such will be a lot easier (although, with a small cube like that, using all those parts are not really necessary, but is NOT a bad way to learn how to use them, on a smaller scale.)

TheColdest

OK, I did get all the columns to light now and the programs I have written are actually working...

I have run into another problem though... Controlling the levels 1-3

The cannot control the levels to specifically light one light at a single time, usually when I light a column I get the entire row or a light directly above it. I have the levels in pins 11,12, and 13 the last digit of each corresponding to the level. 1 being the bottom, 2 the middle, and 3 being the top. The columns are separated by 0-8 for all 9 pins and 9 columns.

Am I not grounding something or does the problem lie in my coding? It is extremely simple and basic since I am new to this but I really would love to learn if there are simpler routes I should be taking or looking into!
Code: [Select]
void setup(){
    pinMode(0, OUTPUT );
        pinMode(1, OUTPUT);
        pinMode(2, OUTPUT);
        pinMode(3, OUTPUT);
        pinMode(4, OUTPUT);
        pinMode(5, OUTPUT);
        pinMode(6, OUTPUT);
        pinMode(7, OUTPUT);
        pinMode(8, OUTPUT);
        pinMode(11, OUTPUT);
        pinMode(12, OUTPUT);
        pinMode(13, OUTPUT);


}

void loop(){
     digitalWrite(0, HIGH);
   digitalWrite(13, HIGH);
       delay(10);
   digitalWrite(0, LOW);
   digitalWrite(13, LOW);
       delay(10);
   digitalWrite(1, HIGH);
   digitalWrite(13, HIGH);
       delay(50);
   digitalWrite(1, LOW);
   digitalWrite(13, LOW);
       delay(50);
   digitalWrite(1, HIGH);
   digitalWrite(12, HIGH);
       delay(50);
   digitalWrite(1, LOW);
   digitalWrite(12, LOW);
       delay(50);
   digitalWrite(2, HIGH);
   digitalWrite(13, HIGH);
       delay(50);
   digitalWrite(2, LOW);
   digitalWrite(13, LOW);
       delay(50);
   digitalWrite(3, HIGH);
   digitalWrite(13, HIGH);
       delay(50);
   digitalWrite(3, LOW);
   digitalWrite(13, LOW);
       delay(50);
   digitalWrite(4, HIGH);
   digitalWrite(13, HIGH);
       delay(50);
   digitalWrite(4, LOW);
   digitalWrite(13, LOW);
       delay(50);
   digitalWrite(5, HIGH);
   digitalWrite(13, HIGH);
       delay(50);
   digitalWrite(5, LOW);
   digitalWrite(13, LOW);
       delay(50);
   digitalWrite(6, HIGH);
   digitalWrite(13, HIGH);
       delay(10);
   digitalWrite(6, LOW);
   digitalWrite(13, LOW);
       delay(10);
   digitalWrite(7, HIGH);
   digitalWrite(13, HIGH);
       delay(50);
   digitalWrite(7, LOW);
   digitalWrite(13, LOW);
       delay(50);
   digitalWrite(8, HIGH);
   digitalWrite(13, HIGH);
       delay(10);
   digitalWrite(8, LOW);
   digitalWrite(13, LOW);
       delay(10);
  digitalWrite(8, LOW);
  digitalWrite(13, LOW);
       delay(10);
  digitalWrite(8, HIGH);
  digitalWrite(11, HIGH);
      delay(10);
  digitalWrite(8, LOW);
  digitalWrite(11, LOW);
      delay(10);
 
 
 
 
 
  digitalWrite(0, HIGH);
  digitalWrite(11, HIGH);
      delay(10);
  digitalWrite(0, LOW);
  digitalWrite(11, LOW);
      delay(10);
  digitalWrite(0, HIGH);
  digitalWrite(12, HIGH);
      delay(50);
  digitalWrite(0, LOW);
  digitalWrite(12, LOW);
      delay(10);
  digitalWrite(0, HIGH);
  digitalWrite(13, HIGH);
      delay(100);
  digitalWrite(0, LOW);
  digitalWrite(13, LOW);
      delay(10);
  digitalWrite(8, HIGH);
  digitalWrite(11, HIGH);
      delay(10);
  digitalWrite(8, LOW);
  digitalWrite(11, LOW);
      delay(10);
  digitalWrite(8, HIGH);
  digitalWrite(12, HIGH);
      delay(50);
  digitalWrite(8, LOW);
  digitalWrite(12, LOW);
      delay(10);
  digitalWrite(8, HIGH);
  digitalWrite(13, HIGH);
      delay(100);
  digitalWrite(8, LOW);
  digitalWrite(13, LOW);
      delay(10);
  digitalWrite(6, HIGH);
  digitalWrite(11, HIGH);
      delay(10);
  digitalWrite(6, LOW);
  digitalWrite(11, LOW);
      delay(10);
  digitalWrite(6, HIGH);
  digitalWrite(12, HIGH);
      delay(50);
  digitalWrite(6, LOW);
  digitalWrite(12, LOW);
      delay(10);
   digitalWrite(6, HIGH);
  digitalWrite(13, HIGH);
      delay(100);
  digitalWrite(6, LOW);
  digitalWrite(13, LOW);
      delay(10);
  digitalWrite(2, HIGH);
  digitalWrite(11, HIGH);
      delay(10);
  digitalWrite(2, LOW);
  digitalWrite(11, LOW);
      delay(10);
  digitalWrite(2, HIGH);
  digitalWrite(12, HIGH);
      delay(50);
  digitalWrite(2, LOW);
  digitalWrite(12, LOW);
      delay(10);
  digitalWrite(2, HIGH);
  digitalWrite(13, HIGH);
      delay(100);
  digitalWrite(2, LOW);
  digitalWrite(13, LOW);
      delay(10);
     
     
  digitalWrite(0, HIGH);
  digitalWrite(11, HIGH);
  delay(500);
  digitalWrite(0, LOW);
  digitalWrite(11, LOW);
  delay(100);
  digitalWrite(1, HIGH);
  digitalWrite(11, HIGH);
  delay(500);
  digitalWrite(1, LOW);
  digitalWrite(11, LOW);
  delay(100);
 
 
 
}



There are some pictures in the attachments, sorry the wiring is semi messy, I cant really have them looking neat till I solve this solution out :/

CrossRoads

The pins in row W/X are likely connected together due to being plugged into what is normally a 'power'  strip.
Try moving them to Row A, section 14, 24, 34
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

CrossRoads

Are you wired up like this?
Be sure to only drive 1 anode high and 1 cathode low at a time.

If you have the ULN2003 to drive the cathodes, then you can drive all the anodes while still just driving 1 cathode.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up