Author Topic: Audio bar graph. Small!  (Read 8937 times)

0 Members and 1 Guest are viewing this topic.

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Audio bar graph. Small!
« on: March 29, 2018, 12:44:12 pm »
I'm looking into creating a small audio bar graph.  I'm struggling to find how to make it as small as possible though.

The LM3914/5 is only in DIP and no longer manufactured.  I can't find a modern equivalent or a surface mount variant.

Looking to drive something like these:
https://uk.rs-online.com/web/p/led-displays/2465689/


So, I think my only options are:

Use the LM3914/5 in DIP and mount the LED bar to the other side of the board.
Use something like a TLC59282, voltage divider, half recitifer and an MCU.  Sounds a bit expensive for a basic audio meter.

I would like it to be, fairly accurate, logarithmic and importantly calibrate-able so I can decide what 0dB is.

My project will have potentially 5 of these mounted on a panel, I'm hoping to keep the whole project enclosure to 4" square.  I suppose to save space I could put all the meters onto one board and use one MCU to run them all.

Surely there are self contained audio bar graphs that meet these requirements easily available, I'm just not looking in the right place.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Audio bar graph. Small!
« Reply #1 on: March 29, 2018, 01:11:47 pm »
Yes, there are boards available, but typically none of them are designed for minimal footprint.  As you say, the LM3915/16 are EOL (but the linear LM3914 appears to be still current?)  I bought something like 100 LM3915 chips (assuming they are not counterfeit) and there still seems to be a reasonable supply of them.  Unless you are designing something for commercial sale in mass quantities.

If you are looking for multiple channels, here in 2018 using a small microcontroller is likely the best solution in terms of size.  Appropriate microcontroller chips and shift-register LED drivers are available in very small packages.  Even microcontrollers with multiple analog inputs and internal multiplexing. The largest components would likely be the filter capacitors for the audio input envelope detection circuits.
 

Offline Cliff Matthews

  • Supporter
  • ****
  • Posts: 1910
  • Country: ca
    • General Repair and Support
Re: Audio bar graph. Small!
« Reply #2 on: March 29, 2018, 01:41:54 pm »
A low cost 30x90mm size could be achieved with 3 of these 16-pin 8x8 mini matrix LEDs
With what Richard said, it would likely require 3 stacked PCB's behind it though..

 
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Re: Audio bar graph. Small!
« Reply #3 on: March 29, 2018, 02:01:21 pm »
Yes, there are boards available, but typically none of them are designed for minimal footprint.  As you say, the LM3915/16 are EOL (but the linear LM3914 appears to be still current?)  I bought something like 100 LM3915 chips (assuming they are not counterfeit) and there still seems to be a reasonable supply of them.  Unless you are designing something for commercial sale in mass quantities.

If you are looking for multiple channels, here in 2018 using a small microcontroller is likely the best solution in terms of size.  Appropriate microcontroller chips and shift-register LED drivers are available in very small packages.  Even microcontrollers with multiple analog inputs and internal multiplexing. The largest components would likely be the filter capacitors for the audio input envelope detection circuits.

Yes the idea to combine multiple channels came late in the day, middle of my message actually.  I kind of excluded a uC because it would be expensive, but if I create a panel mount PCB with 5 bar meters on it and feed them from headers on the main board one ATMega could run all the bar graphs.  As I ditest multiplexed displays I could use TLC59282s to run 16 LEDs each.

For audio level, I have done the less than accurate cheating type for reading audio level (diode half rectifier, then loop 10 readings and take the max).  I gather this would make the meter a peak meter, which thinking about it probably fine for my purposes.  An RMS meter might be a bit more tricky.

On impedance of the meter, so it does not interfere with the audio signal progressing to the amplifier, if I make the required voltage divider from high value resistors of 100k+ is it likely to interfere?  Given that the opamp has a higher impedance input, will the level meter not alter the signal?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Re: Audio bar graph. Small!
« Reply #4 on: March 29, 2018, 02:02:51 pm »
A low cost 30x90mm size could be achieved with 3 of these 16-pin 8x8 mini matrix LEDs
With what Richard said, it would likely require 3 stacked PCB's behind it though..


Interesting, one of those would do.  A single MCU to drive it, but a mess of current limit resistors or an LED driver and a multiplexer.

Actually the 8 works quite well as I want 3 mono levels and one stereo, so I can use the as   L-L-L-LL.

EDIT: Actually the lack of colour is an issue.  Want green-yellow-red.
« Last Edit: March 29, 2018, 02:15:01 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Cliff Matthews

  • Supporter
  • ****
  • Posts: 1910
  • Country: ca
    • General Repair and Support
