ADC to uC for software driven VU?

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

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

adastra

Active member
Joined
Oct 8, 2012
Messages
32
Howdy,
I'm interested in using a 16-bit ADC to drive a level meter (led, lcd, etc) from single-ended preamp output signals.  Obviously there are simpler ways of doing an LED VU (lm3915 etc) but this is an interesting challenge for me and opens things up to remote controls which is useful to me. 

From what I can tell, it would need to go something like this:
Audio Input -> OpAmp Buffer -> Full Wave rectifier -> ADC Chip -> uC

Would something like an ADS1115 be appropriate in this application?
http://www.ti.com/product/ads1115#relEnds
Not married to that chip but it has a nice interrupt function and connects over i2c, which is appealing from a software point of view.


Any thoughts or ideas would be appreciated, I'm an enthusiastic tinkerer and decent on the uC side, but I'm no engineer.

Cheers,
AdAstra.
 
You can perform the rectification and time constants inside the micro. In fact several cheap micros have  multiple A/D convertors built in.

I did the meter in the picture for the master section of a console (still in production APB). I added latches to drive the LEDs but most of the meter was software.

16b micro with 12 b A/Ds (inexpensive microchip).

I also display the peak (dot) separately from VU (bar).

JR
 

Attachments

  • sm_meter.jpg
    sm_meter.jpg
    35.9 KB · Views: 80
Thanks John.  Indeed your meter looks awfully familiar:)

So, are you saying to take a single-ended signal straight off the preamp to an ADC?  No external buffer or rectifier needed?

 
adastra said:
Thanks John.  Indeed your meter looks awfully familiar:)

So, are you saying to take a single-ended signal straight off the preamp to an ADC?  No external buffer or rectifier needed?

You will need a fairly powerful micro to able to work with raw audio. If you do the rectification and basic ballistics in hardware then you can get away with a very low cost micro-controller like an 8 bit PIC.

Cheers

Ian
 
I wouldn't use a 8 bit micro ever again.

When you perform a FW rectification in software you give up one bit of dynamic range so 12 bit becomes effectively 11 bit, but if you average data over time that increased dynamic range, while there are other issues related to sampling, settling time,  etc,,,

I used a 16b processor and 12 bit a/d . I wouldn't advise using less.

JR
 
JohnRoberts said:
I used a 16b processor and 12 bit a/d . I wouldn't advise using less.
YMMV.

When money is an issue (or you're familiar with the tools), an 8-bit ATXmega is plenty fast for this, and it has a differential ADC to boot. Remember that you don't need to sample at >=44k1 if you only want a signal level indicator.

JDB.
[for signal magnitude/energy measurements your sampling rate isn't even required to be monotonic; you can have all the jitter you want]
 
jdbakker said:
JohnRoberts said:
I used a 16b processor and 12 bit a/d . I wouldn't advise using less.
YMMV.

When money is an issue (or you're familiar with the tools), an 8-bit ATXmega is plenty fast for this, and it has a differential ADC to boot. Remember that you don't need to sample at >=44k1 if you only want a signal level indicator.

JDB.
I am familiar enough with byte wide data and instruction sets after writing thousands of lines of 8 bit code to hate them very much.  :mad:

To make a meter better than a LM3915 no problem, but the temptation is to go for more dynamic range display.
[for signal magnitude/energy measurements your sampling rate isn't even required to be monotonic; you can have all the jitter you want]
In fact Nyquist sampling criteria is not really a significant concern. Who cares if an alias folds down in frequency as long as the amplitude of that alias is still accurate.  I found settling time (acquisition time?) for the A/D input sample and hold a real limitation. Most cheap processors only have one A/D convertor but switch several inputs into that one A/D for sampling. I made a 4 input meter (actually 6 input but only 4 active at a time).  If subsequent adjacent audio samples are volts apart from each other in dc value, the sample and hold has to slew to and stabilize at this new sample voltage, before an accurate A/D conversion can be performed.

This is all manageable but not obvious from casual inspection.

BTW the 8 bit processors I used in the past only had 10 bit A/Ds built in  (so only 9 bit after rectification). The 16b/12b A/D family I used was only $2-$3 cost. Maybe if you are making millions of these, save the $1.

FWIW using reasonable meter time constants will increase effective dynamic range as subsequent samples get averaged together but wider data and wider instructions makes that math easier too. 

JR

 
I wonder if it would be possible to re-write software for some of the diy-solutions out there, e.g.: http://www.banggood.com/AS30-Binaural-30-Segment-LED-DIY-Kit-Music-Spectrum-VU-Meter-p-1008247.html

..this is probably as cheap as you could get it..

Jakob E.
 
gyraf said:
I wonder if it would be possible to re-write software for some of the diy-solutions out there, e.g.: http://www.banggood.com/AS30-Binaural-30-Segment-LED-DIY-Kit-Music-Spectrum-VU-Meter-p-1008247.html

..this is probably as cheap as you could get it..

Jakob E.

Am I right in thinking that the 'software' for this actually runs on the PC and the bar graph itself is relatively dumb?

Cheers

Ian
 
gyraf said:
I think it has a minijack audio input, and the usb is just for easy-and-predictable 5V supply..

Jakob E.

Looking at the assembly instructions I believe you are correct - which makes it very good value for money.

Cheers

Ian
 

Latest posts

Back
Top