When working with amplifiers, it’s crucial to keep as much noise out of your power supply as possible. Most of the time, your power noise will end up being amplified or will at least show up in your resulting signal as pattern background noise. To make things harder still, many signals are 0V based, and the source signal will swing from a negative voltage to a positive voltage as it is read out (AC). This is usually preferred as it produces a more stable output signal for a variety of devices. So where can one find a suitable power supply, which feeds both a +V and -V signal? This can be tricky, and high quality (read: cleanly power) units can cost a lot of money. But, for many applications, perfection is the enemy of good enough, and you can get away using a good – (but not perfect) power supply that can be had almost everywhere – via USB. Now any EE purist will shout “USB is NOT a power supply!” and this is largely true – USB was never intended to be used purely as a power supply. Then again, the internet was never intended to be a social media platform…
So – By snagging the +5V from a usb line, we can create a -5V using a simple IC, like this one from Linear Technology (LTC660). This IC is a simple 100mA voltage converter, which inverts whatever supply voltage is provided to it. A simple circuit for testing can be modeled in LT Spice, as I’ve done with one here:
This design follows the recommended one from Linear Tech, and is quite simple. What you end up with is a straight inversion of your source voltage, so providing this +5 returns -5 on Vout, or providing +3 returns -3 on Vout etc. (ignore the sets of decoupling caps at the bottom of the image)
The next question is, how clean is this design and using USB in general? I tried a few tests today, using a pc-based oscilloscope, and found USB to be nearly indescernable from the use of a super-clean voltage supply from a 9V battery. Here are some examples:
Below is a time average of both the positive and negative rails as supplied from a typical PC USB connection. Note the ~300mV + and – spikes on the source line.
Next is an Apple iPhone USB wall charger. A little bit cleaner than the PC based power supply. Apparently Apple makes a clean supply, as it dropped to 0.109mV of noise, or ~ 2% noise/nonlinearity. Note that I’ve also added a 0.68uF decoupling cap to the input +5v line in this test – the PC line shoed a reduction with this cap, but had about 0.070mV more noise than the apple supply did.
Here’s a fast time capture of the Apple wall charger, again with the 0.68uF cap included from + to GND before the inverter.
As a comparison, here’s a 9V battery. Overall a clean signal, but still some noise present. It’s entirely possible (probable) that this noise is actually in the scope itself vs. the battery. Note here (I know it’s hard to see) but the spikes on this # are about 0.20mV, which is about the same as the Apple USB charger! (the red line is the disconnected -5v rail – I wanted a clean test so this test was simply the positive side probe directly hooked up to the battery)
So what does this mean for the average tinkerer? I think using either a PC based USB line, or a nice high quality USB wall charger, as a simple power supply, should be considered as suitable for non-demanding applications. Of course, this is not as good as a high end power supply, but then again, I was able to assemble this circuit on a breadboard in 25 minutes, and it took a whopping $15 worth of components. So from a price/performance perspective, this can’t be beat!
-Austin
Comments
3 responses to “Rail to Rail +5 / -5 Power Supply from USB”
[…] clean +/- 5 volts from USB or iPhone […]
Just wanted to say thanks for linking on this – I’d love to hear how others make use of this solution – it’s been working well for my purposes.
[…] The ATtiny85 is excellent for sensing a few lines on input, and driving a few outputs, like an LED, or speaker. For powering the IC, I prefer using a USB cable, which usually provides a clean source of 5V power. […]