doc: add pictures

This commit is contained in:
King Kévin 2024-05-28 23:18:29 +02:00
parent 1fae9ec7cd
commit 8c748a3d89
14 changed files with 62 additions and 7 deletions

View File

@ -1,19 +1,74 @@
The USB micro-B and C cable tester identifies capabilities supported by USB cables and deduces it's purpose.
The USB micro-B and C cable tester identifies capabilities supported by USB cables and deduces their purpose.
It helps figuring out if a USB cable is for charging or to transfer data, and at which speed.
It supports type A to micro-B, A to C, and C to C USB cables.
<img src="picture/front.webp" title="front" height="250"/>
<img src="picture/back.webp" title="back" height="250"/>
usage
=====
- ensure the tester has a non-empty battery in the CR2032/2025, or is externally powered through the USB power port
- ensure the tester has a non-empty battery in the CR2032/2025 slot, or is externally powered through the USB power port
- plug one end of the cable in one of the host ports
- plug the other end of the cable in one of the devices ports
- if using a battery, press on the BAT ON button
- when using a battery, press on the BAT ON button
- the tester will identify the cable's capabilities, on the left side
- the tester will then show the cable's purpose, on the right side
Once I know it's purpose, I mark the cables with a letter:
- USB A to micro-B only with ground and VBUS wires, limiting power transfer to 0.5 since they can't indicate battery charge: **P**
<img src="picture/a-b-p.webp" title="front" width="500"/>
- USB A to micro-B, with data line shorted internally to indicate 1.5A battery charge (even when not sure the host supports it): **C**
<img src="picture/a-b-c.webp" title="front" width="500"/>
- USB A to micro-B with data wires, but error prone since not shielded (sufficient for low speed): **D**
<img src="picture/a-b-d.webp" title="front" width="500"/>
- USB A to micro-B with shielded data wires (good for high speed): **S**
<img src="picture/a-b-s.webp" title="front" width="500"/>
- USB A to C without data lines but battery charge indication: **C**
<img src="picture/a-c-c.webp" title="front" width="500"/>
- USB A to C with unshielded data lines: **D**
<img src="picture/a-c-d.webp" title="front" width="500"/>
- USB A to C with SuperSpeed data lines, and shielded: **3**
<img src="picture/a-c-3.webp" title="front" width="500"/>
- USB A to C with SuperSpeed data lines, but unshielded: **D**
<img src="picture/a-c-sd.webp" title="front" width="500"/>
- USB C to C with shielded data lines: **S**
<img src="picture/c-c-s.webp" title="front" width="500"/>
- USB C to C with electronic marking allowing 5A charging: **C**
<img src="picture/c-c-c.webp" title="front" width="500"/>
- USB C to C with all features: **F**
<img src="picture/c-c-f.webp" title="front" width="500"/>
The tester can detect electronically marked C to C cables.
Often they are present (and required) in cables allowing 5A/100W charging.
But to be sure, one should read the capabilities from the chip, which is not supported by the tester.
Full Feature C to C cable also require electronical marking, but could only support 3A charging.
Because of that the 3A and 5A indicators are on at the same time (when the marking can be just for the features).
To understand further the capabilities and purpose of a cable, I recommend reading the USB specification, mainly the one for the [type-C connector](https://www.usb.org/document-library/usb-type-cr-cable-and-connector-specification-release-23).
report
------
There is a UART output on the debug port.
The analysis of the capabilities to the purpose is periodically output on it.
You can connect to it and view it using the 115200 8N1 baud rate.
firmware
--------
You can flash or update the firmware using the SWD signals on the debug port, of also use the UART signals and the bootloader.
To start the bootloader, press and hold the BL button while shortly pressing the RST button.
You can then use [stm32flash](https://github.com/stm32duino/stm32flash):
~~~
stm32flash -w binray.hex -v /dev/ttyACM0
~~~
The compiled binary is available in the release archives.
The source code of the firmware is in the `firmware` folder.
design choice
=============
@ -29,12 +84,12 @@ do:
- battery operated: it's a very simple device, and this avoids needing to require external power
- power port: in case you have no battery or it runs out
- USB 3.0: because it is hard to identify if C-C cable support SuperSpeed
- purpose: deduce from capabilities
- purpose: deduce from capabilities for users not knowledgable in USB cables
don't:
- small: no need to build it as compact as possible
- A or micro-B 3.0: the connectors that support it are obvious, and it's rare they are used for anything else than Super-Speed transfer (plus they are less common or problematic)
- A to micro-B 3.0: the connectors that support it are obvious, and it's rare they are used for anything else than Super-Speed transfer (plus they are less common or problematic)
- Power Delivery capabilities: this requires complex host software communicating with the eMarker chip in the cable
- OTG: even if detecting this functionality is easy, micro-B OTG adapters are not popular anymore
- impedance: only the presence of wires is tester, not their impedance
@ -47,8 +102,8 @@ Some additional tests verify the resistances in the plugs.
For more details, check the schematic, and refer to [type-C specification](https://www.usb.org/document-library/usb-type-cr-cable-and-connector-specification-release-23).
The left side identifies the capabilities.
Based on that, a micro-controller (MCU) with map the combination into a purpose on the right side.
The left side if independent of the MCU and right side.
Based on that, a micro-controller (MCU) will map the combination into a purpose on the right side.
The left side is independent of the MCU and right side.
limitation
----------

BIN
picture/a-b-c.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

BIN
picture/a-b-d.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 KiB

BIN
picture/a-b-p.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

BIN
picture/a-b-s.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 KiB

BIN
picture/a-c-3.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 KiB

BIN
picture/a-c-c.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 KiB

BIN
picture/a-c-d.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 KiB

BIN
picture/a-c-sd.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 KiB

BIN
picture/back.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

BIN
picture/c-c-c.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

BIN
picture/c-c-f.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 KiB

BIN
picture/c-c-s.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 KiB

BIN
picture/front.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB