-2
\$\begingroup\$

It's not as good as putting it in the hub but it's a quick lazy attempt. For keeping devices (Raspberry Pi for example) from experiencing brownouts on the order of milliseconds in duration which happen. And could reboot them. I just saw 2 mini-outages of under 1 second, maybe a tree limb on a wire somewhere, who knows. Arcs of short duration, mostly during windy weather.

Just take a USB plug and solder any spare electrolytic capacitor rated at more than 5 volts across it. 5000 mfd say at 10 volts. I'm surprised nobody sells them. Better hubs like the D-Link one I've got here probably have capacitance built in. As a network administrator surrounded by PCs I used to pay attention to which ones rebooted when the lights flickered.

\$\endgroup\$
12
  • 7
    \$\begingroup\$ Sorry but what is the question here? \$\endgroup\$ Commented Jan 2, 2018 at 15:42
  • 4
    \$\begingroup\$ Large load caps of 5mF present an excessively large current load to the USB port which may cause fault conditions. Any attempt to sustain USB current must also regulate charge rate such as using an ICL (inrush current limiter) \$\endgroup\$
    – D.A.S.
    Commented Jan 2, 2018 at 15:49
  • 7
    \$\begingroup\$ As Bence said, it's not very clear what you're asking about. Maybe you could edit your question to include an explicit question (i.e. a sentence ending in ?). I know, this might sound a bit patronizing, but clarity of communication is really something that usually enhances the answers you'll be getting! \$\endgroup\$ Commented Jan 2, 2018 at 15:57
  • 2
    \$\begingroup\$ A 5000uF cap will hold VBUS (drop 0.5 V at 500 mA load) for 5 ms. What if the outage is 10 ms? 20 ms? 50 ms? What would you do? That's why no one is offering this kind of "solution" to brownouts. Use a small-size UPS to solve your problem. \$\endgroup\$ Commented Jan 2, 2018 at 17:31
  • 1
    \$\begingroup\$ @AliChen. No it's not the same thing, putting a large capacitance on the output of a PC USB port (where there is more severe current limiting) may put you out of spec for supply rise times when turning on. You have far less problems when using a Wall Wart with current limiting at around 2 A for example. I agree that once charged the cap helps hold the voltage eup....but you have to be able to turn it on without going out of spec. Most USB (wall wart) power supplies already have a fairly large output cap, and increasing it may well help. Not so for a PC USB output. \$\endgroup\$ Commented Jan 2, 2018 at 23:26

3 Answers 3

3
\$\begingroup\$

Just take a USB plug and solder any spare electrolytic capacitor rated at more than 5 volts across it. 5000 mfd say at 10 volts. I'm surprised nobody sells them.

My question is why you can't just buy them ready-packaged to plug in, you have to rig one up? It would only be an inrush current as the hub is powering up anyway.

A capacitance greater than 10uF connected directly to VBUS can violate the USB inrush current specification. A properly made USB hub has a solid-state circuit breaker which powers down the port when it sees excessive inrush current. So, it isn't surprising that nobody wants to sell a kludge with a significant probability of malfunction in the field.

\$\endgroup\$
0
\$\begingroup\$

You are only considering one small use case which happens to work for you. USB is a primarily a bus and devices must be designed to comply with specs to play nicely with other devices and hosts.

A USB port is only guaranteed to have at least 100 uF of decoupling so your 5,000 uF cap will momentarily take down the hub's supply and the hub and all the devices connected to it will reset. For this reason, USB devices are required to have no more than 10 uF of capacitance on VBUS.

It is possible to use a 5,000 uF cap for your device, but only 10 uF can be directly connected to VBUS. You will have to additional circuitry to limit the current to charge up the large cap to no more than 500 mA 100 mA, until after you've been granted higher current by the host.

You could also design the device to differentiate between a USB power supply and a USB host port. If it detects a power supply, then it can connect the 5,000 uF capacitor.

A brief outline of electrical specs are here: http://www.beyondlogic.org/usbnutshell/usb2.shtml

\$\endgroup\$
7
  • \$\begingroup\$ Are you saying it's 500mA until negotiation? USB (prior to USB3) is 100mA/500mW until negotiation, 500mA/2.5W after. \$\endgroup\$
    – MSalters
    Commented Jan 2, 2018 at 22:14
  • \$\begingroup\$ Yes, it technically is 100 mA before negotiation but I heard the USB standards folks relaxed it to allow 500 mA. I haven't read the spec in years though and don't know the exact reference. (Used to work for a company making PMICs including USB charging for cell phones.) \$\endgroup\$ Commented Jan 2, 2018 at 22:17
  • \$\begingroup\$ @MSalters, there is no "negotiations". There are protocols: a USB device MUST start with consuming no more than 100/150 mA, but a normal host MUST always provide AT LEAST 500/900 mA. There is no "negotiations". \$\endgroup\$ Commented Jan 2, 2018 at 22:38
  • 1
    \$\begingroup\$ @AliChen: The "negotiation" is that the device sends one or more Configuration Descriptors, the last byte of which (bMaxPower) is the power it expects. The host can choose, if the device offers multiple configurations. The host has to take into account that an unpowered hub by definition can't provide 500mA per downstream port, given that it can draw only 500mA from its upstream port. \$\endgroup\$
    – MSalters
    Commented Jan 2, 2018 at 22:50
  • \$\begingroup\$ Ok, I seem to recall that while USB spec is technically 100 mA, you could get a waiver for immediately drawing 500 mA. I'll just edit my answer down to 100 mA to prevent confusion. \$\endgroup\$ Commented Jan 2, 2018 at 22:59
0
\$\begingroup\$

Generally, preventing brownouts is much more effective than dealing with consequences. What you call brownouts sound more like overloaded wall-wars or USB ports rather than actual mains power problems. Getting a powered USB hub for power-hungry devices, and in case of the RPi, an official power supply (or equivalent) will do much more good than any solution involving caps.

Low-voltage devices which have to survive power outrages almost universally include a battery. Outrages of under 1 second are actually not that typical, automatic circuit breakers usually restore power in 2-5 seconds or so, and manual ones may need minutes or more. At that point, caps quickly become too large to be practical.

\$\endgroup\$
2
  • \$\begingroup\$ I recently did a foray in the world of Bitcoin plugminers which may draw an amp or more each from a USB hub. I tend to think more loosely about the power limits, I haven't studied the specs. I'm remembering btute force powers supplies built in the 70s where you'd take a computer surplus 100,000 Mfd cap and put it on the output of a bridge rectifier and run a mobile radio on it for a few years. Knew a few repeaters like that. I live in the country, when the wind blows the lights flicker, or go out. \$\endgroup\$
    – ab1jx
    Commented Jan 3, 2018 at 0:54
  • \$\begingroup\$ @ab1jx Well, violating the USB power limits certainly adds more instability to whatever issues with mains power you may already have. Also, I fail to see the benefit of running a radio on a supercap, compared to batteries (unless you have to pay for the batteries and can get a "surplus" supercap for free. \$\endgroup\$ Commented Jan 3, 2018 at 1:00

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