I am working on a simple audio mixer project. The op-amps I am using (LM741) take +9V and -9V inputs. I am currently getting this by wiring two 9V batteries together, connecting + on one to - of the other, and grounding the pair. This seems to work, but I would now like to switch to a power supply. I can find a bunch of 9V power supplies, but they all only have the one polarity. Is there an easy way to get +9V from a center-negative power supply? I figure I probably need an inverter circuit or something, but I don't really understand what I'm doing.
Assuming at least one of the power supplies is isolated (which will be true if they are good power supplies, but maybe not if they are cheap), you can make a stack of two supplies, so you have outputs at 0 V, 9 V and 18 V. Then, connect your op-amp circuit like this:
- Power supply 18 V -> 9 V op-amp pin
- Power supply 9 V -> 0 V op-amp pin
- Power supply 0 V -> -9 V op-amp pin
Another way to think about this is to understand that ground (0 V) is a relative choice; you can change your choice, as long as you're consistent within one circuit.
One other note-- I should explain what I mean by "isolated." A cheap power supply will have its ground pin connected to the neutral wire of its power cord. Most of the time, that's fine. But if you want to stack supplies, you need an isolated supply, i.e. one where no output pin is connected internally to the power cord.
If you do try to stack non-isolated supplies, you'll be connecting the positive output to the neutral wire, which is the same as shorting out the supply, so its internal fuse will blow. (If it's a really cheap supply, this will destroy it.)
One other solution
If you can't lay your hands on an isolated supply, you could use a switched capacitor voltage converter. This is a chip that charges up a capacitor, and then quickly shifts the pins so what was previously the positive lead is connected to ground, and the old ground becomes a negative output. It does this charge/switch routine at 10-100 kHz, so to humans, it looks like a negative supply.
- LM741 is a terrible op-amp for audio. The NE5532 is something like 15 dB quieter, and still cheap. Notes on Audio Op-Amps
- You should be using rails as high as possible for best dynamic range. The mixers I work on are always ±15 V, because that's the highest voltage most op-amps are recommended for.
- Power supplies with split center-tapped outputs exist, though I can't find any right now. That's essentially the same thing as stacking two isolated supplies. Also, you could always build your own with a center-tapped transformer and learn how to build linear supplies. It's not too complex: High Quality Audio Mixer - Stage 3 - Power supplies
One thing you can do when you aren't going to source or sink a lot of current into your 0V, and only have a single supply, is to use a 'virtual ground'.
For example, suppose you only have an 24V supply - two leads, supply and return. You can get -12V/0V/+12V by dedicating an op-amp to stabilize the half-way point and then use that as a 0V reference. In other words, the 24V supply becomes your +12V line, the 24V supply return becomes your -12V line, and the dedicated op-amp produces the 0V line. All you do is put a 50% voltage divider across the 24V to give you the half-way point, and then buffer it with a voltage follower configuration.
Basically your op-amps are powered from the +V/-V rails anyway, the problem is not having a ground. The half-way point voltage follower effectively 'regulates' the midpoint for you. The limitation is that you can't source or sink more current into the virtual ground than the op-amp delivering it can handle, or you lose the reference.
I usually use an inverting charge pump to supply my negative voltage rails, do pay attention to your noise requirements, some times i use an LC filter on the output to reducing the switching ripple. In digikey category lingo what you want is an "inverting switched capacitor DC-DC regulator". This will turn your +9V input into -9V (more like -8.8V or something close).
If your working with audio, choose an IC with a switching frequency well above the audio range, 400khz is a common value but they range from 10khz to 2mhz. If your circuit also has some digital circuitry on it and is compact, consider a charge pump with switching synchronization input. Keep the switching capacitors as close to the IC as possible to minimize noise.
If you search digikey / mouser there will be tons of choices, just enter your desired parameters/package they come in everything from a SOT-23-5 to a DIP-8.
While it's nice to have +/- supplies for ground-referenced signals, it's not necessary in many cases including yours. It can make the design conceptually simpler, but a more complex power supply will likely be more trouble than designing the amp to work with a single ended supply, particularly in your case.
The thing to note is that audio is AC only. You can ignore, in fact should ignore, the DC component of any input. The output should similarly not have any average DC component. With this observation, you can realize that the input and output can both be capacitor coupled to some other voltage the amp works on internally.
You didn't say where the 9V value came from. It's not clear if this was due to careful consideration of the voltage overhead you need, or merely a convenience due to available power supply or battery voltages. Without additional information we have to assume you need the output voltage range. Since wall warts are readily available in a wide range for voltages, I'd design the amp to run from a single ended DC supply in the 18-28 volt range.
As others have pointed out, a LM741 is pretty poor for audio. There are some opamps specifically for such applications, but for hobby purposes you might look at the very available and cheap TL07x (TL072 for dual, TL074 for quad). These have much lower noise and higher slew rate. They need a few volts headroom on each end, but with a 24V or so supply there is plenty left. The 741 needed some headroom too.
Design the circuit with all the inputs capacitive coupled with the internal signals biased to half the supply. Make sure to filter this half supply signal so that the inevitable power supply noise doesn't get into the output. It doesn't really need to be a full virtual ground since it doesn't need to sink or source much current. It's more of a "bias" than a ground.
If you're interested in persuing this direction, let me know and we can get into more details.
Figure 1. Regular 9 V PSU wall-wart. Figure 2. Modified for +9/0/-9 V.
You can easily modify a standard 9 V wall wart supply as shown in Figure 2. Ripple voltage will be worse and max current on each supply will be half of original specification so I'd recommend some large caps or voltage regulators to eliminate hum.
If you want to keep a standard jack on the PSU then convert it to an AC PSU by removing the rectifier and capacitors and put the diodes and caps into your project case.