Simplest way to get 500mA out of USB? - Page 1
Forum section: electronics / projects

author: twospoons
author_rank: Frequent Contributor
timestamp: October 20, 2022, 03:55:45 am
content: USB by default delivers only 100mA, and the device has to request extra current if it wants it ( if the host device is obeying the standards).I'm looking for suggestions for the simplest/cheapest way to get at that 500mA, to power a small project that doesn't need USB for anything else (no microcontroller).I'm aware that many USB hosts will just deliver 500mA or more regardless, but thats not a reliable approach - would be just my luck that the host I want to use would throw an overcurrent fault and shut down the port.

author: moffy
author_rank: Super Contributor
timestamp: October 20, 2022, 05:23:26 am
content: It looks like 500ma is the default:https://www.androidauthority.com/usb-power-delivery-806266/and"There is no need to "negotiate" anything from USB2 port, nor be "official". This "100 mA" sentiment is a commonly repeated misconception. Per USB specifications any AC-DC powered USB host must provide AT LEAST 500 mA. See this. That's why you cannot find any "negotiating" device on the market, it is not needed and thus does not exist."from :https://electronics.stackexchange.com/questions/516855/usb2-powering-3-3v-at-500-ma

author: magic
author_rank: Super Contributor
timestamp: October 20, 2022, 05:41:17 am
content: Definitely the simplest way is to just take it, but the default in old USB standards was indeed less than 500mA (100mA IIRC) and any larger amount needed to be declared in device descriptors and was only permitted after enumeration by the host. Or maybe even after explicit configuration change by the host, I'm not sure.This may have been increased in 3.0, but still not sure if to full 500mA.I recommend looking up relevant standards, not androidauthority.com

author: exmadscientist
author_rank: Frequent Contributor
timestamp: October 20, 2022, 06:16:29 am
content: 500mA is the limit,de facto. It is true that 100mA used to be specified. I have no idea if that is still the case, because whether it is or isn't, no one implements it that way. What USB hosts actually do is implement a 500mA current limit (at minimum), and you can rely on that in the real world. You will hit other random problems with higher frequency than you will hit a 100mA limit.USB3 ports do up the available current (to 900mA? I forget exactly, but it's less than 1A), but this is less reliable and so probably not worth pursuing unless it would make a big difference for your project. I don't know if it's supposed to need negotiation, because it's been a long time since I even considered it.

author: moffy
author_rank: Super Contributor
timestamp: October 20, 2022, 06:18:54 am
content: Quote from: magic on October 20, 2022, 05:41:17 amPerhaps this might be a bit more authoritative:https://www.ti.com/lit/an/slyt118/slyt118.pdf?ts=1666246593617&ref_url=https%253A%252F%252Fwww.google.com.au%252F

author: magic
author_rank: Super Contributor
timestamp: October 20, 2022, 06:22:24 am
content: Yes, people did encounter problems with that. I seem to recall that some laptops (Apple?) were particularly anal about it. 100mA limit for unenumerated devices, increased for enumerated devices that require it.Quote from: moffy on October 20, 2022, 06:18:54 amAnd do you happen to have an ability to read?It's spelled out quite explicitly in the second paragraph of your PDF.

author: tooki
author_rank: Super Contributor
timestamp: October 20, 2022, 06:38:27 am
content: Quote from: twospoons on October 20, 2022, 03:55:45 amVery few USB hosts actually activelypreventan unconfigured device from drawing more then 100mA by shutting down the port.It’s just that to be USB compliant (where configuration is mandatory), you can’t draw more than 100mA until you’ve enumerated and been given permission by the host.If a device attempts to enumerate and requests 500mA but the host decides that 500mA is not available, then the device is not enumerated and is required to remain under 100mA.Quote from: moffy on October 20, 2022, 05:23:26 amYou are unequivocally wrong. USB Power Delivery is aseparatestandard for charging, which has its own minimum. (There’s also the earlier USB Battery Charging standard.)The maximum “unconfigured” current a device is allowed to pull from a USB 1.1/2.0 port is 100mA. Why is this, even though a port is required to supply at least 500mA? Because of unpowered hubs. The 100mA is to allow a device to have enough power to enumerate and request more power if needed. (And yes, I’ve actually read the USB specifications.)“No negotiating device on the market” ummmm… USB peripheral controller chips very much do this. From things like the popular CP2102N USB-serial chip, to the Cypress EZ-USB Power Delivery controllers, every device that enumerates on USB makes a power declaration.Your unawareness of what the standards say doesn’t mean the standards don’t say them, and your unawareness of what products are on the market doesn’t mean they don’t exist.Now, in practice, practically every USB host connection (i.e. directly on a computer) or powered hub will tolerate 500mA without negotiation, and if it’s a USB BC (battery charging) or USB PD (Power Delivery) enabled port, then 500mA isn’t even non compliant. But don’t expect it to work reliably on unpowered hubs.

author: Someone
author_rank: Super Contributor
timestamp: October 20, 2022, 06:51:21 am
content: USB Type-C added the CC pins which enable more power with simple passive means, see ST AN5225But if you're trying to support people using random USB ports on arbitrary computers, then 100mA is the limit without the device negotiating with host for more.

author: magic
author_rank: Super Contributor
timestamp: October 20, 2022, 06:51:38 am
content: BTW, being capable of supplying 0.5A isn't the same as supplying that much to any device which just comes and tries to pull it.Some USB peripheral chip like FT232 could possibly be used to negotiate power for custom projects (after programming its internal EEPROM accordingly), but it's not clear how to tell when it has finished enumeratingOr you could program a USB capable MCU accordingly.In each case, the user will see notifications about a USB device being connected, even if the device does nothing meaningful on USB.

author: moffy
author_rank: Super Contributor
timestamp: October 20, 2022, 07:22:55 am
content: Quote from: magic on October 20, 2022, 06:22:24 amHoisted by my own petard, thanks.P.S. It was more authoritative.

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 20, 2022, 08:09:34 am
content: Quote from: Someone on October 20, 2022, 06:51:21 amBut is it not so that with more power enabled the voltage goes up, and you have to be careful with this? I have not read the specifications, but know of these chargers that, to push more power into the device, raise the voltage so that the current can remain lower.If so your device needs to be able to handle this higher voltage.Edit: Turned it into a question instead of a statement as per Someone his input.

