100ma, 500ma and 900ma current availability indication without the use of an MCU - Page 1
Forum section: electronics / beginners

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 05, 2024, 07:36:29 pm
content: PreambleI have never done any PCB design before and am not an EE. I recently, however, realized that for programming microcontrollers having a debugger would be very handy, and further than that, having a debugger that was isolated would be even more handy to make expensive mistakes, cheap mistakes.As such, I started designing the schematic for a board that I plan to have 2 connectors, one being an upstream facing port and one being a downstream facing port.The setup from upstream to downstream is as follows:Power and USB 2.0 Data come onto the board through the first type C receptacle, only using the D+ and D- lines, pulling the CC lines both to ground with 2 5.1kohm resistors.The power is broken off to power 3 isolated DC to DC power supplies (2 3v3 and 1 5v5) for 3 separate purposes, and the data is passed through an ADUM4166 USB Hi-Speed Isolator.On the other side of the isolation barrier:One 3v3 supply is used to power the ADUM4166 as well as the FT2232HQ and its accessories, IO pins, and indicator lights.One 3v3 supply will be used to potentially power whatever MCU is being tested at that time if it does not have a supply of its own for whatever reason.One 5v5 supply will be used to power a USB Hub controller that will connect to both the FT2232HQ for debugging purposes and the downstream facing type C port to get more utility out of the Isolator as it's rather costly on its own so it makes sense to me to have it also function in a multi-purpose manner.My goal is to make a board for debugging that will allow me to operate carefree, insulated from sloppy mistakes. There are various components not mentioned related to safety such as ESD TVS diodes, etc.RequestMy current request is to find a USB controller that will allow me to be certain that the upstream facing port has access to 500ma or 900ma+.As best I can tell, there are devices that will give me assurance of 1.5A being available using the USB Battery Charging Specification 1.2, which I don't imagine many computer ports would support, but all devices I could find appear to have "default" as a rather nebulous option. I believe this to be true because the downstream facing port that this device's upstream facing port is connected to does not need to grant the device access to 500ma or 900ma in the case of USB 3.0+ so when GPIO out pins give me the information that the power draw is "default" as far as I understand it, that could mean between 100ma to 900ma.This is an issue because I do not want to overdraw from the downstream-facing port I am connected to, as a core goal of this board is to eliminate worries of mistakes causing an incident to the device that the debugger is attached to, which will be significantly more valuable than the thing being tested. As such, I am hoping to find a solution that conforms to the standard while being able to differentiate between 100ma, 500ma, and 900ma+ being granted to this device. Basically, the most important thing is to conform to the standard at the upstream facing port end. I can deal with any compromise after that if I can get spec compliant assurance that I am good to draw the amount of current I need.In essence, the ideal solution would be a USB hub controller that would always ask for 900ma, failing that, would ask for 500ma, and failing that would let me know not enough power was available, and could give me this information in GPIO form such that adding an MCU to this board would not be required and a simple arrangement of MOSFETs could serve to limit features as to fit within the lower 500ma limit or enable all features if 900ma was available.I realize this is rather specific and this is a bit of a shot in the dark as I've looked through many datasheets at this point, but also acknowledge it is completely possible that I simply misunderstood something about the specifications I was reading.(Kinda blurry image of schematic I've been working on just to show I've done the leg work)Edit:This thread can be closed. Understandably it appears the somewhat niche nature of this question (requiring reasonable knowledge of USB power communications) means it appears unlikely that a productive answer will be found here. I have my own contingency plans and have found further paths to investigate on my own. I may edit this with my solution if I find success for future people searching for a solution to the same problem.

author: Swake
author_rank: Frequent Contributor
timestamp: January 05, 2024, 08:39:20 pm
content: Do I understand correctly that what you want to do is to protect your computer from whatever wrong move you make on the device you're building?Keep it simple! Here are some possibilities:A/ Use a cheap laptop or thin client like device instead of your expensive computer.B/ Use a ready made USB isolator. These cost only a couple of bucks from the well known Chinese providers. These can't provide a lot of power so you have build in protection from that point of view.C/ Use isolated DC to DC power supply modules. 3 bucks at the same suppliers. Example: B0505SD/ Add a fast fuse in line with the power supply.E/ When you first power up your device do not plug it in a computer but feed it from a USB power supply and measure its consumption using a USB power monitor/meter. FNRSI and Rudeng have nice stuff. After that you can use these devices to continue monitoring and logging power consumption.

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 05, 2024, 09:08:21 pm
content: This isn't really an XY problem, I am aware of other solutions. This seems like a good project, its something I want, and much more convenient than the alternatives while forcing me to do fairly complex circuit board design but not too complex for a beginner project (I find it very hard to stick with projects that I feel are just busy body projects/projects that exist solely for the purpose of learning, so I often will go with somewhat ambitious projects that have real payoffs to me as the motivation is really there to finish.More specifically:A) Using a seperate computer is massively inconvenient for programming vs debugging on the computer I'm already coding on. Workflow is massively important for me to complete projects. What might feel like small obstacles to others can often make me lose interest in a project because I simply do not want to do X, Y or Z, or because I'm more risk averse than average.B) Hi-Speed (480mb/s Isolators commercially available are rather expensive anyways, so getting one included for ~30 bucks worth in components to a board I already want seems like good value.C) My design includes Isolated DC to DC supplies. Indeed the one you recommend is pretty much the same as the one I selected except that I opted for an SMD supply due to the potential for easy assembly by a PCB house (I selected the XP Power IES0105S03 and XP Power IES0105S05)D) A Fast fuse does not accomplish what I want. I want to be able to plug this into a PC with full confidence that the device will be within spec. No fast fuse could guarantee this as the 100ma minimum guaranteed current of USB ports is not enough for the FT2232HQ, much less IO.E) This is error prone, does not solve the potential of ac powered devices with different ground plane potentials (Something I've witnessed with janky 3d printers I've worked on) and current is also not guaranteed to stay the same during troubleshooting especially where motors are involved and programming involves issues surrounding troubleshooting movement issues with said motors. This is a common use case I plan to use this device with, using BLDC's in strange ways and other electromechanical projectsIn essence, I am aware that all sorts of janky "it sorta works" solutions exist, but I am seeking to create a solution I am comfortable with, doesn't rely on the user being perfect and maintains a workflow that is conducive to me finishing projects and not going "bah I don't want to set that up right now". Otherwise I wouldn't have already have put days of work into this. I'm trying to make the product I want to exist and gain knowledge along the way; Teaching myself to fish and catching a big tuna.All that being said, this doesn't mean I am idealistic, I have contingencies such as simply being ok with being limited to ports that support 1.5A or greater, using a separate port for power, and other similar compromises. I made this post though imagining someone with more experience might be able to assist with this particular option.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: January 05, 2024, 09:49:13 pm
content: Just get a bench power supply with a USB port. If not, make a cable that connects to the binding posts.

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 05, 2024, 10:17:51 pm
content: Not sure how this would address the problem Im trying to solve.

author: wasedadoc
author_rank: Super Contributor
timestamp: January 05, 2024, 10:43:41 pm
content: Just make a simple junction box that takes 5 Volts and ground from an external supply, ground and data lines from a PC and combines them to connect to your device.

author: Ian.M
author_rank: Super Contributor
timestamp: January 05, 2024, 10:51:39 pm
content: Better yet, use a powered USB 2.0 hub with a floating output PSU on the downstream side of the ADUM4166. Tap in to the hub PSU for device side power to the ADUM4166, and gate power to the hub with a high side load switch controlled by PGOOD so it powers down if the host port is unpowered/disconnected.

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 06, 2024, 12:16:53 am
content: Hey, I appreciate the side advice/alternatives, but I'm making this with a specific goal in mind. I am well aware of all the little tips and tricks I could use to ignore complexity, but my goal is not to get the simplest solution, Its to get a solution I would be happy with. Please understand that I do have specific goals for this project/board and that my choices are made to align with those goals when it comes to the general setup. The goal is to have something I've created which reasonably suits my my use case. It doesn't have to be perfect, but solutions like simply roughly guessing, or using a secondary power supply aren't really what I'm looking for.I want something I can whip out without hesitation, and which encourages use rather than being a point of contention. The best safety devices are the ones you actually use, and I'm specifically making this because I'm tired of janky solutions to things and want to do things the right way, the spec compliant way. So while I appreciate the effort put in, and can understand why people might assume that I might be taking a harder path as a result of potentially being unaware of shortcuts, I really did research various methods and came to a conclusion on what I really wanted out of the project and the functionality I wanted out of this board. With this in mind, I'm seeking a solution like the one I've described—something that more closely aligns with my goals for this project. I want a device where I can use the device without fear of repercussions and without any friction involved in its use. If people aren't familiar with an option that fills my use cases here, no fowl, no problem, I understand completely and can keep looking on my own. I just hope to steer this conversation more towards a solution to this problem rather than workarounds or ways to avoid solving the problem.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 06, 2024, 04:44:21 am
content: Quote from: product_dev_as_a_hobby on January 05, 2024, 07:36:29 pmI'm not sure you understand what GPIO means.No MCU, no GPIO.

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 06, 2024, 06:36:54 am
content: Im very confident I do. It is the method of output from USB controllers that doesn't involve the typical MCU only protocols such as I2C or SMBUS, instead simply pulling GPIO pins to high or low which could be used to turn functions on or off as well as set configuration settings with simple mosfets or pull-up/pull-down resistors rather than entire MCUs.You will often see it listed on datasheets for USB controller ICs, of which I have looked through many at this point.Example Here:I really do think asking for clarification rather than a confident condescending remark would have been more appropriate for something you weren't familiar with.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 06, 2024, 07:10:01 am
content: Quote from: product_dev_as_a_hobby on January 06, 2024, 06:36:54 amThe USB controller itself is a MCU, albeit dedicated to the sole task of negotiating USB connections.(see page 8 of the datasheet, the big green block is an MCU).https://www.ti.com/lit/ds/symlink/tusb320lai.pdfWhatever new version of USB controller you're trying to invent, inevitably your design will require a big green block as well.

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 06, 2024, 11:01:49 am
content: Quote from: Andy Chee on January 06, 2024, 07:10:01 amThe fact that a USB hub controller contains an MCU is irrelevant to a question looking to interface with a USB hub controller without an MCU. Most complex logic components do and that pretty clearly is not what is being referred to, nor would it fit in a search for one that does not require a seperate MCU to interact with it.To say that looking for a USB hub controller that fits my needs is "trying to invent" a USB controller is pretty impossible to take constructively. I have strived for respectful and constructive exchange so having a response so clearly misrepresent technical details of my question is unhelpful and uninviting. I do not wish to dive further into this unhelpful line of conversation with you.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 06, 2024, 11:12:38 am
content: Quote from: product_dev_as_a_hobby on January 06, 2024, 11:01:49 amThat is effectively what you're attempting to do isn't it? You're not solely sensing and measuring current, but you're also generating the correct USB signalling protocol to interrogate upstream or inform downstream devices of current availability?If you were just sensing and measuring current, that's a relatively simple task. But if you want any USB signalling, that practically demands a MCU.

author: peter-h
author_rank: Super Contributor
timestamp: January 06, 2024, 11:23:30 am
content: Look at the TPS2511. That will give you some info.900mA is what you can draw from a USB3 (yellow plastic insert) PC/laptop port. Normal USB is 500mA. In general, with PC (not laptop) ports you can draw this 900/500mA without any negotiation.

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 06, 2024, 11:33:09 am
content: Quote from: Andy Chee on January 06, 2024, 11:12:38 amIndeed perhaps there is a misunderstanding here. The example controller I pulled that screenshot from has a table which I believe will aid in getting across what I'm trying to accomplish as it comes close to the functionality that I want, which is what spurs on my belief that there is likely a USB hub controller chip that accomplishes my goals available off of the shelf, just waiting to be found.here in this graph, you can see that with this controller, we get simply high, low output signals which could then by given to mosfets to very simply control our power draw. To truly understand what I am trying achieve would shift where each of these outputs trigger though.Instead of starting at default, we would start at 100ma, the minimum current, the next tier would be 500ma, the standard USB 2.0 current, and then the final stage would be 900ma+ including everything greater than 900ma.In the first stage of this, the hypothetical USB controller I am hoping to find, we would simply remove power from all of our other components, effectively completely turning off our board as there would not be enough power to run even just the FT2232HQ when the output of its GPIO pins are taken into account.For the second stage at 500ma, we would allow the FT2232HQ to turn on, and the doward facing port to be enabled at 100ma draw (as is the bus powered hub standard current output for USB 2.0). This would just barely fit under our 500ma current allowance, but would disallow us from using the DC to DC isolator meant to be used for powering 3v3 devices being tested by the FT2232HQ that do not have their own power source (for example if you had a microcontroller you took out of its environment and away from its power supply to test at the bench, so you would have a convenient source of 3v3 power without needing to whip out cables and your secondary power supply.For the final stage at 900ma+, we would have enough allowance to enable all of the features of the board.Indeed, the problem is this: I have not found a controller that I believe can distinguish between 100ma, 500ma and 900ma allowance via GPIO pins, the preferred method as it does not require the programming and inclusion of a seperate MCU and can be done with a few cents of mosfets and some pull down resistors.My current plan, or rather my contingency upon failing to find assistance in achieving this was to simply accept compromise and require far more power than I need by simply requiring that 1.5A of allowance be present for the board to operate. This would be a significant compromise given that it would exclude many perfectly capable modern ports from being compatible with the device, but it would give me the assurance I need that I would never overdraw from the host computer which is massively important to my goal of making this a hassle free debugging tool where I do not have to rely on myself not making mistakes to keep an expensive device safe, nor do I have to rely on less convenient half solutions Im used to relying on (like ensuring I only troubleshoot with battery power to avoid any potential ground plane differences that I am unaware of for instance).Hopefully I have gotten my goal across more clearly, but if there are still have questions, Im sure I can add more detail.

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 06, 2024, 11:50:01 am
content: Quote from: Andy Chee on January 06, 2024, 11:12:38 amUnfortunately while definitely somewhat getting at what I am looking for, that is a downward facing port, which means it would be inapplicable for my purposes searching for a USB hub that would give me assurance that I could pull a given current from the host downward facing port of a host computer to the upward facing port on this device/board.It does allow for me to more clearly identify a wish list however. One where I could potentially set the power amounts that the USB hub controller negotiated for. In that event, I would likely be happy enough with being able to set it to negotiate for 900ma, and having it tell me whether or not the request for power was successful or not through a simply hi signal on a gpio pin which would go directly to an enabling mosfet.

author: Andy Chee
author_rank: Super Contributor
timestamp: January 06, 2024, 11:50:30 am
content: So it sounds like you want to build a USB hub that's capable of "load shedding", load capability dependent on on upstream interrogation, and switching off downstream ports as required?And you want to utilise an existing USB hub controller which hopefully has the correct signalling to switch the ports?

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 06, 2024, 12:17:44 pm
content: Not quite but very close. The port itself would not be responsible for any of the load shedding. Instead, due to the fact that the hub would be communicating through isolation and powered via a 3v3 supply rather than the actual USB supply, the goal would be to use that information through the GPIO pins, to do load shedding through a circuit of my own.The outputs of the isolated DC to DC power supplies for instance, to other components on the board would be disabled via mosfets.The distinction here that matters is that the USB hub controller itself would be distinct to the components that draw power. That is to say that the power would not be going through the USB hub itself (as its isolated) or its power switch, but instead to mosfets that power other parts of the circuit.So for instance, in that middle stage, the GPIO pins would lead to a configuration where the power coming from the primary isolated side's secondary 3v3 rail used for powering microcontrollers would be cut off by a mosfet.In the case of only 100ma, for instance however, only the USB hub controller would continue to receive power, and the rest of the components such as the 5V rail for the USB hub, the 3v3 rail for boards being tested that need a 3v3 vout supply, the 3v3 power to the FT2232HQ and the 5v vout for boards to be tested that need 5v would be cut.This would all be with relatively cheap mosfets based on the GPIO output of the hub, and that is why I am so intent on finding one with GPIO out, and not requiring a secondary MCU. It simplifies the design massively and doesn't require coding to configure each board.In essence, the fact that the hub is isolated means that it can't directly control power and can only indicate what it has successfully requested and been approved to use, and then have other circuits comply with that.

