USB Controller

This article describes work related to a USB game controller, with a focus on embedded firmware, USB communication, and cost-constrained hardware design.

The system is based on a GD32L233 microcontroller, used to handle USB device communication, digital input scanning, analog signal acquisition, and basic actuator control.

USB communication is implemented using the HID (Human Interface Device) class, allowing direct compatibility with standard operating systems without custom drivers. Firmware logic converts button states and analog inputs into compliant HID reports.

Button inputs rely on carbon contact switches on PCB, a common solution in mass-produced controllers due to its simplicity and low cost. Analog joysticks are sampled through the MCU’s ADCs, with signal conditioning and periodic polling to ensure stable input readings.

A small vibration motor is controlled via the microcontroller to provide haptic feedback, using simple software-driven control techniques.

Overall, the work focuses on understanding how low-cost USB input devices are designed internally, and how embedded firmware, USB protocols, and minimal hardware can be combined to reproduce standard controller behavior under tight cost constraints.