halloween costume

I made a helmet for my halloween costume out of a 5 gallon paint bucket, some LED’s, an Arduino, and an off the shelf voice changer.

Youtube is here: http://youtube.com/watch?v=u-D-eURrRtU

Basically: it’s 12 LEDs wired in parallel and connected to a digital output on the Arduino board. I used the setup from the knock tutorial but modified the code slightly.

/* Modified Knock Sensor
 * Original by DojoDave <http://www.0j0.org>
 * Modified for use in a halloween costume by Spain [removed serial info, delay, and added if-else]
 * Uses a piezo element as a sound detector to turn LEDs on and off
 * Original can be found at:
 * http://www.arduino.cc/en/Tutorial/Knock

int ledPin = 12;      // leds connected in sequence to control pin 12
int knockSensor = 5;  // the knock sensor will be plugged at analog pin 5
byte val = 0;         // variable to store the value read from the sensor pin
int statePin = LOW;   // variable used to store the last LED status, to toggle the light
int THRESHOLD = 10;  // threshold value to decide when the detected sound is a knock or not

void setup() {
 pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT

void loop() {
  val = analogRead(knockSensor);    // read the sensor and store it in the variable "val"
  if (val >= THRESHOLD) {
    digitalWrite(ledPin, HIGH); // Turn LED on if above threshhold
  else {
    digitalWrite(ledPin, LOW); // Turn LED off if NOT above threshhold

If I had more time:

  • I would have looked into using the arduino as a voice changer, or else made one out of a kit, rather than using one off the shelf from a big box store
  • I would have made the eyes flicker when I spoke also (as it is they are connected to a separate 9v battery)

Thanks to DojoDave for the code, and for forum members nkcelectronics and Cheater for helping me figure out how to solder PC board!

For some reason the "edit" link isn't showing up. Either way: picture of it being worn:

Man, that is SO cool! Fairly simple, yet oh-so-awesome! You could perhaps do something more to the "helmet".. you know.. to make the bucket more helmety. But dang, always a pleasure when someone comes up with something mindpokingly fun like this! Thanks for the inspiration! ^^ Gonna go home from work in an hour, pick up my brand new ultrasound-rangers and lasermodule from Sparkfun and totally geek out! B-D