The best chip for mic preamp, compression, noise reduction

Years ago, I bought a compander chip from Radio Shack that used only two capacitors; one for "attack" speed, and one for "recovery" speed. But I have no idea what that chip's part number was.

I need a compander now to control recorded voice levels in my project, whether the person speaking is close to the mic or far from it.

However, every compander I see online appears way more complicated to wire up, like the TA31101AP, which wants a total of TWELVE capacitors (10 of them electrolytic) as shown on page two of this PDF file. If I sell 1,000 of my final product, that adds up to a lot of added expense in both dollars and increased assembly time.

I've also read online that simple companders tend to add a lot of noise and distortion; which would not be at all good in that I need the words spoken into the mic to be clearly understood when played back.

What do you suggest? Does anyone know the perfect chip to use?

FYI, the audio recording part of my project is based on the article at Arduino Audio Input.

I can't address bestness. I've gotten good results with an [Edit: Fix this part number] SSM2166, "Microphone Preamplifier with Variable Compression and Noise Gating," from Analog Devices. Here's the datasheet.

The device looks like it's intended for use with an electret, probably in a mobile phone. It advertises a maximum compression ratio of 15:1, expressed in dB. In the compression region, a 15 dB change on the input yields a 1 dB change in the output. At maximum compression, a 40 dB input range translates to a 2.7 dB output range; a range of 10 millivolts to 1 volt translates to an output range of 0.74 volts to 1 volt. The degree of compression over most of the range is set by an external resistor; at the high end of the input range, it's 15:1. The IC also has a setting for a minimum signal level, below which the output drops off dramatically, so the compressor won't try to boost background noise during quiet periods.

The IC has four operating parameters that are set with external resistors. This post will be too long already without describing them, so I'll refer you to the datasheet. The datasheet recommends using potentiometers in the design phase, and determining the external resistors experimentally, suggesting that the settings interact so much that it's not feasible to provide formulae or charts to describe those resistor values. The datasheet shows charts for specific settings, but my experience says that a slight variation from those settings will change the device's response to the remaining settings quite a lot.

The datasheet shows a schematic for an evaluation board with four three potentiometers, and gives instructions for determining external resistors by experimenting with those potentiometers. I built the evaluation board, and the procedure worked well for me. When I switched to fixed resistors, I got the results I expected.

The evaluation board takes three potentiometers, seven capacitors - four electrolytic - and seven fixed resistors. The final product needs the same components, less the potentiometers. I built mine with tantalum capacitors on an Arduino protoshield. The IC is in a 14-pin SOIC package, which the protoshield accommodates nicely. I used tantalum capacitors for their small size and height, which will matter if you want to stack yet another board on top.

I've used this IC for reading inputs from musical instruments, and it's done a good job of keeping the signal voltage at a usable level while the sound level from a plucked string decays. I haven't used it for voice. It's pricey: 6.68 USD in singles from Mouser. But, it does a lot of stuff.

An alternative might be SA575. I've never used it. It advertises similar capability, but doesn't seem to coordinate all its features like the SM2166. It seems to leave more work to the designer. Mouser still has about 40 of the through-hole version available, if that matters to you.

Years ago, I bought a compander chip from Radio Shack that used only two capacitors; one for "attack" speed, and one for "recovery" speed. But I have no idea what that chip's part number was.

Probably an [u]NE570 / 571[/u].

That is such a perfect answer, tmd3. I never expected a reply so helpful and complete.

I've already placed my order for your SM2166 chip! :slight_smile:

It being surface-mount instead of through-hole is a bit of a problem. I've never tried surface-mount. But seems the loss of through-hole (availability as surface-mount takes over) is something we are all going to have to live with in the future. So I've watched a couple of videos on how to "drag-solder" surface mount chips to their boards. And for this specific chip, I ordered the 6-pack of SOIC-14 breakout boards from Adfruit

Again, thank you for COMPLETELY solving my problem.

(...and DVDdoug, thanks for your suggestion too.)

I found it fairly easy to solder this IC to the pads on the Arduino protoshield. The pins are spaced at 1.27mm, half the spacing on a typical through-hole device, and they're not all that difficult to work with. It was my first attempt to use a surface-mount IC, and it worked the first time. Maybe not so well that I'd show it off - the IC was slightly askew, but well enough aligned to work.

I'll say again how nicely the Arduino protoboard adapts to this IC. The surface-mount pads are connected to through-hole pads, and there's a very nice landing area near the SMD pads for a through-hole IC, with 5V and GND buses already connected. That works well for mounting the external components, all of which want to be connected to one rail or the other. And, it stacks nicely onto an Arduino. My only concern was that one of the potentiometers was so tall that its adjusting screw contacted the shield above, when I added another one. If you use the protoboard, you may want to consider side-adjusted potetiometers.

I have the evaluation board built, slumbering in a drawer. If, after reading the datasheet, you can tell me how you'd like yours to perform, I may be able to work out the external resistors for you, and you can avoid building the evaluation board. You may want one of your own for future use. Let me know.

Thank you for your kind offer to help, tmd3. I do appreciate it.

The main unit of my project started out with three separate Arduino Uno's. One Uno is for processing realtime waves such as the sound waves we're talking about here, analyzing them and reading/writing results to an SD Card. The second Uno is for processing video that displays the main menu, sub-menus, and data on an LCD monitor with the (instructions and software here), so the project can be operated independent of a laptop. The third Uno is for everything else, such as a strobe light and a real-time clock. These three Uno's communicate with each other via SoftwareSerial.

Currently, I've moved the "brains" of those Uno's -- the three Atmega328 processors -- onto three solderless breadboards, snapped together into nearly a square foot of solderless development space. (The Uno boards left behind are now used for other purposes, such as a sine-wave generator to test/calibrate the main project.)

Having everything on one big breadboard gives me total freedom to make changes in how the project is wired up. Every connection can be easily moved, unlike shields where the pins used have been permanently selected. (With all on the big breadboard, my laptop had a problem with "forgetting" which USB connection went to which AVR processor. So now I use only one USB module which I move to which ever AVR chip I'm updating the sketch of at the moment.)

When my project is perfected and the time comes to advance from "prototype" to "product", I'll design the final PCB board with free software provided by Pad2Pad, who will then fabricate/mass-produce the PCB boards for me. With boards in hand, it will then be a "family project" to insert parts and solder everything up.

The case will be wooden, created using a Laser Cutter, as was done here, and here.


Making the adjustments you spoke of to your sound-conditioning chip will be easy. I'll just plug the three potentiometers into the breadboard, adjust them, and then replace the potentiometers with permanent resistors.

But I'd really like to know how you discovered this sound-conditioning chip in the first place. I spent perhaps four hours googling for such a chip, never finding anything matching my needs well enough. Then you present the perfect solution as though it was the easiest thing in the world to find! Not only does your selection do all the "conditioning" needed, but it also is designed to run on the 5 volts the Arduino system provides. How did you discover it? I'd love to be as successful as you at finding what I need in the future.

CosmickGold:
I'd really like to know how you discovered this sound-conditioning chip in the first place.

I found a reference to that IC here. It's the heart of a popular DIY electric guitar effect. You'll note from the schematic that the device looks a lot like the evaluation board shown in the schematic, with a preamp and power supply. I found it by looking for a compressor IC for a long time, over many days. My alternative was to use a voltage-controlled amplifier, a peak detector, and an op-amp, and the VCA meant that I'd need dual power supplies, so I searched ardently. Eventually, I got lucky.

Here's a reference to that IC on this forum. You can see the chip in the third photo of the original post. The posted schematics omit the SSM2166, and the OP isn't particularly forthcoming about how he implemented it. The photo suggests that the design stays pretty close to the evaluation board.

Analog Devices was kind enough to sample a couple of these to me, even though I owned up to being a mere hobbyist on their registration form. Both of them still work, after I connected them incorrectly more than once. They seem to be fairly hardy.

I'll just plug the three potentiometers into the breadboard ...

Note that the "noise gating" function is adjustable, too, though the evaluation board shows a fixed 100K resistor for that function. Oddly, the text says that it's a potentiometer, but the schematic shows otherwise. For your application, you might want to include a potentiometer for that, too. The datasheet shows it varying from about 5K to about 600K.

[Edit: spelling]