deltakilo
Published © GPL3+

VU Meter for Audio Signal (dBu) using LCD

Simple VU meter to display audio level (dBu) on 16x2 LCD using LiquidCrystal_I2C driver library.

IntermediateFull instructions provided14,856
VU Meter for Audio Signal (dBu) using LCD

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Solderless Breadboard Half Size
Solderless Breadboard Half Size
×1
Resistor 100k ohm
Resistor 100k ohm
×2
Through Hole Resistor, 22 kohm
Through Hole Resistor, 22 kohm
×1
Capacitor 100 nF
Capacitor 100 nF
×2
Jumper wires (generic)
Jumper wires (generic)
×1
I2C 16x2 Arduino LCD Display Module
DFRobot I2C 16x2 Arduino LCD Display Module
×1

Story

Read more

Schematics

LCD_VU Sketch

This is the wiring schematic sketch file using Fritzing

Wiring Schematic

This is the wiring schematic diagram

Code

Sample program of using LCD_VU

Arduino
/***************************************************
 * This is an example on using LCD_VU.
 * This example has been created using Arduino Uno 
 * 
 * You will need LiquidCrystal_I2C library in your system
 * 
 * Aug 10th, 2020
 * *************************************************/

#include <LCD_VU.h>

/****************** Definition for audio input pins *******************/
#define pinAudioLeft    A3
#define pinAudioRight   A2

/******************* LCD declaration **********************
 * 1st argument: address of LCD with I2C backpack, this address may vary between LCD device
 * 2nd argument: number of columns
 * 3rd argument: number of rows
 * 4th argument: analog pin for audio input left channel
 * 5th argument: analog pin for audio input right channel
 * ********************************************************/
LCD_VU lcd (0x127, 16, 2, pinAudioLeft, pinAudioRight);

void setup() {
    // Activate Serial if you want to debug or calibrate
    Serial.begin(9600);

    // You need to call this method to initialize LCD_VU
    lcd.init();
    
    /****** The introduction block ******/
    lcd.setCursor(0,0);
    lcd.print("* dBu VU meter *");

    lcd.setCursor(0,1);
    lcd.print("--");
    lcd.print(lcd.getVersion());
    lcd.print("--");

    delay(2000);
    lcd.clear();
    /****** End of The introduction block ******/

    /**** call this method to calibrate the VU meter ****
    * No need to call this method if with using standard values,
    * display has been displayed properly.
    * Default value are (as measured in my test environment)
    * - vRef = 1500mV
    * - vCenter = 450mV
    * - vOffset = 315mV
    * 
    * The values below are only for an example, you need to
    * do measurement using voltmeter on the points mentioned below 
    * to get better accuracy. 
    * 
    * 1st argument: reference voltage (in millivolt/mV) at pin AREF
    * 2nd argument: center voltage at voltage divider (in mV)
    * 3rd argument: offset voltage, check voltage at Serial printout 
    *               when audio input is connected to ground. Use 
    *               absolute value only (remove negative sign).
    *               You need to activate Serial for this purpose. 
    * ***************************************************/
    // Unremark the following codes if you need it
    
    // use this if necessary, values are only for sample
    //lcd.setReference(1800, 800, 200); 
    
    // or if you need only to set offset value, and keep the rest the same
    //lcd.setReference(VREF, VCENTER, 200);
}

void loop() {
    // call this method to refresh data readings and display VU meter
    lcd.loop();
}

LCD_VU library

This is the library to be used in building VU meter using LCD. You need to include the library in the code. Example on how to use the library is provided, along with documentation on how to do calibration and also references.

Credits

deltakilo

deltakilo

0 projects • 1 follower
weekend programmer who has interest in audio recording, mixing and mastering as well as photography, video recording and post production

Comments