author: Swake
author_rank: Frequent Contributor
timestamp: January 06, 2024, 01:41:47 pm
content: You should not rely on any version of the USB protocol to protect something from happening. It might be possible to implement what you want but that is an out-of-spec use of the protocol and personally I would never want to rely on it because it was never meant to be capable of that.If you want to build something that will be safe to use in a lab context then you must account for that environment yourself. There is only one way to cope with such a harsh environement: total isolation. There is a reason why all those fancy T&M tools from HP; Gossen; Rigol and many more have a galvanic isolation on the communications bus (USB, ETH, RS-xxx; GPIB; etc... ). They all have the equivalent of an MCU on the communications and user interface side (the side that is 'under-control') and they have some equivalent controller on the business side (The side where a surprise event can happen any time), both sides being isolated from each other with opto's or the like.I will write it again: the simplest, don't care and no more worries solution is to use an additional cheap second hand computer. I use an old thin client with a ridiculous cost. No, ones you're setup it does not complicate your workflow in any way. You can solve all that by mounting disks to your 'expensive' workstation over the (wireless) LAN and in my personal case I use remote desktop or a console connection should I nevertheless want to do something on that thin client. Actually it has opened many new possibilities because it is a fully dedicated setup now that is very stable.In your context an MCU is going to be one of your cheapest components. The very capable ESP32-C3 is 1€ and you can find other MCU as low as 10cent. Unless you are going to build millions of devices and the price of the device is sensitive to a couple cents, it is a no brainer decision to include an capable MCU especially if your device is something that will be used to make debugging of firmware/hardware easier, that MCU will bring a lot of capabilities for a ridiculous cost that otherwise would not be possible. Chances are that your potential customers don't care about 5€ more or less but they do about that extra functionality.You still have a 'modern' use case for the FT2232HQ? I'm genuinely curious about what you want to do with it, because I think of it as a legacy interface with old fashioned serial buses. It works perfectly well but is expensive, very expensive.

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 06, 2024, 02:17:36 pm
content: Quote from: Swake on January 06, 2024, 01:41:47 pmI think you are misunderstanding a lot of what I am trying to accomplish here. I am trying to get confirmation of what current the USB spec is allowing me to draw, which I will control ourselves to ensure the board is always compliant. I don't really see where you are viewing USB itself as being a protection device anywhere in this plan. USB itself serves as no protection in any of what I've described, in fact a great deal of the board is to protect the Host pc's usb ports/circuitry specifically with the idea that there isnt inherent protection of a level that I am looking for.Quote from: Swake on January 06, 2024, 01:41:47 pmIf you look over my initial post, you'll see that the entire point is complete galvanic isolation, and indeed that is the reason for the 4 main isolating components described, exactly for that purposes. The Hi-speed USB isolator, is the key component of this device, so I am once again confused because that is quite literally what the plan is: To have complete isolation on one side of the board to the other side of the board.Quote from: Swake on January 06, 2024, 01:41:47 pmI feel I have already sufficiently explained why this suggestion is not relevant to my project as what you are suggesting is to simply not do my project and continue to risk hardware rather than build a safety device once that improves my workflow significantly by not simply having to use low quality hardware due to a lack of proper isolation.Quote from: Swake on January 06, 2024, 01:41:47 pmI don't quite think you are understanding the goal or purposes of the device I am aiming to build. The ESP32 would be completely wasted other than to configure USB hub controllers, and would necessitate extra, unnecessary complexity. I have many ESP32s laying around, this isn't like Im not familiar with or am unaware of how mcus work or how cheap they are, it is that Iamand do not want the added complexity, especially when it comes to a device I want to be fairly bullet proof safety wise.I don't have potential customers. Im building something that I want, for me, to improve my workflow.Quote from: Swake on January 06, 2024, 01:41:47 pmThis is the most confusing part of your comment. These are completely inexpensive. They cost at most 7 dollars Canadian. They also have all of the capabilities I care about with regards to debugging such as compatibility with JTAG, SPI, I2C, UART, and SWD (through software) using either open source libraries and software (ex. OpenOCD) or their driver set.They are a perfect fit for my use case, and I can't quite see why I would degrade my experience by having to bit bang the JTAG protocol manually through code as I would need to do with something like an esp32.They have 480mbps bandwidth which is more than enough bandwidth for dual channel communication for any of the specified protocols, have reasonable software support, and deal with all of the GPIO worries and most of the protocols I care about internally with their MPSSE modules.All in all I think there have been a lot of crossed wires here, so let me reiterate:The goal is a debugger board with isolation that allows me to comfortably debug things without adding friction to my workflow in a protected manner.To do this I will be putting a FTDI FT2232HQ behind complete galvanic isolation just as described in my initial post.To power the isolated supplies however, power is required, and that is where this post comes into play, with my seeking to find a method to best identify how much current I can safely pull from the other side of the isolation wall.Just one more time, I want to reiterate, a major part of this boards aims, involve being galvanically isolated, hence so much of my confusion at much of your reply. Hopefully that clears things up.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 06, 2024, 02:41:05 pm
content: @ OP i dont think youll get your answers hereand to control the supply currents like you want is no trivial tasks, even if you say so, not all makers abide by theses rules, and you could be surprisedi simply use an buffered supply and isolated usb hub, and i added a small voltage current monitoring donglesee there : maybe you'll get some ideashttps://www.sealevel.com/product-category/usb-hubs-isolators/usb-hubs/

author: product_dev_as_a_hobby
author_rank: Contributor
timestamp: January 06, 2024, 03:10:24 pm
content: Quote from: coromonadalix on January 06, 2024, 02:41:05 pmYea... I realized that a few comments ago when the only suggestions seemed all roughly to be "just don't try instead".TBH I feel massively disappointed. I put so much damn effort into making a good post after reading the rules, getting a feel for the forum, adding information, removing information, getting to just the right length etc. What really killed me though were the weirdly dismissive, hostile and condescending comments. It just stings when you've put in the work just to get slapped in the face because apparently if you don't know the answer you are forced by law or force of nature to comment and deride the op irrelevant to their post.That was a bit of a vent because I'm pretty convinced that like you said, I wont get my answers here.Luckily, I've found a group that is focused on USB, and they seem to have some knowledgeable helpful people where while I haven't found my answers, the replies have all been nice/helpful, so it's not like it was all for nothing even if this post in particular turned out to be a quite frustrating dead end. Heck, one of the guys there actually legitimately works on the standard and is pretty available to answer questions, so if anyone knows, it's probably this guy.Quote from: coromonadalix on January 06, 2024, 02:41:05 pmIt's not actually controlling the current thats the issue, I just want to know what's available at any given time. Controlling the current for the schematic I already have should be relatively trivial with a few mosfets and selectively turning off features.Anyhow, thanks for the suggestion, but even before I posted I had a number of contingencies prepared, one of which is to just use the amp rating that I can be confident in; 1.5A as the bare minimum, which a number of hubs seem capable of giving me in the format I want, which has its downsides of requiring that every port I use with this support that current, but accomplishes what I want. I think I'll wait for the experts in the other group chime in though, as I get the impression Ill make a lot more progress with them as the replies I've already gotten seem far more on target.

author: David Hess
author_rank: Super Contributor
timestamp: January 08, 2024, 02:08:56 pm
content: Quote from: Swake on January 06, 2024, 01:41:47 pmHow could the USB protocol not support what he is trying to do? Why are there current limits at all, 100ma, 500ma, 900ma, whatever, if they cannot be enumerated by the device?He wants an IC which goes through the USB enumeration process and negotiates the maximum possible current, and reports that. Why would USB have several different current limits at all if this is not possible?I have also looked for this sort of IC for exactly the same purpose, but figured I did not know what to look for because I never found one.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 08, 2024, 03:49:09 pm
content: just found this one this morninghttps://www.ti.com/product/TPS2552power-distribution switchesAdjustable Current Limit: 75 mA to 1700 mAand add an mcu to do some usb control for the "ilim" pin ??send a pm to the op about this one ...he told me in a pm he would not monitor this thread anymore ...

author: David Hess
author_rank: Super Contributor
timestamp: January 08, 2024, 07:27:59 pm
content: But that does not do any part of what the original poster asked.Some battery charger chips do at least some of it.I was reading about USB power enumeration and the device is suppose to present a set of entries to the host, and then the host is suppose to pick the highest current one under USB 1 and USB 2. Normally this would be 100mA and 500mA, but it could also be anything in between and what we really need is a chip which handles the negotiation and returns a signal for 100, 500, 900, 1.5A, 2.1A, whatever.As point out, most devices are just ignoring all of it. Chargers are defaulting to 500 or 900 milliamps no matter what they are plugged into unless they negotiate one of the proprietary charger standards or PD.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 09, 2024, 05:58:29 pm
content: while i did understood what the op askedonly thing / explanations so far are :http://dangerousprototypes.com/docs/Designing_USB_Devices_for_proper_current_and_MaxPowerit is the connected device who need to be controlled "by itself or added circuitry", not the host by designhttps://electronics.stackexchange.com/questions/5498/how-to-get-more-than-100ma-from-a-usb-porthttps://www.beyondlogic.org/usbnutshell/usb5.shtmlor the attached pdf who explain a few thingsor theses linkshttps://www.infineon.com/dgdl/Infineon-AN2361_USB-Powered_Battery_Charger_for_NiCd_NiMH_Batteries-ApplicationNotes-v06_00-EN.pdf?fileId=8ac78c8c7cdc391c017d072c8b335163https://www.silabs.com/documents/public/application-notes/an0046-efm32-usb-hardware-design-guidelines.pdfhttps://www.infineon.com/dgdl/Infineon-AN2361_USB-Powered_Battery_Charger_for_NiCd_NiMH_Batteries-ApplicationNotes-v06_00-EN.pdf?fileId=8ac78c8c7cdc391c017d072c8b335163yeah i do know its about chargers, but maybe something could be useful in all of this ??