Wednesday 30 March 2016

USB Cable Tester using Arduino UNO



Have you even wondered why your tablet or phone charges faster with one cable and slower with another?

I did, and questions like this keep me awake at night.  So, I designed a USB Cable Tester using an Android UNO board. 


This device measures the charge efficiency of a micro-USB cable by passing 0.5A through the cable and measuring voltage at various points.

To calculate the efficiency, we assume that the input current ITEST is identical to the output current that flows through the 10 ohm load resistor.  I.e. the internal resistance of the cable is negligible.



The efficiency is the ratio of input and output power, which simplifies down to the ratio of input and output voltage.

In order to get the most accurate result possible, this circuit measures both +ve and -ve sides of both Vout and Vin; and measurement points are taken as close as possible to the usb connectors.

The connections to the Arduino analog pins A0 - A3 are shown in the circuit diagram below.  Vcc is wired to 5V.


And here's the Arduino code.  Initially I found the value on the display 'flickered' as the Arduino was updating the display hundreds of times a second.  In this version of the code I have implemented oversampling in an attempt to provide a more 'stable' display of the efficiency value.


And finally, here's some pictures of the device in use.

A good cable (the best on I could find lying around) measured an efficiency of a little over 98%:

And here's an el-cheapo cable that measured a loss of nearly 10%  You know you wan't get optimal charge time with this one:

If you build this yourself please post a comment and let me know how it turned out.

No comments:

Post a Comment