nilsschulte.de/content/posts/framework-gamepad.md
2025-07-12 09:02:12 +02:00

2.5 KiB

title, date, draft, summary, images
title date draft summary images
Framework joystick 2025-07-11T22:11:00+01:00 false PSP joystick extension with ch32v003 for framework laptops...
(/img/FW-EC-PSP-Joy-inserted.jpg

I attended 38c3 last year and it was amazing as always. I brought a modified robot vacuum to the event (it has BLDC motors and goes fast). But I forgot the gamepad so I chouldn't even drive it around :/

So instead of goofing around I goofed around in KiCad and make this1:

FW-EC-PSP-Joystick FW-EC-PSP-Joystick uninserted

It is an extension module for Framework computers. I own a Framework 13 laptop which has 4 slots to put extension cards in. My configuration is now 1 green USB-C, 1 USB-A, 1 HDMI and 1 Joystick.

I ordered the PCBs just before leaving 38c3 for new years eve. And with every PCB project I of cause needed a secound iteration. The error that got me on the first version wasn't actually in the design. I left the tickness of the PCB at the standard of 1.6mm and so the USB-C plug did not fit as its designed for 0.8mm PCBs 🤦.
It wasn't nice but by bending all of the USB-C plug's pins I was able to solder them and validate the rest of the design. After flashing the gamepad example from cnlohr's software usb library for the ch32v0032 it just works :D But because of the wrong thickness and bend USB pins the PCB was realy twisted when inserted into the laptop. Thats why I reordered the PCB with the correct thickness3. This secound version's hardware works as well and after tweeking the example-software a bit (changed the joystick axes to ADC measurments) the overall thing works quite well i must say. It could use some offset calibration (leaving the joystick in the middle does not result in it reporting 0,0) and the imu sensor i added has no driver yet, but I was able to control the robot at this point so I call the project done for now :)

...I put the design files4 and the code on github. So feel free to make your own (there be dragons; no documentation, ask questions maybe)


  1. the PCB, the rest was designed later ↩︎

  2. THE 10cent riscV microcontroller! ↩︎

  3. And I included some minor changes like a complete redesign to make one sided PCB assembly possible. ↩︎

  4. all CAD files created with FreeCAD <3 ↩︎