the field jacket, parts kits

Check it out, part kits are available!

the field jacket

The field jacket is a costume piece designed for dragon*con 2009.

it will contain 3 lighting systems: foward facing white LED, EL wire accents, and UV for the "control" panel and "club" mode.

it will contain light and sound sensors for controlling the lighting as well as tactile buttons for switching lighting modes.

Light control will be done by the LilyPad arduino board.

Parts list for project:

initial investigations

The initial code work I did was with the Arduino Duemilanove to get some of the code right in a more dev friendly environment. It allows me to make connections to the breadboard without having to have to break out the alligator clips

In this setup I'm using 2 LED setups to represent the White and UV light setups. These are hooked to pins 5 (for PWM) and 7 (the UV won't support PWM). I've then got two leads going to pins 2 and 3, which are the two interrupt pins.

Working with this setup, I got the debouncing of the interrupt pins correct (by storing when the interrupts last occurred and not triggering again if it's too soon). When interrupt 0 is triggered (pin 2), I select which of the sets of lights are selected. For a short period after this interrupt, I flash the set of lights quickly for some feedback. When interrupt 1 is triggered (pin 3), I cycle through the options of the light modes. The main loop services the lights based on the current mode selected.

sensor inputs

To write the code for the light and sound sensor, I hooked up the mic board (by soldering some wire leads) and the light sensor with alligator clips.

I took samples and printed them out to Serial to see what the levels looked like. The light sensor goes from 0 in the dark to 1023 in bright daylight. At livingroom light levels, it floats about a 15-20, so I set the cutoff for when the light based sensor triggers on at 10.

When any of the lights are in sound mode, I take sound level samples and start keeping an average for the last 16 samples. When the sound level is over the average by a reasonable amount (20), I trigger the light. I also try to figure out how much higher than the average the sound is and use it to determine how quickly to dim the light. The louder the sound, the more cycles it will stay lit.