Sunday, December 8, 2013

ADG1414 for Professional Audio Circuits

The ADG1414 is one of numerous "iCMOS" gate chips from Analog Devices specifically designed to handle 30Vpp+ analog signals like high quality audio. This particular chip has a shift register that controls 8 gates. I have just tested this chip as a gain control for a basic microphone preamp circuit so I'm posting the results here for posterity.

The following picture shows an Arduino Micro connected to an ADG1414 to control the gain of an NE5532 circuit:


Why not just use a regular mechanical potentiometer do you ask?

One major problem with trying to build custom audio circuits is designing and actually constructing the interface with potentiometers, switches, LEDs and so on. As soon as I settle on a design I want to change it and frequently that means re-routing wires and rebuilding tediously hand-wired boards.

If all of the circuit elements can be controlled digitally, then a microcontroller or PIC could be used to control the circuit and completely decouple it from the interface. I could create a minimal interface with a few encoders and tactile switches. Or if the microcontroller could be programmed to understand MIDI commands, the circuit might be controlled entirely with your average inexpensive non-keyboard MIDI controller. Or you can create a fancy interface to digitally control your analog circuit. Emperical Labs products are conventional analog circuits that are almost completely controlled digitally.

However, I'm not aware of any pro-audio equiptment that uses these iCMOS gates. So the question is, why? On paper these chips look great. What's the problem?

The problem is that historically CMOS gates have a really bad reputation processing audio signals. But these iCMOS gates are different ...
  • Conventional CMOS gates are limited to a signal range of a few volts which is a deal-breaker for common +-15V based circuits.
  • Conventional CMOS gates have an on-resistance of several 100 Ohms which means there must be significant series resistance (or load resistance) to make a switch that really turns off (or on).
  • Conventional CMOS gates have bad on-resistance flatness which means the signal will become distorted at even medium levels.
These iCMOS chips have almost completely eliminated these problems. They handle 30Vpp. The AD1414 has an on-resistance of less than 10 Ohms and an on-resistance flatness of less than 2 Ohms.

The following circuit uses 3 gates of the ADG1414 to control the gain of an op amp. The 3 gates can generate 2 to the power of 3 gain states but for this microphone preamp application, only 6 of the 8 states are really useful (~0dB, +6dB, +12dB, +20dB, +40dB and +50dB).


The purpose of this test circuit is to see if there are any unexpected problems. In particular, my main concern was noise. Any noise whatsoever would be completely unacceptable for a microphone preamp.

The following plot shows the FFT output of the AD1414 test circuit with the gates in the +20dB state. The signal is 20Vpp at 900 Hz.



Note that the harmonics are actually NOT from the ADG1414.

The following plot is the equivalent circuit with the AD1414 "surfboard" removed from of the breadboard and replaced with two jumpers for the closed gates.


You can see the harmonics remain. So it's not the ADG1414.

Replacing the gates with jumpers did increase the gain slightly. Presumably because the 10 Ohms of gate on-resistance is significant compared to the 68R.

Where are the harmonics coming from do you ask?

Because I am not an Engineer, my "laboratory" consists of an XP laptop and an old M-Audio FastTrack USB. So to do even a basic SNR type of measurement I had to use the other half of the NE5532 to boost the output of the FastTrack +40dB and then, after the test circuit, the output is tapped off of a 1K / 10R voltage divider because the FastTrack can only handle an few volts. This extra circuitry might be responsible for some distortion I suppose. But the first harmonic is -80dB down so maybe it's not completely abnormal for two gain stages of +40dB and +20dB. Anyway, the harmonics drop significantly and dissapear at ~3Vpp.

The final graphic shows the noise floor which is appears to be greater than -110dB. With the equiptment I have, that is as good as I'm used to seeing.



Finally, I listened to the circuit using a headphone amplifier with the preamp input grounded using the 220 Ohm resistor. I could not perceive any additional noise above the hiss expected of higher gain settings. Specifically, in the +50dB setting, in addition to the gain provided by the headphone amplifier, the hiss of the noise floor is very audible. But there is no hum or odd rumble and, most important, the hiss level is the same with or without the ADG1414 (although I had to temporarily turn the circuit off to remove the surfboard and add the jumpers in it's place so this is by no means an A/B test). At low gain settings, there was no audible noise at all.

Note that when I initially breadboarded the circuit, I did not properly separate the microcontroller supply or ground from the test circuit and of course I got quite a bit of hum and rumble. This was completely resolved by properly separating the supply and grounds of the microcontroller from the analog circuitry containing the AD1414. With supplies properly separated, there is no buzz or switching noises when cycling through gains using the tactile button or even when resetting the microcontroller. There is a little bit of popping when switching between +20dB, +40dB and particularly +50dB. When designing a circuit with a chip like this, it might be a good idea to have the SPI control lines (clock, data and 5V reference) run over wires from a seprate board hosting the microcontroller. So the ADG1414 should be positioned as though it was simply part of the analog circuit with all non-SPI control pins referenced to the analog supply. The ground pin and all unused gate terminials were connected to local analog ground.

Sound analysis software and corresponding plots created using DSSF3 from ymec.com.

I have no affiliation with Analog Devices.

No comments: