Adapting the LM3914 Linear Bar-Graph to a Logarithmic Scale

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

vmsa

Member
Joined
Jun 20, 2022
Messages
20
Location
Argentina
Circuit to Convert LM3914 into a Logarithmic Meter

Traditionally LM3915 chips could be used to create LED bar meters, but they have been discontinued. While they are still available, as mentioned by @MidnightArrakis, @Script, @richiyobs, and others, in my article about QRMS, I think it’s a short-term solution. In my case, using RMS converters with logarithmic output (from the THAT family) solved the issue, allowing me to use LM3914. This applies to all the designs I am aware of, including the well-known Dorrough meters (patent here: Dual loudness meter and method) that uses a linear-to-logarithmic converter amplifier to drive a linear meter. In contrast, in the design I am trying to obtain, the input circuit is linear, and the display is logarithmic, a significant difference!

Looking at the current situation, it would seem that the option is a LM3914 with additional electronics, or you having an inconvenient display, that not representing accurately the magnitude (the dynamic range) of an audio signal.
In the current context of software meters and loudness regulations, measuring audio levels require two fundamental elements: measure the RMS value, and have a linear indication in dB, which essentially means a logarithmic output. OK.

This prompted me to think: Can I create a logarithmic display with a LM3914? I must admit I've never seen it anywhere, this solution could have been emerged 20 years ago… but no one thought of it?

First, let's analyze what this IC does. It compares the input voltage with the reference voltage using a 10-step resistive divider between pins 4 and 6. It consistently utilizes a constant reference voltage, as it has a stable voltage source for this purpose on pin 7, since the internal resistive divider is linear, all 10 steps are equal.
So, the idea was to explore how to vary the reference voltage to expand the steps. I am thinking in a display with three integrated circuits (emulating what could be constructed with LM3915) to attain a 30 dB range.

Development

First attempt: I deduced that the reference should start at approximately 50 mV, with the first IC reaching approximately 100 mV, the second up to 400 mV, and the third ending at 1250 mV, utilizing the stabilized reference from pin 7 which provides 1250 mV. Figure 1 illustrates the necessary sequence of references voltages to achieve like a "linear" output in dB.

figure 1.jpg
Figure 1: Reference voltages to cover 30 dB with 3 modules.
This solution appears to be interesting, it's "better than nothing." However, the lines deviate in the middle of each IC, where the error increase. The first IC requires less than 100 mV in the comparator voltage, which is very low; the manufacturer recommends not using less than 300 mV due to internal offset and bias currents. In this case, the voltage step between LEDs is a few millivolts, causing the display to function poorly. A disaster!
So, looking for another solution, this concept came to me: What if I vary the reference voltage with the input signal? In this way, as the signal increases, so does the reference. By increasing the reference voltage, I increase the step between the LEDs and improve their accuracy.

figure 2.jpg
Figure 2: Variation needed in Vref to achieve a logarithmic scale with 30 LEDs.​

In Figure 2 we can see the idea comparing the typical application with constant reference voltage in each IC in Blue, and its linear slope of LEDs activation represented with the lighter Blue line. While the dark Red line is the "dynamic" reference needed to obtain the light Red line, giving a LEDs activation with logarithmic slope.

Second attempt: After analysis, Excel calculations, simulations in Multisim, etc., I arrived at one implementation that modifies the reference voltage, causing the steps between LEDs are progressively increased. Simple and elegant.
The first IC in the chain should start at a voltage corresponding to -30 dB. Next the reference will increase to emulate a logarithmic response. So, I analyzed how the voltages should vary in each IC.

Figure 3 shows a simplified (we could call it rough) graph of how the reference should behave for each IC, highlighting the intersection points. The Green curve corresponds to the minimum voltage of IC1 (pin 4), while the Blue to the upper reference of IC1 (pin6), the Yellow to that of IC2, and the Gray to that of IC3. The Red line represents the input voltage, which when sweeping the display, progressively will turn on all the LEDs.
As you can imagine, there is much more intellectual work than what is detailed here. So, I'm presenting the conceptual ideas and results, to help you understand the concept, which is the most interesting part of the project.

figure 3.jpg
Figure 3: Required Variation in Reference Voltages​

If we look in Figure 3 at point A, this intersection is where the first LED lights up, at point B it passes to the second IC, at point C it passes to the third IC, and the point D marks the full-scale, assuming the maximum voltage is 1.2V.
However, here I found the problem by the low voltage in the first IC and it doesn't works well. The manufacturer recommends not using less than 300 mV. So, there is no other option but to increase the reference voltages, making the maximum greater than 1.25V.

The LM3914 has the ability to increase its reference voltage with a resistive divider between pin 7 and pin 8. So, with 1K + 1K between them, I managed to have a 2.5V reference, raising the entire curve.

Since the references are connected in series (the typical application scheme), joining pins 4 and 6 between the ICs, and if each one has around 7.5K of effective internal resistance, the three ICs will have a total of 22.5K.
If there is no other contribution, the voltages will be distributed in thirds in each IC. So, I added an 8.2K resistor to ground to raise pin 4 of the first IC to about 80 mV (-30dB) and another 10K resistor to lower the voltage of the last IC from its pin 7 to 6, to reduce the start comparison to about 300mV for the beginning of the scale. This results in a branch of 5 resistors: 10K + (7.5K) + (7.5K) + (7.5K) + 8.2K. The values in parentheses correspond to the internal resistor values of the comparators of each IC.

