LED peak meter with fastest transient detection (clipping indication meter)

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

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

What is a stable psu voltage? 24v? is 16v enough?

How to adjust desired recovery times?  I need around 500ms peakhold times of the last 10 red Leds!
 
seva said:
@ ruffrecords

What is a stable psu voltage? 24v? is 16v enough?

How to adjust desired recovery times?  I need around 500ms peakhold times of the last 10 red Leds!

16V should be fine.

Peak hold time is determined by the two op amps  that drive the comparators. They are are arranged as a peak detector.

Cheers

ian
 
seva said:
How to adjust desired recovery times?  I need around 500ms peakhold times of the last 10 red Leds!
You have to understand that the two different approaches give different results.
The peak detector in the LM391x charges a capacitor that discharges into a resistor; since this discharge is exponential, the hold time is threshold dependant. Roughly, if the last Led holds for 500ms, the one before last will hold for 1s and the first in the string of 10 will hold for about 4.5s. That would be typical of a very slow PPM
The unproperly named "balanced detector" allows defining the hold time for each individual LED. That would be closer to a digital meter.
 
Yes, understood! I wanna have a kind of digital meter over the 10 leds.

I ll try to draw a schemo of your proposed 10 stages combined with the 391x.

What type of caps should i use for the clip detector?
 
The 391x series is very old and not optimal for your application.

For 1/2 dB steps you will be better off using something like LM339 quad comparators and your own resistor string for thresholds.

Using a microprocessor with built in A/D could provide more flexibility.

To drive that many LEDs with holds, a microprocessor seems optimal.

You can use the micro to crunch your data, then send the results serially to a latch LED driver. I use a 16 LED driver in my current product and these can be run in series so 3 in series would give you 48 LEDs.

What is your plans for FS reference? It seems like you want to engineer the meter to read down from some arbitrary FS since clipping will vary between different hardware.

Depending on how fast you want the peak to read,  you may need to use less bits of A/D resolution (it takes setting time for full resolution) while the top few dB will settle more than fast enough.

There have been many discussions about meters here.

JR
 
seva said:
@ squarewave, rocinante

It makes sense that an ADC will detect peaks really accurate. nice! Its an SPPM for my understanding. Samples trigger the output voltages and Leds lights up!? decay times can be programmed in the chip?

16Mhz clocking! wow - Is it a 1Bit AD?

In the Arduino? No. 16 MHz is the processor clock frequency. The ADC is a successive-approximation type which requires multiple clock cycles to compute a result. In the AVR microcontroller used in Arduino, 13 clocks are required. But those clocks aren't at the processor frequency, there's a prescaler which divides the processor clock down to something the ADC can use. The maximum sample rate at the converter's full 10-bit resolution is 15 kHz. If you choose for a lower-resolution result (8 bits) you can go faster.

How to realize 40 outputs with the ardurinos? I found less than 20 pins on the nano boards… The circuit have to fit in the attached chassis.

There are several ways to do this. One is "Charlieplexing," which is a clever way to time-division multiplex outputs to drive LEDs. Another way is to use an SPI port on the Arduino to drive standard 74HCT595 shift register ICs. This lets you use four micro port pins to drive as many pins as you want.  A third option is to use something like the STP16CPC26 SPI LED driver chip, which has the advantage over the 595 in that its outputs can sink more current -- and it's cheaper! Use two of them, and you can multiplex a 16x16 array of LEDs. Or use one, and three extra port pins (and three transistors) and you can drive 48 LEDs. (Four extra port pins gives you 64 LEDs, five pins gives you 80, and so forth).

-a
 
Andy Peters said:
In the Arduino? No. 16 MHz is the processor clock frequency. The ADC is a successive-approximation type which requires multiple clock cycles to compute a result. In the AVR microcontroller used in Arduino, 13 clocks are required. But those clocks aren't at the processor frequency, there's a prescaler which divides the processor clock down to something the ADC can use. The maximum sample rate at the converter's full 10-bit resolution is 15 kHz. If you choose for a lower-resolution result (8 bits) you can go faster.

There are several ways to do this. One is "Charlieplexing," which is a clever way to time-division multiplex outputs to drive LEDs.

Another way is to use an SPI port on the Arduino to drive standard 74HCT595 shift register ICs. This lets you use four micro port pins to drive as many pins as you want.  A third option is to use something like the STP16CPC26 SPI LED driver chip, which has the advantage over the 595 in that its outputs can sink more current -- and it's cheaper! Use two of them, and you can multiplex a 16x16 array of LEDs.
The old school 595 HCT logic shift register (8 bit) can sink or source current, so you could make an 8x8 LED array but the dedicated LED drivers like STP16CPC26 can only sink current... so I don't see a 16x16 array from a pair of them unless you add 16 high side switches to invert the drive polarity from the second latch.
Or use one, and three extra port pins (and three transistors) and you can drive 48 LEDs. (Four extra port pins gives you 64 LEDs, five pins gives you 80, and so forth).

-a

For an audio design where noise floor matters you could just stack three of these x16 LED sink drivers in series so the LEDs are only switched on/off by the audio signal rising and falling and no multiplexing is involved. 

JR
 
Thanks for the great tips and all the digi stuff, but I will focus on analog fist. It´s too much stuff for me at the moment and I have to understand the analog ways first. I like the dorough meters - I use the plugin:)

I did a calculation of different meter types using the LM391x´s and the peak detectors to find a good scale for the 30Leds using LM391x´s. I think that a 39dB range is ok and matches with the manual reference voltage around 10v.

I trying to understand relationship of input signal to the reference voltage. what is the smallest voltage step what can handle the last comparator of the LM3916? 10mV ?

I can boost the input signal up to 20v and increasing reference voltage to the first (0dB LED) for example. But than the powersupply goes bigger and bigger and comparator steps more acurate. right.? what is a good range for switching comarators?

I calculated for last the last LED a value of 13,7mV and for the LED ahead a value of 19,4mV - It´s a range of 5.6mV. Increasing reference to 10v - range rise to 50,6mV for the last comparator - right?

I attached the calculation and schemos from datasheet.

I wanna use 30 LEDs with the LM391x´s so the Idea is to use 4x LM3916 (5Pins only) 0 to -19dB in 1dB steps and another LM3916 for -20 to -39dB - Is that possible?

Can I combine fig.28 and fig.25?

I don´t understand fig.28 T1 6,3V center tapped, also v+ (12-20v) does it comes from the same psu?
 

Attachments

  • 39dB Meter.png
    39dB Meter.png
    72.3 KB
seva said:
Thanks for the great tips and all the digi stuff, but I will focus on analog fist. It´s too much stuff for me at the moment and I have to understand the analog ways first. I like the dorough meters - I use the plugin:)
I obviously like peak and VU display.... I patented it in 1979 US04166245  Roberts

The meter in the picture is one I did for a friends console company.. FWIW that meter used the 595 shift registers for latched LED drivers.
I did a calculation of different meter types using the LM391x´s and the peak detectors to find a good scale for the 30Leds using LM391x´s. I think that a 39dB range is ok and matches with the manual reference voltage around 10v.

I trying to understand relationship of input signal to the reference voltage. what is the smallest voltage step what can handle the last comparator of the LM3916? 10mV ?
The 391x series use an internal voltage divider string so smallest step depends on linear/log versions, and what top of the divider is connected to.
I can boost the input signal up to 20v and increasing reference voltage to the first (0dB LED) for example. But than the powersupply goes bigger and bigger and comparator steps more acurate. right.? what is a good range for switching comarators?
should not be a problem... the digital meters I did work in a 3.3V processor.
I calculated for last the last LED a value of 13,7mV and for the LED ahead a value of 19,4mV - It´s a range of 5.6mV. Increasing reference to 10v - range rise to 50,6mV for the last comparator - right?

I attached the calculation and schemos from datasheet.

I wanna use 30 LEDs with the LM391x´s so the Idea is to use 4x LM3916 (5Pins only) 0 to -19dB in 1dB steps and another LM3916 for -20 to -39dB - Is that possible?
IIRC the 3916 used a 3dB step size. to get 1 dB I guess you could interleave 3 of them offset 1 dB apart... sounds complicated.

You could roll your own using quad comparators but I already suggested that.

A micro is the obvious way to do this, alternately using analog comparators with a custom resistor divider string is not crazy but probably more expensive.

When I designed the digital meter for my friends console company the digital version was cheaper than their previous analog version.

JR
Can I combine fig.28 and fig.25?

I don´t understand fig.28 T1 6,3V center tapped, also v+ (12-20v) does it comes from the same psu?
 

Attachments

  • meter_small.jpg
    meter_small.jpg
    99.7 KB
JohnRoberts said:
For an audio design where noise floor matters you could just stack three of these x16 LED sink drivers in series so the LEDs are only switched on/off by the audio signal rising and falling and no multiplexing is involved. 
For an API mic pre I used the MAX7221 which charliplexes and I found the noise to be minimal. It actually has a slew rate limiting feature specifically to minimize EMI. And that might be important actually because I tried another LED driver and it created really bad noise. Those drivers can be so fast it's nearly impossible to filter out the transients.

But the MAX7221 is relatively quiet. And there were traces that came within ~10mm of the gain control pot on the same PCB. The SNR at +40dB gain was reduced by less than 0.3dB with LEDs on vs off. Although I use a separate ground for digital, I used a large current setting resistor (I don't want the LEDs to be super bright anyway) and I have only used dot mode so far.

If you have a lot of LEDs using one of the multiplexing chips is going to drastically reduce the number of traces running around. The MAX7221 is 8 sources (segments) and 8 sinks (digits) so you can do 64 LEDs with at most 16 traces.
 
Hi John,

your meter looks really cool and modern, also simple to build up! really nice!

I understand that there are many ways to realize a meter.  ADC seems the most accurate to me. Also matrix devider looks really good to me. 

Do you think that using only 5 pins from the Lm3916 is a problem- I have a attached a calculation for a bigger range - there are no open pins and a wider range - so i have to boost the reff v. I don´t know what is the minimum for the last comparator inside the LM391x so i dont know psu voltage
 
seva said:
Hi John,

your meter looks really cool and modern, also simple to build up! really nice!

I understand that there are many ways to realize a meter.  ADC seems the most accurate to me. Also matrix devider looks really good to me. 

Do you think that using only 5 pins from the Lm3916 is a problem- I have a attached a calculation for a bigger range - there are no open pins and a wider range - so i have to boost the reff v. I don´t know what is the minimum for the last comparator inside the LM391x so i dont know psu voltage
It has been a long time since I looked at a 391x but IIRC you can leave pins open.

The -4dB and below can be covered by 3dB steps.

1dB and  1/2dB steps cry for a custom divider string.

I made a prototype meter back in the early 1980s that used 100 segments to display from +20dBu to -80 dbu in 1dB steps but I wouldn't swear to the accuracy down around -80dBu ... It isn't very practical to meter below -30dBu or maybe -40 dBFS  for more than signal present. IMO

JR
 
seva said:
I did a calculation of different meter types using the LM391x´s and the peak detectors to find a good scale for the 30Leds using LM391x´s.
You will find this is getting out of hand. You're more or less stuck with the decisions the designers of the chip(s) have made, and you'll have to pull a lot of hair to get something that works as you wish. In addition, teh 391x are obsolete.
If you want to stay analog, use comparators and create your own resistor string. You have to calaculate the values so that each node (junction of two resistors) is at the voltage you want the LED to come on. A little tedious, but perfectly doable with pencil and paper; if you're lazy like me, use either Excel or LTspice. You just need to make the reference voltage (top of the string) equal to the highest voltage (after rectification and whatever scaling).
See attachment; two quad comparators cascaded, but 3 or more is possible.
 

Attachments

  • LED meter.jpg
    LED meter.jpg
    69.4 KB
OK :)

Is VR1 to increase the rectified input signal to the 24v ref?

Or is VR1 to decrease ref V to rectified input signal?

I found this calculator
http://rssconsultancy.co.uk/shunt.html

what is a good value for the hole ladder R? I choose 51k for the calculation attached. Is it OK? 

Why do you use 24v for your power supply? What is the minimum for 30 LED´s with 40dB range?
 

Attachments

  • calc R.png
    calc R.png
    95.4 KB
Here is  the peakmeter d&r used in triton console, just for inspiration.
 

Attachments

  • d&r triton peakmeter.pdf
    93.4 KB
Back
Top