AP22815/AP22615/et al USB-friendly load switches from Diodes Inc.

tl;dr: These are two load switches in a series of similar SOT-23-5/SOT-23-6 load switches that make it really easy to get power safely from a USB port.

One of the important rules about getting power to a device from USB is that you need to make sure that your USB device doesn’t try to back-power the voltage rails. Generally these days, it will confuse the computer and probably trigger an error message, but there is the potential that you could zap a USB power port.

One way to work around this is to put a Schottky diode in, to force the voltage to flow in only one direction. This has the drawback of dropping your voltage with the added difficulty that if you actually want to use serious power out of the USB port to drive LEDs, you tend to need a relatively beefy diode after a while and basically all of my design decisions are predicated around driving tons of LEDs.

Wirehead’s first rule of power-electronics states that “If you want to do something with power, somebody’s probably packaged it as a load switch or a MOSFET controller.”

Previously, I’d found the MAX40200, which is a nice tiny ideal diode. As per my first rule of power-electronics, it’s really just a load switch that contains a pair of MOSFETs on the inside. But I’d kinda wanted something that would do more than just a single amp.

Then I found about this device, which is built specifically for the USB problem that I’m looking at, so I got one from DigiKey and soldered it to a bit of prototyping board and started messing with it.

image

Here’s a bit of a larger example than the datasheet:

schematic

I hooked it up and checked the flow of electricity to make sure that it was actually blocking reverse voltage and it does seem to fit the bill there.

Some highlights:

  • Like the MAX40200, this doesn’t drop that much voltage. It doesn’t activate until 3V, however, which might be a problem for some uses.
  • I got the AP22815AWT-7, where the bolded A designates the active-high version which happens to be the easiest one to find. With this version, the EN line works exactly the same as the Enable line on a Feather. This is an interesting alternative to the circuit provided in the Feather spec.
  • A simple switch that connects to ground a la SW2 or jumpered across J16 serves to disconnect the device from the USB power.
  • The FLG line is pretty useful to put an LED on. The line is active-high, so LED D40 will be lit when the power is OK and blink off when there’s a fault. If you reverse the LED and connect it to Vcc instead of GND, it’ll stay off but then blink on when there’s a fault.
  • The AP22615 was out of stock, but that device has an extra pin so you can set a programmable current limit, which would potentially save on a polyfuse.

There’s actually a bunch of similar devices from Diodes Inc. that offer a range of maximum amperages and features; this is just the most recent one. Since they are all effectively the same price at the sorts of quantities I work with, I just went for the AP22815’s.


Posted:

Updated: