Arduino LED Sound Sensor Activated Head Piece

The Mission: Building a headpiece from the ground up utilizing materials not normally used for ornate purposes.

Step 1: Arduino Sound Sensor Activated LED Headpiece

Notes:

  • Resistors and other electrical components come in a wide variety of colors and sizes, I used what I had on hand.
  • Sizing will be up to the creator, I sized the LED strip and components to fit my own head.
  • Jumper wires come in many colors; in this case, use what wires appeal to your design in regard to composition, color variety and own taste.
  • Take notes as the project progresses to keep wires in order just in case they become loose. Draw a map of where the wires would go from the Arduino, Sound Sensor and LED strip.

Step 2: Arduino

Ensure the Arduino Program is installed

https://www.arduino.cc/

Step 3: Materials

Proper materials are a must in building an Arduino project.

  • Breadboard
  • Arduino Board
  • Solderable BreadBoard
  • Resistors
  • Capacitor Lelong H342(M)
  • Sound Sensor
  • Jumper Cables
  • Wire
  • 9V Battery
  • 9V Battery Cover
  • Electrical tape
  • Shrink Tube
  • Soldering Iron
  • Solder

Step 4: LED Strip and Arduino

Order a reliable and flexible LED Strip, I used 20 of the LEDs for the final project.

$25.99 on Amazon https://www.amazon.com/gp/product/B07FVP54GQ/ref=...

Adafruit contains a library of premade Arduino codes for LED Strips.

Explore and learn on their website for a more in-depth information about:

**Program the Arduino beforehand to ensure mobility during assembly**

The test strip I used is listed below, I left the code that is turned off (indicated by // marks) for the availability of later adjustments if desired. This will allow for easy change of color in LED activation.

#include
#ifdef __AVR__ #include #endif

#define PIN 6

// Parameter 1 = number of pixels in strip

// Parameter 2 = Arduino pin number (most are valid)

// Parameter 3 = pixel type flags, add together as needed:

// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)

// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)

// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)

// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)

// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products) Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across

// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input

// and minimize distance between Arduino and first pixel. Avoid connecting

// on a live circuit...if you must, connect GND first.

void setup() {

// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket

#if defined (__AVR_ATtiny85__)

if (F_CPU == 16000000) clock_prescale_set(clock_div_1);

#endif

// End of trinket special code

strip.begin();

strip.show(); // Initialize all pixels to 'off'

}

void loop() {

// Some example procedures showing how to display to the pixels:

colorWipe(strip.Color(255, 0, 0), 50);

// Red colorWipe(strip.Color(0, 255, 0), 50);

// Green colorWipe(strip.Color(0, 0, 255), 50);

// Blue //colorWipe(strip.Color(0, 0, 0, 255), 50);

// White RGBW

// Send a theater pixel chase in...

theaterChase(strip.Color(127, 127, 127), 50); // White

theaterChase(strip.Color(127, 0, 0), 50); // Red

theaterChase(strip.Color(0, 0, 127), 50); // Blue

rainbow(20);

rainbowCycle(20);

theaterChaseRainbow(50);

}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {

for(uint16_t i=0; i<strip.numPixels();i++) {

strip.setPixelColor(i,c);

delay(wait);

}

}

void rainbow(uint8_t wait) {

uint16_t i, j;

for(j=0; j<256; j++) {

for(i=0; i

strip.setPixelColor(i, Wheel((i+j)&225));

}

Stripshow();

delay(wait):

}

}

// Slightly different, this makes the rainbow equally distributed throughout

void rainbowCycle(uint8_t wait) {

uint16_t i, j;

for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel

for(i=0; i< strip.numPixels(); i++) {

strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));

}

strip.show();

delay(wait);

}

}

//Theatre-style crawling lights.

void theaterChase(uint32_t c, uint8_t wait) {

for (int j=0; j<10; j++) { //do 10 cycles of chasing

for (int q=0; q < 3; q++) {

for (uint16_t i=0; i < strip.numPixels(); i=i+3) {

strip.setPixelColor(i+q, c); //turn every third pixel on

}

strip.show();

delay(wait);

for (uint16_t i=0; i < strip.numPixels(); i=i+3) {

strip.setPixelColor(i+q, 0); //turn every third pixel off

}

}

}

}

//Theatre-style crawling lights with rainbow effect

void theaterChaseRainbow(uint8_t wait) {

for (int j=0; j < 256; j++) { // cycle all 256 colors in the wheel

for (int q=0; q < 3; q++) {

for (uint16_t i=0; i < strip.numPixels(); i=i+3) {

strip.setPixelColor(i+q, Wheel( (i+j) % 255)); //turn every third pixel on

}

strip.show();

delay(wait);

for (uint16_t i=0; i < strip.numPixels(); i=i+3) {

strip.setPixelColor(i+q, 0);

//turn every third pixel off

}

}

}

}

// Input a value 0 to 255 to get a color value.

// The colours are a transition r - g - b - back to r.

