Today I'm going to show you how I made my "light painters palette" aka light box. If your into electronics and photography than this is probably something you are going to like.

-Arduino (I'm using an Arduino pro mini which requires a ftdi basic to program, But an uno or leaonardo... would work just fine)
-Tri Color LED Breakout Kit
-Rocker Switch
-A Battery Holder for 4 AA's
-2 Toggle Switches
-2 10k Resistors
-3 10k Potentiometers
-3 Knobs (Red, Green, and Blue)
-IR Receiver (Almost any 38 kHz variety will work)
-IR Remote, mine came from a LED strip that burnt out. But any NEC remote works with some software adjustments (You could just buy one of these, have to check the remote codes)
-Enclosure of some sort, I used this one
-Some hookup wire
-4 little nut and bolt combo's that fit the Tri-Color LED Kit board
-LED bevel (doesn't even really fit the IR receiver, but oh well)

Building Supplies:
Drill and an assortment of bits
Soldering Iron
Flux and Solder
Wire cutters and strippers
Dremmel tool or jewelers saw
Double sided tape

Step 1: Hardware

To build it just drill a bunch of holes in the lid to your enclosure, mount the parts with their included hardware. Be careful not to space the potentiometers to close or they might not fit, my was too close for comfort. I mean that was totally planned. I'd suggest orienting the microcontroller so the analog inputs are on the side of the potentiometers, and the digital inputs are on the side of the switches. Use the double sided tape to secure the battery holder to the bottom of the enclosure. The power switch seemed to fit nice on the side. Give enough wire between the battery and power switch to the lid so you can open it easily. I also tried to make sure to wire the components through the bottom of the Arduino so if I needed to probe around I had some room. I used a spare piece of protoboard for a power and ground rail, however that's not necessary. You could just solder a huge ball of wire ends together. Flash the microcontroller with the software I've got here, drop in some batteries, close up the lid and your done!

The Potentiometers have three solder points, one side to 5V, one side to Gnd, the center to an analog input. If the sides are backwards then just flip the last two values in the mapping function after the analogRead functions in the software. This will reverse the clockwise vs counter-clockwise brightening/dimming relationship. I'd suggest a clockwise turn makes the LED's brighter.
The switches are SPDT, so one side goes to 5V, one side has a wire to the digital input and a 10K to Gnd. The 10k is a pulldown resistor which just makes sure the switch stays in determinate state all the time.
The IR Receiver has 5V, GND and Data lines from right to left (check your data sheet to be sure, I've burnt a couple of these for sure). The data line can connect to any digital input pin.
The LED's breakout kit has a 5V, Gnd, and data lines for each of the three colors. Be sure to wire these to a PWM pin, maybe not pin 5 and or 6 because I think they mess with the delay function and you might not be able to turn that LED all the way off. What ever is closest to the mounting spot.
The batteries get wired to the Raw and Gnd inputs. Send the positive lead through the power switch first.

Make sure however you wire it that it matches the software parameters!!

Step 2: Software

The two switches give the box 4 different modes.

Both switches pointed towards knobs: Color Select
The knobs control the brightness for the three individual LED's. Mixing the knobs gives you the rest of the rainbow. I bet this would be a great teaching aid for an art class.

The switches are pointed opposite one another: Color Fade
This mode fades between the LED's at a speed proportional to the position of the potentiometers. If one is turned all the way down it keeps that LED off. This way you could choose a little red and a lot of green if your light painting some tree on a wall... If you want each letter in something your writing to be a different color you just determine how fast you write each letter and try to time the knobs to that. The difference between switch 1 down and 2 up, and 1 up and 2 down is that it will mix the colors in one mode and will fade to black between colors in the other. So you can make a rainbow streak or more defined red, green, and blue streaks.

Both switches pointed towards IR receiver: Remote Controlled Mode
This mode listens to the remote. When you download the IR library it has an example file that reads codes sent from any remote and displays the NEC code. I used this to reverse engineer the remote and use if for my box. I couldn't build a better remote than this for sure, unless I wanted to time it to some music or something, maybe next holiday party.
The remote has an array of different color buttons you can jump around between. Off turns the colors off. On doesn't do anything, but any color is on.
It has a flash mode which I programmed to take the input from the potentiometers and flash that color. I also programmed the code sent from my Nikon D5100 camera remote to do this same thing, and timed it with my shutter! So its basically a remote operated color flash too.
You can dim or brighten each color with the top left two buttons. It just divides or multiplies the current value for the duty cycle of the pulse width modulated signal in half, or times 2. If you dim it all the way to black, however, you have to hit a color button to turn it back on (multiplying 2 times 0 = 0).
The strobe mode uses a pseudo random number generator to decided the delay between successive flashes, how I assume a strobe light works. You have to hit off to escape that program.
The fade mode does a relatively fast fade between the LED's. For this one you again have to hit off, to turn it off. Its a little tricky because you have to hit the off button right after the fade cycle completes to have it be reading the IR receive function. You can also just turn off and on the unit to get it to stop.
The smooth mode does a really slow fade between the LED's. This is a nice mood light setting. Once again you have to hit off for it to stop. This ones extra tricky to stop because the fade cycle is so long you have a much smaller chance of hitting off at the right time. If anyone has a nice interrupt IR receive function or knows a better way to program the box I'd love to check it out. This was my first attempt at programming a remote controlled anything. You can just turn off and on the box to get it to stop or flip a switch and wait for it to time out...

Whats next? I'm working on dynamic light painting with night time lapse's... I've got to slow the fade down a ton and build a whole bunch more box's. Maybe connect them on a Xbee network, take a hike around some natural features to place the box's, wait till night and let the lights shine!

What version of Arduino IDE did you use? I get errors while I try to compile your code.
<p>I lost the problem by downloading the IRremote library from https://github.com/shirriff/Arduino-IRremote and copying it to the libraries folder.</p>
Oh nice, I'm glad you figured that out! I remember downloading the latest arduino IDE and having trouble compiling some programs. But I'm on a trip and not by my computer to figure out which version that was. Let me know if you have any other issues, I'd love to see if you get any cool photos!
<p>A friend of mine and I, are in the works of this incredible lightpainters palette box, but having huge trouble in finding out where to put all the wires... Could we be so lucky, that you just happen to have the wiring schematics in you top drawer or somewhere else, and would like to share those with the world? It's so very hard to see and locate all the different wires on your pictures. - Hope we are in luck ;)</p>
Thank you, this is going to be great!
This is the coolest light painter palette I have ever seen, a must have! It only misses one tiny neat feature - Chargeable with built-in rechargeable batteries, so you don't have to take it apart every time it is out of juice. I have ordered all the components listet, but can't figure out how to &quot;implant&quot; a battery charger into this project. Any advice on how to? Or maybe you would like to upgrade this cool device a bit and create an instructable on a v2.0 device? ;) Thank you for the great work with this one - I love it!
<p>Thanks aruneberg!! Thats really cool to hear. I actually have been dabbling with a rechargeable version of the box. I would use a 3.7V lipo battery and this charger &lt;<a href="https://www.sparkfun.com/products/11231" rel="nofollow">https://www.sparkfun.com/products/11231</a>&gt;. Just make sure to solder the jumper on the charger board to 5V and connect its to Vcc and Gnd to the Arduino's Vcc and Gnd. I also soldered a SPST switch between EN and Gnd on the charger board, gives you an on off switch. Thanks again! </p>
<p>Hi jritchey - I would really wish you would create a v2 guide, I just love the idea of this device. Anyway - Would it be possible to add some kind of power indicator, to se how much power left on the lipo battery? Maybe also a charge indicator telling when the battery is fully charged?</p>
I am very impressed with what you have done here . The pictures are also very nice! <br>I did a quick read through the code and like the commenting that you provided as well. <br>Thank you so much for sharing! <br>Build_it_Bob <br>
Thanks Bob! I'm glad you liked it.
So RAD! That video is super clean too, thank you for sharing this on Instructables.
Thanks!! definitely more videos to come...

About This Instructable




More by jritchey:Light Painters Palette 2.0 - A complete guide Light Painters Palette aka Light Box Arduino 2 axis Time Lapse Dolly 
Add instructable to: