Jump to content

Looking for a best solution to allow the Arduino to control the gain of the amplifier


Recommended Posts

I've building a preamplifier that also functions as a headphone amplifier.

  •     When no headphones are present, the gain of the internal opamps should be 1x (unity), so that the signal can be passed out the back of the device at line level for a speaker amplifier to further process.
  •     When headphones are inserted, the rear outputs disable, and the user should be able to select from no gain (1x), low gain (2x) or high gain (6x) to suit the impedance of the headphones.

VFxOd.thumb.jpg.51b8446784d43173b676d0f8af16818c.jpg

The entire operation will be controlled from an Arduino. I'm using a switched headphone jack to determine when a set of headphones has been plugged in. The gain should be selectable using a rotary encoder or push button talking to the Arduino, rather than a mechanical switch.

Questions:

1. What would be the best solution to allow the Arduino to control the gain of the amplifier - the dotted green section in the diagram? Transistors or relays, and why? I preferably don't want to add another IC into the mix, and the simpler the solution the better.

2. Given that I'm looking to keep electrical noise as low as possible, are there any concerns I should have with regards to electro-mechanical switches introducing audible noise in the signal?

3. While switching from one gain setting to another, would there be a chance that the negative feedback loop is broken for long enough that the gain skyrockets, causing a moment of noise/thumps or banshee squealing? Basically, is the speed with which the new connection is made going to be an issue?

There's also a significant chance I'm trying to "over-engineer" my solutions here, so any suggestions are welcome. Novice alert.

Clarification: The Arduino is being used to digitally control volume using a PGA2311 IC(http://www.kynix.com/Detail/306697/PGA2311.html), and it also handles source (input) selection. So it’s here to stay :)

Link to post
Share on other sites

This should be in the DIY section. The difference between 1x and 2x gain is incidental. A 2 position switch is easy while 3 position requires many more parts. Use a latching relay controlled by the arduino. Then add a permanent resistor for 6x gain, and switch in another in parallel to reduce the gain.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...