Step 5: Finalizing and Testing

Here was the first version of the circuit;


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!
<p>Where can I get the PCB, or a schematic? All links are, if not dead, certainly on life support! :(</p>
<p>Hello. if you really need the PCB and/or schematic you could create your own. Cadsoft eagle is great for that. The opamp circuit here is pretty much a CMOY Amp so you can check that.</p><p>If you really need a PCB design i could design one as a replacement for you. Is very simple and i got several designs.</p>
<p>Hi! I'm also very interested in that! Would it be possible to post the PCB layout here for example?</p>
<p>Same question. Does somebody manage to re-create the PCB used in this project (sadly all the links have expired) ??</p>
<p>So, do we have the final schematic anywhere? I can design a PCB board myself, but having the final version of schematic would be nice. Is it available anywhere?</p>
<p>i want to build an amp using a 4558d</p>
G'day mate. I want to build this kit but have a couple of questions. I want to power it off 12v...will I need a voltage reg to bring it down to +5V and can I fit a volume control somewhere in there to adjust the gain from track to track, as they fluctuate a bit.<br>cheers,<br>Chris
<p>Helly i may not be the author but i can answer your questions:</p><p>Most amps (including the one used here) work from as low as 5v up to 30v. you can easilly use 12v in this design.</p><p>As for volume controll. on the design there is a resistor between the output and inverting input. that controlls the gain. if you replace the 10k resistor by a 2.2k resistor with a 10k potentiometer you can controll the gain from 1x to 5.5x. you will probably want a Stereo Potentiometer.</p>
Is this still available as a kit with the pcb ready done?
<p>Hey just what I need. (MacMini has only Aux in and net cam microphone needs to be amplified with just USB power-no need for aan external PS.) Where can I purchase the kit from??? gangster does not work!!!</p>
<p>Does anyone have the PDF circuit diagram for this, and could they post it somewhere to download?</p><p>The image at the bottom is not correct. it doesn't include all the components. </p><p>Thanks</p>
hi, im completly new on making pcb. can i make the opa amp by the etching methode?
You input ground goes to your &quot;analog&quot; ground [+2.5V point]. OK - but your output also goes to this. Which goes to a car audio, and hooks to the car ground. <br>Which therefore shorts your &quot;analog&quot; ground to car ground, zapping about half of your power supply and playing havoc with the split rail bias of the op-amp. <br>Did you consider a single rail op-amp?
<p>Im brand new to this electronic stuff but my first question when I set out to solve a problem is what is the simplest first soloution and in your case I would (add another input) and then figure out how to complete the task.</p>
<p>Hey great job on your instructable, I found it really easy to read and highly informative! But i was wondering man is there a way to double this from two aux ports to 4? I mean would this theoretically be a double of all the required components? Or does the OPA227 have a limit to how many can be daisy chained together? </p>
<p>And if this were to be hooked up to a computer could you use the computer as the actual amp while using Opa as the pre-amp? </p>
<p>I have this same problem. The Aux input needs to be more realistic in boosting amperage-what else is used with that port, after all? (Fat chance of the head unit mfrs. getting it right.) Does a Bluetooth setup share this same limitation? I'm thinking phono amp, USB interface (say, Behringer), mike amp, headphone amp, or mixer, even. </p><p>I'm concerned about Pengi's problem--that's exactly what I was going to attempt. I'm interested in Sharpy's solution--that was three years ago, though. My Boss MP3 setup head unit has USB. It's an older car, so I don't want to install a car stereo amp or an expensive Bluetooth solution. It seems like a AA or 9V battery operated booster amp would solve some problems. </p><p>I just figured out a solution for Pengi: Use a 12V lantern/UPS battery for power. They're lead acid and similar to car batteries. Check out hunting, camping gear, and auto accessories sections of big box discount stores for chargers. (A car starter, set at trickle, might serve, as well.)</p>
<p>Hey, those emergency power solutions for phones are highly favored ripoff products at this point: One might instead use a lantern/UPS battery, along with connections, adapters, etc., Some such 12V batteries are smaller--they fit smaller fluorescent lanterns. Small 12V batteries are more useful for DIY than those expensive products.</p>
Hi,<br>Thank you for the post.<br> please post circuit diagra
Well done and this is really exciting for us to see especially from the Op Amp team at Texas Instruments! I love this innovation especially with audio applications. That Op Amps for Everyone book really has been a hit over the years and we think we are on to something else that going to be a game changer, search for &quot;TI Precision Designs&quot;. Our Amp and ADC experts have simulated and built boards on popular challenges to reduce your headaches and design time. It's mostly on high precision applications but I'm sure there is a lot of commonality that you can leverage from. Thanks again and Op Amps ARE the Bomb!
This is the solution I have been looking for, literally, for years. <br> <br>Thanks!
Hi There, unfortunately I have found that I can't power a phone charge at the same time as powering this device. The amp works until I plug the phone charger into a 2nd cigarette lighter socket at which time amp stops working. <br> <br>Hope you can help.
lol opa is grandpa in dutch XP
Hi,<br> Thank you for the post.<br> Well I have tried making amps and it did worked fine, but i am no good at electronics and did not understand the diagram at all i would request you to, kindly simplify the circuit for people like me.<br> Thank you!!<br> <br> I am adding an image of wat i tried from this website, this diagram made it easier for me to make it. I am coping the same image which i got in that post. I hope you will help with this regard. XYz
The same thing can be done with a headphone amplifier. A regular Cmoy works. Using the OPA2132 chip you can use a cigarette lighter connection, 12V. With the Cmoy design there are no electrolytic caps used on the inputs or for bypass. Build your own with instructions on the Headwize.com site or buy one on ebay. Search for Cmoy. Or I'll build you one for $25.00 including shipping. Piece of cake.
Yeah, Cmoy will work fine with a 12V power supply. Usually, headphone amps have a coupling cap in the audio chain to prevent passing a bias current into the speaker coil. The cap causes phase distortion and acts as an RC filter, but it's pretty minor when the amp is designed correctly.
See the following URL for the design and build of the Cmoy pocket headphone amplifier: http://gilmore2.chem.northwestern.edu/projects/showfile.php?file=cmoy2_prj.htm The basic design without the volume control is the one of interest for our purposes. The RC filter formed by the + input cap and resistor does not intrude into the audible frequencies. There is also no audible phase distortion. The amp can be powered from a cigarette lighter socket when an appropriate chip is used. I have a board layout for anybody that want one for etching that uses one chip for both channels. Please don't misunderstand me, I don't mean to cut down your instructable -- it's great. Just offering an alternative.<br>
great project !!!!
hi, you can reduce the power consumption from: <br> I=5V/(150*2) = 17mA to &lt;1mA by using &gt;1K divider and a cheap DC opa. <br> <br>THD below 1% does nothing if you don't use dedicated PSU (no digital/smps stuff on rails). At least use CLC filter, w/ f0=&lt;20Hz. <br>3V3 linear regulator would be also wise to use, w/ 2,2mF caps &amp; low esr films &amp; tantals (only on rails). <br> <br>In the signal line use only film caps or HQ electrolytes. <br> <br>cheers, <br> <br> <br>
I wouldn't even suggest using electrolytes in the audio chain, just for bypassing.<br><br>You can reduce current consumption by using high value resistors on the divider, I used 220's because that's what I have handy. Consumption isn't an issue here, unless you run it from batteries, but even 17mA will last pretty long with some AA's.<br><br>Also agree, the power supply quality can significantly diminish sound quality. I used bypassing to help it work with some nosier power supplies, but an inductor filter works well. Batteries are a great power supply, too.<br><br>Running a 3.3v single supply isn't an option with the Opa227, but there are rail-to-rail op amps where that can work.

About This Instructable




More by Gadget Gangster:Hack Your Car Talking Resistor Calculator Bananaphone: A Touch Capacitance Synth 
Add instructable to: