A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3916

Where we discuss new analog design ideas for Pro Audio and modern spins on vintage ones.
Post Reply
User avatar
mediatechnology
Posts: 3888
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3916

Post by mediatechnology » Sat Jul 27, 2019 5:07 pm

This thread describes a simple comparator-based replacement bar graph display for the discontinued LM3915, LM3916 and almost-discontinued LM3914.

I needed a simple LED bar graph display for the XL-305 reverb clone to read reverb return level. In years past this was easily done with an LM391X bar graph driver. In this particular case I only needed eight LEDs with 3 dB steps to read from -12 to +9 dB.

We've discussed on this forum the many virtues of using a microprocessor for display and even "direct conversion" of the raw A/D data. For high dynamic range displays with a large number of LEDs using a micro makes great sense.

For this project I wanted a code-free, EMI-free, conventional analog solution.

Image
An LM324-based simple two channel eight step audio level meter for outboard gear.

The LM324 Quad Op Amp As A Comparator

When I first started doing simple bar graphs the "go to" IC was the LM339 (quad) or LM393 (dual) comparator. Most bargraph designs you see that don't use the LM391X are based on this comparator family. The LM339 is a mix of comparator with op amp characterstics for low speed signals. It is unlike the early µA710, LM311 and the many high-speed comparators that followed. The LM339 has an open collector output.

Without hysteresis the LM339, like most comparators, will oscillate on transitions. The slowly changing envelopes of rectified audio can trigger oscillation bursts. Adding hysteresis requires two resistors per comparator. For 16 LEDs (2 channels) that's 32 resistors...

I first saw the LM324 low power op amp used as a bar graph in the SSL 4000 and 6000 82E10 dynamics card and it immediately made sense. The LM324 is a horrible op amp for audio but its low bandwidth, low gain and class-B output are considered features for this application. They're too slow to oscillate but do have decent DC performance. Despite their low power they can still source and sink considerable current. For these reasons they make great bar graph comparators. An image search shows that plenty of others folks have had this same idea. The LM324 and LM324A (improved) are dirt cheap, mature, and have modern applications in industrial control and consumer products.

One advantage that the LM324 or LM339 have over the LM391X is that the LED current returns to the -15V rail. The LM391X's LED current flows into ground.

Speaking of the power supply rails the LM324 and LM324A usually have a 32V supply limitation. (Some improved variants are 36V.) If one needed to run this on +/-18V rails adding a 5 to 6.8V Zener in the negative rail is a good option. It's what SSL did for the 82E10 card. Though the regulation is poor compared to a regulator it doesn't affect LED brightness or metering accuracy.

Shared Reference Voltage Divider

Sharing the reference divider between two channels conserves resistors.

An LM334 current source, set to 1 mA, feeds the reference divider string. A current source virtually eliminates supply voltage changes to the comparator reference voltages. 1 mA was chosen as a nice round number that would also use a low impedance divider string. The total resistance of the divider string is about 1.56KΩ. The reference accuracy is about 5% or 0.4 dB. A trim can be added to the LM334 in series with the 68.1Ω resistor if needed.

I used a spreadsheet to calculate the dB to Volts conversion. What's convenient about a 1 mA Iref is that the threshold voltage, in mV, is equal to Rladder * Iref. If you sum the resistance values at a particular node to ground and then multiply that by 1 mA you have the step voltage. So the lowest step, at 140 mV, has a 140Ω resistor to ground and the highest step, at 1.56 V, is about 1.56KΩ.

If I were to use this often I'd write a spreadsheet that I could plug in the dB or linear mV step size and have it calculate the R values.

Level Detector

The level detector isn't anything special and there are a great many ways to accomplish full-wave rectification particularly over a limited 21 dB dynamic range. The first stage is a "pre-distorter" to overcome the forward voltage drop of the second stage rectifiers. A 5532 was used here simply because they are already on the bill of materials. A TL072 would work equally well.

The rectifier chosen has one simple advantage in that the gain can be changed by varying only the input resistor.

An averaging VU-like response was wanted. Using "99% of the steady-state value in 300 ms" works out to be a tau of 65 ms. Though a 1% value is shown to set the attack and decay (both 300 ms) unless the C is selected (or a 5% tantalum) capacitor accuracy will affect timing. Since the measurement is of a reverb return a 10 or 20% electrolytic ought to be just fine.

The internal operating "0" level at the meter inputs is -2 dBu RMS. (Line drivers and receivers scale the internal levels of most gear down and up by 6 db to preserve internal headroom. With a +4 dBu input the internal level is -2 dBu.)