Re: Audio bar graph. Small!
« Reply #5 on: March 29, 2018, 03:15:22 pm »
Bi-color matrix LED's are available.. I don't know if there's a library for them though.. *especially since getting the right shade of yellow requires even more code, so a Holtek or similar driver could work?
https://learn.adafruit.com/adafruit-led-backpack/bi-color-8x8-matrix
« Last Edit: March 29, 2018, 04:25:19 pm by Cliff Matthews »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2523
  • Country: us
Re: Audio bar graph. Small!
« Reply #6 on: March 29, 2018, 06:37:53 pm »
If you are going to be using a MCU, just use a small OLED display and draw the number bars in the proportions and colors you want.  For example the 1.27" OLED Breakout Board from Adafruit.  Imagine the color bars in the attached photo on their side with breaks between each color band.  You could draw each bar to look like VU Meters with or without segments.  A display would also allow you to add some annotations for each bar.

They're larger 1.5" OLED Breakout Board is square and would allow for text below each bar.

They are a little expensive but generate all the necessary voltages needed for the OLED and provide 5V compliant signal levels.  I have a couple and like them very much.
 
The following users thanked this post: Richard Crowley

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: de
Re: Audio bar graph. Small!
« Reply #7 on: March 30, 2018, 10:39:21 am »
Some nice ideas regarding display option. But it seems to me that the challenge may not be around the display (paulca would be happy with the LED bars, right?), but around the A/D conversion?

Paulca -- would the built-in ADCs of typical microcontrollers be good enough for your purpose? You mentioned log scale, but did not specify the dynamic range you are after.

If µC ADCs are adequate, I would defnitely suggest a suitable µC. Then either display via SPI on an OLED, or via matrix drive or charlieplexing (directly from the µC) on discrete LEDs.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Audio bar graph. Small!
« Reply #8 on: March 30, 2018, 11:06:05 am »
Even 4-bit resolution is adequate for 16-step linear display. 8-bit resolution is more than enough for logarithmic,10-step display. Linear to log conversion can be done with simple integer arithmetic or lookup-table.  Even ballistics can be done digitally with a microcontroller of modest power.  And average/RMS + peak display, etc.  The 10-bit resolution of even the cheapest Arduino is overkill for this application. And sample rate of 100 Hz is more than adequate for a modest 10-step display.  So even a microcontroller costing <$1 would do the job for at least 2-channels of stereo and a display 2-3x the steps that @paulca proposes.

The benchmark for digital display of audio levels is the Dorrough loudness meter....

https://youtu.be/yI3_BCDmnzw
 
The following users thanked this post: JPortici

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: de
Re: Audio bar graph. Small!
« Reply #9 on: March 30, 2018, 11:15:00 am »
Even 4-bit resolution is adequate for 16-step linear display. 8-bit resolution is more than enough for logarithmic,10-step display. [...] The 10-bit resolution of even the cheapest Arduino is overkill for this application.

I fully agree that you can fill a 10-step log display in a meaningful way using 8 bit input data. But we don't know what paulca is after, right? Also, paulca mentions the need to adjust the 0dB level (which should be done in software, I think), and we don't know the desired headroom for adjustments.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Audio bar graph. Small!
« Reply #10 on: March 30, 2018, 11:26:44 am »
The most intriguing audio level display circuit IMHO is this one which uses a simple comparator and a string of shift-registers.

https://www.eetimes.com/document.asp?doc_id=1225971

 
The following users thanked this post: ebastler

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Re: Audio bar graph. Small!
« Reply #11 on: March 30, 2018, 11:54:31 am »
So, I'm still working through numbers (struggling with some of them).

For now I'll pick 0.615Vrms as 0dB.  So that means a rectified VPeak of 0.870V (minus diode drop)... which straight away I can see is a problem requiring a good schokty.... or I just give the MCU the negative and let it ignore it and hopefully not fry it.

This gives me the following values for the LEDS:


   Vrms   Vpp   Vpk
Vref   0.615   1.740   0.870
dB         
-12   0.154   0.437   0.219 Blue
-9   0.218   0.617   0.309 Green
-6   0.308   0.872   0.436 Green
-3   0.435   1.232   0.616 Green
0   0.615   1.740   0.870 Green
3   0.869   2.457   1.229 Yellow
6   1.227   3.471   1.736 Yellow
9   1.733   4.903   2.452 Yellow
12   2.448   6.926   3.463 Red
15   3.458   9.783   4.892 Red


Which nicely fit under the +5V max.  With an 10 bit resolution of 4.8mV and the smallest step (-12dB to -9dB) being 90mV I should be more than fine with the AVR 10 bit ADC.

This covered "internal levels" of the project based around the Line level -2dB figure of 0.615Vrms taken as the 0dB reference.

For the master output level things are different.  I calculated the sound pressure levels of my headphones based on their sensitivity and found that -15dB is not going to cut it.  To give me a usable indication of "loudness" I would need something like:

Given dbSPL = sensitivity(db/V) + 10*LOG10(Vpk)  ???


db    Vrms        Vpk
-120   0.000   0.000  - 53dB  (quiet conversation)
-100   0.000   0.000   
-80   0.000   0.000
-60   0.001   0.002
-40   0.006   0.017
-20   0.062   0.174
0   0.615   1.740   -  113dB ( loud rock concert )
20   6.150   17.397 -  124dB (Dumb and dangerous! Not possible with the circuit I should add and it will be diode clamped much lower)


And there is the problem.  Anything much below -40dB would not be measurable by an MCU with a 5mV resolution, but I can't gain it or the 0dB level will bust the 5V limit.

Might need to reconsider this meter or abandon it altogether and just use another Line level meter.

Of course, as I said, I'm stuggling a little with the maths, so some of my calculations could be out.
« Last Edit: March 30, 2018, 12:02:52 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Re: Audio bar graph. Small!
« Reply #12 on: March 30, 2018, 12:13:03 pm »
This has to be wrong..

dbSPL = sensitivity(db/V) + 10*LOG10(Vpk)


Surely.

-120dB sound level should be practically muted. 

Resulting in 1uV through 76Ohm = a few nano amps so it can't produce "conversation level" through headphones.

I'm missing part of the puzzle obviously.

Hmmm..  Anyone know how to calculate db SPL when given:
Sensitivity 114.6 dbSPL / V
and a Vrms or Vpk?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Audio bar graph. Small!
« Reply #13 on: March 30, 2018, 03:24:19 pm »
But we don't know what paulca is after, right?
Right.  @paulca has not revealed his application.  For example, my application is to monitor recording levels for audio and video production.  It is quite common in modern digital gear to put 0dB at the top of the range. Hence the term dBFS (deciBels Full Scale). 

The old traditions of some reference voltage/impedance/power for "0dB" is relegated to ancient history of telephone lines 100 years ago. And analog (mag tape) recorders of 50 years ago.  But this is the 21st century and we aren't constrained by tape saturation, etc.  What we ARE constrained by is the very hard limit of the analog to digital converter.  When you have reached Full Scale, you are out of bits and hard clipping ensues.

Nobody who is doing any kind of practical recording cares about -120dB because that is "down in the mud" of the noise floor of the circuits in the signal chain (starting at the microphones).  So is @paulca trying to design some kind of Sound Pressure Level (SPL) meter?  Even those don't have a continuous range from -120 to +120dB.  They use segmented ranges for better circuit optimization and measurement/indication resolution.  So, we are all just shooting in the dark trying to imagine what @paulca is trying to do here???
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Re: Audio bar graph. Small!
« Reply #14 on: March 30, 2018, 03:58:57 pm »
The purpose is to show line level at different stages in a mixer circuit.  Post pre-amp, post mixer amp, post master volume. Primary purpose is to flatten the gain structure to around 0dB.

Richard, if the db scale is not reference to an arbitary value, what exactly is it referenced to?  Have I missed the point of dB completely?

Forget the output level meter.  I was trying to show the full range of output that would go to headphones.  I was considering putting a meter on the headphone output level, but as per my last post the headphone amp will be working in much lower db levels.

Also I think my equations where wrong.  The effective SPL values don't make much sense.

The -15db to +15db line level meter is the important one.

As that equates to a range maxing out at under 5V I should be fine with the AVR 10bit ADC.

"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Re: Audio bar graph. Small!
« Reply #15 on: March 30, 2018, 04:36:40 pm »
So if I have a bunch of 10 segment LEDs for the bar charts.  Some AVR code using the ADC, that leaves 3 things.

1.  Meter impedance
2.  Rectification
3.  Correct measuring

For 2, my options are, just put both the positive and negative side of the audio signal directly onto the MCU pin and hope it doesn't upset it or half wave rectify it with a diode and factor the voltage drop.  The later raises questions about the meter cutting out below the Vf of the diode.  The former raises questions as to how much negative voltage the MCU pin will take before bad stuff happens.

For 3, is it acceptible to measure peak voltage by looping and taking the max, or is a correctly sized capacitor/resistor required to measure effectively RMS voltage.

2...  I don't want the meters to interfere with signal.  The signal in all monitoring points will be between opamps, so should I put something like a 4 Meg resistor on the meter signal input.  EG: 

Measure point --> 4Meg --> AVR ADC Pin.

Is this enough to prevent any alteration to the signal?

Am I missing the point entirely?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7661
  • Country: ca
Re: Audio bar graph. Small!
« Reply #16 on: March 30, 2018, 05:33:42 pm »
Slowly think things through.  Remember you have a MCU with ADC.  You will be able to do simple math with the sampled signal, sampled at CD audio bandwidth, since you may want to have software filtering and total control and even extended features with the source audio analysis.  Also remember about input current and biasing, maybe an optional LPF if you aren't sampling at full bandwidth.

Also remember, MCUs are cheap.  Do not try to save 2$ on one if a double speed, or 32 bit one is available.

If you get to a schematic stage, you'll get plenty of additional help here.
« Last Edit: March 30, 2018, 05:35:21 pm by BrianHG »
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Audio bar graph. Small!
« Reply #17 on: March 30, 2018, 05:42:11 pm »
A Bel (or as we use it more commonly, a 10th of a Bel or a deciBel) is:

Quote
The decibel (symbol: dB) is a unit of measurement used to express the ratio of one value of a physical property to another on a logarithmic scale. It can be used to express a change in value (e.g., +1 dB or -1 dB) or an absolute value.

In the case of absolute value, it expresses the ratio of a value to a reference value; when used in this way, the decibel symbol should be appended with a suffix that indicates the reference value or some other property. For example, if the reference value is 1 volt, then the suffix is "V" (e.g, "20 dBV"), and if the reference value is one milliwatt, then the suffix is "m" (e.g., "20 dBm").

Source:  https://en.wikipedia.org/wiki/Decibel

You seem to be measuring dbV?  (decibels relative to 1V)  https://en.wikipedia.org/wiki/Decibel#Voltage
Or perhaps other audio-specific values?  https://en.wikipedia.org/wiki/Decibel#Audio_electronics

