Before commencing the main construction, it's well worth testing each LED. The last thing you want to do is build your cube and then find a duff LED buried deep in the middle of the structure. As you can imagine, it would be very difficult to access and swap out such a LED. Additional re-testing of the LEDs at key points during the cube construction is also advised, just in case of poor solder joints or LED failure due to abuse of the lead bending or excess heat from soldering or...
To make the testing easier, it's a good idea to have some kind of test rig. I created a test rig using an Arduino shied. I set this up in such a way that that a reference LED can be compared to each LED being tested to check for color and brightness variations and/or defects in the diffuser.
The red LED has a different forward bias voltage to the blue and green. I wanted to compare each individual LED color and also white (with all the LEDs being full-on) at equal intensities with the white being neutral rather than having a hint of say red. For my testing purposes, I settled on a forward current of around 10mA per LED, which seemed to make them bright enough, so I calculated the current limiting resistors accordingly based on the typical forward voltage values quoted.
Red = (5V - 2.4V) / 10mA = 260Ω
Green and Blue = (5V - 3.4V) / 10mA = 160Ω
The actual current consumption measured for the green and blue LEDs was around 12.5mA each, with 11mA for the red LED. I eventually settled on values of 270Ω for the green and blue LEDs and 200Ω for the red LED based on what I had available and what I thought gave a neutral white. With these resistor values, the actually current was measured as being between 10mA and 11mA per LED.
Rather than drive the LEDs directly from the Arduino outputs, I used three BC547 transistors, each driving a pair of red, green, or blue LEDs (the reference LED and the LED under test), where each LED was equipped with its own current limiting resistor. The BC547 can sink 100mA, which is more than enough for this test rig. The LEDs are inserted into header sockets and a button is pressed to start a test cycle of full red, full green, full blue, and full white. The reference LED is located adjacent to the test led so they can be easily compared.
The shield makes use of the Arduino's PWM (pulse-width modulated) outputs just in case I decide I want test ramping the brightness up and down. With the sketch set to run an endless loop of R-G-B-W, I was finding it difficult to insert each of the test LEDs into the headers because of the constant flashing of the reference LED. Since the reference LED is so bright, it makes it harder to see the header sockets clearly (especially as my eyesight isn't as good as it once was). Thus, I ended up installing a push button to trigger the start of a single cycle through the RGBW sequence, and this works nicely for me.
The LED lead spacing is less than 0.1" pitch, which makes them awkward to insert into the 0.1" pitch headers. Thus, in order to fan-out the leads, I used an off-cut piece of 0.1" Veroboard, spread the tips of the leads into the exposed slots of the serrated edge, and then slid the LED housing toward the Veroboard, thereby forcing the leads further apart. With a little squeeze to bring the two outer leads back in a bit, the LED inserts into the headers much easier.
A cunning tool created out of an off-cut of Veroboard.
Actually, I realize that it's a bit hard to visualize what I'm talking about from the above description, so I created this video showing the entire process in action.
In future columns I will describe all aspects associated with the construction of my 8x8x8 3D tri-color LED cube, from straightening the wire to creating jigs to designing the circuit board and the controller. In the meantime, I welcome any comments and questions.