Kenji Kozai: Alienware AW410K RGB Controller

Alienware AW410K RGB Controller

This project uses a Raspberry Pi Pico 2 as an intermediate between an Alienware AW410K keyboard and a host computer, allowing individual control of the RGB lighting of keys while passing through all keyboard inputs. The RGB configuration is done over a webpage so that no software needs to be installed on the host machine.

YouTube Video

The Raspberry Pi Pico 2 acts as both a USB host and a USB device, passing through the USB descriptors and all inputs from the keyboard to the connected device. In addition, the Raspberry Pi Pico 2 presents itself as a CDC-NCM device over USB, allowing it to serve webpages on a network connection over the USB port. There is also a CDC-ACM device for outputting debug information. Finally, the ADC is used to measure the ambient lighting condition so that the RGB lighting adjust automatically, getting brighter when the ambient conditions are dark and dimmer whent he ambient conditions are bright.

Because the Raspberry Pi Pico 2 forwards the HID report descriptors from whatever device is plugged into it, it can pass through USB on any HID peripheral. However, the lighting control is hardcoded to only work with the Alienware AW410K keyboard. Each manufacturer uses a different protocol for controlling its RGB lighting, and sometimes even different models from the same manufacturer will use different protocols. Since the Pico 2 has limited flash memory, only the AW410K’s RGB lighting protocol is programmed into the firmware.

A webpage served over USB allows each key’s RGB lighting to be updated on the fly, and those settings can also be saved to flash. Any saved configuration will be automatically loaded when the keyboard and Raspberry Pi Pico 2 are powered on. Because configuration is done over the webpage, no software on the host machine is needed to control the RGB lighting, and it will work independently of the operating system.

Code Repository

Tags: