I have very small and simple electronic projects that I power up using the USB power connectors plus a resistor. For one project I require to use more than 100mA, however the USB port requires an enumeration process to be done before giving more than that (up to 500mA).

I've browsed TI.com looking for some IC that can help me with this task, however I'm not sure I'm on the right track (I've pre-selected LM3526 and BQ2402x ICs, but I don't fully understand how to use them... I'm still learning....).

Is there any simple example circuit design that I can use to solve this? Ideally, it should be something that I can connect to an USB port and that will just give me an output of 500mA and more than 4.5V.

Thanks for the help,

  • 3
    \$\begingroup\$ Have you experienced a power that refuses to deliver more than 100 mA, or just read somewhere that a port might do that? In practice, USB porst that limit the current are rare. \$\endgroup\$ – Wouter van Ooijen Apr 15 '14 at 7:09
  • \$\begingroup\$ Agreed with @wouter . USB specs dictate that a device shouldn't pull more than 1 power block (100mA) before enumeration. But 99% of pheripherals ignore this, as do hosts. Occasionally you get things like the first generation raspberry pi, but that had hardwired fuses for 200mA on usb, a bad design. \$\endgroup\$ – Passerby Apr 15 '14 at 15:35
  • \$\begingroup\$ The other option you have is skipping the computers, and using a usb wall charger. No enumeration required. There is rarely any that come with charger side current limiting. \$\endgroup\$ – Passerby Apr 15 '14 at 15:39
  • \$\begingroup\$ Re: "experienced a power that refuses to deliver more than 100 mA": One of my circuits pulls 130mA with no issues... however, as this time I'm going to reach 400mA, I was curious about how I can "play it safe, by the rules", to avoid any possible damage to the computer and/or the circuit. \$\endgroup\$ – Sebastian Apr 17 '14 at 23:28
  • \$\begingroup\$ Thanks all for the help. It seems that I will just try to pull +100mA, and switch to a wall adapter in the worst case scenario, unless there is s simpler ICs (BTW, I haven't seen any comment about LM3526 and BQ2402x ICs... aren't they a good fit?... I don't mind about the cost). Samuel and Spehro answered exactly what I've asked, I'm not sure what's the best answer so I'll wait for more community votes to decide. \$\endgroup\$ – Sebastian Apr 17 '14 at 23:39

Consider Atmel's ATtiny85 with V-USB. It's an 8 pin AVR chip that you would have to program with V-USB, which is a software-level USB implementation that would enable the Enumeration Phase, which would allow you to use the entire 500mA available.

It's about a $1.50 in SOIC packaging, pictured below, which saves both space and cost:

ATtiny85 in SOIC packaging

Easily programmable and inexpensive, whereas the FTDI chip above (FT232R) is about $6 for one.

If you want to communicate with the chip, using V-USB also gives you the ability to act as a CDC-class USB device, which is akin to a serial port (UART), just like the FTDI chip.

  • \$\begingroup\$ It may be worth adding that the free V-USB is published under the terms of the GNU General Public License Version 2 what may require to purchase one of the commercial licenses if commercial use is intended. Its not expensive though. \$\endgroup\$ – Rev Apr 15 '14 at 6:48
  • 1
    \$\begingroup\$ @Rev1.0 First of all, the GPL does not in any way or form forbid commercial use. It only (basically) requires that all derivatives of the GPL licensed software be free software as well. I really don't see a reason why would that be a problem if the AVR is only used to ask for 500 mA and perhaps UART use. Furthermore, there's no need to even post the modified source code on the Internet. It's enough to just make it available and it's allowed to charge reasonable price for the expense of sending the source code. That's how GNU financed itself back when GCC was on tapes. \$\endgroup\$ – AndrejaKo Apr 15 '14 at 9:00
  • \$\begingroup\$ @AndrejaKo: My comment wasn't meant to be specific to the use case of the original question and I just wanted to point out that the software MAY require licensing. For my own understanding: What if I use this firmware (maybe slightly modified) for a product that also uses a second (main) controller? Would I have to make both firmwares or even the whole product public if I don't want to buy a license or only the potentially modified V-USB firmware? \$\endgroup\$ – Rev Apr 15 '14 at 10:02
  • \$\begingroup\$ @Rev1.0 GPL only applies to software that is licensed under GPL. GPL wouldn't "infect" the other controller and it would definitely not "infect" the rest of the hardware. It only applies to the "slightly modified" code. You need to make the modification available under terms of the GPL and that's it. You don't have to host it somewhere (but that's the usual way) and you don't have to share modification at all if the product is internal to your organization. That's how Google gets away with not sharing GPL licensed and modified software. It's only for internal use. \$\endgroup\$ – AndrejaKo Apr 15 '14 at 10:08
  • 1
    \$\begingroup\$ Also, you need logic to power up your application only after enumeration has completed and the host has switched to a configuration with 500 mA current. In order to test this, you can connect to a bus powered hub, which should not have sufficient power reserves to enable your device. \$\endgroup\$ – Simon Richter Apr 15 '14 at 11:47

You can use a FT232R USB-UART chip, as so:-

enter image description here

You'll connect your load on the other side of the p-channel MOSFET power switch.

They're easily available through distribution, and in not too intimidating a package.

The default power setting is 100mA, so you'll have to use a utility to program the 500mA you want into the USB power setting. FTDI has MPROG, which can be used for this purpose.

enter image description here

  • 4
    \$\begingroup\$ And as an added bonus you get a full logic-level RS-232 connection. \$\endgroup\$ – Ignacio Vazquez-Abrams Apr 15 '14 at 3:02

While USB does specify no more than 100 mA are to be taken by the device, there is no USB host that actually implements such restriction.

You can easily pull even slightly more than 500 mA (before polyfuse or something similar kicks in) from any computer built in last 5 years. Yes, OS will be unaware of such pull but current going out will be perfectly fresh. :)

Based on your project description, you are not actually interested in USB device but just using it as a power source. While ignoring any specification might not be best approach, I am yet to see any computer that limits current under 500 mA.

  • \$\begingroup\$ At my previous job (GPS devices) a prototype managed to trip the 100mA protection on a Toshiba laptop. Probably something to do with its power management. I agree that desktops just won't care, 2.5W is peanuts for them. \$\endgroup\$ – MSalters Apr 15 '14 at 9:18
  • \$\begingroup\$ As @MSalters implies, this is more of an issue on laptops, and many cheap devices take account of this. You can't guarantee that just because a machine sits permanently on a desk it doesn't use a laptop motherboard though (some of the all-in-one PCs do). So it's fine for a hobby-project, but don't bank on it working in another machine. \$\endgroup\$ – Chris H Apr 15 '14 at 11:48
  • \$\begingroup\$ I personally have yet to come to see a working machine (including laptops) that actually enforces such low limits. Hell, most modern laptops easily go even over 1 A. And let's not forget that there are plenty of "professional" devices that use USB way over 100 mA (remember all those LEDs and glass warmers and god knows what else). I do agree with you that proper power enumeration is the way to go. But cheap bastard in me cannot get over getting a chip into device just for that purpose... \$\endgroup\$ – Josip Medved Apr 15 '14 at 14:52
  • \$\begingroup\$ On the other hand, many do have protection for over 500mA pulls. MacBook Pros and IMacs. \$\endgroup\$ – Passerby Apr 15 '14 at 15:36
  • 1
    \$\begingroup\$ I have run into the 100mA limit, but I don't think I've seen it on a device capable of 500mA. \$\endgroup\$ – Spehro Pefhany Apr 15 '14 at 16:34

Your Answer

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

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