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

I attended [38c3](https://events.ccc.de/congress/2024/infos/index.html) 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 this[^1]:
<div class="image-row">
  <img src="/img/FW-EC-PSP-Joy-inserted_small.jpg" alt="FW-EC-PSP-Joystick">
  <img src="/img/FW-EC-PSP-Joy-uninserted_small.jpg" alt="FW-EC-PSP-Joystick uninserted">
</div>


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](https://github.com/cnlohr/rv003usb/tree/master/demo_gamepad) from cnlohr's software usb library for the ch32v003[^2] 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 thickness[^3]. 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 files[^4] and the code on [github](https://github.com/schnili/FW-EC-PSP-Joy). 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](https://www.freecad.org/) <3