Pocket USB keyboard tester
Posted: 03 May 2021, 06:51
When building a converter, I just test the USB interface on the same PC that uploads the firmware. But sometimes the converter works with several keyboards and I need to test any firmware upgrade on all of them that aren't in storage. Or an MCU moves from a breadboard to a permaproto. The soldering workstation is in another room from the desk for ventilation.
So, a couple of years ago I built this from a Raspberry Pi Zero, OLED hat, and USB hub pogo-plugged-thingy. It displays each USB event with the current state of down keys, plus total count of pressed and unique keys, giving a quick check that everything is working. (To be more precise, that it is still working, since it isn't really suitable for actual debugging.) The joystick selects modes. The key buttons turn on the three main keyboard LEDs. It also has a simple text box for a quick typing test. I recently updated it to recognize CDC devices too for all the ASCII keyboards I've ended up with, which just convert to a serial port. The file system is mounted read-only, so even though there's an actual shutdown command, nothing particularly bad happens should it crash or get unplugged.
So, a couple of years ago I built this from a Raspberry Pi Zero, OLED hat, and USB hub pogo-plugged-thingy. It displays each USB event with the current state of down keys, plus total count of pressed and unique keys, giving a quick check that everything is working. (To be more precise, that it is still working, since it isn't really suitable for actual debugging.) The joystick selects modes. The key buttons turn on the three main keyboard LEDs. It also has a simple text box for a quick typing test. I recently updated it to recognize CDC devices too for all the ASCII keyboards I've ended up with, which just convert to a serial port. The file system is mounted read-only, so even though there's an actual shutdown command, nothing particularly bad happens should it crash or get unplugged.