Close

Building the Shelf Lights

A project log for Lab Bench III

You guessed it! It's a lab bench & my third. The kicker? It's unlike any other...

Grant GiesbrechtGrant Giesbrecht 01/14/2020 at 19:310 Comments

I put LEDs on the underside of my shelves for my old bench and really liked the extra illumination - plus it looked cool. I'm doing the same thing for this new bench, but I'm using individually addressable LEDs and a better light mounting system. 

I'm using WS2812B LEDs and I'm controlling them with an Arduino Mega. I didn't want to use the adhesive that comes with the LEDs directly on my shelves because the adhesive is kinda crappy. Instead, I'll use their crappy adhesive on 3D printed mounts which will screw into my shelves. If the adhesive fails, I can experiment with other glues without worrying about damaging the finish of my shelves. More importantly, the 3D printed light mounts will also provide some rigidity to the wires, which from prior experience, really want to tear their pads off the light strip. They'll also provide a shade which hides the bright emitters for a more polished and tidy look.

Here's a joint between two light bars. The ends have guide-holes for the wires, helping protect the fragile connections.
Make sure you don't connect your data wire to the data out side rather than the data in side. I had to run a wire along the edge to connect to the right pin after screwing this up. Cyanoacrylate-based superglue works well for adhering the wire to the 3D printed bar.
I used dupont connectors to connect my light bars to the control signal and power.
The control electronics were a lot easier than I expected. I was thinking I'd need to make a PWM driver circuit like I did for my previous lab bench light build. However, because the LEDs are individually controlled, the intensity variation is performed locally within each LED, making my job super simple. I wire my beefy 100W, 5V 20A power supply to the power connection, then connect the data lines to any digital pin on the Arduino. Cool!
I have 10 light bars, each holding 16 LEDs distributed throughout five shelf-nooks. I even have one behind my black component boxes for some cool backlighting.

The rest is programming. In order to make it easy to make cool patterns, I estimated the relative position of the light bars and made function which understands my lights to be arranged in a grid 96 columns wide and two rows high. I can assign any color to any 'pixel' on my shelves and the function automatically locates the correct bar and turns on the LED(s). Because of the arrangement of the bars and the spacing between them, there isn't a 1-to-1 association between LEDs and grid squares. For example, the light bar behind my centrally located grid-shaped shelf holding black boxes has 16 LEDs but occupies 14 cells in my grid. Now I can make cool animations below without having to worry about the relative position of different bars, I just assign colors to pixel locations like on a screen, but the screen is actually a shelf :)

Discussions