author: Someone
author_rank: Super Contributor
timestamp: October 20, 2022, 08:56:58 am
content: Quote from: pcprogrammer on October 20, 2022, 08:09:34 amSo perhaps dont make "comment" that is unchecked and unverified? Because that was all incorrect and just adding more confusion to this thread. Greater than 5V is only by PD negotiation and requires some micro/asic in the powered device.

author: satyamfifa
author_rank: Regular Contributor
timestamp: July 14, 2023, 07:03:39 am
content: http://dangerousprototypes.com/docs/Designing_USB_Devices_for_proper_current_and_MaxPower

author: bson
author_rank: Unknown
timestamp: July 14, 2023, 06:54:56 pm
content: If all you're doing is using USB as a DC source, then the host has no idea if there's one 100mA so-called unit load or five devices each with a unit load on a hub. The latter is perfectly valid and the host has no way of telling until it has enumerated all devices. But if you don't have any USB devices to enumerate, then the host will never be able to tell. You ARE however violating the standard with an undeclared 500mA (five unit loads) sink, but in reality this makes no difference. If you add a second sink on a hub you may well find the host shuts off power as it's not required to provide for more than five units loads on a bus without device configuration (or PD).

author: Someone
author_rank: Super Contributor
timestamp: July 14, 2023, 10:30:10 pm
content: Quote from: bson on July 14, 2023, 06:54:56 pmSo you ship a USB hub with each of your products to hide the power consumption of the actual device?

author: amyk
author_rank: Super Contributor
timestamp: July 15, 2023, 01:03:18 am
content: Quote from: twospoons on October 20, 2022, 03:55:45 amIt is - there's zero advantage and plenty of additional cost associated with implementing switchable current limits. Overcurrent limits will be at least >500mA.What the spec says and what actual USB hosts implement is not the same. No sane company is going to spend the $$$ to add adjustable current limits on their USB host product just to piss off everyone else - including potential customers who will surely have other devices that draw >100mA without asking - when they can simply use a single current limit (which is more for safety than anything else.) Mobo manufacturers were marketing USB ports with 1A, 2A, or even 3A capability long before USB acknowledged them. "In theory, theory and practice are the same. In practice, they're not."

author: Someone
author_rank: Super Contributor
timestamp: July 15, 2023, 01:33:37 am
content: Quote from: amyk on July 15, 2023, 01:03:18 amThats all fine and dandy for a DIY product that you play with, but send volume product (the only category of product which would be caring about saving a few $) out into wide circulation and they'll come across implementations that DO limit current to 100mA.mosthosts do not limit unenumerated devices until > 500mAdoes not implyzerohosts/sources will limit until 500mA

author: amyk
author_rank: Super Contributor
timestamp: July 15, 2023, 11:00:23 pm
content: Can you name one? There was Apple mentioned earlier, but I checked a few of their models and they use the same fixed-current-limit switch that other PCs do.I suppose a USB compliance test machine exists that will actually do that, but not a USB host that people will actually use.

author: Someone
author_rank: Super Contributor
timestamp: July 16, 2023, 12:32:54 am
content: Plugged a 140mA mostly resistive load into one of 4 usb ports on the computer in front of me, output came down to under 4V. That same port has no problems with enumerated devices.

author: amyk
author_rank: Super Contributor
timestamp: July 18, 2023, 12:54:58 am
content: Quote from: Someone on July 16, 2023, 12:32:54 amMake and model? Either you have a (very!) rare example of a proprietary USB host that has programmable current limits, your "enumerated devices" don't draw much current, your "mostly resistive" load was enough to put a PTC fuse into high resistance with its inrush current, or you just have a bad connection.Consider this: Standard PC USB controllers using OHCI/UHCI/EHCI havenoway for software to set a programmable current limit, nor even determine how much current is actually being drawn. They can turn Vbus on/off, and have a way to read overcurrent status, but that's it.

author: Someone
author_rank: Super Contributor
timestamp: July 18, 2023, 03:31:22 am
content: Quote from: amyk on July 18, 2023, 12:54:58 amI'm not putting out model/make specifics here, partly because this is repeatable across many makes and models. Yes its mostly higher end/workstation/server grade hardware that limits USB power and Apple has been a famous target (their USB hub keyboards with the non-standard connector) but its not wildly unusual if you move past dollar shop USB adaptors and grey box HAXOR !!!111eleven gaming motherboards.That example USB port you question works fine with USB hard drives that have been measured to pull more than the 140mA I pulled forcibly. Inrush current was carefully controlled to be well within USB specifications and works fine if the load is kept under 100mA.Some of us have designed and built USB devices, and gone out to test these things. But hey, let the myths and rumours continue unabated. I'll keep making money by having this "secret" knowledge people seem hostile to, despite being given for free.

author: amyk
author_rank: Super Contributor
timestamp: July 20, 2023, 04:02:42 am
content: Quote from: Someone on July 18, 2023, 03:31:22 amYet you have not named asinglehost in widespread use with programmable current limits, or even hinted at how such a thing could be implemented, so we are lead to believe this is merely a product of your imagination.In the beginning... the mid 90s to be precise, Intel released the PIIX3 (82371SB) chipset, the first to feature a USB host controller with the UHCI interface. It has no current sense capability; not even an overcurrent status. In its reference schematic, which no doubt based the design for many other mobos with the 430/440 series chipsets, USB Vbus is simply connected to the system +5V with a 1.25A fuse:In the design guide, there is zero mention of any 100mA limit, only 500mA, and they even recommend a very generous 1.5-2A for a fusing current:The competing OHCI standard does have provisions for overcurrent detection, but once again, no programmable current limit.Let's fast forward a few more years to Intel's 800-series chipsets; here's the USB power supply for Intels' 845G reference mobo, and it has some more switching circuitry, but current limiting is accomplished by nothing more than a 1.5A fuse:What about the AMD side? This is a Quanta ZP1 (OEM of Acer Aspire 135X), one of the first AMD laptops to have USB 2.0 via (no pun intended) VIA's VT8235 southbridge, providing 6 USB ports with overcurrent inputs......which are permanently pulled up, so either the feature was not working or not worth bothering to implement. You may wonder whether this means the USB ports have no protection, but a quick glance at the schematicconfirms that they do, with one RT9701 1.5A solid-state current limiter for each of the two pairs of ports (750mA each). This laptop won't tell you if you overload the USB ports, but the ports are protected regardless.Intel's first USB 2.0 southbridge, the ICH4, can be found in the Fujitsu Lifebook S6120, among others. It also features 6 USB ports with active-low overcurrent inputs, a feature that is taken advantage of to provide simple overcurrent detection downstream of the 1.5A fuse using a half-ratio divider:No programmable current limit either. You might still be inclined to doubt, so let's look at another slightly newer and perhaps more "prestigious" laptop: the IBM Thinkpad X40, OEM'd by Wistron as the S-Note 3, featuring 8 USB 2.0 ports on its ICH6:A simple FET switches the 5V rail through a 1.5A fuse with a resistive divider producing an overcurrent trip output. Several years later, the X60 would change this for TPS2051+TPS2052 solid-state current-limiting load switches, rated at 500mA continuous per channel; again conspicuously missing is any signs of programmable or 100mA limits:I think you get the idea now; there's never been, and likely never will be, a 100mA current limit, nor programmable current limits, on standard (non-PD/etc.) PC USB ports. It is always fine to take up to 500mA from them.Applehas been mentioned more than once here as possibly behaving differently, so I looked on that side too. The early history is difficult to research but I found schematics for the iMac G4 and PowerBook G4. These don't even have an x86 CPU and use a proprietary chipset, so they are quite different from standard PCs in that respect, but what about their USB port power?A 2A fuse followed by a TPS2023 1.5A current-limiting load switch feeds all 3 USB ports, allowing them to take 500mA each. There is an overcurrent feedback to the chipset, but nothing more complex than that. Did that change when they switched to the standard PC architecture?No. The first MacBook has one TPS2042B dual-channel switch with a 500mA limit per channel.There are a ton more examples I can show if necessary, but for now I'll just show one more: Thinkpad T490/590 from 2018, or roughly 20 years after USB ports first started appearing. Have they decided to implement programmable current limits now?That shouldn't be a surprise anymore.Quote from: Someone on July 18, 2023, 03:31:22 amGuess who is posting the "myths and rumours" now?I hope we're all here to learn, and motivated by your assertion that USB ports with programmable current limits exist in practice, contrary to my experience, I did a ton of research. Yet I couldn't find a single piece of evidence that such a thing exists outside of specific USB spec compliance testing equipment. You can either admit your BS, show one actual counterexample with non-made-up details, or try to counter all the other evidence shown in addition to my initial reasoning.Why would any company deliberately add hardware and software to implement programmable current limit that defaults to 100mA on each port, when it provides negative value to users and profits? Moreover, as we just saw, even if you wanted to, there's no way to do that with regular hardware and software, nor any evidence that anyone sane ever wanted to.

author: Berni
author_rank: Super Contributor
timestamp: July 20, 2023, 05:44:57 am
content: The 100mA limit is indeed a thing...BUT not for that reason.As amyk nicely demonstrated computers never implement a limit at 100mA, they all use similar 5V overcurrent protected high side switch ICs (I replaced a few in laptops before) that make sure a port has at least 500mA available. They are capable of supplying 500mA and the cables can handle 500mA, so why would they limit it?However... the USB spec also describes USB hubs with no external power. So if you are to load up a 4 port USB hub with 500mA on each port the hub would need to pull 2A from the USB port. In that case the host USB power would be overloaded and shut off power to the hub, causing all the devices on it to disconnect. Notice how 100mA hub + 4*100mA = 500mA. So because a USB device is not allowed to pull 100mA until enumerated nothing will break. Then as devices enumerate they also report how many mA of current they require. So if the USB host decides that the port the USB hub is on can't handle more power, then it can decide to stop enumeration. Windows has a "USB Hub Power Exceeded" error message in that case.However in practice this doesn't always work. Cheep hubs might not correctly report back if they are externally powered or not. Sketchy USB devices might pull more current than they enumerated for, or might pull the power before enumeration. The OS might not be correctly aware of the host ports capability etc... But in practice computers often feed multiple USB ports from one high side switch IC, so there is often much more than 500mA available.So yes you are indeed not supposed to draw more than 100mA before enumeration, but in practice lots of USB power only devices violate this rule.

author: ejeffrey
author_rank: Super Contributor
timestamp: July 20, 2023, 08:31:41 am
content: Quote from: amyk on July 20, 2023, 04:02:42 amThat doesn't matter. It is still absolutely required by the USB specification for devices to enumerate before drawing more than 100 mA or use some other power negotiation (such as USB battery charging or power delivery specs). If you do not do that you are 100% violating the USB spec. You device will fail certification. Yes you will get away with it almost all the time.It's also not just purely theoretical concern that a host could implement more complex power management. It has been explained multiple times and you conveniently ignore which is that bus powered hubs exist and are quite common.

author: Someone
author_rank: Super Contributor
timestamp: July 20, 2023, 08:50:03 am
content: Quote from: amyk on July 20, 2023, 04:02:42 amSTPD01Falsifiability, to claim there is none can be proven wrong with a singular example.

author: Someone
author_rank: Super Contributor
timestamp: July 20, 2023, 08:51:55 am
content: Quote from: ejeffrey on July 20, 2023, 08:31:41 amNumerous USB specific power management chips report the current back to the host, upstream programmable regulators? some magic current limit chip? dunno, dont care, can see it in action in front of my nose.

author: Berni
author_rank: Super Contributor
timestamp: July 20, 2023, 10:30:31 am
content: The USB spec calls for root hubs and self powered hubs to provide 500mA of current.The only case where it talks about reducing the amount of current on available on a port from 500mA down to a lower value is:a) You are a battery powered host and can't afford to supply the full 500mA. In that case your only option is to refuse enumeration of a device that asks for more than what you are willing to giveb) You are a self powered hub and have lost your power source. In that case you can force re-enumeration of everything on the hub with the new 100mA per port limit.In fact it even makes the practice of placing multiple USB ports on a single current limiting channel perfectly legal as long as you don't provide more than 5A to a single port.So if you ever find a USB host port that doesn't seam to want to provide 500mA off the bat can mean that either the manufacturer of the host device cheaped out (put a bus powered hub inside or skimped on the power supply) or they are violating the USB spec.

author: alm
author_rank: Super Contributor
timestamp: July 20, 2023, 02:24:42 pm
content: Quote from: Berni on July 20, 2023, 10:30:31 amWhere do you see the spec specifying that they must provide 500 mA before enumeration? It explicitly says that high power bus powered loads (loads drawing more than 100 mA) may only use up to 100 mA before configuration. So any device drawing more than 100 mA without enumeration is definitely violating the USB spec (whichever version this is).

author: Berni
author_rank: Super Contributor
timestamp: July 20, 2023, 05:01:59 pm
content: Well the spec says that root port hub must supply 5 unit loads of power and 1 unit load is 100mA.Later on it also talks about a control signal to the power switch/limit. It specifically says this is an on/off signal that is under software control. So since the first page says you must supply 500mA and never mentions anything about reducing it to 100mA (Apart from the cases i mentioned above of a battery powered host or a hub loosing power) that means doing that switch between 100mA to 500mA on enumeration violates the requirement on the first page.That still does not mean you are allowed as a USB device to draw 500mA right off the bat. The specification is clear about only being allowed to draw 1 load unit before enumeration. But it is not the job of the host to stop that from happening, such a spec violating power hogging USB device would simply just cause problems when used with too crowded of a USB hub. Causing the whole hub to go offline rather than just the power hungry device failing to enumerate, having a "USB Hub Power Exceeded" error show on the screen, while the hub and other devices on it continue to work.But that being said limiting the current to 100mA before enumeration would not really hurt anything since a spec following USB device will not draw too much current during that time anyway. Only when that 500mA off the bat power hog device shows up is when it would show up as a problem.

author: magic
author_rank: Super Contributor
timestamp: July 20, 2023, 05:20:34 pm
content: LOL at this thread still being aliveQuote from: Berni on July 20, 2023, 05:01:59 pmAnd the next sentence says that battery powered hosts may choose to supply only 1 unit load per port.I suppose this may include laptops or phones while they are not charging.

author: peter-h
author_rank: Super Contributor
timestamp: July 23, 2023, 03:54:28 pm
content: 500mA is standard out of a PC/laptop. You can go higher with messy negotiation methods.100mA is all you can assume can be obtained from ahub. AIUI this is why hubs can be unpowered only up to 4 ports; beyond that they need a power supply.So a USB device should start with 100mA only.

author: bson
author_rank: Unknown
timestamp: July 23, 2023, 08:52:22 pm
content: Quote from: amyk on July 15, 2023, 11:00:23 pmIt seems to have been the port on an AppleKeyboard. That kind of changes things, who knows what they did there. Since it's a single port maybe they felt it was somehow a good engineering decision to enforce the 100mA spec... After all you should only ever plug in a mouse, right? Right? The droop to 4V makes it look like complete shit though.

author: Someone
author_rank: Super Contributor
timestamp: July 23, 2023, 10:26:08 pm
content: Quote from: bson on July 23, 2023, 08:52:22 pmThat was a common example of the additional restrictions on unpowered hubs.Quote from: Someone on July 16, 2023, 12:32:54 amPorts, directly on the desktop computer, integrated, exposed to the user as a "port". But do continue to imagine every possible malicious/disingenuous possibility that I have not said.... or explicitly said the opposite of.Don't like the standards? that's up to you. Claim zero computers limit the current output on their ports? I'll keep pointing out there are many computers that have, do, and will, limit current on USB ports.

author: amyk
author_rank: Super Contributor
timestamp: July 24, 2023, 01:46:54 pm
content: Quote from: Someone on July 23, 2023, 10:26:08 pmYou haven't provided any actual proof.Nor do the standards define any way of programming a current limit!As much as you keep going on about the standards, have you actually read them?Going back to the OP's question, it's not even about a USB device that has communication so compliance testing and such is completely irrelevant anyway!Quote from: twospoons on October 20, 2022, 03:55:45 amThe answer is that you won't get any overcurrent indication if you just draw 500mA from the host.

author: Someone
author_rank: Super Contributor
timestamp: July 24, 2023, 10:57:45 pm
content: Quote from: amyk on July 24, 2023, 01:46:54 pmBecause "proof" is a) a rubbery thing with no strict definition, and b) a bar which can be arbitrarily raisedYou said there were no implementations or use case, I provided a link to a publicly available example of one. You said it didn't exist and I'm untrustworthy, yet it does exist and you have no evidence or proof I am untrustworthy.Show me proof pigs can't fly.......

author: ve7xen
author_rank: Super Contributor
timestamp: July 24, 2023, 11:22:19 pm
content: Quote from: amyk on July 24, 2023, 01:46:54 pmAnd why would they? The specification is about minimum requirements. If you want to gild the lily, as long as you still meet the spec, you can go ahead. The specification allows several scenarios where only 100mA must be available, ergo, within those constraints, a port-owner can choose to current limit its ports as long as 100mA are available. It is notrequiredor evendefinedby the standard, but it is certainlyallowedby it. Then it's just a 'rule 34' kind of proof. There are enough USB devices out in the wild that it's a near certainty that someone has implemented this. It's even quite a reasonable thing to do on a self-powered hub.

author: amyk
author_rank: Super Contributor
timestamp: July 25, 2023, 03:31:33 am
content: Quote from: Someone on July 24, 2023, 10:57:45 pmWhat link? I've posted almost a dozen schematics of real devices, while you've only made (intentionally!) vague claims.Quote from: ve7xen on July 24, 2023, 11:22:19 pmFor USB to enforce a current limit as some of you are suggesting happens in practice, software would need to read the descriptor to see what the device requests, and then program it into the hardware. There is no way to do this with standard UHCI/OHCI/EHCI/XHCI controllers, nor does the USB hub standard define such an interface either. Hence why all self-powered USB ports have a 500mA de-facto limit, and so do ones on bus-powered hubs. Otherwise you'd need proprietary drivers and hardware, which may exist, but no one really cares about because it's so rare and out-of-touch with the real world.

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2023, 04:01:49 am
content: Quote from: amyk on July 25, 2023, 03:31:33 amQuote from: Someone on July 20, 2023, 08:50:03 amYou claim there is nothing which limits USB current to 100mA, yet quoted there above is an example specifically targeting USB hosts which limits current to 100mA. No magic hardware, off the shelf product.

author: Monkeh
author_rank: Super Contributor
timestamp: July 25, 2023, 04:08:51 am
content: Quote from: Someone on July 25, 2023, 04:01:49 amA chip capable of doing this is not a product in the wild which implements it. A chip, I might add, designed for USB PD applications, which are quite new.Just tell us the model of any off the shelf computer which implements such behaviour. Not rocket science.

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2023, 05:52:26 am
content: Quote from: Monkeh on July 25, 2023, 04:08:51 amWhat does that achieve? are you going to go out and buy some of them? Useless posturing.You really think a manufacturer would make a chip, deliver it to market, keep it available, promote it, and not have it end up in a single product?The question was posed why does this not exist, I showed it did. But as I said above this is some silly "argument" for proof where no matter how incorrect and falsifiable these claims are, pointing that out and meeting the burden of proof is only replied to with yet another "challenge" as if that somehow invalidates the prior statements.I'll repeat it here:that many/most USB hosts do not limit the current on the port to 100mA under any known conditions, does not mean there are no hosts that doI have observed such hosts, and shown there is a market for that functionality that is served by semiconductor manufacturers

author: Berni
author_rank: Super Contributor
timestamp: July 25, 2023, 06:37:05 am
content: The STPD01 is a switchmode chip used for supporting USB PD (That does require switching current limits and even voltage). This is many years after the USB 2.0 standard was released.But the USB-A connector has no support for USB PD features because it requires extra CC pins (found in USB-C). So what we can do on there instead is USB 3.0. There the specification pdf has the same wording about power, except that the currents have been bumped up to 150mA for low power and 900mA for high power devices. The spec calls for the same overcurrent protection circuitry, you must supply at least the maximum allowable port current and must be less than 5A, still allowing ganging multiple ports onto one current limiter.Even if we ignore the spec. What would one gain from the extra effort of limiting the power down to 100mA? The host has the power available, the wires and connectors are rated for higher power so nothing would be damaged. Maybe on a battery powered device you might use it to ensure the device won't drain the battery faster than expected.If anything implementing this would get you problems from badly designed cheep bus powered USB hubs that don't have power switching and just run the 5V directly out to the ports (tho this is against spec). So if you plug such a hub into a port and then plug 4 of the low power devices into it everything will work fine. Then after you reboot your computer the hub will get freshly enumerated, so you suddenly impose a 100mA limit while the 4 low power devices draw 400mA and the port shuts off, preventing the hub and all devices on it from working until the user unplugs it and plugs it back in that order. The spec also calls for the overcurrent mechanism being resetable without user mechanical intervention. This would also break your forward compatibility with USB 3.0 devices as they are allowed 150mA before enumeration. So congratulations not only did you break compatibility with the cheep USB peripherals (that do break spec, but users will eventually plug one in) but you also broke forward compatibility to perfectly spec following USB 3.0 devices.Still wouldn't mind an example of a computer that implements this 100mA before enumeration limit. If nothing else so that i can avoid buying a piece of equipment with such a badly designed USB ports.

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2023, 08:44:55 am
content: Quote from: Berni on July 25, 2023, 06:37:05 amAnd nothing requiring those higher limits be provided before enumeration.Quote from: Berni on July 25, 2023, 06:37:05 amExactly why I'm not putting out any specific models or examples. So the unwashed mob can storm around claiming products which pass USB standards are bad and should be avoided so their non compliant widgets will work? Fuck no, thats the opposite of progress.

author: Berni
author_rank: Super Contributor
timestamp: July 25, 2023, 10:31:20 am
content: Quote from: Someone on July 25, 2023, 08:44:55 amWell for one i would expect a standard adhering USB 3.0 device that draws 150mA at initialization to still function on USB 2.0 ports.

author: Monkeh
author_rank: Super Contributor
timestamp: July 25, 2023, 12:51:57 pm
content: Quote from: Someone on July 25, 2023, 05:52:26 amIt achieves proof of yor claim. Without which, your posts are useless noise.Quote from: Someone on July 25, 2023, 05:52:26 amYou claimed that it did and as proof supplied a chip for a very specific purpose which is only loosely related.Quote from: Someone on July 25, 2023, 08:44:55 amThe opposite of progress is belief in unproven claims. You spoke of myths and rumours earlier -this is all your claims are until you prove them.

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2023, 10:41:31 pm
content: Quote from: Monkeh on July 25, 2023, 12:51:57 pmIt is no proof as all anyone has to say is: "I still dont believe you" absolutely nothing changes, it does allow others to reproduce the result if they want but as I said I doubt anyone on here is going to go out and obtain such computers and undertake such tests (or we'd have already seen people posting example of what happens with their hardware, rather than just referring to clauses of standards taken out of context).Quote from: Monkeh on July 25, 2023, 12:51:57 pmRead the quotes, follow the discussion. Or do I need to take it through step by step?Quote from: amyk on July 20, 2023, 04:02:42 amThats the question, posed at the end of the monster post irrationally chasing a falsifiable claim that there are no hosts implementing 100mA current limiting by trying to flood with positive examples, which is not proof unless every single example is examined/shown.I keep posting the very simple point which was repeated in the reply to that, in context with the original question attached to make it blindingly clear:Quote from: Someone on July 20, 2023, 08:50:03 amAn example of a"way to do that with regular hardware and software". The claim there is no way to do it is false.Quote from: Monkeh on July 25, 2023, 12:51:57 pmYou dont have to believe, but to question the statement and argue into oblivion is equally not something anyone should believe. I'll keep pointing out the factually incorrect rubbish that is polluting this thread and explaining the basis of my reasoning so people can consider it. Because the logic and engineering displayed here is hilariously poor and easily shown to be wrong.

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2023, 10:46:33 pm
content: Quote from: Berni on July 25, 2023, 10:31:20 amThe 100mA/150mA limit is only validated after the source can determine which standard applies, afterattachment. There is a whole zoo of possible higher current limits that are available once the host knows more about the device plugged in. If you make a USB 3 device that will attach and negotiate as a USB 2 device and it draws more than 100mA before negotiating for a higher power limit, thats a non-compliant device.What was the question of the OP?Quote from: twospoons on October 20, 2022, 03:55:45 amAsking what is needed to get through a minimally negotiation/attachment/enumeration steps to be guaranteed 500mA.

author: Someone
author_rank: Super Contributor
timestamp: July 25, 2023, 10:51:48 pm
content: Quote from: ve7xen on July 24, 2023, 11:22:19 pmI think it's clear from the discussion at this point there are several posters who fail at logical deduction and are unable to understand standards. Yet they are motivated for some reason to argue that their faulty reasoning is correct and people applying logically correct argument should not be trusted.post truth world.

author: tooki
author_rank: Super Contributor
timestamp: July 25, 2023, 11:44:03 pm
content: Quote from: amyk on July 25, 2023, 03:31:33 amThroughout this discussion, you're the only one who's ever spoken of programmable (i.e. dynamically adjustable) current limits. What I said, very early on, is that some computers will simplyshut downthe port if too much current is drawn. There's no point in a constant-current mode other than as circuit protection, and some devices do indeed do it for that purpose (for example, in the TPS2042B you mentioned). They will, of course, assert the overcurrent fault signal, so that the computer can display an error message and disconnect the device, software-wise. It's possible that the computer may, at that point, turn the load switch off (via its enable line) to completely turn off the port. I know that's what some Macs did back in the olden days. You had to restart the computer to re-enable the port.It certainly doesn't make any sense from a power management standpoint to constant-current limit to 100mA by reducing the voltage to something well below 5V, where the USB device won't be able to operate anyway. So if you have a device that wants 500mA or more, and you have only 100mA available, you just shut down the port altogether.I don't know with certainty whether any computers will actually shut down a port that is using 100mA<load<500mA.What they certainly can do is deny enumeration to devices requesting 500mA when plugged into unpowered hubs. The USB standards are very clear that a device is not allowed to draw more than 100mA unless it has successfully enumerated and been granted the 500mA.

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 26, 2023, 12:03:05 am
content: This thread is a perfect example of the internet search method that used to be employed before Google came into being. It was highly efficient and just required a little thought being put into the 'trigger statement'Step 1, assert something in a forum on the internet related to the topic you want information about. It doesn't really matter what you assert, as long as it pertains to the information you want to know and is incorrect somehow.Step 2, someone will inform you of exactly why you are wrongStep 3, someone else will correct them, and provide examples of why *they* are technically wrongStep 3 will repeat until you have all the information you could possibly want on the topic, with diagrams, references and so on. You will have saved a lot of time that would otherwise have been spent researching and collating this information.

author: amyk
author_rank: Super Contributor
timestamp: July 26, 2023, 12:27:34 am
content: Quote from: tooki on July 25, 2023, 11:44:03 pm"Someone" asserted that he has a computer with such a thing - 100mA before enumeration, and presumably 500mA after. That certainly requires programmable current limits, which due to all the reasons I've stated and the available evidence, is nearly nonexistent.Quote from: tooki on July 25, 2023, 11:44:03 pmThis is where the theory and practice diverge, and why I am almost willing to bet that you can simply draw 500mA without enumeration from standard PC USB ports. That's the question the OP was asking. Try to draw more than 500mA, and you'll likely trip the overcurrent protection.

author: tooki
author_rank: Super Contributor
timestamp: July 26, 2023, 12:47:54 am
content: Quote from: amyk on July 26, 2023, 12:27:34 amWell, programmable to the extent of two levels, not necessarily of freely programmable.Quote from: amyk on July 26, 2023, 12:27:34 amI certainly agree that it's something you can generally get away with, even if it's bad form. However, if "someone" actually has a computer that current-limits as they describe it, it'd be easy enough to prove: everyone has a phone that can take video.The OP's question wasnotwhether you canget away withpulling 500mA without negotiation, but rather whether you canrelyon it. If "someone" can provide evidence that their PC will not, in fact, allow you to do so, then the answer is clear: no, you cannot rely on this, and you need to negotiate for the power properly. As "someone" stated earlier: an absolute statement is falsified by the existence of a single counterexample, so if their PC does that, the statement is falsified.

author: Someone
author_rank: Super Contributor
timestamp: July 26, 2023, 01:15:46 am
content: Quote from: tooki on July 26, 2023, 12:47:54 amPeople are free to PM me and organise consulting rates should they actually careNote the lack of people sharing measurements of the hardware they have to hand, its all talk and no work.But as stated above, I'm specifically interested innotdisclosing the standards complaint devices that refuse to provide more than 100mA (by limiting or disconnect or otherwise) before negotiation because thats just adding fuel/ammunition for people to fight against standardisation. Which is dumb and counterproductive to interoperability. If people on here feel so strongly that the USB standard should allow 500mA without negotiation then they should petition and work with the standards body to have that implemented.

author: tooki
author_rank: Super Contributor
timestamp: July 26, 2023, 01:31:06 am
content: Quote from: Someone on July 26, 2023, 01:15:46 amYyyyeah, but why should you be exempt? You're the one making the claim, so it's up to you to prove it.Quote from: Someone on July 26, 2023, 01:15:46 amThat doesn't make any sense.

author: Monkeh
author_rank: Super Contributor
timestamp: July 26, 2023, 01:32:21 am
content: Good grief.Quote from: Someone on July 26, 2023, 01:15:46 amAnd you're all talk and no proof. Yes, I could lash something up and test this, and perhaps I will.. but I doubt any degree of testing on my part will convince you to be polite, respectful, and helpful in providing actual information.QuoteWhat gives you the impression anyone here wants to fight against implementation of these limits? I'm afraid your rationale makes little if any sense - it feels far more like trying to explain away your refusal to provide simple information. Usually when people do that, they're full of shit.If it is the case that systems implement this in practice, simply prove the fact and it's over and done with. A mere citation of a commonly available system to allow anyone else to relatively easily verify it will be quite adequate, as most of us are reasonable people.

author: Someone
author_rank: Super Contributor
timestamp: July 26, 2023, 02:17:44 am
content: Quote from: Monkeh on July 26, 2023, 01:32:21 amMe being polite? Like sharing information and observations for free, and in return having every detail and my credibility questioned endlessly? Saying someone is lying is hardly polite, when there is ZERO evidence for that.Quote from: Monkeh on July 26, 2023, 01:32:21 amWhy am I the one having to keep going back and putting comments in context? A poster explicitly stated why they wanted make/model details:Quote from: Someone on July 25, 2023, 08:44:55 amYou say I'm refusing to provide information. Which I am, for reasons explained above and in general not wanting to dox myself or reveal attack surfaces. People are free to not believe me and that is their choice, but why are posters coming in and trying to tear down and directly attack the content? I never said it was proof or infallible, the proof I gave was the publicly advertised existence of silicon to implement 100mA limits, which an unreasonably voluminous poster said does not exist. Thats a correct and well formed argument.Saying NAH NAH NAH I dont believe you, just an opinion man. Misunderstanding the standards and claiming they say things they dont, just plain wrong, observably wrong, verifiably wrong (most of the content in this thread).

author: Monkeh
author_rank: Super Contributor
timestamp: July 26, 2023, 02:26:14 am
content: Quote from: Someone on July 26, 2023, 02:17:44 amBut you haven't provided information. We're still hung on that point, apparently.QuoteNot wanting to buy for his own reasons != ammunition to fight against something. I'd like to thank Berni for feeding your paranoia, though.QuoteYou think you're going to dox yourself or reveal an attack surface by naming a piece of commodity hardware which correctly implements an open standard?Okay. So some systems may implement this functionality but we shall never know what they are, and nobody else here has ever knowingly encountered one. There's the established facts. Thank you for achieving absolutely no gain in knowledge for those of us who have asked you to assist, you're very helpful.

author: Someone
author_rank: Super Contributor
timestamp: July 26, 2023, 02:27:19 am
content: Quote from: tooki on July 26, 2023, 01:31:06 amI'm not exempt, because I'm not asking for "proof" from anyone else. People who are asking for undefined "proof" are the ones who are asymmetric in their demands. Claim was there are zero implementations that limit the current, I observed one and provided some specifics, I have observed others in the past, you claimed knowledge of example(s):Quote from: tooki on July 25, 2023, 11:44:03 pmI dont ask you for proof of that, I'm not the one asking for proof. I'm pointing out the fallacious arguments and in return receiving fallacious replies and demands of "proof".Quote from: tooki on July 26, 2023, 12:47:54 amI know how these things go, its not my first rodeo in a mob of morons trying to win internet points. Provide more information, more detail, just add more things they can question and poke imaginary holes in. Oh you have a video of it occurring... "but the multimeter isn't within calibration dates, its an untrustworthy measurement", "you didn't show enough detail, there could be some custom modification inside the computer and its non-standard". Trying to prove anything like this is a huge waste of time as the bar will be constantly raised, so I'm sticking to logical argument and things which cannot be questioned (like the existence of silicon made for this purpose, or do we want to argue thats not proven until I have an example in hand and a 3rd party verify it does what the datasheet says?).

author: Monkeh
author_rank: Super Contributor
timestamp: July 26, 2023, 02:40:41 am
content: Quote from: Someone on July 26, 2023, 02:27:19 amI defined it in case you were struggling. All I'm looking for is a positive end to this discussion with a trivial point of data.

author: Someone
author_rank: Super Contributor
timestamp: July 26, 2023, 02:40:51 am
content: Quote from: Monkeh on July 26, 2023, 02:26:14 amNo information, zero? This is the sort of rediculous "argument" that inflames rather than aims for conciliation. Here is information:Quote from: Someone on July 16, 2023, 12:32:54 amIn what way is that not information? its information of an observation I made.Quote from: Monkeh on July 26, 2023, 02:26:14 amThere is a lack of evidence or suggestion that anyone else here is actually looking for this functionality or testing it, relying instead on (mostly incorrect) interpretations of the standards. This isn't a case of an example product "correctly" implements a standard, it behaves in a way that meets the standard which may cause non-standard items to fail to work. You're adding layers of emotion and misdirection on what I keep taking back to the actual standards as they a written.Hosts are not obliged to limit the output current at 100mA, but are permitted to. Most hosts dont bother with such details and will allow more current, but that is no guarantee that all hosts will. Exactly what the OP stated and asked for some suggestions on how to address the unknown rare cases of hosts that do restrict power.Why not question the OPs assertions? ask them for proof?

author: Someone
author_rank: Super Contributor
timestamp: July 26, 2023, 02:41:48 am
content: Quote from: Monkeh on July 26, 2023, 02:40:41 amYou say trivial, I say unnecessary. Why does that need pages of argument?

author: Monkeh
author_rank: Super Contributor
timestamp: July 26, 2023, 02:53:31 am
content: Quote from: Someone on July 26, 2023, 02:41:48 amBecause the 'discussion' still hasn't ended, as apparently people are not satisfied with The Word of Someone. It appears, despite your opinion, the information is necessary.

author: Someone
author_rank: Super Contributor
timestamp: July 26, 2023, 03:02:46 am
content: Quote from: Monkeh on July 26, 2023, 02:53:31 amAs above, if this actually necessary for a person they are free to contract me to produce a more formal report on it. I'm providing information for free, want something else? you can pay for that.It's an active choice to not provide people with the information that would enable them to continue using non-complaint devices, one day that choice will bite them and it's not the fault of standards complaint hosts, or my fault. They chose non-compliance and have to accept the problems that brings.

author: Siwastaja
author_rank: Super Contributor
timestamp: July 26, 2023, 05:34:08 am
content: Quote from: Monkeh on July 26, 2023, 02:40:41 amNope, Someone's right, it won't end. Someone already tried it, proving one claim wrong, and the bar just raised and goalposts shifted. I'd do exactly the same, stop playing the game. If the bar raises once instead of an apology, it's obvious it will happen again and again. amyk's posting was never about honest discussion, and won't magically turn into such.

author: magic
author_rank: Super Contributor
timestamp: July 26, 2023, 01:24:26 pm
content: Quote from: Monkeh on July 26, 2023, 02:26:14 amMaybe he is that one poor soul in the world forced to implement 100mA limiting in a product and hence so mad at people making or using noncompliant devicesWe find that product and we know who he works for.

author: amyk
author_rank: Super Contributor
timestamp: July 26, 2023, 08:22:39 pm
content: There's only one person here that's incessantly going on about The Holy Standard, so that's a good clue.I like what Linus Torvalds says about standards: "Standards are paper. I use paper to wipe my butt every day. That's how much that paper is worth."Long before USB standard started allowing >500mA, mobo manufacturers were already providing and prominently advertising high-current ports. Why not? It costs them nothing and makes customers happy. They won't spend extra on unnecessary current limiting hardware and software. It's notable that Intel, the original authors of USB, didn't design any provisions to do so either. Only the "but my precious standards!!!!11" whiners have a problem with that, and they are easily ignorable because they are nearly nonexistent. Everyone making USB decorations, like what the OP seems to want, is also better off.

author: Microdoser
author_rank: Frequent Contributor
timestamp: July 26, 2023, 08:25:16 pm
content: So regarding the OPs question, what's the simplest way to get 500mA out of a USB, the answer is either connect a 10 ohm resistor to the 5V pins, or get the host machine to recognise that a device is plugged in.The former is easy (10 ohm resistor), the latter is also easy

author: ve7xen
author_rank: Super Contributor
timestamp: July 26, 2023, 10:20:57 pm
content: Quote from: amyk on July 26, 2023, 08:22:39 pmThe standards provide guarantees. If you abide by them and your device doesn't work, then it's not your bug to fix, it's someone else's.Can you violate them and get away with it? Sometimes. But it means if your device doesn't work as a result, that isyourfault. If you want your device to work anywhere (and pass certification...), the only way to guarantee that is to conform to the standards. It's like UB in C - maybe you can get away with it because you know how the common implementations behave, but eventually someone will compile your code with a weird compiler or on a weird architecture, and it will break. It is the same thing with violating the USB specification. Either you follow the specification, or you accept that your device will fail an unknowable amount of the time, or that it will only ever be used with devices youcantest empirically.QuoteYou seem very fixated on desktop/consumer PCs. USB host ports exist on all sorts of devices that are not PCs, some of which may be very power constrained, safety constrained, or various levels of 'overengineered' in comparison. Never mind about USB OTG.You are insisting that out-of-spec behaviour is fine and will always work, but practically by definition that is not the case. Even if it doesn't exist today, I could spend an hour designing a USB port that behaves as you seem to think is impossible, and now it exists, is standards compliant, and breaks your worldview. What you can 'generally get away with' if you don't care about USB certification or working absolutely 100% of the time and 'what will always work, or it's a bug' are different things. Everyone agrees that you can generally get away with significant abuse of USB power, but you seem to believe this isalwaysthe case, which is frankly absurd.

author: Someone
author_rank: Super Contributor
timestamp: July 26, 2023, 10:46:43 pm
content: Quote from: Microdoser on July 26, 2023, 08:25:16 pmNot standards complaint, not guaranteed to work.

author: tooki
author_rank: Super Contributor
timestamp: July 26, 2023, 11:27:17 pm
content: Quote from: ve7xen on July 26, 2023, 10:20:57 pmExactly. All the people here arguing for what you can get away with are ignoring that the OP’s question was expressly about what isguaranteedto work.

author: Berni
author_rank: Super Contributor
timestamp: July 27, 2023, 05:57:58 am
content: Quote from: Microdoser on July 26, 2023, 08:25:16 pmJust placing resistors on the data lines will not do it properly by the standard.You do need to respond with info about your USB device upon enumeration. That is where you tell the host how many mA of current your device needs to work. So you need something like a 8 pin AVR to bitbang some low speed USB descriptors into the USB port. There are also some chips out there that automate this like the MAX8895X (It not only identifies the USB port power available but even detects those old high current USB chargers that predate USB PD) but many of these chips are in a pain in the ass package due to being made for mobile devices.The most important thing is that your 500mA load MUST be switched under electronic control. You are only actually allowed to draw those 500mA once the enumeration finishes successfully. This is the whole point of this 100mA/500mA switch on the device side. If the USB host thinks that it can't safely provide 500mA to your device then the host will cancel the process prematurely and leave that device non enumerated. So the USB device must know it failed to enumerate and stay in low power mode.The USB standard is very clear about this on the device side (even if this thread doesn't quite agree for the host side), since refusing to enumerate a too power hungry device is the way the host is supposed to prevent overloading of the USB port. Main point of it being that USB hubs don't always have enough power to provide 500mA on all ports simultaneously, so this is how the host can manage the power budget of a USB hub without actually having direct control over the wire that feeds 5V to those hub connected devices. Once the USB hub runs out of power budget the host will simply refuse to enumerate any further power hungry devices that you plug in.

author: magic
author_rank: Super Contributor
timestamp: July 27, 2023, 07:37:38 am
content: Quote from: tooki on July 26, 2023, 11:27:17 pmNot exactly. This thread is an excuse for a bunch of nerds to argue with each other, completely ignoring that the OP is long gone

author: AndyBeez
author_rank: Frequent Contributor
timestamp: July 27, 2023, 09:10:19 am
content: Quote from: magic link=topic=348271.msg4982530#msg4982530Tell it how it isSo has anyone suggested daisy chaining the USB port with a powered USB hub cònnected to a three amp walwart? Or even use USB-C PD? Or is this just too simple a solution when the original idea was to smoke the Vbus track on the motherboard?

author: Terry Bites
author_rank: Super Contributor
timestamp: July 27, 2023, 12:57:34 pm
content: I needed to power up my roku box, bluetooth headphones and an HDD from the TV.The poor TV just couldn't cope.Solution- 60W usb power hub. 12A !No I charge my phone and tablet on my media console as well.No worries.www.amazon.co.uk/dp/B00Y1QA4DM?psc=1&ref=ppx_yo2ov_dt_b_product_details

author: Someone
author_rank: Super Contributor
timestamp: July 27, 2023, 11:02:23 pm
content: Quote from: AndyBeez on July 27, 2023, 09:10:19 amWell if you had read the thread (but obviously didn't because its polluted with so much noise and rubbish) both those things were suggested, and are entirely valid ways to solve the problem (though still not standards compliant if relying on the hub).