KAmod USB HID Extender
From Kamamilabs.com - Wiki

Description
KAmod USB HID Extender - USB HID device extender with CH9350 chip
The module is designed to transfer data between a computer and HID devices (mouse and keyboard) at a distance even many times greater than the standard length of USB cables. A pair of UART signals (RXD, TXD) is used for transmission, and to facilitate installation, the module is also equipped with a connector providing +5 V power from the board cooperating with the host (computer) to the module connected to the end devices.

Basic parameters
- 1× USB-C socket - for connecting to a host, e.g. a computer *
- 2× USB type A socket - for connecting to a mouse and keyboard *
- 2× 3.81 mm screw connectors (detachable) - for transferring data via UART and supplying voltage between modules
- 1×5 goldpin connector (status outputs)
- 1×3 goldpin connector providing UART interface and ground (GND) connections
- Power supply: 5 V DC from the USB C port on the host side
- 2×5 goldpin strip for adding configuration jumpers
- 4 LEDs indicating the presence of supply voltage and the operating status of the modules
- Built-in ESD protection on all USB ports, UART connector (J5) and power connector (J4)
- Supports Windows, Linux, MAC and other operating systems with built-in HID device drivers
- The maximum length of cables connecting modules is approx. 20 m, but depends on the quality of the cables and the conditions in which the modules operate
- PCB dimensions: 65.2 × 30.8 mm
- Mounting holes: diameter 3.2 mm, spacing: 59 × 25 mm
- * NOTE:
- USB-C and USB A connectors cannot be used simultaneously on the same module!
Before connecting, please read the rest of this documentation.
Standard equipment
| Code | Description |
|---|---|
| KAmod USB HID Extender |
|

Electrical diagram

Indicator diodes
The module is equipped with 4 LEDs that indicate the presence of the supply voltage and the status of individual USB ports.

- LD0 – lights up immediately after connecting the HOST module to the master device (e.g. computer) and goes out after establishing communication with the computer.
- LD1 – lights up in the DEVICE module after connecting the HID device to USB port 1; blinks during communication with the HOST module; in the HOST module, lights up after connecting the HID device to any of the USB 1 or USB 2 ports and blinks during activity of channel 1.
- LD2 – lights up in the DEVICE module after connecting the HID device to USB port 2; blinks during communication with the HOST module; in the HOST module, it lights up when a HID device is connected to any of the USB 1 or USB 2 ports and flashes when channel 2 is active.
- PWR – power supply voltage indicator.
Power
The HOST module's power supply is provided by a USB C cable connected to the host device (e.g. computer).
For the DEVICE module, there are two methods of power supply.
- 1. Power supplied by voltage supplied to the J4 connector (GND / 5VOUT) from the appropriate pins of the HOST module's J4 connector. This method is the simplest in application, requiring only the connection of both modules with a 4-wire cable in the following arrangement:

- 2. Power supplied by external voltage supplied to the J4 connector (GND / 5VOUT) of the DEVICE module. The preferred method for long-distance communication, as increased resistance of the power supply cables can lead to interference on the DEVICE module's power supply line. The connections between the HOST and DEVICE modules should be made as follows:

Note! When using the second configuration described, avoid a potential difference between the ground of the master device (on the HOST module side) and the ground of the power supply supplying 5 V to the DEVICE module. It is recommended to use a voltage source isolated from the power grid (or other infrastructure common to both modules), otherwise the equalizing currents in the ground loop may damage the module(s), the master device, the end device and/or the power supply.
Module role configuration
To configure the module role (HOST or DEVICE), set the SEL jumper in connector P1 as follows:
- Jumper SEL on - HOST module operating mode
- Jumper SEL off - DEVICE module operating mode

UART baud rate configuration
To configure the baud rate on the TXD/RXD line side, set the BAUD0 and BAUD1 jumpers in connector P1 as follows:
| Transmission speed [bps] | 115200 | 57600 | 38400 | 300000 |
|---|---|---|---|---|
| BAUD0 |
❌ |
❌ |
✅ |
✅ |
| BAUD1 |
❌ |
✅ |
❌ |
✅ |

Operating mode configuration
The CH9350 chip used in the module can operate in one of five modes, selected using the STAT0 and STAT1 jumpers in the P1 connector as follows:
| Operating Mode | 0/1 | 2 | 3 | 4 | |
|---|---|---|---|---|---|
| STAT0 |
❌ |
✅ |
❌ |
✅ | |
| STAT1 |
❌ |
❌ |
❌ |
✅ |
✅ |

- Mode 0 – automatically switched on after supply voltage is applied; the system simulates the operation of a composite HID device.
- Mode 1 – the device simulated by the system depends on the HID controller connected to the DEVICE module (keyboard and/or mouse); this mode also supports the operation of other HID devices (e.g. multimedia),
- Mode 2 – the system simulates the operation of a composite HID device, with the possibility of modifying the VID and PID values,
- Mode 3 – as in mode 2 with the difference that the system simulates the operation of an ABS (absolute displacement mouse),
- Mode 4 – as in mode 2; the system also supports HID digitizers.
More details about the operating modes can be found in the CH9350 system documentation.
IO1...4 inputs/outputs
The CH9350 provides four input/output lines marked IO1, IO2, IO3 and IO4. In the KAmod USB HID Extender module, they are brought out to the P2 pin connector.

In the module operating in HOST mode:
- IO1/IO2 – outputs with a state corresponding to the IO1/IO2 inputs of the DEVICE module,
- IO3/IO4 – inputs whose state is “rewritten” to the IO3/IO4 outputs of the DEVICE module.
In the module operating in DEVICE mode:
- IO1/IO2 – inputs whose state is “rewritten” to IO1/IO2 outputs in the HOST module,
- IO3/IO4 – outputs with a state corresponding to IO3/IO4 inputs of the HOST module.
Data transmission
A sample waveform on the UART interface data line (at a speed of 115200 bps), recorded after connecting the wireless mouse receiver to the DEVICE module and connecting both modules with a 5-meter multi-core unshielded cable, is shown in the figure below.
A detailed description of the communication protocol can be found in the CH9350 system documentation.


Dimensions
The dimensions of the KAmod USB HID Extender board are 30.8 × 65.2 mm. There are 4 mounting holes on the board with a diameter of 3.2 mm and a spacing of 25 × 59 mm.
