Maker.io main logo

Setup a Graphic equalizer display using ESP8266-12, MSGEQ7 and WS2812

2016-08-01 | By Amir Avni

License: General Public License

I was looking for a fun project to do with those two items, one which can help me also to learn LUA script, the language that is used to program the ESP8266. Finally, I've created this project: An equalizer display controlled by ESP8266 with the NodeMCU firmware, where the equalizer colors are controlled via WiFi.

Aside from the aforementioned parts, you’ll need any device with a USB-to-serial module (TTL / FTDI or Arduino); an LM1117 voltage controller; a 3.5-mm AUX connector; 68-nF, 33-pF ceramic and 3x100-µF electrolytic capacitors; 200K-ohm, 2x15K-ohm, and 2x2, 20-ohm resistors; and a 20K-ohm potentiometer.

How to Setup a Graphic equalizer display

Flashing the ESP8266 V12

NodeMCU firmware runs on ESP8266 and allows the user to control the equalizer colors via Wi-Fi. To make the ESP8266 V12 start in flashing mode, a special powering/flashing circuit with the voltage regulator and connectors may be required. The latest version of NodeMCU supports the WS2812 library, and the baud rate should be set to 9600.

Connecting MSGEQ7

The MSGEQ7 chip uses analog filters on analog signals, meaning no delay is expected. Because this circuit has space for mistakes, it’s best to use the breadboard.

The ESP8266 gets its power through the voltage regulator, and the WS2812 LED strip takes 5V from the power jack with the capacitor for protection. Pin 15 is GND, GPIO12 - Strobe, GPIO2 - Reset, GPIO5 - LED Strip, ADC - Analog IN. It’s best to power MSGEQ7 with 5V, since 3.3V may cause noise.

Internet connection

The next step is to rewrite the Arduino code in Luascript so it will run on the ESP8266, and then add a Wi-Fi option to change the equalizer colors. The Wi-Fi code is based on Markus Gritsch’s code. Eventually the ESP8266 will connect to your router using a "info.txt" file, which has a string, "SSID:PASSWORD", of your router. When you enter the ESP’s IP address, you'll receive the page with colors to select from.

Note that it’s simple to change the ESP8266 mode to a hotspot mode, so a router isn’t required.

How to Setup a Graphic equalizer display

Source

Check out how to build the frame and find more details as well as demo videos.

TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum