Author Topic: Just wondering... how to: digitally programmable gain on MIC inputs?  (Read 3315 times)

0 Members and 1 Guest are viewing this topic.

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Hello,

I have randomly came across this very interesting component: http://www.thatcorp.com/datashts/THAT_5171_Datasheet.pdf
http://www.aes-media.org/sections/pnw/ppt/other/low_cost_programmable_microphone_preamp_gain_control.pdf

I have always wondered, how do they implement programmable gains on the MIC inputs in all those digital audio mixing desks and racks. So now I know... or don't I?

Out of curiosity, I have looked how much does the part cost. Wow. I've almost fallen of my chair.  Insane pricing strikes again! :o :o :o
https://mouser.com/ProductDetail/THAT/5171N32-U?qs=sGAEpiMZZMvMUzLd0qnXYkT0A1%252b9vFe5

Okay, there is a cheaper part no. THAT 5173 with only 3dB gain step, costing just 2/3 of that.

Okay, there is even a cheaper part, THAT 5263, a dual channel within single package with even less gain range.

One could also state, that at quantity, the cost is acceptable, about $4-5 a pop. But that's just the gain control IC, you still need to add cost of the pre-amp itself. The cost of that per channel will very likely be at least the same amount, likely much more.

You could also probably state, that those digital mixing desks are very expensive. Yes and no. There are several smaller models available on the market, that I think just could not justify the cost of such ICs.

As far as I have looked, I have not found any similar ICs from any major IC vendor. Availability of these THAT parts is also piss-poor, I have found only Mouser (at least in EU) has them, and I mean not much of them is really in stock (if any, for example no THAT 5263 in stock - which is the cheapest one of them all) 

So how do they achieve the programmable gain on the MIC inputs in those entry level* mixing desks? Do they really use these THAT parts, or others I haven't found yet? Or are there some interesting topologies, that might be more cost effective for these? Does anyone know? Unfortunately, I have never had any chance to see any of these modern mixing desks inside (but plenty of those analog ones).

By entry level, I mean like Allen & Heath Qu16, which is a 16 MIC input desk that must cost like a 1000 USD or less to manufacture (retail price is like 1500 USD)
Or the Mackie DL32S, which is a freaking 32 channel input mixrack with a retail price of 1100 USD.

Would be nice if there is anyone on the forum, who got hands on one of these, so we could look inside.  8)
« Last Edit: January 06, 2019, 07:22:55 pm by Yansi »
 

Offline mrpackethead

  • Super Contributor
  • ***
  • Posts: 2845
  • Country: nz
  • D Size Cell
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #1 on: January 06, 2019, 07:28:37 pm »
 the pricing on mouser/digikey in no way reflects the pricing that you will pay when you are buying many many reels of them.   


On a quest to find increasingly complicated ways to blink things
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #2 on: January 06, 2019, 07:44:21 pm »
Still the pricing will reflect what the manufacturer quotes on their web page, won't it?

http://www.thatcorp.com/5171_Digital_Preamplifier_Controller_ICs.shtml
 
Quotes $6.7 for a 1000pcs. I do not think that digital mixing desks are made in such quantities, the pricing could drop significantly lower.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #3 on: January 06, 2019, 07:58:16 pm »
I have found these cute images of what's inside that Qu16 desk: https://imgur.com/a/yHnJI Unfortunately, no photos of the preampy stuff.
 

Online DaJMasta

  • Super Contributor
  • ***
  • Posts: 2298
  • Country: us
    • medpants.com
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #4 on: January 06, 2019, 08:05:30 pm »
Quantity goes a long way, having a relationship with a manufacturer goes a long way, and THAT corp is sort of a boutique that does good work, but is by no means the only player in the game.  Sure, you may only use a dozen of the chips on a console you're only going to make a few thousand of, but if you can use the same chips across your product line, you could easily need tens of thousands, so the volume is fairly high.  That said, large mixing racks are actually in demand, in addition to venues and recording studios, you need them for TV and film work, they use them in large churches, and they're starting to come in for streaming and other uses, so selling a thousand high end mixers is probably easy for a large company.


You could also try a different approach, a fixed gain preamp with a programmable attenuator.  Since audio is low bandwidth, getting 100x or more gain out of an input stage is pretty easy, and line level is probably the internal analog bus/what works for the DACs/ADCs used in a digital console, so you don't need a particularly high signal level internally.  That means if your split rail is like +-5V or more, you could easily overamplify your signal by a fair margin and still stay away from the rails, then just switch in digital attenuation as needed.  Of course there's a lot of finesse involved with audio stuff, but as long as you can keep the noise floor low enough for 100dB or so of dynamic range and you can keep the distortion down, it will probably sound fine even on the high end.  Sure, it's no simple feat, but it's also well within reach of many modern ICs, so the constraint usually comes down to layout and analog concerns more than IC performance, so you don't often need the very top spec'd parts for your audio path.
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #5 on: January 06, 2019, 08:19:56 pm »
Would it really hurt the manufacturers to reduce their low quantity pricing, a lot? I constantly hear that no manufacturers even actually pay it anyway.

Not just on electronics, on lots of things where technology is only affordable when huge economies of scale can operate. (drugs in particular. Its really criminal to price life saving drugs that way.)

It seems to me that kind of pricing is clearly an unjustifiable subsidy to big companies. (to keep smaller firms out.)
"What the large print giveth, the small print taketh away."
 
The following users thanked this post: Yansi

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #6 on: January 06, 2019, 08:36:31 pm »
Quantity goes a long way, having a relationship with a manufacturer goes a long way, and THAT corp is sort of a boutique that does good work, but is by no means the only player in the game.  Sure, you may only use a dozen of the chips on a console you're only going to make a few thousand of, but if you can use the same chips across your product line, you could easily need tens of thousands, so the volume is fairly high.  That said, large mixing racks are actually in demand, in addition to venues and recording studios, you need them for TV and film work, they use them in large churches, and they're starting to come in for streaming and other uses, so selling a thousand high end mixers is probably easy for a large company.


You could also try a different approach, a fixed gain preamp with a programmable attenuator.  Since audio is low bandwidth, getting 100x or more gain out of an input stage is pretty easy, and line level is probably the internal analog bus/what works for the DACs/ADCs used in a digital console, so you don't need a particularly high signal level internally.  That means if your split rail is like +-5V or more, you could easily overamplify your signal by a fair margin and still stay away from the rails, then just switch in digital attenuation as needed.  Of course there's a lot of finesse involved with audio stuff, but as long as you can keep the noise floor low enough for 100dB or so of dynamic range and you can keep the distortion down, it will probably sound fine even on the high end.  Sure, it's no simple feat, but it's also well within reach of many modern ICs, so the constraint usually comes down to layout and analog concerns more than IC performance, so you don't often need the very top spec'd parts for your audio path.

I think that would hurt the resulting quality a lot.   There is a constant fight for signal headroom to be left in professional audio equipment, so any "overamplification" is highly unwanted due to headroom, noise, distortion and other aspects.
Even the cheapest mixing consoles stretch the supply voltages to good amounts (like +-17V) for good reasons.

It is not simply possible to overamplify, due to the sheer amount of dynamic range required.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #7 on: January 06, 2019, 08:48:25 pm »
It seems to me that kind of pricing is clearly an unjustifiable subsidy to big companies. (to keep smaller firms out.)

This. Exactly what pisses me off like not much else. Conspiracy? Yes. Reality? Unfortunately very probably yes too.



I have just found PGA2505. www.ti.com/lit/ds/symlink/pga2505.pdf
Looks feature-wise very similar to those THAT parts. I do not think that is a coincidence. However the PGA2505 seems worse spec, however pricing slightly better, as it contains the whole pre-amp, it is not just the gain controller.

EDIT: Ah, and there is also the  PGA2500, the better specced counterpart. So it really seems is obvious, that Texas competes directly with THAT (5173 and 5171) with these devices. Hard to say who had begun the fight, but oh well..
« Last Edit: January 06, 2019, 09:02:49 pm by Yansi »
 

Offline mrpackethead

  • Super Contributor
  • ***
  • Posts: 2845
  • Country: nz
  • D Size Cell
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #8 on: January 06, 2019, 08:56:09 pm »
if i need 1M or 1pce of an IC, how much support do i need in each case.
On a quest to find increasingly complicated ways to blink things
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #9 on: January 06, 2019, 09:03:58 pm »
I do not understand your comment, Mr PacketHead. Could you please elaborate?
 

Offline mrpackethead

  • Super Contributor
  • ***
  • Posts: 2845
  • Country: nz
  • D Size Cell
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #10 on: January 06, 2019, 09:53:50 pm »
the cost of supporting a someone whos designing in a part dont' change much between one and a million parts. 

What changes is that cost can be divided over lots of parts.  Thats why large quanitys are cheaper.
On a quest to find increasingly complicated ways to blink things
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #11 on: January 06, 2019, 10:10:21 pm »
And what kind of support are we talking about?
 

Offline mrpackethead

  • Super Contributor
  • ***
  • Posts: 2845
  • Country: nz
  • D Size Cell
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #12 on: January 06, 2019, 10:11:10 pm »
how about starting with a datasheet, development of eval kits etc etc.
On a quest to find increasingly complicated ways to blink things
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 37740
  • Country: au
    • EEVblog
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #13 on: January 06, 2019, 10:16:16 pm »
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #14 on: January 06, 2019, 10:21:31 pm »
What you write does not make much sense.

Why should a datasheet cost me as an individual more, than a company, that's using more pcs? The cost of part development (for the manufacturer) does not change with how many parts I buy. The cost of development is a constant, divided by the number of parts they manufacture.

I see no sense why should I overpay for a so called "support" (a datasheet, etc), if I do not even buy the parts from the manufacturer directly, but from a third party, a distributor?

I think it is exactly the other way round! The bigger the company, the more resources it needs.  It is not those "diy individuals", that create most of the work for support centers in large corporates.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #15 on: January 06, 2019, 10:40:01 pm »
There are also other ways of skinning this, you can for example build a mic amp out of a couple of transistors and a instrumentation style stage based on a few opamps and use an LED and LDR pair to swing the gain of the instrumentation amp, I see no reason to think it would not work....

If your input pad is say a relay switched 20dB (fairly typical) then you can do most of your gain changes by using a network of photomos switches in the instrumentation amp gain setting region, (CADAC did this in the excellent M16).

Remember also that for  a modern digital system you are only looking for a few volts peak at the ADC input pin pair (And you nominal level should be probably 30dB below that), so it is not like you are trying to swing 15V on a 17.5V rail like the old days.

Then there is that trick Sony came up with, two preamp stages effectively about 30dB apart, two ADCs and some DSP you use the sensitive one until it approaches clipping then switch to a scaled version of the less sensitive one until the modulator in the sensitive stage recovers....

One nice trick if playing with this sort of thing is to run the ADCs at 96kHz, then deliberately inject a sniff of 24Khz sine into the inputs, that way you can trivially get the I/Q values for the 24Khz and use this to tweak the digital gains.

It is worth noting that the best microphones have about a 130dB dynamic range or so, a good quality ADC about 120dB dynamic range so it should be entirely possible to cover the whole thing with just a pad and two or three switched gains, the rest can be done in the digital domain.

For THAT parts, Profusion in the UK are good for modest quantities.

Regards, Dan.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #16 on: January 06, 2019, 10:54:11 pm »
I do not think that it would be that easy with photomos. The gain setting resistor typically starts from couple of ohms and needs to have good linearity. Any switch in that path will have significant effect on the distortion.  Increasing impedances will increase noise too.

You are correct, that most ADCs want somewhere about 2Vrms. But excessive gain followed by attenuation still creates unnecessary noise   and distortion.

You are probably correct, that with a very high quality ADC (120dB of DR) it would be possible to have only few switched gains. However such ADCs are scarce in the cost optimized equipment mentioned above. Hence wondering how have they done it.

But I think solution with PGA2505 comes cheap enough, it would cost very likely under $4 at quantity, which I think for a complete and a minimum external parts sounds quite reasonable.
 

Offline Jr460

  • Regular Contributor
  • *
  • Posts: 142
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #17 on: January 06, 2019, 11:37:09 pm »


Except that mixer doesn't have digital controlled pre-amps.   Not much of anything on that board is under digital control.

Let's take a look at Yamaha 01V mixer.   All digital right?  Save all the setting, recall anything you want, right?   Wrong, look close at the pre-amps for each channel.  That control and also the 20dB pad are analog.   Setup to LS9, MC7L, PM5D, and you get preamp gain controlled and saved digital.   To take it further try a Rio3224D headend, the preamps are not even in the same box as the mixer.  (Dave really needs to go do a tour of the Audinate/Dante company)

For the Rio line, I know that they do not do the whole adjustment range with one amp/chip.   There is a place in the range that you can hear a small relay click as it puts in or removes a pad.   Of course when they do that they also have readjust the gain of the amp at the same time so things seem seamless.   An early firmware update fixed an issue with just that issue, gain change not smooth just as the relay came in or out.
 
The following users thanked this post: The Soulman

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #18 on: January 06, 2019, 11:42:10 pm »
Back in my 'audio days' a simple digital potmeter in the feedback loop (to adjust the gain) of a low noise opamp (NE5532) did the trick.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: Kilrah

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #19 on: January 07, 2019, 12:10:43 am »
But you simply can't cover a 60dB gain range with a simple digital pot in a differential low noise mic preamp.  NE553x at 60dB gain in simple amplifier configuration would be noisy as hell.

The THAT part datasheets shows quite nicely, how the preamp looks like and looked like even back in those analog days. The resistor they mark as "Rg" was/is a typically 5k reverse log potentiometer. (in the schematic below, the gain pot connects to the "X68" pins 1 and 2 in the right upper corner)
« Last Edit: January 07, 2019, 12:17:47 am by Yansi »
 

