How to Make DIY Music Reactive RGB LED Ring (WS2812B) Using Visuino

by RonFrtek in Circuits > Arduino

199 Views, 1 Favorites, 0 Comments

How to Make DIY Music Reactive RGB LED Ring (WS2812B) Using Visuino

How To Make DIY Music Reactive RGB LED Ring (WS2812B) using Visuino

In this tutorial we are going to make music reactive lights using Arduino Nano ESP32 board with Neopixels LED ring & microphone module using Visuino.

Every time the sound is detected the LEDs will move and randomly change colors.

In case you do not have the microphone module I will also add a step at the bottom to make the project without it.

Watch the Video!

What You Will Need

microphone.jpg
nanoesp32.jpg
Adafruit-1643-30091150-01.jpg
VisuinoAdvrtisemenM5StackCoreS3.jpg
breadboard.png
F5OFEUQJJ4ZYFKY.LARGE.jpg
  • Arduino Nano ESP32 (or any other board)
  • Microphone module (Optional)
  • Neopixels LED ring
  • Breadboard
  • Jumper wires
  • Visuino program: Download Visuino


The Circuit

2023-12-24_14-29-16.jpg
  1. Connect LED Ring pin [VCC] to Arduino pin VBUS or 5V]
  2. Connect LED Ring pin [GND] to Arduino pin [GND]
  3. Connect LED Ring pin [IN] or (DI) to Arduino digital pin [6]
  4. Connect Microphone module pin [VCC] to Arduino pin [VBUS or 5V]
  5. Connect Microphone module pin [GND] to Arduino pin [GND]
  6. Connect Microphone module pin [DO] to Arduino digital pin [2]

Calibrate the Microphone

microphone2.jpg

Slowly rotate the trimmer until the second LED is off, and turns ON only if you make a sound.

Start Visuino, and Select the Arduino Nano ESP32 Board Type

select-board-uno.jpg
2023-12-04_15-31-44.jpg

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino Nano ESP32" as shown on Picture 2

In Visuino Add Components

F9EMMVDL9H2QTQT.jpg
FBMEN73L9H2QTQW.jpg
FOXNFWAL9H2QTQV.jpg
  1. Add "Clock Multi Source" component
  2. Add "Random Color" component
  3. Add "NeoPixels" component


In Visuino Set Components

2023-12-24_14-13-01.jpg
2023-12-24_14-13-20.jpg


  • Double click on the "NeoPixels1" and in the "PixelGroups" window drag "Running Color" to the left
  • On the left side of the "PixelGroups" window then select "RunningColor1" and in the properties window set "Count Pixels" to 12 or 16 (Depends on how many LED your LED ring is having)
  • Close the "PixelGroups" window


In Visuino Connect Components

2023-12-24_14-02-40.jpg
nano-ledring.png
  1. Connect Arduino digital pin [2] to "ClockMultiSource1" pin [In]
  2. Connect "ClockMultiSource1" pin [0] to "RandomColor1" component pin [Clock]
  3. Connect "RandomColor1" pin [Out] to to "NeoPixels1" >RunningColor1 component pin [Color]
  4. Connect "ClockMultiSource1" pin [1] to to "NeoPixels1" >RunningColor1 component pin [Step]
  5. Connect "NeoPixels1" component pin [Out] to Arduino digital pin[6]


Generate, Compile, and Upload the Project

2023-12-04_15-36-46.jpg
  • In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.


Play

After uploading the project to the Arduino Nano ESP32 the RGB LED ring will start to randomly change colors according to the detected sound by the microphone module.

Congratulations! You have completed your LED project with Visuino. Also attached is the Visuino project, that I created for this Tutorial. You can download and open it in Visuino: https://www.visuino.com

Project Without the Microphone

2023-10-07_13-28-22.png
2023-12-25_15-31-37.jpg

Add "Pulse Generator" component and connect pin [Out] to "ClockMultiSource1" pin [In]

Select "PulseGenerator1" and in the properties window change the "Frequency" value to adjust the speed

Tips

Place the microphone module near the speaker of a radio,phone or TV.