The Opa! Amp - IPod Amp for Aux-In
by Gadget Gangster in Circuits > Audio
101043 Views, 248 Favorites, 0 Comments
The Opa! Amp - IPod Amp for Aux-In
MP3 player too quiet when you hook it up to your car’s Aux-In or home stereo? Make it louder with the Opa! Amp.
The Opa! Amp is an USB powered audio pre-amplifier based on a Burr-Brown OPA2227. With 0.00001% total harmonic distortion, it’s a high quality way to make your MP3 player louder when hooked up to your home or car stereo.
This project is suitable for beginners, you'll need a few soldering tools, but even if you've never soldered before, it's an easy build. You can etch your own board, make it on a protoboard, or pick up a kit from Gadget Gangster.
I made the Opa! Amp because I recently got a smartphone – it sounded great with headphones, but when I hooked it up to my stereo, I had to crank up the volume to hear it and there was distortion. Listening to spoken word stuff in the car was the worst. The Opa! Amp increases the audio level and fixes the problem without distortion.
The next few steps discuss the design and testing process. If you just want an awesome pre-amp, skip to Step 6: Making It.
The Opa! Amp is an USB powered audio pre-amplifier based on a Burr-Brown OPA2227. With 0.00001% total harmonic distortion, it’s a high quality way to make your MP3 player louder when hooked up to your home or car stereo.
This project is suitable for beginners, you'll need a few soldering tools, but even if you've never soldered before, it's an easy build. You can etch your own board, make it on a protoboard, or pick up a kit from Gadget Gangster.
I made the Opa! Amp because I recently got a smartphone – it sounded great with headphones, but when I hooked it up to my stereo, I had to crank up the volume to hear it and there was distortion. Listening to spoken word stuff in the car was the worst. The Opa! Amp increases the audio level and fixes the problem without distortion.
The next few steps discuss the design and testing process. If you just want an awesome pre-amp, skip to Step 6: Making It.
Understanding the Problem
When I hooked my smartphone to my car stereo through the Aux-In connection, the volume was very low, even when I cranked it up. It was especially bad with anything that has a large dynamic range like audiobooks and podcasts.
I did some research and testing and the problem was easy to pinpoint: Your headphone jack is designed to drive headphones. The jack’s max output is 300mV RMS, which drives headphones just fine, but most Aux Inputs are expecting 1V RMS as the max level. So when your MP3 player is saying “Blast it”, your stereo interprets that as “keep it pretty quiet”.
You can mess with the equalizer on your phone or compress the dynamic range, but as long as the max output is 300mV, the volume increase will be minor. And at the max volume levels, you get distortion because both the stereo and MP3 player are operating at their maximum levels.
I did some research and testing and the problem was easy to pinpoint: Your headphone jack is designed to drive headphones. The jack’s max output is 300mV RMS, which drives headphones just fine, but most Aux Inputs are expecting 1V RMS as the max level. So when your MP3 player is saying “Blast it”, your stereo interprets that as “keep it pretty quiet”.
You can mess with the equalizer on your phone or compress the dynamic range, but as long as the max output is 300mV, the volume increase will be minor. And at the max volume levels, you get distortion because both the stereo and MP3 player are operating at their maximum levels.
Figuring Out a Solution
The solution sounds simple – just amplify the signal! Unfortunately, audio amplification can be pretty complicated, so I defined a few goals;
Further, Bluetooth doesn’t have the bandwidth to stream uncompressed PCM, it re-encodes the audio stream using SBC, a low complexity codec. The transcoding changes the output audio and not for the better.
Resigned to building the circuit, I got to work.
- High Audio Quality – I wanted transparent amplification that was better than what I could buy off-the-shelf.
- Convenient – either powered from a few batteries that lasted forever, or wired to power.
- Do-nothing usage – no switches, knobs, or settings; just plug it in and go.
Contender 1: headphone amplifier
The most common solution I saw was to use a headphone amplifier when connecting your MP3 player to a stereo. I found a few on Amazon, but I had a few problems with them:- There are little-to-none performance measurements, usually just claims like “State-of-the-art sound” and “ruler-flat distortion”.
- They run off batteries, so there’s yet another device to recharge.
- They can be expensive.
- Headphones are inductive loads and headphone amps include several devices in the audio chain to manage this. These devices only add distortion when you use a headphone amp as a pre-amp.
- A pre-amp can be built for a few bucks in parts, but a headphone amp is a lot more because of the additional parts.
Contender 2: Bluetooth
I tried a few A2DP receivers and ran into the same problems – their output is designed for headphones, not Aux-In, so everything is still too quiet. It was also more of a hassle to turn on the Bluetooth on my phone and on the receiver every time I wanted to listen to music.Further, Bluetooth doesn’t have the bandwidth to stream uncompressed PCM, it re-encodes the audio stream using SBC, a low complexity codec. The transcoding changes the output audio and not for the better.
Contender 3: Line Out
The iPod / iPhone and a few other players offer stereo line out through a dock connector / dongle. The line out usually connects to the audio chain before the headphone amplifier, so that’s a good thing. But the voltage levels are still too low (400mV RMS) so you’re back where you started: with too-quiet audio.Other Options
There are a few other options that may work for you:- If your stereo has built-in Bluetooth A2DP, it's usually at the right volume (although it still uses SBC).
- The 'Loud' button on your car stereo usually doesn't change the input range of the Aux-In, it is an equalizer preset that boosts bass and treble. But I've heard that some car stereos also have a sensitivity setting that may compensate for the lower levels of MP3 players.
- A Line-Out iPod dongle won't solve the problem, but I believe there are some powered docks that increase the Aux-In levels. The Line-Out dongle is still nice to use, though - we can use it with the Opa! amp so it amplifies signals before they go through the iPod's headphone amplifier.
- European regulations (EN 50332) limit output voltage on headphone jacks - Some older MP3 players were were built before the requirement and are able to output higher levels. But it seems that many hardware designs are used worldwide and have the same level limit regardless of country.
Resigned to building the circuit, I got to work.
First Attempt
The first amplifier I stumbled across was the LM386. It’s a low voltage audio amplifier that comes in a friendly DIP package and doesn’t require too many parts. Following the datasheet, I came up with a small circuit and used two button cells to power it. Here's the schematic;
and the Prototype
Each channel (left & right) passes through a resistor, then through the amp, and out through a bypass cap and dampening. This allows for a 20X gain and I quickly breadboarded it to try it out. The result wasn’t bad, but there were a few shortcomings to using an LM386;
and the Prototype
Each channel (left & right) passes through a resistor, then through the amp, and out through a bypass cap and dampening. This allows for a 20X gain and I quickly breadboarded it to try it out. The result wasn’t bad, but there were a few shortcomings to using an LM386;
- The LM386 has a fair amount of total harmonic distortion (more on that in a bit).
- Power consumption is about 10mA – my button cell batteries only lasted about 10 hours. Not a deal-breaker, but a pain when you’re using button cells.
Revisions
I didn’t want a pre-amp that distorted to the audio, and I didn’t want to change batteries, so I went back to the drawing board.
I wanted a solution that was better than ‘off the shelf’, and the LM386 had too much distortion and too much gain. After a lengthy search, I decided to use a Burr-Brown OPA2227 (datasheet pdf). It has a low level of distortion ( .00001%), and allows for lower gain. Compared to the LM386, it is more expensive ($4.00 instead of $0.30), but worth the extra few bucks for the quality.
While the LM386 has distortion of around 1% at 20kHz, the OPA2227 measures around .0001%, or one ten-thousandths of one percent. The OPA can also run lower gains, which allows us to keep input levels high compared to any possible noise or interference.
I hadn't used Op Amps much before, so I picked up a copy of Jung's Op Amp Cookbook and started reading and I also combed through the OPA2227's datasheet. Op Amps are awesome! I ended up designing the board for this project in a way to allow more experimentation with them in the future. They're so flexible and capable, it's hard not to want to tweak / modify / change the circuit to see the results.
I realized that I always use a USB / cigarette lighter adapter, so I added a USB jack to the board. The USB jack draws the 10mA needed to drive the pre-amp. Car chargers are often very noisy, so I added multiple bypass caps to keep noise to a minimum. I also added battery jumpers so the pre-amp can be run from a battery box.
The OPA2227 also needs a split power supply (+V, AGnd, and –V). The easiest way to do that is to make +V the 5V from the USB power supply, -V will be Ground from the USB power supply and our analog ground will be the halfway point (2.5V). We create the halfway point (aka virtual ground) with resistor divider;
I also included a spot for a TLE2426 on the board. Feeling pretty comfortable with the approach, I started testing it.
Fixing the amp
I wanted a solution that was better than ‘off the shelf’, and the LM386 had too much distortion and too much gain. After a lengthy search, I decided to use a Burr-Brown OPA2227 (datasheet pdf). It has a low level of distortion ( .00001%), and allows for lower gain. Compared to the LM386, it is more expensive ($4.00 instead of $0.30), but worth the extra few bucks for the quality.While the LM386 has distortion of around 1% at 20kHz, the OPA2227 measures around .0001%, or one ten-thousandths of one percent. The OPA can also run lower gains, which allows us to keep input levels high compared to any possible noise or interference.
I hadn't used Op Amps much before, so I picked up a copy of Jung's Op Amp Cookbook and started reading and I also combed through the OPA2227's datasheet. Op Amps are awesome! I ended up designing the board for this project in a way to allow more experimentation with them in the future. They're so flexible and capable, it's hard not to want to tweak / modify / change the circuit to see the results.
Fixing the power supply
I realized that I always use a USB / cigarette lighter adapter, so I added a USB jack to the board. The USB jack draws the 10mA needed to drive the pre-amp. Car chargers are often very noisy, so I added multiple bypass caps to keep noise to a minimum. I also added battery jumpers so the pre-amp can be run from a battery box.The OPA2227 also needs a split power supply (+V, AGnd, and –V). The easiest way to do that is to make +V the 5V from the USB power supply, -V will be Ground from the USB power supply and our analog ground will be the halfway point (2.5V). We create the halfway point (aka virtual ground) with resistor divider;
I also included a spot for a TLE2426 on the board. Feeling pretty comfortable with the approach, I started testing it.
Finalizing and Testing
Here was the first version of the circuit;
Looks pretty good, right? The left box shows our amplified source, a nicely shaped sine wave, and the right box shows gain across the audible frequencies.
I conducted an extended listening test and was very satisfied, so I put together a prototype;
Then, I took it out to the car and everything fell apart.
Scoping out noise
Crappy power supply
The 99 cent USB car charger provided a pretty unstable power supply. Works fine when charging your phone, but not as good for an analog circuit.
To solve that problem, I added more bypass caps that help smooth out the input power. This made a huge improvement. The two caps that tie +5V and +2.5V (my virtual ground) actually didn't help keep 2.5V stable, but just increased noise, so I removed them from the circuit.
Amp Stability
I suspected there was enough load capacitance to destabilize the Op Amp, so I increased the gain (from 5x to 10x) and it eliminated the instability problems. Testing in Spice didn't show any difference from the original circuit, but you can see from scoping out a square wave, we get a pretty solid reproduction;
Here’s the final schematic, less bypass caps;
Testing is done. Now, let’s build it!
Testing With Spice
Spice is an analog circuit simulator that allows you to build and test your circuit on the computer before the breadboard. Since this was my first Op Amp circuit, I used it to test used CircuitLogix to build the circuit and test it - here's what I got;Looks pretty good, right? The left box shows our amplified source, a nicely shaped sine wave, and the right box shows gain across the audible frequencies.
The Real World
I built the circuit on a breadboard and hooked it up to my home stereo. The result was good, although there was a little clipping, which was cured by turning down the MP3 player a notch. Total current draw was <10mA @ 5V, good considering we’re using a voltage divider.I conducted an extended listening test and was very satisfied, so I put together a prototype;
Then, I took it out to the car and everything fell apart.
Spice is a liar!
What worked well on the bench was a noisy mess in the real world! I modeled a perfect power source in Spice, which was close enough with a battery pack, but far from true in the car. After scoping it out, I saw the problems: Interference from the Power Supply (the USB car charger) and the car’s electronics, and the Op Amp would become unstable and seriously distort the audio.Scoping out noise
Crappy power supply
The 99 cent USB car charger provided a pretty unstable power supply. Works fine when charging your phone, but not as good for an analog circuit.
To solve that problem, I added more bypass caps that help smooth out the input power. This made a huge improvement. The two caps that tie +5V and +2.5V (my virtual ground) actually didn't help keep 2.5V stable, but just increased noise, so I removed them from the circuit.
Amp Stability
I suspected there was enough load capacitance to destabilize the Op Amp, so I increased the gain (from 5x to 10x) and it eliminated the instability problems. Testing in Spice didn't show any difference from the original circuit, but you can see from scoping out a square wave, we get a pretty solid reproduction;
Here’s the final schematic, less bypass caps;
Testing is done. Now, let’s build it!
Make It: Tools
The Opa! Amp is an easy build and takes about 15 minutes from start to finish. You'll need a few tools to build it:
- Soldering Iron and solder. Leaded solder is easier to work with, and a 15-40 watt iron is just fine. A conical or chisel tip works well.
- Dikes. Diagonal cutters are used to trim the excess leads from components after soldering them down.
Make It: Parts
You can make it on a protoboard, but it’s meant to be small and reliable, so I suggest using a custom PCB.
There's also a kit available that comes with the board and all the parts you’ll need to build your own Opa! Amp.
You can download the DipTrace file, gerbers and pdf version right here, everything is MIT licensed. I’ll show you how to put it together on the PCB. I don’t suggest doing it on a protoboard, but, if you really want to, you can build it from the schematic.
There's also a kit available that comes with the board and all the parts you’ll need to build your own Opa! Amp.
Parts List
- Burr-Brown / TI OPA 2227 (Mouser). I got mine from Digikey and I suggest you get it from a reputable dealer - the ‘incredible deal’ on ebay is often another opamp with the marking scraped off.
- Resistors: 2x 1.1k, 2x 270, 2x 10k, All ¼ watt.
- Capacitors: 1x 110uF, 1x .1uF, 1x .01uF
- 2x Headphone Jacks (mouser part #806-STX-3100-5N)
- 1x Male USB (sparkfun) $1.50
- 8 Pin DIP socket
You can download the DipTrace file, gerbers and pdf version right here, everything is MIT licensed. I’ll show you how to put it together on the PCB. I don’t suggest doing it on a protoboard, but, if you really want to, you can build it from the schematic.
Make It: Resistors
Start with the resistors;
R1 and R2 are the voltage dividers. They create the virtual ground for our amp, The value isn't so important as long as they're the same. I'm using 270 ohms, Red - Violet - Brown
R7 and R8 are the input resistors. They set the input impedance of the amp, I'm using 1.1k, Brown - Brown - Red
R4 and R3 are the feedback resistors. They control the gain on the amp. I'm using 10k ohm resistors here (Brown - Black - Orange), which gives me about a 10x gain (feedback resistor value / input resistor value, or 1.1k / 10k)
R1 and R2 are the voltage dividers. They create the virtual ground for our amp, The value isn't so important as long as they're the same. I'm using 270 ohms, Red - Violet - Brown
R7 and R8 are the input resistors. They set the input impedance of the amp, I'm using 1.1k, Brown - Brown - Red
R4 and R3 are the feedback resistors. They control the gain on the amp. I'm using 10k ohm resistors here (Brown - Black - Orange), which gives me about a 10x gain (feedback resistor value / input resistor value, or 1.1k / 10k)
Make It: Capacitors
Now the capacitors, these stabilize the voltage levels and reduce noise;
C6 stabilizes our virtual ground, it's a .01uF ceramic capacitor. A .01uF cap is marked with the number '103'
Ceramic caps are not polarized, it doesn't matter which lead goes in which hole.
C7 stabilizes 5V, we'll use a slightly bigger cap here, .1uF. Sometimes it's marked with '104'. It's also a ceramic cap and not polarized.
We'll add the electrolytic capacitor in just a second.
C6 stabilizes our virtual ground, it's a .01uF ceramic capacitor. A .01uF cap is marked with the number '103'
Ceramic caps are not polarized, it doesn't matter which lead goes in which hole.
C7 stabilizes 5V, we'll use a slightly bigger cap here, .1uF. Sometimes it's marked with '104'. It's also a ceramic cap and not polarized.
We'll add the electrolytic capacitor in just a second.
Make It: Connectors
Add the DIP socket (or machine pins) at the area marked U1. Then add the Electrolytic cap at C3. Note that electrolytic caps are polarized - the side of the cap marked with the strip goes to the left.
Then add the USB jack on the top left of the pcb, be sure to use plenty of solder with the big holes on the outside - that secures the connector to the board.
Add the headphone jacks on the boxes marked 'In' and 'Out'. Finally, add the Op Amp, note the notch on the chip lines up with the notch marked on the board.
All done!
Then add the USB jack on the top left of the pcb, be sure to use plenty of solder with the big holes on the outside - that secures the connector to the board.
Add the headphone jacks on the boxes marked 'In' and 'Out'. Finally, add the Op Amp, note the notch on the chip lines up with the notch marked on the board.
All done!
Using It: Mods, Hacks, Tweaks
Using It
Using the Opa! Amp is very simple, just plug it into your USB power source and go. It produces about a 9x gain to our source, bumping up 100mV RMS input to about 1V RMS. I suggest running your volume at about 50%. If it's getting saturated (distorted), turn it down a notch.Circuit Tweaks
A number of spots are open on the board for modifying the circuit.- C4 and C5 let you add feedback capacitors - they act as first order low pass filters. If you have RFI noise, you might want to give them a try, maybe a value like 100pF.
- C1, C2, C3, and C7 are all spaces for bypass caps to stabilize your power source. I only needed a few, but if you get noise in the output, you can use a better power supply or add more bypassing to improve it.
- C8 and C10 connect the V+ (usually 5V) to your virtual ground. I wouldn't use this unless you also use TLE2426, there's a spot for it on the PCB at U2
The Opa 227 is running right at the edge of it's voltage range when splitting a 5V single power supply. If you want to increase the voltage range, you can add a battery box or 9V battery and use it as the power source. The jumpers on the board marked + and - are where you'd connect an external power supply.
Changing Gain
Our 9x gain is the feedback resistor divided by the input resistor (1100/10000). We can populate R9/R10 to create a voltage divider, reducing the input voltage and allowing us to increase the gain. We can also change the values of our input resistor / feedback to change the gain, but keep in mind we have a pretty narrow gain window with 5V input - to increase the gain much more than 9x or increase the input voltage. suggest using a higher voltage power supply or at least using an OpAmp that goes rail-to-rail.The default gain will reach saturation with a 100mV RMS input, so if the music sounds distorted, just turn down your MP3 player. I've found that about 50% volume works perfect for me, but your setting might be different..