USB Tester Pinout and Protocol

Updated: All Leave a Comment

Serial Output

{ “a”:{ “max”:1.20, “min”:0.70, “avg”:0.95}, “v”:{ “max”:5.00, “min”:5.00, “avg”:5.00}, “mah”:0.01, “mwh”:0.04, “shunt”:0.07, “dp”:1.06, “dm”:1.08, “ram”:1420}


  • Connector.

    Ampere

    A: - This consists of three parts. Max, Min, and Avg of current during the sample period.

  • Connector.

    Voltage

    V: - Consists of max, min and avg voltage readings during the sample period

  • Connector.

    mAh

    Total miliamp hour measured since last boot or reset by command or button.

  • Connector.

    mWh

    Total miliwatt hour measured since last boot or reset by command or button.

  • Connector.

    Shunt Voltage

    This is the current voltage drop across the shunt which is used internally to calculate current across the shunt.

  • Connector.

    D+ / D-

    This is the voltage reading of the USB differential data lines D+ and D-. Could be used to figure out charge modes for various devices.

  • Connector.

    Free RAM

    Shows the current amount of free SRAM available in the microcontroller. Mostly for debugging but could be useful for anyone wanting to customize the firmware.

JSON Serial Command Protocol

  • Connector.

    BAUD Rate

    Serial BAUD rate is 115200

  • Connector.

    Serial Output Rate - R:

    Send R:XXXX - X is time in miliseconds
    - Returns new set rate (Min is 150ms)

  • Connector.

    Set Screen - S:

    Send S:X - X is screen number 1-5
    - Returns new screen

  • Connector.

    Reset - Z:

    Send Z: - Resets all data
    - Returns 'OK' upon reset

  • Connector.

    LED Threshold - W:

    Send W:XXXX - X is current in miliamps
    - Returns new threshold for LED

  • Connector.

    Verison - V:

    Send V: - Returns current firmware version

Leave a Reply