A VU meter project was on my to-do list for a very long time.
Finally found some time to make it happen.
And while I was busy, why not just try to make a big one with some other effects included :)
Step 1: What Can It Do?
A video about all it's functions Bluetooth controlled.
From 0:00 - 1:47 : switching between 3 different VU meters.
From 1:47 - end : switching between 5 other light effects.
More functions might be added in the future.
Step 2: What Do You Need?
- Arduino Uno (Arduino Mega will also work, but do not use Arduino Nano)
- Neopixel strip or individual Neopixels to make your own strip. LED type used here: WS2812B
- Arduino mic module. I used the one showed in the picture, not sure how other types will affect the end result.
- Arduino bluetooth module hc-05
- 5V DC power supply, amperage will depend on how many Neopixels you use. (More about this later)
- Some switch to turn power supply ON and OFF
- 470R resistor
- 1K resistor
- 2K resistor
- 1000 µF, 16V capacitor
- Android device (phone or tablet)
Step 3: Ledstrip or Pixels?
This step is not really necessary.
It's much easier to buy a premade ledstrip, but in my case, I only had pixels laying around.
I drilled holes in a piece of wood to have some sort of template.
This template makes it much easier to solder all pixels in a straight line with equal spacing.
Each pixel has 6 pins,
Below u can find a example how to connect them to each other. (only 2 LEDs in this example)
--------[5V 5V]-------------------------[5V 5V]----------------------
------[Din Dout]--------------------[Din Dout]------------------
------[GND GND]------------------[GND GND]-----------------
I used 84 leds in total,
You can make your strip shorter or longer. (But the arduino sketch will need a modification, more about this later)
Step 4: Connecting Neopixels and Power Supply to the Arduino
I used a 5V DC power supply to power the Arduino and Neopixels. (USB port can't deliver enough power)
The amperage of this power supply will depend mostly on how much leds there are in your ledstrip.
Each individual NeoPixel draws up to 60 milliamps at maximum brightness (white),
for this project the leds will not be on all together at max brightness, but better be safe and calculate with max value
I used 84 Neopixels: 84x 60mA = 5040mA = ~5A
(+ keep in mind, also the arduino itself will take a little bit of power)
So in my case, I chose a power supply that can deliver more than 5A.
-If you want to upload a new sketch to the arduino, make sure to turn off this power supply before connecting the USB cable between PC and Arduino!! (Never connect both at the same time)
-The order of pins on your ledstrip may be different than in above shematic, look at the text printed on your ledstrip and make the correct connections.
Power supply GND -> Arduino GND and ledstrip GND
Power supply 5V -> arduino 5V and ledstrip 5V
Arduino pin6 -> 470R -> ledstrip Din
- Adding a ~470 ohm resistor between the Arduino's data pin and
the data input on the ledstrip can help prevent spikes on the data line that can damage your first pixel.
- The 1000uF cap is there to prevent the initial onrush of current from damaging the pixels.
Step 5: Connect the Mic Module
I used 3V3 + AREF here, it gives better readings.
OUT module -> A5 arduino (ANALOG IN, 5)
GND module -> GND Arduino
VCC module -> 3V3 Arduino
3V3 Arduino -> AREF Arduino
Step 6: Test What We Have Created So Far.
Before continuing a little test can be done.
Upload this sketch to your arduino. (Make sure the power supply is disabled when doing this!)
If you have another amount of leds in your strip, just change the number in this line:
#define N_PIXELS 84
You will also need the adafruit neopixel library for arduino: Adafruit neopixel library
When the mic module is exposed to noise or music your ledstrip should behave as a VU meter now. (Same as in the video)
Step 7: Connecting the Bluetooth Module
Note: Your Bluetooth module may have a different pinout. Follow the text on your module.
- I used SoftwareSerial in my arduino sketch -> SoftwareSerial bluetooth(10, 11); so the communication is done through pin 10 and 11.
- The Bluetooth module does communication at 3.3V level, 2 resistors are used as voltage devider to turn 5V into 3.3V
GND module -> GND arduino
5V module -> 5V arduino
module TX -> PIN10 arduino
module RX -> voltage devider -> PIN11 arduino
Step 8: Arduino Sketch
This the full arduino sketch, with 3 VU meters + 5 other ledstrip effects + Bluetooth control.
Changing the number of used leds happens in the same line as before #define N_PIXELS 84 (Try to use a even number, I didn't test odd numbers. VU meter 2 and 3 may have 1 pixel offset)
You will need the "Adafruit Neopixel" and "Fastled" library for arduino.
You can find them here:
When uploaded in the arduino, nothing will happen, you need the android app from next step to start one of the effects.
Step 9: Bluetooth App
How to install:
- Find a android phone or tablet that has Bluetooth.
- Copy the .apk file on this device. (in the downloads folder for example)
- In the security settings of your device, toggle ON " unknow sources, allow app installation from unknown sources"
- Now you will be able to find the .apk file on your device and install it.
- After installation, turn OFF the security setting again.
How to use:
- First make sure Bluetooth is enabled on your phone or tablet.
- Also turn ON the power supply for arduino and ledstrip.
- Find the new icon on your device, called: VUmeter controller
- Open it.
- The app should look like the picture added here.
- Push the gray button "Choose device to connect to"
- Now you will see all bluetooth devices it can connect with, choose the one from this project.
- If the connection is succesfull, the "Not connected" text in the app will change in "Connected"
- The app is now ready to use, push the green buttons to choose a lighteffect.
Step 10: Building a Housing.
I used an old TL lamp for this, but you can use whatever you want.
Showing your creations below would definitely be appreciated!
- In the future, more features may be added.