Close
0%
0%

USB Sleuth Cable Tester

The device tests for continuity and internal resistors within various USB Cables and exposes some pins for multimeter testing.

Public Chat
Similar projects worth following
**Follow this project for updates on a board order**

The device tests for continuity and internal resistors within various USB Cables and exposes some pins for multimeter testing.

A STM32C031K6T microcontroller is used for testing connection and orientation, powered by a CR2032 battery. Code is given using STM32 HAL libraries.

The device has some benefits over a simple continuity tester
- displays the as-plugged orientation of the 4 different possibilities of the USB-C to C cable
- detects pullup and pulldown resistors on the CC lines as required by the USB standard for legacy cables
- identifies active cable with E marker (via the pulldown resistor present on VCONN)
- doesn't apply a +V to the Ground line/pin, instead it uses a MCU to test the presence of a connected ground wire
- exposes various pins to test cable and internal resistors manually with a DMM

Improvements before next batch:

 Kit-friendly improvements

  •  replace resistor arrays with 0805 discretes;
  • MCU + firmware → Arduino IDE compatible

Other improvements

  • Change the CC orientation LED design to: (A side) STD [FLIP]    (B side) STD [FLIP] (still 4 LEDs but now 2 indicators at a time)
  • Low power mode / power time off to save battery - Remove DIP switch for cost
  • add OSHW logo and nec. files
  • A diagnose for the Shield connection (see comments)

---

See the repo for an in depth description of operation, footprints, gerbers, and firmware and this blog post for my thoughts on working with JLCPCB and KiCad and other lessons learned.

The project is a hardware fork of aroerina/LimePulse that I decided to reverse engineer and write the firmware for to get experience with KiCad and STM32 development.

A STM32C031K6T microcontroller is used for testing connection and orientation, powered by a CR2032 battery. Code is given using STM32 HAL libraries and the device can being programmed over SWD.

KiCad and gerber files are provided for the board layout, as well as the library footprints for non-standard parts ordered from JLCPCB/LCSC.

This USB cable tester has the "B" side on the right, and the "A" side on the left. Receptacles are given for the following:

  • Type-C (both sides)
  • Type-C to A
  • Type-C to micro B (2.0)
  • Type-C to mini B

2c613b88e83b5b3001c98a28d16cfa16.jpg

DMM Test of Internal Resistor

Testing the value of the pulldown resistor on an active cable by measuring between B_CC2 and B_GND (should be between 800-1.2K Ohms).



Attributions

Icons

Inspired By

Thanks

s/o to Tokyo Hackerspace where you can find more people working on projects like this on Tuesdays.

  • v2 Planned Features and Use-cases!

    Spencer Maroukisa day ago 0 comments

    I'm going to log improvements for a v2 here since the main description was getting overwhelmed.

    I realized this project can actually serve as a good breakout board for USB, which is especially useful for doing power-profiling on usb-powered devices.

    ## USB Pin Breakouts

    Feature: Expose VBUS, GND, D+, D- on both A and B sides as holes for ~0.6mm pin headers with isolation switches from the MCU and battery. 


    For example, using the Nordic Power Profiler Kit II, we can use the PPK2 as a power source if we connect the VOUT/GND to the A_VBUS/A_GND pins. Then we can log the power consumption.


    This avoids the need of a separate breakout cable or powering through a non-USB port, such as in the Arduino Mega case below:

View project log

Enjoy this project?

Share

Discussions

Manfred Schüssler wrote 04/02/2024 at 17:19 point

I am very interested to order a board.

  Are you sure? yes | no

Christoph Aeschlimann wrote 02/24/2024 at 08:49 point

I would also be very interested in buying one

  Are you sure? yes | no

Christoph Winkler wrote 02/16/2024 at 17:01 point

a suggestion for improvement from the comments on the LimePulse device, which is no longer available on tindie, may make sense here as well:

quote:

A diagnose for the Shield connection, as i had a problem wit a usb 3.0 Cable and a ssd disk at a fritzbox. The WLAN was disturbed. The reason was that the shield was not connected. Therefor I added one 2k2 Resistor and one yellow LED to test this: +5V - [2k2] - shield of all B-conectors
GND [K LED ye A] - shield of all A-connectors.
If the shield is connected, the yellow LED lights up.
If the shield has an additional connection to GND the yellow LED does not light, as the -now parallel - red GND LED has a lower working voltage.
About 25% of my cables had unconnected shieldings. Some hat GND connected to shield.

  Are you sure? yes | no

Spencer Maroukis wrote 02/17/2024 at 00:55 point

Good point! Right now I brought out the shield pins as test points for manual testing, but I can add an LED and MCU check for shield-ground continuity

  Are you sure? yes | no

Spencer Maroukis wrote 02/02/2024 at 03:46 point

Also would be cool to add programming over usb c! (https://hackaday.com/2022/02/24/an-unbusy-usb-c-port-doubles-up-for-jtag-programming/) But would probably want to add circuitry for gating the battery power when connected to Host power via USB C

  Are you sure? yes | no

philip wrote 02/01/2024 at 13:54 point

Do you plan to sell this on tindie or anywhere else? I´ve been looking for exactly this kind of product since USB-C is available, and I would really like to buy it or participate in a PCB-order.

  Are you sure? yes | no

Spencer Maroukis wrote 02/02/2024 at 03:44 point

I haven't had plans yet, but a PCB order would be a good idea, maybe I'll set something up. I think the indicator LEDs could use better arrangement. For example it's unclear which D+/- pair is the top side or bottom side.

  Are you sure? yes | no

Christoph Winkler wrote 04/24/2024 at 18:48 point

Hi, are there any updates on an order?

  Are you sure? yes | no

Spencer Maroukis wrote 05/12/2024 at 23:07 point

No updates as I'm onto another project and don't plan on setting up a tindie shop soon, but I'm looking into making it into a kit that uses an Arduino-compatible MCU so it is more user friendly and can be programmed via Arduino IDE. I also want to shrink down the size.

  Are you sure? yes | no

Christoph Winkler wrote 02/07/2024 at 09:13 point

me too ;-)

  Are you sure? yes | no

Nicolas Tremblay wrote 02/07/2024 at 14:37 point

Add me to the order too

  Are you sure? yes | no

Martin Meise wrote 02/07/2024 at 17:20 point

I'd like one too

  Are you sure? yes | no

Max wrote 02/07/2024 at 22:51 point

A bulk order would be nice! @Spencer Maroukis how much did you pay for an assembled board? I assume you had to order a few, correct?

  Are you sure? yes | no

Spencer Maroukis wrote 02/08/2024 at 01:59 point

It was around ¥2000/each or $13 for 5 boards. I can see how we can get the price down. We don't really need the DIP switches (I can just populate solderable jumpers), and it could be shrunk down a bit.
(edited to clarify)

  Are you sure? yes | no

Spencer Maroukis wrote 02/01/2024 at 00:16 point

If you get it manufactured as-is, I have the testing pads on the front and back copper layer extending beyond the board edge which it seems different fab houses will handle differently. JLCPCB at first moved the whole pads inside the board which wasn't what I wanted, but then they eventually fabbed it with the pads in the right location with an offset at the board edge since I didn't request edge plating. 

  Are you sure? yes | no

Dan Maloney wrote 01/31/2024 at 16:42 point

Perfect timing -- my phone is having trouble charging and I don't know if it's the USB power supply/cable or something internal. I've been looking for something just like this to help me figure it out. Thanks!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates