Make a USB Charger and Current Tester

Mark Zachmann
Home Wireless
Published in
3 min readJan 21


You can make any project portable with this LiPo battery charger and USB test circuit. The USB circuit provides a passthrough of the USB signal along with battery charge power. Finally, since most of the projects need power analysis this includes a simple current test. See Github for the files.

USB-A and USB-C testers

The fully populated boards cost under $3 fully assembled at JLCPCB (plus $9 in extended part costs per order). Note these circuits use a small JST battery socket (1mm) instead of the usual 2mm because I prefer the smaller footprint (much less board height) and the 2mm sockets are currently out of stock. If you can’t connect to the socket, put the LiPo across the first pin of IBAT sense and ground (see schematic).

To use the boards in a project, permanently connect the USB output to your project’s USB input. Connect the VSS + pin to the voltage input for the project (which assumptively is expecting LiPo voltage levels).

Unplugged, the project runs off battery at VSS. Plugged in, the project can run off VBUS or VSS depending on the circuit, although I think charging the battery while draining it isn’t guaranteed. Internally source a higher VSS+ pin voltage when plugged in for best results.

On a Raspberry Pi Pico or Pico W simply connect the VSS+ to the Pico’s VSys pin.

USB-A Tester

There’s a USB-A version and a USB-C version. The A version would be a bit nicer if it were female to male but a male USB-A connector is hard to mount correctly since it hangs way over the end of the board, so this is female-female.

The USB-C tester has female USB-C ports.

USB-C Tester

I started with the USB-C version but the pitches are extremely tight for JLCPCB and USB-A is far more robust physically — since this board gets plugged and unplugged a lot the USB-A is a smarter choice.

Block Diagram

The board uses only passive components (resistors) for the current test portion — which keeps things very simple. Simply jumper the test points to remove the test resistor from circuit. Remove the jumper and put a voltage meter on the two wires to find the current through the circuit. The 10 ohm resistor (I-Bat 1) is for evaluating currents in the uA range.

Schematic for the 12 pin USB-C Tester

The VSS output from the battery has a blocking diode at the end to work seamlessly with the Raspberry Pi Pico VSys input circuit.



Mark Zachmann
Home Wireless

Entrepreneur, software architect, electrical engineer. Ex-academic.