

The Adafruit CH9328 UART to HID Keyboard Breakout (Manufacturer Part ID: 5973) is a compact and versatile breakout board designed to convert UART serial data into USB HID keyboard signals. This allows microcontrollers, such as Arduino boards, to emulate keyboard input over USB. The CH9328 chip on the breakout board simplifies the process of sending keystrokes to a computer, making it ideal for projects that require custom keyboard input or automation.








The following table outlines the key technical details of the Adafruit CH9328 UART to HID Keyboard Breakout:
| Parameter | Value |
|---|---|
| Chipset | CH9328 |
| Input Voltage | 3.3V or 5V (logic level selectable) |
| Communication | UART (TX/RX pins) |
| USB Interface | USB 2.0 HID (Keyboard) |
| Baud Rate | Configurable (default: 9600 bps) |
| Operating Current | ~10mA |
| Dimensions | 25mm x 18mm x 4mm |
The breakout board has the following pin layout:
| Pin Name | Description |
|---|---|
| VIN | Power input (3.3V or 5V, depending on logic level) |
| GND | Ground connection |
| TX | UART Transmit pin (connect to RX of microcontroller) |
| RX | UART Receive pin (connect to TX of microcontroller) |
| 3V3 | 3.3V output (can power external devices) |
| USB | USB Type-C connector for HID keyboard output |
Power the Breakout Board:
Connect UART Pins:
Connect USB:
Send Keystrokes:
Below is an example of how to send keystrokes using the Adafruit CH9328 breakout board with an Arduino UNO:
// Example: Sending "Hello, World!" via the CH9328 UART to HID Keyboard Breakout
// Ensure the TX/RX pins of the breakout are connected to RX/TX of the Arduino UNO.
#include <SoftwareSerial.h>
// Define the TX and RX pins for SoftwareSerial
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() {
// Start the hardware serial for debugging
Serial.begin(9600);
while (!Serial) {
; // Wait for the serial port to connect
}
Serial.println("Adafruit CH9328 UART to HID Keyboard Example");
// Start the software serial for the CH9328
mySerial.begin(9600); // Default baud rate for CH9328
}
void loop() {
// Send a string to the CH9328 breakout board
mySerial.println("Hello, World!"); // Sends "Hello, World!" as keystrokes
// Add a delay to avoid spamming the keyboard
delay(2000);
}
The board is not recognized as a USB device:
Keystrokes are not being sent:
Incorrect or garbled keystrokes:
The board is drawing too much current:
Q: Can I use this board with a Raspberry Pi?
A: Yes, the CH9328 breakout board can be used with a Raspberry Pi. Connect the UART pins (TX/RX) to the Pi's GPIO UART pins and ensure the logic levels are compatible.
Q: Can I send special keys like "Ctrl" or "Alt"?
A: Yes, the CH9328 supports sending special keys and key combinations. Refer to the CH9328 datasheet for the specific UART commands required.
Q: Is it possible to change the default baud rate?
A: Yes, the baud rate can be configured using specific UART commands. Refer to the CH9328 datasheet for details on how to change the baud rate.
Q: Does the board support USB-C power delivery?
A: No, the USB Type-C connector is used only for USB HID communication and does not support power delivery features.