uint32_t Wheel(byte WheelPos) {

WheelPos = 255 - WheelPos;

if(WheelPos < 85) {

return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);

}

if(WheelPos < 170) {

WheelPos -= 85;

return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);

}

WheelPos -= 170;

return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); }

Step 5: BreadBoard and 9v Power

Having a breadboard will allow for proper testing of LED Strip and sound sensor to ensure proper working order before soldering

https://www.amazon.com/Breadboard-Solderless-Proto...

This project can be powered using a 9V Battery to the Arduino. I ordered a 9V Battery cover since the power is sitting right on top of the head and it has an on and off switch, either plug connection will work.

https://www.amazon.com/5pack-Battery-2-1mm-Arduino...

https://www.amazon.com/gp/product/B01C5J4KRM/ref=o...

Step 6: Sound Sensor

Sound Sensor will be connected to the Arduino and control the LEDs per code.

https://www.amazon.com/gp/product/B077XB5Y4X/ref=o...

  • Test the LED strip with the sound sensor and code for the desired color reaction.
  • The sensitivity of the sound sensor can be adjusted with a small screwdriver.

Step 7: Jumper Cables, Resistor, Capacitor

  • Purchase bundle of male to female and male to male jumper cables, pick colors according to aesthetics or the order desired for connection between equipment.

https://www.amazon.com/Elegoo-EL-CP-004-Multicolor...

https://www.amazon.com/ELEGOO-Solderless-Flexible-...

  • Resistor

https://www.amazon.com/Resistor-Assortment-Kit-The...

  • Capacitor Lelong H342(M)

https://www.amazon.com/OCR-Electrolytic-Capacitor-...

Step 8: Solderable BreadBoard

For a more permanent connection from the temporary breadboard, utilize a solderable Breadboard instead. I chose the red for aesthetics but there are other colors, sizes, and shapes available.

https://www.amazon.com/gp/product/B071R3BFNL/ref=o...

  • It is highly recommended connection is practiced on the breadboard before soldering to this Breadboard
  • Ground First
  • From Breadboard Negative - ===> 1st Ground on Arduino (Purple Wire

  • From Breadboard Positive + ===> 5V on Arduino (Yellow Wire)
  • Connect the positive lead to the positive power on the LED strip
  • Connect the negative lead to the negative power on the LED Strip
  • While here, use a green wire to match the green wire on the LED power. Ensure connection with a resistor and feed into the number 6 spot on the Arduino

Step 9: Begin Testing Connections Between Sound Sensor, LEDs and Arduino

Sound Sensor

  • Pins will come unattached, make the decision outright if pins are desired in final design or soldering wires to the chip for a more secure connection. If soldering is desired, remember to size and place shrink tube on the wire before soldering the connection.
  • It is always wise to connect Ground first
  • GND ===> 2nd GND on Arduino (Black wire)
  • VDD ===> RES on Arduino (Yellow Wire)
  • OUT ===> AO on Arduino (Green Wire)
  • Face Conductor on Breadboard indirection listed on the sides, positive leg to positive and negative leg to negative.

Step 10: Soldering

It is time to solder connections to the solderable Breadboard. Refer to your maps and steps to make sure everything is in the correct place before soldering.

Be sure to place shrink tube on wires before soldering to strengthen the wires.

Step 11: Building the Crown

  • Using a bag of 6.8K Ohm Resistors, I soldering them together to make the crown. This is where it could get exciting, make decisions based on color desires and aesthetically pleasing choices of electrical components.
  • Starting with long necklaces, I made two rows before soldering them together in the middle.
  • There is a long wire coming out of the resistors, the decision can be made to trim off as much or not according to the taste of the builder.
  • I made two rows, I believe three or more would be better for stability; this part is very flexible.

Step 12: The Feather

Building the feather with wire:

  • A higher gauge wire down the middle will provide for better stability.
  • I used a mixture of stereo wire and tarnish free craft wire, there are tons of color possibilities here.
  • The stereo wire is hard to solder, I had to use a Bristol pad and score the outside to ensure a solderable connection.
  • Don't be stuck on making just one feather, if the crown is more stable, add in more feathers to make a more elaborate headpiece.

Gold:

https://www.amazon.com/gp/product/B003N0PFNG/ref=o...

Silver:

https://www.amazon.com/gp/product/B00JIRJDFO/ref=o...

Copper:

https://www.amazon.com/gp/product/B002ZFEFB8/ref=o...

Step 13: Assembly

Assembling everything together:

  • Between the Arduino and the Breadboard, I decided on a barrier of cotton since it is a poor conductor of electricity.
  • Using wire, I wired together the Arduino and breadboard.
  • The sound sensor is also connected by wire
  • I used electric tape to hold some of the wires together for a more cleaned up look (shrink tube can be used instead).
  • I also used electrical tape to hold the battery pack in place behind the breadboard.

Share

    Recommendations

    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Paint Challenge

      Paint Challenge
    • Backyard Contest

      Backyard Contest

    Discussions