With a unity gain detector the average value of a full-wave rectified -2 dBu RMS (614 mV RMS) sine wave is about 0.55V. Thus, the comparator reference voltage for a 0 dB indication is also 0.55V.

For +4 dBu RMS "O dB" calibration the input resistors scale to 20KΩ.

Freedom from comparator oscillation.

I checked the Protoboard looking at a lot of nodes for any hint of RF bursts on comparator transitions and just don't see any. That's very difficult to achieve with an LM339 without hysteresis. The low gain of the LM324, when used as a comparator, causes ramped, slew-limited output transitions to the LEDs.

Next Up.

The GR-10 and GR-20 meters we did for the Pico compressors was a very popular seller. I'm not planning on making more of those using the discontinued LM3914 but I would like to show a linear-scaled gain reduction/control voltage meter front end.

Also, to make JR happy and use a micro for display I'll be using the analog level detector to feed an Arduino Nano driving an WSM2812 RGB display. The Arduino isn't up to doing the DSP but it will drive some pretty LEDs quite well. That will be a "disco" VU meter.
https://ka-electronics.com

"There's A War On For Your Mind" Banned.Video https://banned.video/
Meme World https://www.memeworld.com/
"Armstrong: Climate Change Has Been A Routine Scare Tactic Since The 1930s" https://www.zerohedge.com/news/2019-09- ... ctic-1930s

User avatar
mediatechnology
Posts: 3888
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Rectifier Waveforms

Post by mediatechnology » Mon Jul 29, 2019 11:38 am

Rectifier waveforms.

The upper trace is the full-wave rectified output at the output of the second op amp.
Baseline for the upper trace is +2 divisions.

Lower trace is the output of the first stage "pre-distorter."
Baseline for the lower trace is -2 divisions.

Image
A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3916.
Rectifier waveform at 0 dBu input.



Image
A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3916.
Rectifier waveform at -20 dBu input.



Image
A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3916.
Rectifier waveform at -20 dBu input and 10 kHz.
https://ka-electronics.com

"There's A War On For Your Mind" Banned.Video https://banned.video/
Meme World https://www.memeworld.com/
"Armstrong: Climate Change Has Been A Routine Scare Tactic Since The 1930s" https://www.zerohedge.com/news/2019-09- ... ctic-1930s

User avatar
mediatechnology
Posts: 3888
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

LM324 Comparator Response

Post by mediatechnology » Mon Jul 29, 2019 12:01 pm

Shown below are the comparator responses to a tone burst.

The upper trace is a 1 kHz input tone burst with a 100 ms duration.
The lower trace is the comparator output for the fourth step.

Image
A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3916
LM324 Comparator response to tone burst.


Expanded image.

Image
A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3916
LM324 Comparator response to tone burst. Expanded.


Under low overdrive.

Image
A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3916
LM324 Comparator response to tone burst. Low overdrive.


Note the smooth, slow, fall time response of the LM324 output at LED turn-on.
https://ka-electronics.com

"There's A War On For Your Mind" Banned.Video https://banned.video/
Meme World https://www.memeworld.com/
"Armstrong: Climate Change Has Been A Routine Scare Tactic Since The 1930s" https://www.zerohedge.com/news/2019-09- ... ctic-1930s

User avatar
JR.
Posts: 2918
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3

Post by JR. » Mon Jul 29, 2019 12:52 pm

mediatechnology wrote:
Sat Jul 27, 2019 5:07 pm


Also, to make JR happy and use a micro for display I'll be using the analog level detector to feed an Arduino Nano driving an WSM2812 RGB display. The Arduino isn't up to doing the DSP but it will drive some pretty LEDs quite well. That will be a "disco" VU meter.
It's harder and harder to make JR happy these days, :lol: but maybe perform the rectification and smoothing time constants inside the digital domain. It only cost one bit of dynamic range, but saves a bunch of external glue parts and makes it easier to change later with software tweaks.
====
I made many meters over the decades with lofi op amps including LM1458 (remember them?). For a bar graph you can feed multiple leds in series to use less current. Feeding the top of the string from a current source, and driving bottom to - supply keeps ground free of meter current. (The LM339 open collector was popular as a shunt across LEDs to turn on/off.)

I rarely made simple bar graph only meters. I even tricked an LM391x to multiplex between modes to display peak and average simultaneously back in the late 70s IIRC. For whatever reason I never used a LM391x in a production design, before, during, or after Peavey.

