Arduino Party Lights

by mkarvonen in Circuits > Arduino

8836 Views, 132 Favorites, 0 Comments

Arduino Party Lights

kansi.jpg
output_YrJO6p.gif
ezgif.com-video-to-gif.gif
Arduino party light

Now this is a multipurpose project. Use it as a party light OR as a gig booster.

Adding colors and manipulating the light sequence is easy thing to do.

Check the video to see the project in work.

If there is a VOTE patch on the right side of the project site, throw me a vote if you want :)

Components

DSCN6764.JPG
DSCN6772.JPG

First thing first. Components.

Consider that this project can be done much smaller with Arduino nano or any small programming board. I made this with Arduino Uno for two reasons. 1. At the time i did not have any smaller programming board available and 2. I't is easier for beginner to make use of the Uno board by copying the work.

You will need:

Arduino board (anything you have, even a copy one).

10 kOhm resistor.

Two female plugs for audio in and audio out.

Neopixel led strip. Mine is 1 meter long and has got 30 led's.

Optional

Case (printable files in project)

Prototype shield. Just to keep everything nice looking.

Desing

Dwm 2015-06-01 16-04-17-35.jpg
Dwm 2015-06-01 16-04-26-20.jpg
pythonw 2015-06-01 16-04-09-17.jpg
pythonw 2015-06-01 16-04-07-32.jpg

The case was designed with Tinkercad. Simple and easy to use tool that works in your browser.

Check that out for some easy 3D designs.

Printing

DSCN6781.JPG
DSCN6782.JPG
DSCN6783.JPG
DSCN6784.JPG
DSCN6785.JPG
DSCN6786.JPG
DSCN6787.JPG
DSCN6802.JPG

The case was printed with Printrbot makers kit. Basic and cheap printer.

Settings for printer was 0.4mm nozzle, 0.2mm layer height, 40mm/s print speed.

Holes for the case are made in the printing. If the fit is snug in the holes just use file to make it fit.

Testing and Coding

DSCN6773.JPG
DSCN6774.JPG

The connections are pretty simple.

Put a resistor between GND and A0 to make the analog 0 by default. This helps Arduino to sense real thing and not just some interference made by radio signals etc.

Ground the ground from the plug to make it a part of Arduino.

Put left or right channel from the plug to Arduino A0

Put the led strip's +5 to VCC and GND to GND. Data cable goes to Arduino pin 6.

If you have any questions, just ask.

Note that you will need NeoPixel.h library. Find it from GitHub.

#include <Adafruit_NeoPixel.h>

#include <avr/power.h>

#define PIN 6

Adafruit_NeoPixel strip = Adafruit_NeoPixel(30, PIN, NEO_GRB + NEO_KHZ800);

void setup() { Serial.begin(9600); strip.begin(); strip.show(); // Initialize all pixels to 'off' }

void loop() { int sensorValue = analogRead(A0); Serial.println(sensorValue);//Just for the calipration

if(sensorValue > 10) { rainbowCycle(0); } if(sensorValue >30){

theaterChase(strip.Color(255,0,0),10); theaterChase(strip.Color(255,0,0),10); theaterChase(strip.Color(0,0,255),10); } if(sensorValue >40){ colorWipe(strip.Color(255,0,0),10); colorWipe(strip.Color(0,255,0),10); colorWipe(strip.Color(0,0,255),10); } }

//this makes the rainbow equally distributed throughout void rainbowCycle(uint8_t wait) { uint16_t i, j;

for(j=0; j<256*1; j++) { // 1 cycle 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<5; j++) { //do 5 cycles of chasing for (int q=0; q < 3; q++) { for (int i=0; i < strip.numPixels(); i=i+3) { strip.setPixelColor(i+q, c); //turn every third pixel on } strip.show(); delay(wait); for (int i=0; i < strip.numPixels(); i=i+3) { strip.setPixelColor(i+q, 0); //turn every third pixel off } } } }

// Fill the dots one after the other with a color void colorWipe(uint32_t c, uint8_t wait) { for(uint16_t i=0; i

Downloads

Test Fit

DSCN6765.JPG
DSCN6766.JPG
DSCN6767.JPG
DSCN6768.JPG
DSCN6788.JPG
DSCN6789.JPG

Solder pins to the shield if you use one.

Drop the Arduino in to the case to see it fits.

If it fits continue to next step.

If you use different Arduino than Uno. (Smaller or bigger does not matter.)

And need a design for the case. I can make one on my free time and send it to you via email. Unfortunately i really can't make the real print and send it to you because sending something from here Finland to some other country is really expensive.

Soldering

DSCN6769.JPG
DSCN6770.JPG
DSCN6771.JPG
DSCN6790.JPG
DSCN6791.JPG
DSCN6793.JPG
DSCN6792.JPG
DSCN6794.JPG
DSCN6795.JPG

Solder needed wires and hook up the shield to Arduino and hope for best.

The plugs are meant to keep the Arduino down in the case as seen in picture 4.

Final Assembly

DSCN6803.JPG
DSCN6804.JPG
DSCN6805.JPG

Insert the "Hook" if needed to the back side of the case. Use hot glue to keep it in place.

Then glue the bottom lid on to the bottom.

Done

DSCN6807.JPG
DSCN6797.JPG
DSCN6808.JPG
DSCN6809.JPG
DSCN6810.JPG
DSCN6796.JPG

Now the project is done. This is pretty much there is to make. Now you will just have to thing where to use it.

Next few steps are just examples where to use it.

Power the board from USB or a Battery. Any battery works great. 9V battery lasts about an hour.

Option One

DSCN6906.JPG
DSCN6907.JPG
DSCN6913.JPG
DSCN6909.JPG
DSCN6910.JPG
DSCN6911.JPG
DSCN6912.JPG

Use the box to enchant your speaker setup. Light looks really nice.

Making you favorite colors is easy by just changing the (R-G-B) from the code. Where 0 is no light on and 255 is full light.

Option Two

DSCN6775.JPG
DSCN6776.JPG
DSCN6778.JPG
DSCN6779.JPG
DSCN6780.JPG
DSCN6811.JPG
DSCN6812.JPG
DSCN6816.JPG
output_aWPFSU.gif
wmplayer 2015-06-15 15-14-03-61.jpg
wmplayer 2015-06-15 15-15-25-92.jpg
wmplayer 2015-06-15 15-15-27-02.jpg
wmplayer 2015-06-15 15-15-37-56.jpg
wmplayer 2015-06-15 15-15-37-72.jpg
wmplayer 2015-06-15 15-15-37-92.jpg
wmplayer 2015-06-15 15-16-14-84.jpg
wmplayer 2015-06-15 15-16-29-98.jpg
wmplayer 2015-06-15 15-16-30-18.jpg

Make a awesome gig enchanter. Just sew the led strip on the guitar/bass strap and rock on!

Or for drummers, throw this inside the bass drum and wait for the applause. Musicians benefits are guaranteed ;)

Thanks for reading :)

If you have any questions i will try to answer them :)