Simple LED Strip Party Lights Using Arduino

by vamsikurre in Circuits > Arduino

5589 Views, 39 Favorites, 0 Comments

Simple LED Strip Party Lights Using Arduino

color organ1

Inspired by https://www.instructables.com/id/How-to-build-your-own-LED-Color-Organ-Arduino-MSGE/

project by GreatScottLab

I could not find all those parts so I ordered a brake out board for MSGEQ7 chip and used it in my build. It also has 3 MOSFETS for RGB led strip.

MSGEQ7 is a 7 band graphic equalizer it divides the music spectrum in to 7 bands and gives the sound in each band at the specific time. you can find data sheet of the chip at Link

Parts Needed

_DSC7789.JPG
_DSC7800.JPG
_DSC7795.JPG
_DSC7798.JPG
_DSC7816.JPG

1. MSGEQ7 brake out board Link or Link(if you can make your own MOSFET board)

2. Arduino

3. RGB led strip

4. 3.5mm audio splitter

5. Some jumper wires

6. 12v power supply (for LED strip)

7. 5v power supply (for arduino)

I also made an instructable to convert pc power supply easily to bench power supply that can output 5v and 12v

Wiring

56c094a34fbade858a0003d6.jpeg
_DSC7803.JPG
_DSC7813.JPG
_DSC7814.JPG

brake out board I got has following pins

  • OUT (output of MSGEQ7)
  • STR (Strobe Pin of the MSGEQ7)
  • RST (Reset Pin of the MSGEQ7)
  • VDD (5v input)
  • GND (Ground)
  • S1 (base of 1 MOSFET)
  • S2 (base of 2 MOSFET)
  • S3 (base of 3 MOSFET)

PIN connection to Arduino are as follows

MSGEQ7 Board Arduino
OUT ANALOG PIN 0
STR DIGITAL PIN 7
RST DIGITAL PIN 8
VDD 5V FROM ARDUINO
GND GND
S1 DIGITAL PIN 9
S2 DIGITAL PIN 10
S3 DIGITAL PIN 11

positive and negative of the board connects to 12v and ground for powering LED strip.

Coding

_DSC7801.JPG

Reset pin has to change from high to low to start the output of the multiplexer from the beginning

Strobe pin has to be low to get the first value of frequency band

after reading band strobe pin has to be pulled up for reading next frequency band

I am doing some filtering to ignore noise from the chip.

and mapping the values to PWM signal of LEDs

int analogPin = 0; 
int strobePin = 7;
int resetPin = 8; 
int ledred = 9;   
int ledgreen = 10;
int ledblue = 11; 

int spectrumValue[7];
int filter = 100;    

void setup() {

  Serial.begin(9600);        
  pinMode(analogPin, INPUT);  
  pinMode(strobePin, OUTPUT);
  pinMode(resetPin, OUTPUT); 
  pinMode(ledred, OUTPUT);  
  pinMode(ledblue, OUTPUT);
  pinMode(ledgreen, OUTPUT);
  digitalWrite(resetPin, LOW);
  digitalWrite(strobePin, HIGH);
}

void loop() {

  digitalWrite(resetPin, HIGH);
  digitalWrite(resetPin, LOW);     
  for (int i = 0; i < 7; i++) {    
    digitalWrite(strobePin, LOW);  
    delayMicroseconds(30);         
    spectrumValue[i] = analogRead(analogPin);
    if (spectrumValue[i] < filter) {
      spectrumValue[i] = 0;
    }
    spectrumValue[i] = map(spectrumValue[i], 0, 750, 0, 255);
    digitalWrite(strobePin, HIGH);

    Serial.print(spectrumValue[i]);
    Serial.print(" ");
  }

  int redvalue = (spectrumValue[0] + spectrumValue[1] + spectrumValue[2]);
  int greenvalue = (spectrumValue[3] + spectrumValue[4]);
  int bluevalue = (spectrumValue[5] + spectrumValue[6]); 

  if (redvalue > 255) 
  {
    redvalue = 255;
  }
  if (greenvalue > 255)
  {
    greenvalue = 255;
  }
  if (bluevalue > 255)
  {
    bluevalue = 255;
  }
  
  Serial.print(redvalue);
  Serial.print(" ");
  Serial.print(greenvalue);
  Serial.print(" ");
  Serial.print(bluevalue);
  Serial.println();
  
  analogWrite(ledred, redvalue);  
  analogWrite(ledgreen, greenvalue);
  analogWrite(ledblue, bluevalue);
}


Finishing

color organ2

This Led strip can be easily installed in suspended sealing

and I am planning to get some individually addressable LED strips to make 7 band equalizer to hang it on wall.