|
GP1287 VFD Display |
x 1 | |
|
Arduino Nano R3 |
x 1 | |
|
Rotary Potentiometer, 10 kohm stereo |
x 1 | |
|
Resistor 10k ohm |
x 1 | |
|
Capacitor 10 µF |
x 1 | |
|
5V 2.5A Switching Power Supply |
x 1 |
|
arduino IDEArduino
|
|
|
Soldering Iron Kit |
Retro look Analog style VU meter on VFD display with Arduino Nano
A VU meter, also known as a Volume Unit meter, is a device used to display the audio signal level in decibels (dB) in real-time. It is commonly found on audio equipment to help users monitor and control audio levels. The analog VU meter typically consists needle-based indicators that move in response to the audio signal's intensity.
This time I will describe how to make such a device that uses a VFD (vacuum fluorescent display) instead of analog instruments.
In this particular case, the display is a GP1287 with a resolution of 256 by 50 points, and it can be obtained at a relatively cheap price. In one of my previous videos (https://www.youtube.com/watch?v=nvs09OfKzgc&t=18s) I described how to connect such a display to an ESP32 microcontroller, and this time the display is controlled by Arduino.
The device is extremely simple to build and contains only a few components
- Arduino Nano Microcontroller
- GP1287 VFD Display
- 10K potentiometer,
- and two capacitors and resistors
The signal from both audio channels (left and right) is brought to the analog inputs of the Arduino through coupling capacitors.
As for the code, I don't have much experience, so feel free to modify and improve it. It is basically based on the U8G2 library, because only this library has support for this kind of VFD display. Also note that when compiling the code you should use the U8G2 library given below. In the first few lines of code we can define the values of Gain, low sound, High Sound, as well as the speed at which the arrow returns to its original position. The sensitivity of the VU meter can be controlled with the potentiometer mounted on the back of the device.
Finally, a short conclusion. I made the device with the intention of explaining to you how you can connect this type of display to an Arduino microcontroller. In actual operation of the VU meter, the slow response of the hands in relation to the input audio signal can be observed, which is a consequence of the display itself, not the microcontroller or the code. Namely, when testing the code I used a 128х64 LCD display instead of a VFD, and the reaction was almost momentary. Due to the relatively high consumption of the display, it is preferable to power it through the power connector of the display itself, which is shown in the picture.
The device is installed in a suitable box made of PVC material with a thickness of 5 mm and covered with colored self-adhesive wallpaper.
#include <U8g2lib.h>
#include <SPI.h>
#define GAIN 100
#define STEP 8
#define LOW_SOUND 50
#define MAX_SOUND 600
U8G2_GP1287AI_256X50_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
int strela=-36;
int hMeter = 64;
int vMeter = 85;
int rMeter = 77;
int ur,urr,x;
int strelax =-36;
int hMeterx = 194;
int vMeterx = 85;
int rMeterx = 77;
int urx,urrx,xx;
void setup(void) {
u8g2.begin();
u8g2.setContrast(25);
u8g2.enableUTF8Print();
u8g2.setFont(u8g2_font_4x6_tf);
analogReference(INTERNAL); // если очень маленький уровень сигнала
pinMode(A2,INPUT);
pinMode(A0,INPUT);
}
void loop (){
strela = map(log(analogRead(A2))*GAIN, LOW_SOUND,MAX_SOUND, -36,36);
strela = constrain(strela, -36, 36);
urr = strela;if(urr<ur){ur=ur-STEP;}else{ur = strela;}
strelax = map(log(analogRead(A0))*GAIN, LOW_SOUND,MAX_SOUND, -36,36);
strelax = constrain(strelax, -36, 36);
urrx = strelax;if(urrx<urx){urx=urx-STEP;}else{urx = strelax;}
u8g2.firstPage();
do {
u8g2.drawFrame(0,0,256,50);
u8g2.drawRFrame(130,2,124,46,3);
u8g2.drawRFrame(2,2,127,46,3);
u8g2.drawLine(20, 15, 70, 15);// line 1
u8g2.drawLine(150, 15, 200, 15);
u8g2.drawLine(73, 15, 108, 15);
u8g2.drawLine(203, 15, 238, 15);
u8g2.drawLine(73, 14, 108, 14);// line 2
u8g2.drawLine(203, 14, 238, 14);
u8g2.drawLine(15, 17, 70, 17);// line3
u8g2.drawLine(145, 17, 200, 17);
byte b1_2[10]{20,57,42,33,64,91,50,70,77,104};
byte c1_2[10]{12,14,14,12,14,12,12,12,12,12};
for(int i=0;i<10;i++){u8g2.drawLine(b1_2[i], 15, b1_2[i], c1_2[i]);}
byte b3[5]{15,29,43,57,70};
for(int i=0;i<5;i++){u8g2.drawLine(b3[i], 17, b3[i], 20);}
byte b1x_2[10]{150,187,172,163,194,221,180,200,207,234};
byte c1x_2[10]{12,14,14,12,14,12,12,12,12,12};
for(int i=0;i<10;i++){u8g2.drawLine(b1x_2[i], 15, b1x_2[i], c1x_2[i]);}
byte b3x[5]{145,159,173,187,200};
for(int i=0;i<5;i++){u8g2.drawLine(b3x[i], 17, b3x[i], 20);}
u8g2.setCursor(17, 10); u8g2.print(F("20 10 3 0 1"));
u8g2.setCursor(147, 10); u8g2.print(F("20 10 3 0 1"));
u8g2.setCursor(14, 28); u8g2.print(F("0 25"));
u8g2.setCursor(144, 28); u8g2.print(F("0 25"));
u8g2.setCursor(40, 28); u8g2.print(F("50"));
u8g2.setCursor(170, 28); u8g2.print(F("50"));
u8g2.setCursor(55, 28);u8g2.print(F("75"));
u8g2.setCursor(185, 28);u8g2.print(F("75"));
u8g2.setCursor(68, 28);u8g2.print(F("100"));
u8g2.setCursor(198, 28);u8g2.print(F("100"));
u8g2.setCursor(90, 10);u8g2.print(F("2"));
u8g2.setCursor(220, 10);u8g2.print(F("2"));
u8g2.setCursor(103, 10);u8g2.print(F("3"));
u8g2.setCursor(233, 10);u8g2.print(F("3"));
u8g2.setCursor(14, 40); u8g2.print(F("-"));
u8g2.setCursor(104, 40);u8g2.print(F("+"));
u8g2.setCursor(44, 40);u8g2.print(F("VU meter"));
u8g2.setCursor(90, 40);u8g2.print(F("L"));
u8g2.drawFrame(88,33,7,9);
u8g2.setCursor(144, 40); u8g2.print(F("-"));
u8g2.setCursor(234, 40);u8g2.print(F("+"));
u8g2.setCursor(174, 40);u8g2.print(F("VU meter"));
u8g2.setCursor(220, 40);u8g2.print(F("R"));
u8g2.drawFrame(218,33,7,9);
int a1 = (hMeter + (sin(ur / 57.296) * rMeter)); // meter needle horizontal coordinate
int a2 = (vMeter - (cos(ur / 57.296) * rMeter)); // meter needle vertical coordinate
u8g2.drawLine(a1, a2, hMeter, vMeter);
// u8g2.drawLine(a1-1, a2-1, hMeter-1, vMeter+1);
int a1x = (hMeterx + (sin(urx / 57.296) * rMeterx)); // meter needle horizontal coordinate
int a2x = (vMeterx - (cos(urx / 57.296) * rMeterx)); // meter needle vertical coordinate
u8g2.drawLine(a1x, a2x, hMeterx, vMeterx);
// u8g2.drawLine(a1x-1, a2x-1, hMeterx-1, vMeterx+1);
} while ( u8g2.nextPage() );
}
Retro look Analog style VU meter on VFD display with Arduino Nano
- Comments(0)
- Likes(2)
- Francisco Meza Mar 04,2024
- Engineer Dec 03,2023
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Mirko Pavleski
- Testing 2500W Large Induction Heater An induction heater is a device that uses electromagnetic induction to heat objects. It consists of...
- Arduino FFT Audio Spectrum analyzer on 8x32 color matrix WS2812B The spectrum analyzer displays the amplitude of signals as a function of frequency, allowing engine...
- Unusual Led Ring Arduino Clock, Temperature, and Humidity meter There are many arduino clock projects with temperature and humidity readings where the results are ...
- How to make simple portable PEMF Magnetic Pulser PEMF (Pulsed Electromagnetic Field Therapy), which is also known as magnetic pulse therapy uses ele...
- Single Mosfet Mini SSTC Tesla coil with 10 + cm Spark A Solid State Tesla Coil (SSTC) is a type of Tesla coil that uses solid-state components such as tr...
- How to Make EM84 (6E2) Vacuum Tube Stereo VU Meter A VU meter, also known as a Volume Unit meter, is a device used to display the audio signal level ...
- Universal Arduino Staccato controller for SSTC and VTCC Tesla Coils The VTTC Staccato Controller was developed in the attempt to create longer sparks from VTTCs while ...
- DIY extremly Sensitive and cheap Arduino Seismometer A seismometer, is an instrument used to detect and record ground motion caused by seismic waves, su...
- DIY Extremly Sensitive and cheap Geophone sensor for Earthquakes detecting A geophone is a device used in geophysics to detect ground movement. It is specifically designed to...
- Arduino FFT Spectrum analyzer on VFD display GP1287 An audio spectrum analyzer is a device that visualizes the frequency content of an audio signal. It...
- DIY simple Spark Gap Tesla Coil Tesla coil is a type of resonant transformer circuit invented by Nikola Tesla around 1891. It is a ...
- DIY PC controlled high power PEMF Therapy Device PEMF or Pulsed Electromagnetic Field therapy is a type of therapy that uses electromagnetic fields ...
- DIY Precise Arduino Miliohmmeter In practice, we very often need to measure low resistances. Measuring low-value resistances, especi...
- The simplest way to determine the quality of lighting in your home - bulb flickering meter Light flickering can be a common issue and may occur with various types of bulbs, including incande...
- Classic Style Arduino Weather Station with three Oled Displays So far I have made several weather stations that display local values as well as internet data, whic...
- How to build simple cheap Hulda Clark Syncrometer Hulda Clark's Syncrometer was a device she claimed could detect the presence of various substances ...
- DIY simplest small CRT Oscilloscope An oscilloscope is a measuring instrument used to visualize and analyze electronic signals. It is c...
- Arduino Door Lock with Smartphone Flashlight Login (Li-Fi project) There are many different arduino door lock projects, where the access method is using a keyboard, R...
-
Open Source Very Large Stick - Freejoy & MMjoy2 breakout board
504 0 0 -
RF Control training board for students based on ESP32 C3
678 0 2 -
Aquarius+ Computer, Standard PCB
898 0 4 -
KINETIC COASTERS with a TWIST! Laser or 3D Print some DIY Magic
605 0 1 -
RPI - 8 IO PLC With ATTiny85 Watch Dog
533 0 1 -
Nintendo Famicom HVC-001 Controller Shells
626 0 1 -
COMMODORE 128 DIAGNOSTIC REV.785260 KEYBOARD DONGLE
596 0 4 -
COMMODORE 128 15KHz DISPLAY ADAPTER (C128 80 COLUMN ADAPTER)
800 1 6 -