Project tutorial
UV METER (Music Visualizer) #1 With Arduino

UV METER (Music Visualizer) #1 With Arduino © LGPL

This is part one of the music visualizer series. In the following tutorial, we are going to make a music visualizer.

  • 3,351 views
  • 1 comment
  • 9 respects

Components and supplies

Apps and online services

About this project

CONSTRUCTION:

1: Watch the video

Watch the video first so that you can also build it easily:

do watch the video so that you can replicate it easily

Start by inserting the LED on the breadboard with the negative leg of the LED to a common ground rail of the breadboard (LED count = 20). The positive leg of the LED will be there at any empty rail of the breadboard as shown in the video and following pictures.

Then connect the ground of the Arduino to the common ground rail of the LED. Start from the pin 22 of the Arduino Mega and the flow is shown below:

ARDUINO PIN ___ LED COUNT

  • 22 ___ 1
  • 23 ___ 2
  • 24 ___ 3
  • 25 ___ 4
  • 26 ___ 5

(this follows starting from pin 22 of Arduino and ending at pin number 41 of the Arduino Mega)

  • 1 ___ 20

2: Audio Jack

The music source is the main thing in the following project. As you have seen in the following video that I have used a audio splitter which will split the aux cable data into two parts: one is for our circuit and the other one with which we can connect to the music system.

The connections for audio input follows as:

  • Ground of the aux cable will go to the ground of the Arduino.
  • Left or right channel of the aux cable will go to the A0 analog input of the Arduino Mega

3: Adding the Potentiometer

The potentiometer is used to increase or decrease the sensitivity of the music UV meter. The connection for the potentiometer are as:

  • 1st Pin___________GROUND
  • 2nd Pin___________A1 of Arduino
  • 3rd Pin___________+5v or vcc

In the code, we have also used the following command lines to the potentiometer to be worked as the sensitivity adjustment.

potval=analogRead(A1);
output = analogRead(music);
potval=map (potval,0,1024,5,40); 
output = output/potval;

4: Uploading the code

After the construction on the breadboard, we can upload the following code by using the Arduino IDE.

5: Creating a PCB

After a complete test of the following circuit, we can construct the same circuit much more stable on the PCB. For that repeat the same process of the connecting the LED on the PCB and solder the common ground layer. Then connect the audio jack left or right channel and the ground to the A0 and ground

Then for the sensitivity use to pot. The basic idea you can get from the above video and the rest of the things are how creative you can apply the concept.

Code

UV meter code for arduinoArduino
upload the following sketch through the arduino ide software
//////////////////CREATED BY KJ ELECTRONICS///////////////////////////;
////////////FOLLOW ME ON YOUTUBE BY CLICKING THE LINK BELOW////////////
///////  https://www.youtube.com/channel/UCZE35bOktFxu8dIadxuQPLg /////

int music = A0;
int output,a;
int potval=A1;
int number_of_led[20] = { 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,32,33,34,35,36,37,38,39,40,41}; // Assign the pins for the leds
void setup()
{
for (a = 0; a < 20; a++)  
  pinMode(number_of_led[a], OUTPUT);
}

void loop()
{
potval=analogRead(A1);
output = analogRead(music);
potval=map (potval,0,1024,5,40);
output = output/potval;   

  if (output == 0) 
   {
   for(a = 0; a < 20; a++)
     {
     digitalWrite(number_of_led[a], LOW);
     }
  }
  
  else
  {
   for (a = 0; a < output; a++)
    {
     digitalWrite(number_of_led[a], HIGH);
    }
    
    for(a = a; a < 20; a++) 
     {
      digitalWrite(number_of_led[a], LOW);
    
     }
  }
}

Schematics

14_JLvDWhi6Yo.jpg
14 jlvdwhi6yo

Comments

Similar projects you might like

Sigfox kWh Meter

Project tutorial by jassak

  • 6,117 views
  • 7 comments
  • 15 respects

Stereo NeoPixel Ring VU Meter

Project showcase by ericBcreator

  • 29,175 views
  • 268 comments
  • 70 respects

Local and Remote Programmable Robotic Arm

Project tutorial by MJRoBot

  • 17,974 views
  • 7 comments
  • 54 respects

Arduino 101 Connects with Raspberry Pi Zero W

Project tutorial by Alexis Santiago Allende

  • 8,195 views
  • 0 comments
  • 17 respects

Infinity Mirror VU Meter Music Equalizer

Project showcase by TheTNR

  • 5,437 views
  • 4 comments
  • 27 respects

DIY UV Meter With Arduino and a Nokia 5110 Display

Project tutorial by Nick Koumaris

  • 1,418 views
  • 0 comments
  • 10 respects
Add projectSign up / Login