Sunday, November 15, 2015

Halloween "The Sims" costume with color changing LEDs


This year my girlfriend and I wanted to make a The Sims costume for Halloween. We took a few pics of the build process for anyone else that might be interested in making one.


The basic idea was to make a sort of lamp-shade in the shape of the diamond (known in the Sims world as the "Plumbob"). This would slide over a clear acrylic tube with some LEDs inside to hold it up.


We debated for a while about what materials to actually use for the "lamp-shade". Here were some thoughts we had about the following:
  • Cut out acrylic triangles and glue them together. Seems like it would require very precise cutting to get everything to fit together without gaps.
  • Wire-frame using wooden dowels held together using glue. Probably could have went this route, we were unsure about using wood glue which needs to be held in place for a long time to set. However using wooden dowels and hot glue probably would have been fine.
  • Wire-frame using some metal coat-hanger like material and solder together. We decided to go this route because soldering is relatively quick and strong. And we could strengthen the joints afterward with an epoxy.
Some other thoughts:

Soldering vs Sugru? - Sugru might have been the best way to go about it since you can easily hold everything in place while the Sugru is still soft.

Paper vs Fabric? - Fabric seemed more durable but more time consuming. Also the cotton we bought didn't actually seem to diffuse light as well as regular paper, but it turned out to be okay. In the end we went with cotton mainly due to the durability.

Okay, without further ado, the build photos:

Wire-frame

Cutting the 0.062" steel rod stock I bought turned out to be a nightmare. I had to resort to using my rotary tool and a cutting wheel to cut through it

Tacking the pieces in place and soldering. These were about 3" in length. Using lots of rosin flux (the gross looking Q-tip is flux, I swear!)

Finished soldering the base piece together
Soldering the side pieces. These were about 7" in length. It's very helpful to have an extra hand at this point! Starting off with 3 at a time so that the tip will be centered.

The rest of the side pieces soldered and the tip soldered.

Same process to solder the side pieces for the bottom, but more annoying because it doesn't lay flat on the table anymore. Lots of helping hands needed for this one! Started off by holding 3 in place then soldering the other 3.

Wire-frame almost complete. A hole still needs to be cut on the bottom.

Soldered some smaller pieces near the tip so it can be cut off without losing its strength. In hindsight we should have done this before the bottom was completed so it could sit flat on the table. Lots of goopy rosin flux.

Since we were making two, I learned from my mistake and soldered the bottom support pieces on the first half this time. This one was a bit uglier because the support pieces went around the outside versus in between the side pieces, but it actually ended up breaking fewer times, so I suppose it was stronger.

Fabric

Time to cover it in fabric. The hot glue actually wouldn't stick very well to the smooth steel rods. We ended up creating small folds and hot gluing the fabric to itself with the rods in between for a strong connection.
We decided to use white fabric because we wanted it to show equally well for green, yellow, and red like in the game.

First piece glued down.

Shorter side glued down.

Rotate and repeat for the top piece, ensuring that the fabric is pulled taught throughout the process, but not too taught that it breaks the joints. This was probably one of the most frustrating parts of the build.

Starting on the bottom half.

Magnets were helpful to hold the fabric in place while gluing. For the bottom half, the fabric is just glued flat onto the top half (doesn't wrap around the rods).

All covered up!

Electronics

The electronics were the easy part of this project (but I might be a little biased). The plan was to use the ws2812 "neopixel" LED strips that I already had on hand and a Teensy-LC as the controller, all powered from a 5V USB "mobile charger".

The LED strips need a 5V power supply. I simply made connections to the Teensy Vin/VBUS/5V and GND pads. If you're using many more LEDs you won't want to share the same wires to power both the Teensy and the LEDs (in this case the USB cable), but for the 16 that I used I didn't have any issues.

Connections to the Teensy-LC

There is only 1 signal that is needed to connect the Teensy to the LED strip, and that is Pin 17 on the Teensy-LC. This pin has a 3.3V to 5V level shifter which may be required for some LED strips to work properly, although mine works with 3.3V levels just fine.

Take note that the LED strips are "directional" in that one set of pads is for an input, and the other for an output. These are indicated by arrows. The Teensy-LC should be connected to the input side, and if daisy-chaining strips together, the output of one strip should connect to the input of another.

Connections to the LED strip. Note the direction of the arrow

I was able to put two strips back-to-back and solder the pads directly to each other. My strips came with a "weatherproofing" jacket that I kept on to prevent the pads from shorting to each other on the back sides.

Strips soldered back to back
 The complete system. The Red block is the USB charger.

Some hot glue at the bottom for strain-relief

Code

You can find the code at https://bitbucket.org/snippets/htonoyan/kpRg4

I used the "FastLED" library that came installed with Teensyduino. This made it pretty simple to set up the LEDs and make smooth gradients from Green to Red without doing all the interpolations myself.

The code I set up is a very simple state machine with 4 states:
  • State 1 - Keep the plumbob green for 15 minutes.
  • State 2 - Transition from green to yellow to red. This takes 2.5 minutes.
  • State 3 - Keep the plumbob red for 2 minutes.
  • State 4 - Transition from red to yellow to green. This takes 2.5 minutes. Return to state 1
The FastLED library uses a number from 0-255 to control the Hue of the LEDs. Red is 0, and green is 68. If you know how long you want it to take to transition from green to red, you can easily figure out how long you need to pause before incrementing or decrementing the color. In my case, we wanted it to take 2.5 minutes, so each increment should take approximately 2.2 seconds.

Holding it up and finishing touches

We were thinking about creating some sort of harness to hold the whole thing up, but in the end, we just shoved the thing down our shirts. For the ladies, a bra helps. For the guys, I used some shoelaces tied around my body to support the thing. A taut line aka midshipman's knot worked much better than a typical square knot to keep the shoelaces tight in place.

My girlfriend also made some cardboard props from the game to go along with it!


End Result

It actually ended up looking pretty good! We won some prizes at a costume contest at a bar, but ended up losing 2nd place to Daft Punk.

Some interesting observations from throughout the night:
  • People either LOVE the costume, or have no idea what it is
  • Walking around with these definitely draws a lot of attention
  • You'll be able to spot yourself in party photos no matter how many people are in the crowd
  • You'll never find yourself in the dark
  • After taking these off, your brain will start to see a weird green tinge to everything for a few hours


No comments:

Post a Comment