Meter impedance is pretty much a relic of 60-80 years ago when they had a standard dBm (relative to 1 milliwat across 600 ohms where 0.775 volts =  "0dB".  You seem to want to measure audio voltages at various points in the signal path where a high-impedance voltage-referenced measurement would make the most sense.

Simple fast-response analog rectification and basic filtering/integration would seem to be the most appropriate to produce a DC voltage that accurately represents the audio signal envelope.  You can do other things (like "ballistics", peak-indication, etc.) in software.

Correct measuring (presumably you mean calibration?) is just a matter of setting the analog gain and software arithmetic so that your indicator reads what you want.  This can be done in hardware (trim-pot) and/or in software (gain setting values) etc.

Note that a measurement reference of exactly 1.0V  may not be ideal for whatever you are doing.  Perhaps your full-scale reference should be set at the maximum signal your circuit is capable of before clipping.  That probably isn't exactly 1.0V
« Last Edit: March 30, 2018, 05:48:33 pm by Richard Crowley »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7661
  • Country: ca
Re: Audio bar graph. Small!
« Reply #18 on: March 30, 2018, 05:53:28 pm »
Simple fast-response analog rectification and basic filtering/integration would seem to be the most appropriate to produce a DC voltage that accurately represents the audio signal envelope.
:--

  You can do other things (like "ballistics", peak-indication, etc.) in software.
:-+
Just do everything, A->Z, everything you can possibly imagine under the sun, even theoretical physics, even destroy the universe, all in software...  Take this leap, and you will thank me in the future.  Go with the first option above, and you will never know...

 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Audio bar graph. Small!
« Reply #19 on: March 30, 2018, 06:00:07 pm »
@BrianHG,  how we would get an accurate measurement of the audio envelope with only positive-responding inputs to an ADC in a uC?  Especially when audio waveforms are notoriously asymmetrical.  I completely agree that here in the 21st century we should as much as possible in software.  But I am not seeing how to do that with your average DC ADC?

And, sampling the raw waveform would require a much higher sampling rate to accurately catch short peaks which would require a faster (more expensive) ADC and/or uC would it not?
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Audio bar graph. Small!
« Reply #20 on: March 30, 2018, 06:15:32 pm »
The purpose is to show line level at different stages in a mixer circuit.  Post pre-amp, post mixer amp, post master volume. Primary purpose is to flatten the gain structure to around 0dB.

This is standard in audio mixers. The most important test point is right after the preamp, before the fader, which is why the button is called "pre-fader listen" or PFL.

Quote
Richard, if the db scale is not reference to an arbitary value, what exactly is it referenced to?  Have I missed the point of dB completely?

Inside a mixer, the levels really arbitrary. Pull up the user manual of any analog mixer. It should include a diagram of the internal gain structure. The input level meter (either on the channel strip, or the main meter when you press PFL) has a 0 dB position, or unity. This level represents a compromise between noise performance and clipping. That is, not enough preamp gain up front means you might be pushing the output levels up, boosting noise. Too much preamp gain means you risk clipping not only the preamp itself but the summing amps downstream. That second point is often not understood. You have to allow for more mix bus headroom when you're mixing 40 channels than you need when mixing only 16. A lot of people say, "Well, on the Midas H3000 you have to run the inputs way up into the red to get it to sound good." Well, that's because the thing is designed to handle, what, a hundred inputs to mix? You have to goose up the input gain to get something to come out the output!

See the attached, it's the gain structure for an Allen & Heath GL4000. Conveniently, its internal gain structure is 0 dB = 0 dBu (or 0.77 Vrms).

So the point, of course, is that you set all of your input gains such that all of the inputs are at the same level on the PFL meter. And then you use the faders to set the mix level for each input.

 
The following users thanked this post: Richard Crowley

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Audio bar graph. Small!
« Reply #21 on: March 30, 2018, 06:23:43 pm »
@BrianHG,  how we would get an accurate measurement of the audio envelope with only positive-responding inputs to an ADC in a uC?  Especially when audio waveforms are notoriously asymmetrical.  I completely agree that here in the 21st century we should as much as possible in software.  But I am not seeing how to do that with your average DC ADC?

You have to drive the ADC appropriately. If the ADC has a 4 V span and a 2.0 V offset, your ADC driver has to level-shift the audio up 2 V while likely attenuating to fit within the span. Configure the micro's ADC to give you a 2's complement result, and then the standard absolute-value function gives you a positive result which you can average

Quote
And, sampling the raw waveform would require a much higher sampling rate to accurately catch short peaks which would require a faster (more expensive) ADC and/or uC would it not?

Cheap micros have 10-bit ADCs that run at 250 ks/s or 500 ks/s. With the former you should be able to mux and sample four channels.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Re: Audio bar graph. Small!
« Reply #22 on: March 30, 2018, 06:25:12 pm »
The purpose is to show line level at different stages in a mixer circuit.  Post pre-amp, post mixer amp, post master volume. Primary purpose is to flatten the gain structure to around 0dB.

This is standard in audio mixers. The most important test point is right after the preamp, before the fader, which is why the button is called "pre-fader listen" or PFL.


This is exactly why I want these meters.

The Small signal audio design book uses resistor divider ladders, LEDs and BJTs.  For 5 meters this will result in a board about 4" square.  Much like a meter panel on a large desk. 

I want it in 2" square or so.

Using "one" and PFL or "meter select" switches is an option, but LED bar graphs are fairly cheap and small.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Audio bar graph. Small!
« Reply #23 on: March 30, 2018, 06:26:47 pm »
The purpose is to show line level at different stages in a mixer circuit.  Post pre-amp, post mixer amp, post master volume. Primary purpose is to flatten the gain structure to around 0dB.

This is standard in audio mixers. The most important test point is right after the preamp, before the fader, which is why the button is called "pre-fader listen" or PFL.


This is exactly why I want these meters.

The Small signal audio design book uses resistor divider ladders, LEDs and BJTs.  For 5 meters this will result in a board about 4" square.  Much like a meter panel on a large desk. 

I want it in 2" square or so.

Using "one" and PFL or "meter select" switches is an option, but LED bar graphs are fairly cheap and small.

The size of the meter board will be dependent on the size of the LEDs used for the display. You can fit the micro and support circuitry on the back of the board.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: gb
Re: Audio bar graph. Small!
« Reply #24 on: March 30, 2018, 06:30:39 pm »
@BrianHG,  how we would get an accurate measurement of the audio envelope with only positive-responding inputs to an ADC in a uC?  Especially when audio waveforms are notoriously asymmetrical.  I completely agree that here in the 21st century we should as much as possible in software.  But I am not seeing how to do that with your average DC ADC?

You have to drive the ADC appropriately. If the ADC has a 4 V span and a 2.0 V offset, your ADC driver has to level-shift the audio up 2 V while likely attenuating to fit within the span. Configure the micro's ADC to give you a 2's complement result, and then the standard absolute-value function gives you a positive result which you can average

Interesting.  Can I just AC couple it with a cap and lift the ADC side with a virtual ground to +2V.  I'm thinking Arduino 10bit 0-5ish volt ADC.

Is the difficult bit not then calibrating it?  That virtual ground would need to be very accurate. to get accurate readings or am I over thinking it?  If I make the virtual ground the AREF that might work.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf