Menu

LightBox: a VJ-oriented LEDs controller

Hi,

this is probably the first complete and usable device I have been able to make with an Arduino, so I am very proud of it!

LightBox, a VJ friendly RGB LEDs controller

Recently we have seen the explosion of bright, colored RGB LEDs everywhere. Their cost has been going down tremendously, so that now you can easily buy meters of LED chained in strips for few euros.
These strips usually come with some sort of controller which is OK for your home, or a Christmas tree, but may miss some functionalities in other contexts.

The objective:
I want to use an LED strip as a complement to my VJing performances, for example, putting a strip on the front of the stage and making it flash according to the music. More concretely I want to have separate control for luminosity and for color (as in a performance you can be more interested in the amount of light than the color itself). Then I want to have some oscillators for both light and color and be able to control their speed, and I want to have luminosity and/or sound to be controlled by the music, or, more specifically, by the bass (to have lights in sync with the rythm).

The materials:
It’s pretty simple to control an RGB LED strip with an Arduino and three TIP120 transistors, so I decided to build my own custom controller.
As the RGB color space does not separate color and luminosity I have adopted the HSV color space which has different dimensions for value (luminosity), hue and saturation .
The controller interface should have then:

I have soldered all the components to a big protoboard, and soldered some pins to the back of the board so that you can plug it to Arduino as a shield (useful for replacing the board if needed!).

This slideshow requires JavaScript.

Everything is then put into a colored box, potentiometers with their caps, and some printed decorations have been glued on the box. I made the decorations with Inkscape. For making the HUE circle I have used this trick.

The code of the controller is pretty straightforward: it just needs reading some digital pins for understanding in which position the commuters are, then read the values of the potentiometers for getting the amount of saturation, hue and value, and control the oscillation.
As for the oscillation I have created three kinds: a triangular oscillation, which is nice and smooth, a square oscillation, for strobo-like effects, and a random oscillator.
There are two tricky parts in the code. One is the sound control, especially if you want to make the device reactive only to low frequencies. For this part please have a look at my previous post. The other tricky piece is the HSV to RGB conversion. Fortunately there are a lot of examples on the internet, and one specially thought for integers (much faster than float computation), though I had to slightly adapt it for Arduino has 16 bits integers and was making some errors in the calculations. You can download and use my code for free from my repository.