Wearable Tech Final Project - DJ Helmet

by isqu6491 in Circuits > Arduino

802 Views, 2 Favorites, 0 Comments

Wearable Tech Final Project - DJ Helmet

IMG_1477.JPG

The goal of this project is to make a DJ helmet with LEDs reactive to music for show and wow factor. We are using an addressable LED strip from Amazon.com as well as a motorcycle helmet, an Arduino uno and wire.

Supplies

Materials Include:

  • Addressable LED strip
  • Motorcycle Helmet
  • Arduino Uno
  • Wires and soldering iron

Getting LEDs to React to Sound

33A38F10-26EF-4797-AF6E-E2F34A45BFBF

For the first step we are going to test the LED strip to react to sound, we use the sound board from Sparkfun and connect it to the Arduino using a breadboard and wire. Testing out with the Arduino software, we get two readings we can use. The amplitude of the sound coming from the "Envelope" port and the binary 1 / 0 reading from the "gate" port. Use this variables to map to the addressable led strip, then "gate" is at one, the LEDS display certain color, when the Envelope is above a certain level, display a certain color. The full code will be provided.

Cut and Solder LEDS to Shape on Helmet

IMG_1371.jpg
IMG_1383.JPG
IMG_1379.JPG

On my project I decided to add the LEDs to the helmet in an X fashion with extra triangles on the outside, I plan to make that design work better with the way the music plays. So this step is all about cutting the LED strips to the desired lengths and soldering them together on the cut marks to make corners. I had to do this about 10 times and it is very time consuming especially when dealing with small wires. This is the progress at this step

Wire and Test the LEDs on the Helmet

724FB839-8691-48FB-BA0B-15A02659015E.jpeg
IMG_1382.JPG
In this step I wired and tested the LEDs to the arduino, the sound board and the cut LEDs to make sure the cuts and soldering were working correctly

Free Electronics From Breadboard

IMG_1470.JPG
IMG_1469.JPG
IMG_1468.JPG

In this step I focused on getting all the electronics off the breadboard. I soldered all the wires that needed to be soldered and extended the helmet wires to be long so you are able to wear the helmet wile attached to the Arduino. The most important thing I could not figure out was external power, I tried batteries in different configurations but nothing would give me the result I needed, some would make the lights go crazy and some would make them be different colors. Unfortunately this may be due to my knowledge of circuits but I opted to keep the power to the Arduino coming from the pc board. The sound board is powered by a battery pack and that works fine

Final Configuration

IMG_1477.JPG
IMG_1482

for this final step, I read the values coming from the sound board and modified the code to match the new values that changed one everything was taken off the breadboard. I glued the LED strips to the helmet where before they had been taped down and finally I tested again.

Code (Arduino)

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library
#include 
#ifdef __AVR__
 #include  // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the NeoPixels?
#define PIN        3 // On Trinket or Gemma, suggest changing this to 1
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 166 // Popular NeoPixel ring size
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels
void setup() {
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif
  // END of Trinket-specific code.
  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
   Serial.begin(9600);
}
void loop() {
  int sensorValue = analogRead(A1);
  int sensorValue2 = digitalRead(7);
  Serial.println(sensorValue);
  
 //delay(5);
  //pixels.clear(); // Set all pixel colors to 'off'
  if (sensorValue2 == 1){
     for(int i=0; i<28; i++) { 
     pixels.setPixelColor(i, 15, 0, 50);
  }
     for(int i=48; i<81; i++) { 
     pixels.setPixelColor(i, 15, 0, 50);
  }
  
     for(int i=102; i<129; i++) { 
     pixels.setPixelColor(i, 15, 0, 50);
  }
     
     for(int i=148; i<166; i++) { 
     pixels.setPixelColor(i, 15, 0, 50);
     }
  }
  
  
////////////////////////////  
  
  else{
         for(int i=0; i<28; i++) { 
     pixels.setPixelColor(i, 0, 0, 0);
  }
     for(int i=48; i<81; i++) { 
     pixels.setPixelColor(i, 0, 0, 0);
  }
  
     for(int i=102; i<129; i++) { 
     pixels.setPixelColor(i, 0, 0, 0);
  }
     
     for(int i=148; i<166; i++) { 
     pixels.setPixelColor(i, 0, 0, 0);
     }
    }
 
  
  
 
 //////////////////////////// 
 
 
 if (sensorValue == 3  || sensorValue == 2){
     
    for(int i=29; i<47; i++) { 
     pixels.setPixelColor(i, 255, 0, 0);
  } 
  for(int i=82; i<101; i++) { 
     pixels.setPixelColor(i, 255, 0, 0);
  }
   for(int i=130; i<148; i++) { 
     pixels.setPixelColor(i, 255, 0, 0);
  } 
  
   pixels.show();
   
  }
   if (sensorValue > 3){
     
        for(int i=29; i<47; i++) { 
     pixels.setPixelColor(i, 0, 155, 155);
  } 
  for(int i=82; i<101; i++) { 
     pixels.setPixelColor(i, 0, 155, 155);
  }
   for(int i=130; i<148; i++) { 
     pixels.setPixelColor(i, 0, 155, 155);
  } 
     
   pixels.show();
   
  }
  
    
   else{
    for(int i=29; i<47; i++) { 
     pixels.setPixelColor(i, 0, 0, 0);
  } 
  for(int i=82; i<101; i++) { 
     pixels.setPixelColor(i, 0, 0, 0);
  }
   for(int i=130; i<148; i++) { 
     pixels.setPixelColor(i, 0, 0, 0);
  
  }
   pixels.show();
    }
    
   
}