Introduction: Color Changing LED Brooch
This color changing wearable will always be in harmony with the outfit it is pinned to. This brooch reads the color of a garment and turns either the complementary color or displays the missing two colors in the triadic color scheme. This project uses the Adafruit color sensor, Neopixels and an Arduino Mini 05.
Don't remember color theory from art school?
Complementary colors are opposite each other on the color wheel, when paired they make a vibrant combination.
Triadic colors are 3 that are evenly spaced from each other on the wheel. When all are used together, it is recommended to let one be dominant and the other two be used as accents. The dominant is automatically the main color you are wearing, while the two lit panels act as your accent. The brooch has it covered!
Since the brooch is colored using light, the wheel to be referenced is the RGB color wheel.
Step 1: Materials
 x Arduino Mini 05
 x CR2032 coin cell batteries
 x 2 coin cell holder
 x mini slide switch
 x FTDI Basic or other FTDI breakout board
32 gauge stranded hook-up wire (you may be able to use 28 gauge, check before you solder it all together to see if it will fit in the brooch body)
Heat shrink tubing, 1/8" - 1/4" diameter
- Soldering iron + solder
- Soldering iron
- Wire Stripper
- Angled wire cutters
- Alligator leads
- Dremel with various sanding down bits for acrylic
- Access to a laser cutter (120 Watt Epilogue is used in this instructable)
- Q-tip or toothpick (for applying epoxy to thin areas)
- Small spring clamps or a heavy flat object to hold brooch in place while epoxy dries
** Any other favorite circuit prototyping tools
The dimensions of the wood and acrylic accounts for some test material. The brooch itself is about 4" x 4".
 x 10" x 10" piece of 3/8" thick of hard wood, ash wood is used in this 'ible.
 x 10" x 10" piece of 1/16" white acrylic
 x 10" x 10" piece of 1/16" black acrylic
 x 3/4" pin back
- A bit of polyester fill (for light diffusion)
- Hot glue gun
- Masking tape
- Access to Illustrator
Step 2: Engrave and Cut Brooch
The brooch is assembled in 3 layers, all laser cut and engraved. The engraving is done to hollow out the wood body for the circuit to lie in. I imagine that there are other ways to do this by hand. Wood is not my typical medium, so I stuck with what I knew best in this case. Whatever gets you there!
The outside of the brooch is wood, then two acrylic layers are stacked on each other, leaving an opening for the battery holder, so you can open and replace them. Lastly, white acrylic panes pop in to the front of the wood body, which the LEDs shine through.
Before you cut or engrave, cover the wood in masking tape to protect it from any burn marks. The acrylic should already come with coverings on both sides when purchased.
Download and open all the files, match up the name of the file with it's material. If you need, do some tests to calibrate the laser settings.
Since the windows are held in place by tension, getting the right size is crucial. Because of this, it's a good idea to copy and paste the windows and scale them 1% up and down. Cut all three sizes, this way you have more options to try when you assemble the brooch.
You should end up with:
 x 1/16" black acrylic back
 x 1/16" black acrylic middle
 pairs of 1/16" white acrylic panes
