Author Topic: Adding buttons to encapsulated USB joystick w/ microcontroller  (Read 256 times)

0 Members and 1 Guest are viewing this topic.

Offline omibTopic starter

  • Newbie
  • Posts: 2
  • Country: de
Hello guys,

I'm using a standard 2 axis / 2 button joystick with hall sensors, which is connected via USB to a computer. I need to add two external buttons to it, but since it is encapsulated there is no way to add these internally to the joystick. So my idea is now to design a circuit which sits in between the joystick and the computer and acts as a middle-man: Get the HID reports from the joystick, add the two external button states and relay the changed report to the computer.

This requires a microcontroller, which has to act as an USB host for the joystick and as a USB device for the computer. Since I don't want to bit bang USB, the chip needs to have two dedicated USB interfaces, preferably with integrated PHY. I've looked around for a bit, and the STM32F4 series has some parts which have two interfaces (STM32F405RG for example, which looks overpowered, though).

The last time I tinkered with USB stuff was with 8 bit Atmels with V-USB and LUFA, so I'm a little out of practice. Do you think this idea is feasible? What microcontroller would you use?
 

Offline fchk

  • Frequent Contributor
  • **
  • Posts: 392
  • Country: de
Re: Adding buttons to encapsulated USB joystick w/ microcontroller
« Reply #1 on: June 18, 2026, 11:01:49 am »
I'd buy a new one with all the features needed. Making an addon is a lot of work, and USB is not easy. Unless your work hours are 0€/h a commercial replacement is cheaper and will just work.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 14087
Re: Adding buttons to encapsulated USB joystick w/ microcontroller
« Reply #2 on: June 18, 2026, 11:16:39 am »
An alternative approach which may or may not be suitable for your application depending on how it handles control mapping would be to make the buttons as a separate USB device and let the computer handle combining them.  That would simplify it to something an Arduino with native USB (e.g. anything with an ATmega32U4) could handle.

Here's a commercial product that does this: https://gear-falcon.com/products/mini-button-box-bb9-3x3
 

Offline omibTopic starter

  • Newbie
  • Posts: 2
  • Country: de
Re: Adding buttons to encapsulated USB joystick w/ microcontroller
« Reply #3 on: June 19, 2026, 04:49:06 pm »
I'd buy a new one with all the features needed. Making an addon is a lot of work, and USB is not easy. Unless your work hours are 0€/h a commercial replacement is cheaper and will just work.

Unfortunately this is not available from my manufacturer. Think of it like an arcade cabinet: Theres a joystick, but the buttons are all not intrinsically connected to the joystick. The joystick would need an additioinal input connector for the buttons, which is not supported by the manufacturer I'm using.

An alternative approach which may or may not be suitable for your application depending on how it handles control mapping would be to make the buttons as a separate USB device and let the computer handle combining them.

Yeah, I though about that, too. Both USB devices could be combined by using a USB hub IC, to have only one USB connection to the host. But that also means software support is needed. A game which just get's the joystick data would have no idea of extra buttons...
But thanks for the link. That makes me wonder, since this Button Box is a standard HID joystick, where is the axis? Is it possible for an joystick HID report to miss the axis information or is it always just zero...
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3516
  • Country: gb
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf