• hmxmghl Created Project

    07/12/2016 | 3:31am

Loading Items

About This Project

Hi fellows. In this project I will instruct you to sync Adafruit NeoPixel LED strips with music using Arduino. What we do is we will take Fourier Transform of our music input. The Fourier transform will return the current frequency bands in each rotation of Arduino loop(). Using the values of frequency band between minimum and maximum range, we will code Arduino to light up specific portion of strip for specific frequency band. You will definitely enjoy learning this interesting makeable.

Request Access

Project Info

  • Status:DIY How-To
  • Published:July 12, 2016
  • Owner:hmxmghl
  • Category: Art

Skills

  • Arduino
  • Breadboard
  • Overall

Meet The Makers

Join Team
  • hmxmghl
    • User:hmxmghl
    • Rank:Journeyman
    • Projects:10
    • Joined:2016

No Comments yet. Why don't you add one?

.Introduction

.Basic Concept:

In this project, we will make Adafruit NeoPixel LED strips to sync with music. Basic concept of Digital Signal Processing is used in this project. We will take Fourier transform of the music signal to extract the frequency bands. As Arduino loop() rotates continuously so it will return new frequency band at instant with every rotation. The NeoPixel strips, that I used, have 300 LEDs. Your NeoPixel strip might have different number of LEDs. So, for coding purpose, we will split the 300 LEDs in portions. For each frequency band specific portion of LEDs is associated with it so when Arduino reads that band, associated portion will light up. In this way, we will code Arduino for all frequency bands and associate portion of LEDs to each band.

.Instruction

Here is the step by step procedure that you need to follow to achieve the complete music reactive system:

.1. Downloading Software

Arduino IDE: https://www.arduino.cc/en/Main/Software

.2. Installing Libraries

You need to install fast Fourier transform & Adafruit NeoPixel Library. Links to download libraries are:

Here is the YouTube video guide to install libraries in Arduino IDE: https://youtu.be/Zdxz3YUd1S8

.3. Hardware Requirements

  • Arduino (UNO , Mega or any other board but performance varies with board processing speed)
  • Adafruit NeoPixel strips (you can use different models such as ws2811 or ws2811b but keep track of RGB and GRB parameters difference)
  • Audio Jack
  • Power Source
  • Breadboard
  • Connecting Wires

.4. Making Connections

In the below image, connections are shown. Connect according to image and also follow the instruction written below image:

  • Analog Read (A0) in is from the audio jack (mono) or if you are using stereo audio jack then use only left or right channel of jack .

  • You will need to power NeoPixel strips separately that is not shown in schematic due to lack of availability of digital prototype.
If you find above image vague, then get guideline from the Eagle schematic below:

Note: Ignore the unused pin (Data out) in above schematic because we don't need to cascade strips here. And for the safety of Arduino board, try to power NeoPixel modules by external power source.

.5. Coding Arduino

This is a real work in this project that needs your attention. As described earlier, we divide our strip into small portions. In my case, I am using strip of 300 LEDs and band range of frequency spectrum is from 0 to 12. Values from 0 to 6 indicate bass while values from 7 to 12 indicated treble. Now, we will code Arduino in such a way that we associate each value with specific portion of LEDs. I am dividing 300 LEDs into small portions of 23 LEDs which means in this way I could cover all 300 LEDs with values from 0 to 12. Well-commented code is attached in the script files section. You can get it from there.

Test the sketch and make changes in the conditional and repetition flow loops to change the effect of glow. Don't forget to share your experience in the comments section. Enjoy!

YouTube link to demo video: https://youtu.be/e7h0npS5LeA

  Details Downloads Size Get it

NeoPixelSpectrumReactive_ArduinoCode

Last updated on 07/12/2016

by hmxmghl

499 10.1kb
Qty   Item Where to Find Est. Cost More Info
1 Arduino Uno

Arduino Uno

$16.06 3 links  
1 Arduino IDE v2.2

Arduino IDE v2.2

The open-source Arduino S

$30 1 file  
 
Arduino Pic

Arduino Pic

Updated 2/24/2017 by aaronbday
8 Humidity Sensor  Item Number: DHT11

Humidity Sensor

Item #: DHT11

1,Supply Voltage: +5 V 2,

$6 1 file  
 
dht11 datasheet

dht11 datasheet

Updated 10/28/2016 by jamesshawver1
1 Soil sensor

Soil sensor

$1.03 1 file  
 
Datasheet

Datasheet

Updated 12/22/2016 by swym_admin
1 4 channel Relay

4 channel Relay

$7.69