Audio VU meter with Extra wide Dynamic Range 69 dB using Arduino

31,104

Audio VU meter with Extra wide Dynamic Range 69 dB using Arduino
Audio VU meter with Extra wide Dynamic Range 69 dB using Arduino

After experimenting with a stereo version of the VU meter described in a previous blog post, a studio-grade VU meter is now being presented. This meter features 24 steps, spaced equally every 3 dB, and covers a wide dynamic range from -63 to +6 dB. It operates as a single (mono) channel, emphasizing absolute precision. The device maintains a flat linear frequency response from 40 Hz to 20 kHz. The RGB LED display remains unchanged from the previous project, with plates arranged in a single line to form a large bar graph. Minor adjustments have been made to the color mixing data tables, which are intuitively understandable. A key feature of this project is autoscaling. The Arduino used has a 10-bit ADC, but it cannot process the negative half-wave, resulting in only 9 bits being available for AC measurements. The theoretical maximum dynamic range is impacted by hardware limitations, such as the NE5532 operational amplifier, which is not rail-to-rail. Test results indicate noticeable compression (~1 dB) when the scaled magnitude approaches about 50 dB, correlating with a peak-to-peak deviation of 2.5 V observed on an oscilloscope. The real dynamic range is approximately 49.93 dB. Additionally, audio data is processed based on a block structure, meaning that a 50 dB average does not account for spikes in the sampling pool that could introduce errors in measurement results, a phenomenon known as the Crest Factor. Different sources estimate the crest factor of musical content to be between 10 and 20 dB. Therefore, using the mentioned Arduino and operational amplifier front-end, the accurate coverage is limited to 30 dB. To achieve a wider dynamic range, the input amplifier gain is scaled by building a two-stage amplifier and selecting one or two cascades using the internal ADC multiplexer. With no switching ICs in the analog signal path, gain stability is high and can be precisely measured and calibrated using coefficients stored in EEPROM. The electrical drawings illustrate a modified kit where the stereo amplifier has been converted into a two-stage mono version. The first stage, with a gain of approximately G1 = 11, boosts the line-level signal to create the necessary DC bias for the ADC's correct operation and serves as a buffer to lower the signal source impedance as seen by the ADC input. The gain of the second stage amplifier is set at 40 dB, calculated as 20 x Log_10(G2), where G2 = 101. Limiting the gain to only 30 dB per stage is considered excessive for real-time radio broadcasting or audio processing for storage media, where high fidelity must be preserved. For visual display purposes, clipping of signal bursts is not noticeable due to the display's high refresh rate of 78 Hz, which is too fast for human perception. For steady AC amplitude measurements in microvolt meter mode, a headroom as small as 3 dB is sufficient, allowing for a wide range of 47 dB per stage.

The studio-grade VU meter circuit is designed to provide accurate audio level monitoring in professional audio environments. The use of a 24-step LED bar graph allows for precise visual feedback of audio levels, with each step representing a 3 dB increment. The linear frequency response from 40 Hz to 20 kHz ensures that the meter accurately reflects the audio signal without coloration or distortion.

The two-stage amplifier design is crucial for achieving the desired dynamic range. The first stage amplifies the incoming audio signal while providing the necessary DC bias for the ADC. This stage also acts as a buffer, isolating the audio source from the ADC input, which helps to prevent loading effects that could distort the measurement. The gain of the first stage is carefully calculated to optimize the signal level for the ADC without introducing clipping.

The second stage further amplifies the signal, with a gain set to ensure that the overall dynamic range meets the requirements of professional audio applications. The choice of the NE5532 operational amplifier, while not rail-to-rail, is justified by its low noise and high-performance characteristics, making it suitable for studio applications.

The autoscaling feature is particularly important for handling varying audio levels, especially when dealing with complex musical content that may have a high crest factor. By dynamically adjusting the gain of the amplifier stages, the circuit can accurately measure and display audio levels across a wide range of input signals.

Overall, this studio-grade VU meter represents a sophisticated approach to audio level monitoring, combining precision engineering with practical features that enhance usability in professional settings. The design considerations, including the choice of components and the implementation of autoscaling, ensure that the meter delivers reliable performance under a variety of operating conditions.OK, after having some fun with stereo version of the VU meter I described in my previous blog-post, now it`s time to do a serious stuff. Studio grade VU meter ! 24 steps, equallyspaced every 3 dB, covering Extra wide Dynamic Range from -63 up to +6 dB. Single (mono) channel this time, no messing around, absolute precision at the stake. Plus, it keeps absolutely Top-Flat linear frequency response from 40 Hz up to 20 kHz(*). I`m not going into details of RGB LEDs Display, which has no modification since Tears of Rainbow  project, only plates installed in one line, form a single GIGANTIC bar-graph. There are some minor changes in mixing colors data tables, but they intuitively understandable. The most important feature in this project is autoscaling. As you, probably know, Arduino has 10 bits ADC. Only it can`t process negative half-wave, and for this reason it has only 9 bits available for AC measurements.

According to DSP theory, maximum dynamic range is: As input audio waveform represents anything but perfect peak-to-peak 5Vsine-wave, real dynamic range would be lower. How much In first, there is a hardware limits. OPA (NE5532), which is: but, unfortunately, isn`t rail-to-rail type. Test results show, that compression becomenoticeable (~1 dB) when not scaled magnitude approaches level about 50 dB.

That is in goodagreement with observed on oscilloscope notdistorted deviation peak-to-peak 2. 5 V. Or only half of full range of 5V. And as theory says, half is one bit less, and real DR = 1. 77 + 6. 02 x 8 = 49. 93 (~50 dB). In second, audio data is processed on block  structure basis. It means, having average of the block 50 dB, doesn`t mean that there was no spikes in the sampling pull, thatobviouslywould be clipped and introduce error in the measurements results. This phenomenon is defined as Crest Factor. Different sources estimate crest factor of musical content between 10 20 dB. So, taking direct approach, Arduino with OPA mentioned above as front-end could accurately cover only: 50 20 = 30 dB.

To get wider dynamic range, I have to scale input amplifier gain, and this is exactly what I did, building amplifier in two stages and selecting one cascade (by-passing second one) or two cascades using internal ADCmultiplexer. As there is no switching IC in analog signal path involved, gain is defined with high stability, could be one time precisely measured calibrated via coefficient stored in EEPROM (nice feature to add).

On the right side there are electrical drawings of slightly  modified kit, where stereo amplifier was converted into 2 stage mono version. First stage, with gain about G1 = 1 + 10 k / 1 k = 11 is necessary to bump-up  line-level signal, to create DC bias required for correct operation of the ADC, and also served as buffer to lower signal sourceimpedance, as it seen by ADC input.

I set a gain of the second stage amplifier at 40 dB: 20 x Log_10 ( G2 ), where G2 = 1 + 100 k / 1 k = 101. IMHO, setting gain limit for only 30 db per stage as it follows from paragraph above, is overkill, and would be justified for real-time  radio broadcasting or audio processing for storage media, when high fidelity of audio program must be preserved.

For visual display clipping  of bursts in signal is notnoticeable at all due high refresh rate of display, 78 Hz. Human just can`t see, if LED lights-up with such speed. For steady AC amplitude measurements (micro Voltmetermode) this is not a problem at all, and headroom as small as 3 dB would be sufficient, leaving wide 47 dB per stage.

🔗 External reference