5
\$\begingroup\$

I'm pulling 5V from USB for testing an IC. Should I put a capacitor in there to filter the power supply, or will it already be steady coming from the laptop?

I don't have access to an oscilloscope, so I can't check how noisy the USB voltage is.

\$\endgroup\$
  • 1
    \$\begingroup\$ If it's no great hardship to do I' add a 10uF and 100nF ceramic. \$\endgroup\$ – Andy aka Jun 30 '13 at 10:20
  • \$\begingroup\$ Just adding the cap would have been quicker and simpler than asking. And yes, you need a bypass cap local to the IC. \$\endgroup\$ – Olin Lathrop Jun 30 '13 at 12:08
  • 5
    \$\begingroup\$ @OlinLathrop I'm not a fan of cargo cult electronics though. \$\endgroup\$ – Andreas Jun 30 '13 at 12:53
5
\$\begingroup\$

Yes, put a cap in.

You don't say what the IC is, but you should have at the very least a decoupling cap across the power rail near the power pins of the IC, e.g. a 100nF ceramic is a typical value (or 1uF, 2.2uF, etc are cheap/common nowadays)
Depending on the IC and if there are other components present, you may need one or more larger electrolytics as well (e.g >10uF, near the entry point for the power rail). The effects of not having at least the smaller cap present may range from working, the odd glitch to not working, so for the cost it's an easy choice.
Usually the IC should have an example circuit in the datasheet and advice on decoupling/layout.

Have a read of any decent electronics book for detailed info on decoupling and why it's needed, or search here (plenty of answers that deal with this) or Google - app notes on board layout/design from places like Xilinx / Atmel / Microchip etc. are worth a read.

\$\endgroup\$
4
\$\begingroup\$

Putting a capacitor on the 5 Volt line is a good idea even if the source supply is well-filtered. This meets several purposes:

  • Providing a supply reservoir to the device under test: varying current draw at the device will result in supply voltage variation without such a reservoir capacitor.
  • Filtering noise picked up over the length of the cable from the USB source to the device under test
  • Decoupling, ensuring that the device itself does not feed noise back to the USB source

In short, yes, +1 for capacitor(s).

\$\endgroup\$
3
\$\begingroup\$

Just putting 10uF and 100nF capacitor directly between the VBUS and GND is enough for digital circuits. But be aware that USB 2.0 Specifictiation allows a maximum capacity of 10uF so there is a limit to the inrush current. So do not put larger Caps in to be "on the safe side"

\$\endgroup\$
1
\$\begingroup\$

The USB spec actually mandates a 1 uF capacitor on the +5V line. The reason is to counteract the inductive kick of hot-plugging and hot-unplugging the cable. More is somewhat better, as long as it's not so big as to cause temporary over-current draw from the host when being plugged in.

\$\endgroup\$
1
\$\begingroup\$

Depends on the length of the cable (and sometimes the quality), the quality of the laptop's usb circuit, if you are charging the laptop or not, what type of IC you are actually using. Most brand name manufacturers will have a decent enough usb supply where extra filtering is not needed.

But most of the time, it doesn't hurt.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.