element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Photonics
  • Challenges & Projects
  • Project14
  • Photonics
  • More
  • Cancel
Photonics
Blog Arduino MSGEQ7 Light Organ - high power LED banks for your backyard party
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Photonics to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: robogary
  • Date Created: 14 Mar 2020 2:37 PM Date Created
  • Views 5128 views
  • Likes 11 likes
  • Comments 23 comments
  • photonicsch
  • arduino
Related
Recommended

Arduino MSGEQ7 Light Organ - high power LED banks for your backyard party

robogary
robogary
14 Mar 2020

This is a LED light Organ project meant for summertime evening fun.

 

Imagine grilling on your house deck, patio, or beachfront..........relaxing (or rockin' and rollin' ) with a stereo playing,

and 100+ feet (35 meters) of deck railing ( backyard fence or yard ) bursting in a multitude of LED colors to the tunes,

lighting up the night sky.

 

That is the goal of this project.....just watch :-)

 

https://youtu.be/NHUzB_AjNY0

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

5M LED strips are relatively inexpensive, wickedly bright , can be bought in a wide variety of colors and in waterproof versions.

 

So here we go on how it works:

 

The MSGEQ7 graphic equalizer IC inputs mono audio signal ( a stereo input jack is used and sums the left and right side together) , sorts out the audio into 7 different frequency bands, and provides an analog output of the the amplitude of the selected frequency band.

This output band desired is selected by the Arduino, and the MSGEQ7 analog output read by the Arduino.

The Arduino compares the analog input level to a threshold setting, if the amplitude exceeds the threshold, the output turns on the MOSFET, driving the LED bank. The 7 band scan scan is so fast, the process appears continuous.

The Arduino can sweep thru the 7 channels so fast, there are some delays intentionally set for the MSGEQ chip read/write timing.

 

The number of LED banks that can be used (power limit) is dependent on the 12V power supply, MOSFET current, and wire size of the power circuit.

This can get really big as is , and even bigger with little change and no sweat. 

 

Note the pushbutton for test mode, that can be activated at any time. It is very helpful in troubleshooting, or just putting on a short light show itself.

image

imageimage

 

short Video of the LED Light Organ using a 20Hz-20kHz audio test file played by ipod

https://youtu.be/gk0YhrchxXU

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

short Video of the LED Light Organ using an example audio test file played by ipod

https://youtu.be/QiQ49bj-sWE

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Code:

/*

 

  Test 3 is based on Test2Working is showing the MSWGEQ7 is reading an analog input from a ipod earphone jack, and providing volts from the multiplexor.

  -> added pot to analog input 1 for threshold adjust on LED trigger

  -> add a PB to D6 to run a test routine that strobes the lights

 

  control interface to MSGEQ7 IC

  strobe control for equalizer bands, read in multiplexed voltage per band, drive outputs LEDs

 

  Arduino D4 wires to MSGEQ7 pin 4 strobe

  Arduino D5 wires to MSGEQ7 pin 7 reset

 

  all ins have pull ups

 

  Arduino D7 = 63Hz LED , LOW = ON

  Arduino D8 = 160Hz LED

  Arduino D9 = 400Hz LED

  Arduino D10 = 1kHz LED

  Arduino D11 = 2.5 kHz LED

  Arduino D12 = 6kHz LED

  Arduino D13 = 16kHz LED

 

  Arduino A0 wires to MSGEQ7 pin 3 Vout

 

*/

int BandMagnitude[8];

int Vin =0 ;

int LEDThreshold = 500;

int strobeBit=1;

int pausetime =1000;

 

 

// the setup function runs once when you press reset or power the board

void setup()

{

  Serial.begin(9600);          //  setup serial

 

  // initialize digital output pins for LEDS.

  pinMode(13, OUTPUT);

  pinMode(12, OUTPUT);

  pinMode(11, OUTPUT);

  pinMode(10, OUTPUT);

  pinMode(9, OUTPUT);

  pinMode(8, OUTPUT);

  pinMode(7, OUTPUT);

 

  // initialize digital output pins for strobe and reset MSGEQ7

    pinMode(5, OUTPUT); //reset MSGEQ7 WHEN HIGH, LOW enables STROBE

    pinMode(4, OUTPUT); //strobe MSGEQ7 output, edge triggered LOW is active state for strobe

 

 

// defines and intehger array for the 7 band values, array location 0 is unused

 

 

   pinMode(6, INPUT_PULLUP); //tie pin D6 to ground to run the strobe LED routine

 

int BandMagnitude[8];

int Vin =0 ;

}

 

 

// the loop function runs over and over again forever

void loop()

 

 

{

  // initialze the strobe and reset after every scan to ensure synchronization

 

    initializeMSGEQ7 ();

    //delay (1);

     delayMicroseconds(100); // minimum delay is 72 usec for strobe reset

     LEDThreshold = analogRead(1) ;

 

    for (int i=1; i <= 7; i++)

     {

       digitalWrite(4, LOW);   // strobe is edge trigger LOW active

        delayMicroseconds(30); // minimum delay is 18 usec for strobe reset

      // delay (1);

       Vin = analogRead(0) ;

      BandMagnitude[i] = Vin ;

       digitalWrite(4, HIGH);   // strobe off,  strobe is edge trigger LOW active

//          Serial.println("BandMagnitude[i] =");             // debug value

//          Serial.println(BandMagnitude[i]);             // debug value

  //         Serial.println("[i] =");             // debug value

  //         Serial.println(i);             // debug value

       if (BandMagnitude[i]>LEDThreshold)

          { digitalWrite((6+i), LOW); }

       if (BandMagnitude[i]<LEDThreshold)  {digitalWrite((6+i), HIGH);}

    

           delayMicroseconds(30); // minimum delay is 18 usec for strobe reset

   //    delay (90); // delay time with strobe low for the next read cycle

 

}

strobeBit = digitalRead(6);

if (strobeBit == LOW) { strobe();}

//          Serial.println("BandMagnitude[i] =");             // debug value

          Serial.println("[strobebit] =");             // debug value

           Serial.println(strobeBit);

 

 

}

 

 

void initializeMSGEQ7 ()

{

   digitalWrite(5, HIGH);   // make RESET line HIGH

   digitalWrite(4, HIGH);   // turn on strobe bit

  delayMicroseconds(30); // minimum delay is 18 usec for strobe width

  digitalWrite(4, LOW);   // turn off strobe bit

   delayMicroseconds(1); // minimum delay is 100 ns

//   delay(1);

  digitalWrite(4, HIGH);   // turn off strobe bit

//  delay(1);

   digitalWrite(5, LOW);   // make RESET line LOW to enable the strobe line

delayMicroseconds(100); // minimum delay is 72 usec for strobe reset

// digitalWrite(5, LOW);   // make RESET line LOW to enable the strobe line

// delay (1);

//  digitalWrite(4, HIGH);   // turn off strobe bit (low is active)

// delay(1);

}

 

 

void strobe ()

{ pausetime=500;

   for (int j=1; j <= 15; j++)

   {

      pausetime=(pausetime/2);

       if (pausetime<8){pausetime=8;}

         for (int i=1; i <= 7; i++)

            { digitalWrite((6+i), LOW);

             delay (pausetime);

             digitalWrite((6+i), HIGH);

             delay (5);

            }

         for (int i=0; i <= 7; i++)

           { digitalWrite((12-i), LOW);

             delay (pausetime);

              digitalWrite((12-i), HIGH);

             delay (5);

             }

      }

   }

  • Sign in to reply

Top Comments

  • jc2048
    jc2048 over 5 years ago +3
    Good project. The graphic equalizer chip interfaces nicely to a NANO. If you interfaced it to addressable LED strips, you could make a giant, wall-sized equalizer display.
  • robogary
    robogary over 5 years ago +3
    Hi hobbit25 and dubbie Finally had a break in the weather, installed the light organ under the railings of the deck in back of my house. Here is a test run. https://youtu.be/NHUzB_AjNY0 Next Step is adding…
  • dubbie
    dubbie over 5 years ago +2
    Good project and I liked the light show. Hopefully at some point you will set it up outside and we can see it in full action. Dubbie
  • robogary
    robogary over 5 years ago in reply to hobbit25

    ebay

     

    Each color is enclosed in a ~ 3 foot clear plastic tube. Each tube has at least 6 feet of LED strips ( 2 rows of 3 feet) . Some rows are qty 3 1 foot (30 cm) lengths, some are 3 foot ( 1 meter )

    I dont have the exact supplier, but I order from China on the cheap, for example:

    https://www.ebay.com/itm/Waterproof-12V-30-120cm-Motorcycle-Underglow-Lights-LED-Strip-Fairy-Neon-Light/303511232959?var…

    https://www.ebay.com/itm/1pc-30cm-60cm-120cm-5050-Waterproof-White-Flexible-Led-Strip-String-Light-DC12V/263981766236?va…

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • hobbit25
    hobbit25 over 5 years ago in reply to robogary

    OK thanks.   Were did you source your LED lamps from?  

     

    I got an idea from a few videos to use white LEDs or strips, and then cover them in cellophane gift wrap of various colors. (colours, in Canada, eh?)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • robogary
    robogary over 5 years ago in reply to hobbit25

    That is the final code version

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • hobbit25
    hobbit25 over 5 years ago in reply to robogary

    Good idea.  I was looking at your test code above.  Can you please post the final code for the light organ?   I'd like to try building a unit.

     

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • akshitagupta15june
    akshitagupta15june over 5 years ago

    Have a look at my entry and please like and share #badass Woman Project Entry - Akshita Gupta

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube