Parts: Programmable gain amplifier (MCP6S26)

Microchip’s MCP6S21/2/6/8 are programmable gain amplifiers that multiply an input voltage by a factor of 1, 2, 4, 5, 8, 10, 16, and 32. The MCP6S22/6/8 also have selectable input channels for working with different signal sources. The multiplication factor and input channel are configured through an SPI interface. This chip is useful for multiplying a small input signal, and selecting among several analog input sources. We demonstrate the six channel MCP6S26 below.

We tested the chip in the circuit shown above with a 3.3volt power supply. A resistor voltage divider (R1-4) outputs a fraction of the supply on channels 0, 2, and 4. We used 5K resistors, but the value isn’t critical. The divider outputs 2.4volts on channel 0, 1.6volts on channel 2, and 0.8volts on channel 4.

Bus Pirate

DS1801 (pin #)

ADC

VOUT (1)

GND

VREF (8)

GND

VSS (9)

CS

CS (10)

MOSI

SI (11)

MISO

SO (12)

CLOCK

SCK (13)

+3.3V

VDD (13)

We used our Bus Pirate universal serial interface to demonstrate this chip, but the transaction sequence will be the same for any microcontroller implementation. We connected the Bus Pirate to the MCP6S26 as shown in the table above. We setup the Bus Pirate for raw3wire mode (M, 8) with normal outputs, and enabled the on-board power supply (capital ‘W’).

Writing 0b01000001 (0x41) followed by a channel number changes the active MCP6S26 input. ‘[‘ lowers the chip select line to start an SPI transaction. We send the change channel command (0x41) followed by 0 to select input 0. ‘]’ raises the chip select line to end the SPI transaction. ‘d’ takes a voltage measurement and shows that input 0 with 0 gain is 2.4volts.

We can’t amplify the input voltage beyond the power supply (2.4volts * 2 = 4.8, 4.8volts > 3.3volts), so we need to change to a lower channel to play with the gain features.

tc: the problem with using this as a volume control is that you only have a limited number of gain settings to choose from, as opposed to a traditional volume knob that has a continuum of settings. You might be better off using a digital potentiometer for volume. This chip could be combined with that though so that you can have the capability of selecting multiple inputs, as well as having the benefits of a preamp.

One interesting use for the multiple inputs is that a series of filters can be created and the inputs can be chosen to switch various filters in and out of the circuit. I’m current working on a sort of “universal amplifier” that uses this technique.

I was curious. I’m trying to get together a custom MP3 player setup for a motorcycle and need some sort of amp to kick it up about 12 or 15dB (I use helmet speakers with earplugs) so the fact that it has limited settings doesn’t bug me. I’d still have a pot of some sort afterwards.

Of course, it turns out that the MP3 player I was looking at (“MOD-MP3″) doesn’t support SDHC, so that one is out the window. :(

Another reason that I ask is to get feedback and suggestions. Sometimes I’m not even sure about what I’m looking for. :)

tc: It would probably not be appropriate to connect this chip directly to headphones if that is what you are considering. You need something that can deliver more power. The LM386 chip is the most common choice in this situation, although there are more modern chips that can do stereo, such as the TPA302D. If you use the LM386 you will need two to do stereo.

This web site is really quite good, but for some reason it does not display properly when trying to view on my Nintendo Wii. If it helps, the console uses the Opera web browser and am impelled to using the console for accessing the Net whilst my PC is away being restored.

Cool. I’m interested in this chip and was wandering if the gain is adjustable to 2.5? If not then one would have to lower the input voltage to a value that is acceptable for a gain of 2 for the desired output? I guess what I am asking is if the gain can be programmed to 2.5?