Online DaJMasta

  • Super Contributor
  • ***
  • Posts: 2298
  • Country: us
    • medpants.com
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #20 on: January 07, 2019, 12:25:50 am »
You can have a fixed gain stage in the preamp, though, and then an adjustable stage with much less dynamic range for adjustment and a much higher noise floor because the noise floor of the system will already be set by the noise floor of the input - 10x gain on the initial preamp stage means any variable gain stuff following it can have a noise floor 10dB higher and only contribute the same noise to the signal as the preamp, making the requirements for the fancier adjustable gain hardware much more generous and making the thermal noise for a given value resistor much less impactful.  Once you get amplified up a bit, ten microvolts here or there count for little, where at that first input stage a few nanovolts difference can be a big deal.  Analog muxes do a reasonable job switching as well, the THD can easily be below 0.001% for reasonable signal levels into high impedances, so switching in attenuation is a viable choice on an amplified signal.  Can't really say as to the exact architecture used, but there seem to be some options for inexpensive architectures that could yield more than 100dB of dynamic range for a complete system.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #21 on: January 07, 2019, 12:46:37 am »
My point about the ADCs was really that the front end for such a thing wants to have a gain of about -20 - + 40dB instead of 0 ->60dB that would have been appropriate to a old school desk (Which makes the gain setting resistor and DC block cap much more reasonable).

Further the fact that you are only going for 2V or so at the ADC means that you CAN afford 10dB or so of excess gain followed by a pad without smacking into the rail.

Say 20dB pad followed by 0/+20/+40dB switched amp and ADC driver, AKM have an 8 channel ADC that IIRC is specified at 115dB DR for  about $4 at 1,000 quantity even paying Digikey pricing (AK5558VN), now I never quite believe the headlines on these things but it seems likely to do 110+ in reality, which is a non issue in a budget mixer. 
 
Doing the lazy IC sort of way, the THAT 6266 does all the programmable gain and ADC driving for two channels for £3.75 per channel pair at 1k quantities, and 6dB steps is just fine for this kind of thing, so one option is 4 * £3.75 + £4 per 8 channels (Plus a bag full of passives, connectors and tin) = ~£20 per 8 channels of mic input (Basically Digikey pricing at 1k off), £100 for a 24 channel desk front end seems workable at modest volumes. Bet you could cut that down by 30% or so with a good buyer and some clever engineering instead of going the easy route.

Connectors and metalwork will cost as much as the 'tronics.

Regards, Dan.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #22 on: January 07, 2019, 12:57:10 am »
Note that that old school preamp Yansi posted has a few issues...

Firstly the wonderful, and much missed '737 low noise PNP is unobtainium and there is nothing else quite like it, that thing was superb.

Secondly if you have a mic cable short circuit pin 2 or 3 to ground with the P48 on, the coupling cap will dump **amps** of current into the base of said transistor, more modern designs add a little series resistance and some clamp diodes to make this less destructive.

Thirdly, reverse log pots have another name when you try to source the things "Rocking horse shit".

Regards, Dan.
 

Offline YansiTopic starter

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #23 on: January 07, 2019, 01:16:49 am »
Well, it probably could be done with just a few steps.  I have only experience with building pure analog frontends, hence asking in the first place.
If the dynamic range of the ADC is good enough, that just few 20dB steps would be enough and the rest interpolated digital gain, well probably why not?

That AK5558 seems dirt cheap for its spec, compared to for example CS5368.

Well, we call the pots exponential, but in English I see them commonly as "reverse log" or "reverse audio". And they are definitely pain in the ass to get.

I know about the issues, it was the first schematic I had on hand, from my small Behringer mixing desk.  Regarding the "amp dumping action". I'm not sure, but those BAV21 diodes might protect it a bit, if they were connected a bit earlier in the path. Not sure what they are doing there else anyway.


 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Just wondering... how to: digitally programmable gain on MIC inputs?
« Reply #24 on: January 07, 2019, 01:21:27 am »
You can have a fixed gain stage in the preamp, though, and then an adjustable stage with much less dynamic range for adjustment and a much higher noise floor because the noise floor of the system will already be set by the noise floor of the input - 10x gain on the initial preamp stage means any variable gain stuff following it can have a noise floor 10dB higher and only contribute the same noise to the signal as the preamp, making the requirements for the fancier adjustable gain hardware much more generous and making the thermal noise for a given value resistor much less impactful.
Indeed. IIRC A microphone will need 20 to 30dB gain to start with so there is no use to having a very large amount of gain in the controlled gain stage.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf