Overview

This little USB port go-between is like a speed gauge for your USB devices. Instead of hauling out a multimeter and splicing cables, plug this in between for a quick reading on how much current is being drawn from the port. Great for seeing the charge rate of your phone or tablet, checking your battery chargers, or other USB powered projects.

Data is passed through transparently from end to end, so you can use it with any USB device at any speed. The power line has a 0.1 ohm current sense resistor an an INA169 high-side current sensor that is tracked by a little ATtiny85 chip. The microcontroller is programmed to read the current draw as well as the bus voltage and light up the strip of LEDs on the side.

The LED strip gives you a quick visual "power OK" and an indication of your power usage. But we also stream the data to a serial port so you can monitor, log and/or plot it on your computer!

The gauge comes as a mini kit with an assembled & tested PCB plus a separate USB jack and plug as shown above. The instructions on the following pages will show you how to assemble and use this handy gauge.

Please note: this is a handy gadget but it isn't a multimeter! We do some basic calibration during test, but the serial output readings are not precise and should be used as a basic guide rather than lab-grade data plots. Assume a variance of at least 0.1V and 50mA due to noise, thermal changes, etc.


Assembly

The USB Power Gauge comes in kit form so that you can customize it to your needs. There are only 3 parts to the kit and basic assembly takes just a few minutes.

Basic Assembly

Assembling the USB Power Gauge is pretty simple. Just solder the male and female USB connectors on either end.

Solder the female connector.

This connector goes on the end marked "Device". Be sure to solder all pins, as well as the mounting tabs for a secure connection.

Solder the male connector

This goes on the end marked "Computer". Be sure to solder all pins, as well as the mounting tabs for a secure connection.
With a connector on each end, your gauge is ready for use. Proceed to the next page for usage instructions, or read-on for other assembly options.

In-Line Assembly

Optionally, the USB Power Gauge can also be spliced right into a cable for a more compact package without all the connectors.

Cut and strip the cable

Trim back the outer insulation and foil shield. Then strip and tin each of the 4 inner wires.

Wire in-line

Solder the cut and stripped cable ends to the board - taking care to assure that the wire positions correspond exactly to the pins on the connectors.

Caution: Standard USB color coding is shown in the diagram on the left. But it is best to verify conductivity with a multimeter because your cable may vary.

Some 1/2" clear shrink-wrap tubing can be used to protect your wiring while still allowing you to see the indicator LEDs.

Serial Data Monitoring

For real-time monitoring of voltage, current and wattage over a serial link, you can connect an FTDI cable, FTDI Friend or even an XBee using the breakout holes on the side of the power meter board. Connect at 9600 Baud - data will be spit out automatically!

Connect the USB/Serial Cable:

You can solder the wired directly to the breakout holes, or add a header as shown here: You will only need to connect a ground wire and a signal wire to your serial device.

Connect:
  • GND -> GND (Black wire on an FTDI cable)
  • Tx -> Rx (Yellow wire on an FTDI cable).

Use it!

LED Power Indicators

The green led indicates that you have power of at least 4.5v. This is the minimum effective voltage for charging or running most USB devices. If the green LED goes out, you know you should check your port, shorten the USB cable, or reduce the current draw.

The blue LEDs give you an indication of the total power draw. They will light in sequence with increasing intensity. Each fully lit LED indicates 1 Watt of power ( ~200mA at 5V nominal). 1A represents a full-scale reading with all 5 blue LEDs lit. Most USB ports are rated for 500mA. Although the indicators will max-out at 1 Amp, the gauge is safe to use with devices drawing as much as 2 Amps.

Analog Output

The A0 breakout hole next to the computer-side connector outputs the voltage across the 0.1 ohm current sense resistor. This give you an analog signal of 1 Volt per Amp of current through the gauge. This is handy if you want to measure more precise current draw using any multimeter, or connect it to a different kind of gauge that takes voltage input

Serial Output

Voltage, current and wattage data are streamed in ASCII text on the TX pin at 9600 baud. Connect an FTDI friend, USB console cable, microcontroller, XBee, whatever you want that can read 9600 baud TTL serial data for datalogging, plotting or display.

Note that the logic level for the serial data out is 5V. If you are connecting to a 3.3V logic device, use a resistor divider or level shifter to bring it down from 5V to 3.3V

Example of serial output:


V: 5.5 I: 0 mA Watts: 0.0
V: 5.2 I: 383 mA Watts: 2.0
V: 5.1 I: 717 mA Watts: 3.6
V: 5.1 I: 587 mA Watts: 3.0
V: 5.3 I: 414 mA Watts: 2.2
V: 5.3 I: 487 mA Watts: 2.6
V: 5.3 I: 297 mA Watts: 1.6
V: 5.3 I: 383 mA Watts: 2.0
V: 5.3 I: 192 mA Watts: 1.0
V: 5.4 I: 174 mA Watts: 0.9
V: 5.4 I: 169 mA Watts: 0.9
V: 5.4 I: 452 mA Watts: 2.4
V: 5.3 I: 208 mA Watts: 1.1
V: 5.4 I: 157 mA Watts: 0.8
V: 5.5 I: 157 mA Watts: 0.9
V: 5.3 I: 181 mA Watts: 1.0
V: 5.4 I: 207 mA Watts: 1.1

Hack It!

The USB Power Gauge is powered by an ATTiny85 processor (the same one used in our Trinket and Gemma!). You can find schematics and source code in the github repository so that you can customize your power meter too!

https://github.com/adafruit/USB-Power-Gauge

Power Gauge Breakout Holes:

All of the ICSP connections for in-circuit serial programming are available in the breakout holes on the edge of the board. These can be used with programmers such as our USBTinyISP.

Connect to your programmer:

Using the 6-pin connector on your USBTinyISP, connect:
  • MISO -> Tx
  • VCC -> 5v
  • SCK -> Clk
  • MOSI -> SI
  • RST -> Rst
  • GND -> GND
Note! The ICSP pinouts diagram is viewed from the TOP of the connector. Note the position of pin 1.

For details on programming with the USBTinyISP, see this guide:

Schematics:

This guide was first published on Jan 02, 2014. It was last updated on Jan 02, 2014.