DIYstompboxes.com

DIY Stompboxes => Digital & DSP => Topic started by: ElectricDruid on March 26, 2019, 04:58:19 PM

Title: An LED bargraph audio level meter
Post by: ElectricDruid on March 26, 2019, 04:58:19 PM
Some people here might find this useful or interesting:

(https://electricdruid.net/wp-content/uploads/2019/03/AudioMeterPrototype.jpg)

Full details (schematics/code) are at:

https://electricdruid.net/led-bargraph-audio-level-display/ (https://electricdruid.net/led-bargraph-audio-level-display/)

I was looking for a simple "peak level" meter for a project I'm working on to give a visual indication of the level to prevent clipping in later stages of the circuit. All the existing designs I could find used the LM391x series chips which (although there are still some about) are no longer produced. So I did a simple PIC-based design to do the same job.
While the original chips are just a set of comparators and output drivers, I was also able to add an optional "Peak Hold" LED dot above the main level display. This gives very useful information about exactly (ok, *almost* - technical stuff) how high the peaks are getting, without really getting in the way of the overall level display which appears beneath it. I should really do a video to show you what it looks like, but I'm just not that organised. Maybe one day.

Tom
Title: Re: An LED bargraph audio level meter
Post by: EBK on March 26, 2019, 05:11:14 PM
I think the LM39xx chips are still being produced in PLCC format. 

Once you start going down the microcontroller route, you can get into some very interesting types of displays. 
Title: Re: An LED bargraph audio level meter
Post by: ElectricDruid on March 26, 2019, 08:12:04 PM
I spent quite a long time playing with various types of attack/decay filtering on the rectified audio input, but eventually I gave up on it. I find the instantaneous response is actually the best - the brightness of the LEDs gives you an idea how often that level is being hit. Obviously I also needed to know what the very highest level was to avoid clipping, and that's why I added the peak hold feature.
I thought initially "Oh, I need a VU meter!" but then when I started looking into it, I discovered that I didn't really need a "VU" meter, I needed a "PPM" (Peak Program Meter) and furthermore that I was most interested in one that was scaled with full-scale at 0dB and then down from there. That's only one of the about-a-hundred types of meter that have been designed and specified over the years for all sorts of uses.
That said, most of those are different lin/log/summat else scales and different attack/decay specifications, so they don't provide what you'd call "different displays", rather just the same display, but with a different response speed. But yeah, as soon as it's software, you've got free rein to do whatever display suits you best. I did!

Tom
Title: Re: An LED bargraph audio level meter
Post by: EBK on March 26, 2019, 10:12:35 PM
Random side note: I have found median filters more useful than low pass filters for handling noise when sampling voltages with a microcontroller.  I'd have to dig up my code to remember how I implemented one though.
Title: Re: An LED bargraph audio level meter
Post by: tonyharker on March 27, 2019, 06:30:04 AM
For a simple coarse level indication dont forget the KA2284.
Title: Re: An LED bargraph audio level meter
Post by: deadastronaut on March 27, 2019, 10:04:45 AM
^ an6884 too.  (no fancy dot though)

and had ripple artifacts (last dying led caused fizzle) with audio use, which i could never solve.  ::)
Title: Re: An LED bargraph audio level meter
Post by: pianoselectronicos2000 on May 10, 2019, 04:30:28 PM
astronaut I haven't heard anything, :o (https://pianoselectronicos2000.com/) could you do me the favor of putting it in Spanish? my translator is a bit bad, thank you!!

Title: Re: An LED bargraph audio level meter
Post by: ElectricDruid on May 10, 2019, 05:41:01 PM
¿Que es que quieres en español?
Title: Re: An LED bargraph audio level meter
Post by: micromegas on May 11, 2019, 01:17:30 PM
Quote from: ElectricDruid on May 10, 2019, 05:41:01 PM
¿Que es que quieres en español?

"que quieres" means "what do you want"