I’m currently working on a new project that contains sensitive analogue components and have rediscovered what many before me already know, that is that the VUSB 5V line that comes out from your computer’s USB hub is noisy. In fact I was surprised at just how noisy it is. There’s random noise at high and low frequencies. There’s persistent ripple and some mightily impressive spikes that sail through at seemingly random time intervals. If you’re running a sensitive component such as an ADC or DAC then you need a clean power supply and all this noise will really ruin your day.
Anyway I thought I’d provide a practical example of how to clean up the power supply and eliminate all that noise. The result is a nice and stable VBUS line that you can use to feed your sensitive circuits.
A hacked USB B connector
I’l be using the hacked USB B connector pictured above and connected to a breadboard for testing. I’ll be using my trusty old HP 500MHz oscilloscope and I’ll be probing directly at the component legs so as not to introduce noise from jumper wires. I should really be using a ground spring on the scope probe instead of a wire and clip but I haven’t got one those so I can’t.
Firstly let’s establish the baseline by probing VUSB on a couple of USB ports. I have a number of root hubs exposed through the front panel of my case. The two blue ports on the left connect to a generic no-name PCIe USB 3 expansion card. The remaining four ports connect back into the motherboard USB 2 headers.
I’ll be testing the circled ports
For these tests I’ll be looking separately at VUSB on the USB 2 and 3 hubs on the left of the picture. The cables from the back of these ports has to travel quite a long way across the case to the motherboard header for the USB 2 ports and across the board to the slots for the USB 3 ports.
Let’s get started by showing just how bad things are without any filtering. Here’s a selection of screen grabs from the oscilloscope showing the noise on the supply from the two ports. The vertical resolution is 50mV/div in all the captures.
I’m sure you’ll agree the noise levels are pretty awful with spikes of +/- 100mV. I don’t think your sensitive analogue components would thank you for connecting them to this supply.
The noise on my USB 3 port is even worse than on the USB 2 port. I’ve got spikes, harmonics of spikes and even a pretty decent sine wave in there! Maybe it’s because the cable has to travel all the way across the motherboard or maybe it’s just because I bought a cheap USB 3 card.
I’m going to filter out the noise using a selection of capacitors and a ferrite bead based on the values provided in this FTDI application note and if any significant noise is still present then I’ll tweak the values of the components until it’s gone.
Here’s the schematic for the filter. It’s basically an LC filter with a selection of additional capacitors chosen to respond to different frequency ranges. It’s a little known fact that the USB 2.0 standard mandates a maximum of 10µF in parallel with VUSB to limit the inrush current. I’ll admit to having broken this rule several times in the past and the world didn’t end but do bear this in mind if you’re designing a product for mass production. If you do need significantly more capacitance than 10µF then the FTDI application note shows one way that you can design a slow start into your circuit to limit the inrush current.
That’s the USB input on the left and the filtered output on the right
I have all of those components available in through-hole form. The long leads and the breadboard interconnects are not ideal from a noise point of view. All those exposed wires will probably act as tiny little antenna picking up stray noise from the environment.
Now let’s take a look at how the power supply line has cleaned up with the filtering components in place. Firstly here’s how the USB 2 supply looks with filtering:
I’m sure you’ll agree that this is a huge improvement over the unfiltered supply. Noise is infrequent and limited to 50mV when it does occur.
Again you can see that the filter has done its job very well with noise levels about the same as for my USB 2 port. The noise patterns are also very similar which makes me think that maybe this residual noise is being picked up by the leads in my circuit.
The addition of a few small and cheap components can make a huge difference to the stability of the USB power supply. Noise is reduced to a low, tolerable level that should not present any issues for sensitive components.
I hope you enjoyed this short practical demonstration. If I’ve saved at least one of you from having to bin a batch of PCBs and do a redesign to filter supply noise then I’ll be happy.