Go Down

Topic: New here - Planning a 5x5x5 (Read 2 times) previous topic - next topic


There you go - fixing the code to leave the LEDs on as long as possible before turning off & turning the next one on.
Simple concept, yet many do not grasp the consequences or how to implement it.
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.


Fixed that glitch now.  It was to do with setting LOW to the previous row at the restart of the for-loop.   I just made a new loop to clear them all each row-cycle immediately prior the update.

The pattern is working nicely on the 5x5 square.  Now I'm thinking of connecting the IR 2D120X to adjust some parameters - just to learn how that works.

The eventual cube will be bright enough to see because presently the brightness is sufficient with PWM(50/255).  Not 'bright' but plenty to see the pattern moving around. 


Hi Forum,
Just an update ..

Got some thin MDF (wood) to mount the project.  Got that all drilled ready to put the 25 leads through and have the controller and arduino on the back.  I'll have little rubber feet to create some space under it.  The controller-board and wiring and electronics will still visible when it is turned over.  I got some ribbon cable and mini connector plugs.

I got a bread-board with holes and coppered rows on the back and made up a transistor controller-board grid.  I had all the transistors soldered in with some resistors ready to connect up.

Then I realised I needed to break some of the copper rows to get the correct circuit.

So after doing about 100 perfect NASA-quality solders, I had to drill the copper - so I used my power drill as carefully as I could.  But unfortunately, the components on the other side didn't think it was careful enough because several transistor-legs got a bit mangled.

Note to self: drill first, solder second.

Anyway, I got a new board and some more 2N2222A's and will have another go.  But first I will plan the thing fully and get the board fully ready before soldering.  I will be using ribbon cables and some mini-plugs to connect the cube because I will be making a better cube with bright blue LEDs later.  My yellow-LED cube looks pretty cool all soldered up, ready for mounting... after realigning the LEDs a little.

I will need to connect 30 outputs from the controller-board to the 25 grid-points and the 5 planes on the LED-cube.  Then connect the 15 outputs from the arduino to the controller board (5 planes, 5 x-points, 5 y-points).  Hmm 45 connections.. this is going to be interesting.

I only had a little bit of time this weekend, apparently Mothers Day takes priority.

More later.


All building is done now.

I have made up a controller board to manage the multiplexing.  The circuit is as per CrossRoad's design of 25 transistors with 5 more running the power to ground.  This has connector-plugs to the LED cube and to the Arduino using ribbon cable.

But now I need help with addressing the output pins A1 to A5.

What I have so far:  (Nothing lights up)
Code: [Select]

int xPin[] = {
  3,5,6,10,11  };

int zPin[] = {
  2,4,7,8,12  };   

int x;
int z;

void setup()
pinMode(A1, OUTPUT);
pinMode(A2, OUTPUT);
pinMode(A3, OUTPUT);
pinMode(A4, OUTPUT);
pinMode(A5, OUTPUT);

void loop()
digitalWrite(A1, HIGH);

analogWrite(xPin[1], 255);

digitalWrite(zPin[1], HIGH);  // Turn LED ON


digitalWrite(A1, LOW);

analogWrite(xPin[1], 0);

digitalWrite(zPin[1], LOW);  // Turn LED OFF




I have got some lights working now, but not as expected. 

I'll go over the wiring with a multimeter tomorrow and do some troubleshooting.

But I'm still not sure if I'm addressing the A1 to A5 pin outputs correctly.

Go Up