Before you start on the final, do some testing cutting and engraving with your chosen wood. The idea is to get a deep engraving to keep the number of passes low and to make sure all your settings are correct, of course. :)
The wood body does take more time, because of the multiple passes, it took mine about 40 minutes to be done.
The first pass is a combination of vector cuts and raster engraving. Once the vector cuts have been made, DELETE the vector cuts in Illustrator or Corel Draw. Be careful not to move the wood in the cutter or the file around on the canvas!
Hit print again, go to preferences and choose raster engraving. Engrave the wood piece until there is 1/4" depth. It took around 7 engravings to achieve this depth, refocusing on every other go.
Step 3: Prep
Before You Start
Before handling the Neopixels, have a look at Adafruit's Uberguide, especially the "Best Practices" section. There are precautions that are highly suggested so you don't damage the pixels as you build and test.
There is a note stating that you can omit the resistor between the data pin of the arduino and data in of the Neopixel and the capacitor between power and ground if you are using a small amount of pixels and putting them in a wearable. You will find them omitted in this project for these exact reasons. The guide and "Best Practices" chapter is a must read if you have never worked with them before. Thank you Adafruit for your thoroughness! :D
Cut Notches for Switches
Two cuts need to made in the wood body, one for the battery holder on/off switch, the other for the mode switch.
Lay the holder in the wood body and mark where to make the cut with a pencil. Use a Dremel sander or grinder tip to cut out a hole big enough for the switch to fit in. I suggest placing the mode switch on the opposite side (refer to pic). This places the switch in the same cavity as the arduino.
Step 4: Build Circuit
Do not solder the battery holder...yet.
That comes after testing and programming the arduino.
Cutting Notches for Switches
Before you solder, the wire needs to be cut to appropriate lengths from component to component as it lies in the engraved cavities. In order for you to get an accurate placement of the components, two cuts need to made in the wood body. One for the battery holder on/off switch, the other for the mode switch, which is the mini slide switch.
Lay the battery holder in the wood body and mark where to make the cut with a pencil. Use a Dremel sander or grinder tip to cut out a hole big enough for the switch to fit in.
I suggest placing the mode switch on the opposite side (refer to pic). This places the switch in the same cavity as the arduino.
There is not a whole lot of room to work with in the body of the brooch. It's helpful to solder the components as you go while you lay them in the brooch for reference. Cut your wire just to the length you need + a tiny bit more so it can be moved around.
Download the circuit diagram and solder the connections as illustrated. The mini slide switch is a single throw, double pole switch. It can made into a single throw, single pole switch by just leaving one of the pins disconnected. Grab the multimeter, flip it to the continuity setting, attach to alligator leads the two leads on the multimeter. Attach alligator leads to an outside pin of the switch and the middle pin. throw the switch and you should hear a beep. Once you know what leads are the two contact points of the switch, solder to those and clip the remaining lead of the switch off.
Soldering the LEDs take a more advanced solderer due to them being so tiny. They are the most stripped down and smallest RGB LEDs I have found without getting to SMT level.
Tinning the ends of the wire and the tiny solder pads of the LEDs will help with soldering the small connections. After tinning, place the wire ends on the pads, touch the iron to the connection just enough for the solder to flow.
Use a helping hand to hold the LED in place as you go around from pin to pin. Check out the attached datasheet to see where the power, ground, data-in and data-out pins are. Take a pencil and mark pin 1 one on each LED, this will help orient you as you solder around the pixel.
Step 5: Upload Arduino Program
Install Arduino Libraries
First you will need to install a few libraries.
Never installed a library or need a refresher? Check the arduino reference page.
Solder 4 male pins to the TX, RX, 5v and Ground pins and plug it in to a breadboard.
Connect the Mini to the FTDI Basic like so:
GND >> GND
5V >> 5V
RX >> TX
TX >> RX
Download the .ino file, connect the FTDI Basic board to your computer via the USB cable and open the Arduino environment. Select board and serial port, then hit the "Verify" button to make sure the libraries are properly installed.
After the program has successfully compiled, press the "Upload" button, while it still says "Compiling sketch..." in the lower left hand corner of the window, press the reset button on the Arduino Mini and watch the TX and RX lights on the FTDI board light up. The timing of the reset press needs to be just so for it to upload.
For a bit more detail on how to program the arduino, check out the Program Mini 05 with FTDI 'ible.
After it has been successfully uploaded, the LED on the color sensor will go on, this means the sensor is engaged and reading. Carefully unplug and plug the power lead from the FTDI board to the Arduino Mini to power cycle, this will reset and the color sensor will read again, this is when you can test the color sensor.
The LED on the sensor is set to stay on and the sensor will read for 1 second. Place the sensor up close to a brightly colored object, piece of fabric or piece of paper. Whatever you have handy! All 8 LEDs will turn either the complementary color or the triadic scheme to the color the sensor read. Sometimes it takes a couple tries to get a good reading and translation. It won't be perfect, the LEDs and sensor have some limitations. I found it works best in low ambient lighting and up close to the color you are attempting to read.
Now is the time to solder the battery holder leads to the voltage in pin of the arduino and the ground. The battery holder comes with the wire leads coming out of the top. So the wire fits in the wood base of the brooch, you will need to unscrew the battery holder, take it apart and Dremel a notch in the side of the battery holder.
Step 6: Assemble
The trusty hot glue gun was taken out for all the internal glueing EXCEPT the battery holder and arduino. Use epoxy to attach those to the inside of the wood base.
Mix a small amount of epoxy and spread some over the back of the battery holder and arduino. Set it in place and wait for it to cure. Moving counter-clockwise from holder, glue the Arduino Mini next to the battery. Fit and glue the mode switch in the cut made of it above the arduino and the LEDs in the engraved notches. They are placed to shoot sideways towards the middle of each of the windows. Four LEDs for each window.
Now is a good time to cover up any solder connections that were not heat-shrinked. The hot glue works well since it sets instantly, only a little is needed for each LED.
Wait to glue the sensor, it gets attached to the back, instead of the body.
Test Along the Way
Test the circuit as you go to catch any breaks or problems ahead of time. If you are brave and confident, pour some epoxy, hot glue or Plasti-dip over the arduino to insulate and protect the connections after you know the circuit is solid and working.
** A note on the photos
In the photos you can see that the white window panes are already in, actually leave them for the last step of assembly. That way they will be kept away from the glue and stay clean and unharmed.
The middle acrylic file is made up of a smaller inner piece and a large outer piece. Take off the protective backing on the side that goes down on the wood on both pieces. Use a medium-fine grade sandpaper and roughen the surfaces up a bit. This helps the epoxy grab on to the plastic.
Use a toothpick or Q-tip to apply epoxy to the wood body and the middle pieces. Using small spring clamps or a heavy flat object to weight and hold the pieces in place over night. Be careful to not crack the acrylic with the clamps, use a flat object instead if you feel that may happen.
Before getting to the back, set up the hot glue gun, you'll be using this to attach the sensor.
Take the back piece and fit it over to see how things fit. If the wires and components are sticking up too much, you may need to cut more middle pieces to build up the walls for added depth.
Check to see that the oval opening gives the LED and lens on the sensor enough room for a reading. Do some tests to see how well it reads and to make sure the circuit is still intact. When everything looks good, it's time to start gluing again.
Take the hot glue gun and carefully put some around the perimeter of the sensor. Grab the back and press the sensor on to the surface, lining up the lens and LED with the oval opening.Make sure the sensor is secure, you may want to apply more glue in the engraved cavity, so the sensor sits on it and gets glued from the back as well.
Take the sand paper and rough up the touching surfaces of the middle and back piece. Grab the epoxy, mix up a small amount and apply it to the middle piece around the perimeter and the small piece in the middle. Place the back on the brooch and weight or clamp it. Leave over night to cure.
Step 7: Finishing Details
When the brooch is all built up, all that's left are the details.
The wood I used was a little light in color for my liking. To darken it up, I used a dark walnut stain. It was very quick, the stain was left on for about 30 minutes, then wiped off. It added a lot of character and brought out the grain in the wood.
Take some polyester fiber fill and stuff it into the cavities with the LEDs from the front, this will help a little bit with the diffusion of light. Pop the white acrylic pieces in place, this may take some work. There should be some tension, but be careful not to force them too much or the wood could crack. Try the other sizes you cut or sand an edge or two down using a piece of sand paper on a flat surface and try again.
Attaching Pin Backs
Take the two pin backs and epoxy them on to the back. It's nice to be able to wear the brooch either horizontal or vertical, so I placed one in each position.
Step 8: Wear and Harmonize!
The brooch works best in dim light and while holding the sensor ~5mm from a bright color. Hold it vey close to the material you want it to read. It seems to like bright red the best, but also does well with jewel-tones.
Switch the mode button either to display the complementary color or the missing two triadic colors to the color it senses. After clicking over, switch the power off, then on again to get a new reading.
We have a be nice policy.
Please be positive and constructive.