We already have the voltages for the beginning of the scale. The issue now is to figure out how to add the input voltage. To do this, I included a resistor from the input to the pin 6 of the third IC. I calculated that to provide the necessary variation, a 5:1 ratio is required, and since I have 10K from pin 7 to 6, I chose 2.2K for this resistor. This will do its magic, varying the reference based on the input voltage!
I found that I needed to slightly increase the slope of the second IC, so I added another 10K resistor between the input and the pin 6 of this IC. And during testing I found that the last five LEDs required a further increase in the reference voltage to match the logarithmic response at the end of the scale. So, I added a diode from the input to the pin 8 to force an increase in the reference when the input voltage exceeds 1.8V.

The circuit obtained is the presented in Figure 4, where the letters A, B, C, and D indicate the four reference voltages shown in Figure 3.

Figure 4.JPG
Figure 4: Resistor Network Used.​

The complete circuit verified in the Excel worksheet is as follows:

figure 5.jpg
Figure 5: Final Schematic of the Calculated Resistor Network.

figure 6.JPG
Figure 6: Simulation of Reference Voltages in Multisim.​

In the simulator, I assembled the circuit and verified the values that each IC would obtain when the input voltage increase. In this case, the input voltage is a ramp from 0 to 2.5V, which is the maximum voltage of the comparator and therefore the full-scale.
Then, in the laboratory workbench I took measurements over a prototype mounted on the Protoboard and tabulated the values in Excel, resulting in the following graph:


figure 7.jpg
Figure 7: Variation of each reference voltage versus input voltage for the 30 LEDs.​

Here, the Blue, Orange, Gray, and Yellow lines indicate the values of the reference voltages for each IC, and the Black line indicates the input voltage, demonstrating its good logarithmic response.

Subsequently, in my laboratory tests with the circuit mounted on the Protoboard, I compared the readings obtained against a display made with LM3915 (where a 1dB step is guaranteed by the internal comparators and is quite accurate), both connected in parallel to the same circuit exciter QRMS. This allowed me to verify the accuracy of its dynamic behavior. I am sharing with you some simple videos taken with my phone in the workshop to demonstrate it excellent performance:

Video 1:
Video 2:

I also compared it to a linear display, versus one with LM3914 in the typical linear configuration. This allowed me to compare the difference between a linear and a logarithmic display presentation, which I found very interesting.

Video 3:

I would like to mention that the small board that rests on the breadboard in the first two videos is a hand wired display with three LM3915, and in the third video I used one with LM3914 in the standard configuration.

Conclusions

I hope to have shown that by applying this simple network of 6 resistors and a diode, you can create an excellent logarithmic display with three LM3914, allowing you to have a good, economical, and simple audio level meter with a linear scale in dB, with an input voltage range from 0 to 2.5V.

One limitation I found is that it's impossible to use the dot mode due to the low reference voltages, which prevent the lower LEDs from lighting up. I'm sorry; it only works in bar mode. Otherwise, I would have to increase the working voltages even further, which would go against my concept of using a 5V USB power supply for the entire system.
So, with this scheme, plus the QRMS converter, an input multiplexer and a K-filter, you can create a loudness meter that meets all the necessary features, at very low cost and ANALOG!
That's the best part: it’s truly unique in the world! :cool:

I hope this design be interesting enough to consider applying it in your next sound thingamabob!
 
Continuing with my evaluative testing of the prototype assembled on the breadboard, I am now comparing its performance against a meter built with a THAT2252 (true RMS converter with logarithmic dB output) using LM3914 in the standard form, versus my logarithmic adaptation powered by the QRMS. From the test in the accompanying homemade video, subtle differences can be observed, but I believe that overall, the device performs very well, emulating a well-graduated scale and correct ballistic characteristics with less than 1 dB of difference. Further evaluations are needed to fine-tune certain values here and there, but in general, the concept works!
This video starts with a linear dB scale to demonstrate the linearity of the sweep, three times, and then some musical segments that fill full scale to appreciate its performance.
VMSA

 
Circuit to Convert LM3914 into a Logarithmic Meter

Traditionally LM3915 chips could be used to create LED bar meters, but they have been discontinued. While they are still available, as mentioned by @MidnightArrakis, @Script, @richiyobs, and others, in my article about QRMS, I think it’s a short-term solution. In my case, using RMS converters with logarithmic output (from the THAT family) solved the issue, allowing me to use LM3914. This applies to all the designs I am aware of, including the well-known Dorrough meters (patent here: Dual loudness meter and method) that uses a linear-to-logarithmic converter amplifier to drive a linear meter. In contrast, in the design I am trying to obtain, the input circuit is linear, and the display is logarithmic, a significant difference!
BTW if you read the Dorrough patent you will notice that they cited my 1979 patent US04166245 Roberts in the listed references.

JR
 
BTW if you read the Dorrough patent you will notice that they cited my 1979 patent US04166245 Roberts in the listed references.

JR
What an honor that a person with your background takes notice of my simple development. Your idea has truly been excellent, as it has become the standard for audio meters! My sincere congratulations.

VMSA
 
Back
Top