Another stupid circuit trick I liked for my peak/VU meters was to connect the LED between two adjacent op amp outputs, so the first op amp going high turns it on, and the second op amp going high turns it off while turning the next one on providing the floating peak dot. Since I had lost control of my original pk/vu patent while designing console meters for Peavey, so I patented a different variant display where a floating bar indicated peak with the top of the floating bar and average with the bottom of that floating bar turned off again (crest factor was the width of the floating bar assuming 3dB steps). I don't think I have schematics handy but several of these were published in various Peavey product schematics.

I have lost interest in developing a generic micro based meter platform, even though I kept control of the APB console meter software. Life is short and it is more fun to modify my lawnmower. I have to keep reminding myself the world doesn't need another TS-1 either. :lol:

JR
Don't only half-ass tune your drums. Visit https://circularscience.com to hear what properly "cleared" drums sound like.

User avatar
mediatechnology
Posts: 3888
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3

Post by mediatechnology » Mon Jul 29, 2019 1:09 pm

Thanks for the list of tricks.
I also did an LM3914 that muxed displays to display level and control voltage.
JR. wrote:
Mon Jul 29, 2019 12:52 pm
For a bar graph you can feed multiple leds in series to use less current. Feeding the top of the string from a current source, and driving bottom to - supply keeps ground free of meter current. (The LM339 open collector was popular as a shunt across LEDs to turn on/off.)
For large displays that makes sense.
1 mA of LED current is blinding so for a 16 LED there's no reason to use series-connected arrays with shunt drive.

For 8 red LEDs series-connected (at 1.85V each) you need a minimum of 15V to light them so a higher voltage supply is also needed.
That would limit it for a lot of people needing a simple solution for DIY rack-mount outboard gear with 1-2 bars maximum and with lots of green and yellow LEDs. For that reason I went with parallel drive.

Yes the LM339's open collector is advantageous in shunt applications: The LM324 can shunt but it needs a diode to prevent reverse-biasing the LED when off and the output is in an "active high" state.

I have lots of bar graph examples using series/shunt drive but never posted them.
https://ka-electronics.com

"There's A War On For Your Mind" Banned.Video https://banned.video/
Meme World https://www.memeworld.com/
"Armstrong: Climate Change Has Been A Routine Scare Tactic Since The 1930s" https://www.zerohedge.com/news/2019-09- ... ctic-1930s

User avatar
JR.
Posts: 2918
Joined: Sat May 24, 2008 7:21 pm
Contact:

Re: A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3

Post by JR. » Mon Jul 29, 2019 5:27 pm

agreed ... when LEDs first appeared they cost $15 a piece and needed 15mA to 20mA to be seen inside a room without turning off the lights. :lol:

At only 1 mA ea not an issue. I even recall doubling up low current ports to drive LEDs with micros (this century), but that may have been over-design (I have been accused of that).

JR
Don't only half-ass tune your drums. Visit https://circularscience.com to hear what properly "cleared" drums sound like.

User avatar
mediatechnology
Posts: 3888
Joined: Sat Aug 11, 2007 2:34 pm
Location: Oak Cliff, Texas
Contact:

Re: A Simple Two Channel Eight Step Bar Graph Audio Level Meter For Outboard Gear Without Using An LM3914, LM3915 or LM3

Post by mediatechnology » Wed Jul 31, 2019 9:21 am

I'll post a schematic later on for a peak-responding detector.
It's the same detector as the original post with three added diodes.
Image
An LM324-based simple two channel eight step audio level meter for outboard gear.
Two back-to-back diodes are placed in series with the 10KΩ feedback resistor of the second stage. (Like stage one.)
The 6K49 resistor is then replaced by a diode.
The pre-distorter in the second stage overcomes the diode drop of the peak detector diode.

A resistor in series with the diode and drain resistor then set the attack and release characteristics.

When setting resistor and capacitor values be mindful of the bias current of the eight LM324s.
The LM324A, which is still dirt cheap, has lower maximum Ibias (and Vos) so for some applications it may be better for higher R values.

For stock LM324 based on current TI data sheet maximums eight of them, worst case at full temperature range, have a 4 µA total bias current.
Eight LM324A are 1.6 µA worst-case.
https://ka-electronics.com

"There's A War On For Your Mind" Banned.Video https://banned.video/
Meme World https://www.memeworld.com/
"Armstrong: Climate Change Has Been A Routine Scare Tactic Since The 1930s" https://www.zerohedge.com/news/2019-09- ... ctic-1930s

Post Reply