Introduction: Simple LED Strip Party Lights Using Arduino

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

Step 1: Parts Needed

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

Step 2: Wiring

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 BoardArduino
OUTANALOG PIN 0
STRDIGITAL PIN 7
RSTDIGITAL PIN 8
VDD5V FROM ARDUINO
GNDGND
S1DIGITAL PIN 9
S2DIGITAL PIN 10
S3DIGITAL PIN 11

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

Step 3: Coding

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);
}


Step 4: Finishing

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.

Comments

About This Instructable

2,348views

36favorites

License:

More by vamsikurre:Simple LED strip party lights using arduinoArduino Android USB serial communication with OTG cableRepair and upgrade dodgy mouse
Add instructable to: