SpaceBall 4000 Serial to USB Adapter




Introduction: SpaceBall 4000 Serial to USB Adapter

The SpaceBall 4000 (equivalent to the 5000FLX, but not the 5000) is a serial-based 3D mouse with 12 buttons that you can buy on ebay for under $20. These are nice for doing 3D graphics design, as you can move models along three axes and rotate them just by moving a ball. I recently made a Chrome extension that lets you use it in TinkerCAD, for instance. Or you can use it as a six-axis 12-button joystick (the adapter has a switchable mode that lets you activate that mode) in games like Descent.

I will show how for $5 you can build a USB adapter for the SpaceBall that makes it emulate most of the functionality of a much newer SpaceMouse Pro, so you can use it with the latest 3DConnexion drivers.

Parts for project:

  • STM32F103C8T6 minimum development board: either a black pill like this one ($1.90 shipped) or a blue pill like this one ($1.94 shipped); if you use the blue pill, you will probably need to solder an extra resistor (probably 1.8K); if you use the black pill, there is a potential (but it didn't happen when I tried it with the SP3232 board) that you will have some power supply problems and will need to solder a wire directly to a diode on the board.
  • An SP3232 TTL to RS232 DB9 male board like this one (ebay $3.09).


  • USB to UART adapter for loading the bootloader on the development board. If you have one sitting around, you can use an Arduino for this, or one of the many USB to UART adapters on aliexpress for around $1
  • soldering iron
  • computer for running the Arduino IDE.

Step 1: Load Bootloader and Prepare Arduino Environment

Follows steps 1 and 2 in this Instructable to load the bootloader on the board and prepare the Arduino IDE for the board (you can skip the GameControllers library, though).

If you have a blue pill, measure the resistance between PA12 and 3.3V. If it's significantly more than 1.5K, put a resistor between these two pins to parallel the existing resistance and bring it down to 1.5K. If you measured 10K, you should put a 1.8K resistor in. (Note that some boards that have the blue pill layout are black in color. The way to tell them apart is that the blue pill layout includes a 5V line.)

Step 2: Connect Serial Board

Make the following connections between the RS232 adapter and the pill:

  • VCC - V3
  • GND - G
  • TXD - A10
  • RXD - A9
  • RTS - B11

Connect the SpaceBall to the RS232 adapter. Plug the pill into a USB port. Wait a few seconds. If all goes well, the SpaceBall will emit two beeps. This shows that the electrical connections are good. If you have trouble, see the "What to do if it's underpowered?" step.

Step 3: Load the Sketch Onto the Board

Load my Mouse3D sketch into Arduino. If you have a Blue Pill, edit the LED line to be PC13 instead of the Black Pill's PB12.

Plug the pill into your computer.

Go to Tools | Board and scroll down to select Generic STM32F103C series.

Press the Upload (right arrow) button in the Arduino IDE.

That's all. You now have an adapter. Unplug it and plug it back in to use it. I recommend you download the latest 3D Connexion drivers for it. Your adapter makes the device pretend to be a SpaceMouse Pro, except that it's missing the last three of the SpaceMouse Pro's buttons.

You can also run the SpaceBall as a generic USB joystick (calibrate with Win-R joy.cpl on Windows). To switch to USB joystick mode, press the 4, 5, 6 and 2 buttons at the same time. To switch back to SpaceMouse Pro, either reset the adapter (unplug and re-plug, or press the reset button on it) or press the 4, 5, 6 and 1 buttons.

Step 4: What to Do If It's Underpowered?

If you're unlucky, you may find that the SpaceBall 4000 is underpowered and either doesn't beep initially. Another symptom is sending button presses (you can view them with joy.cpl on Windows) but not ball movement.

In that case, you want to change the power supply to the UART-to-RS232 converter board from 3.3V to 5V. If your STM32 board has a 5V pin (blue pills have it), that's easy: just connect that to the converter board's VCC instead of 3.3V. If the board doesn't have a 5V pin (black pills don't have it), you'll need to solder the power line to the diode on the board.

Be the First to Share


    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    12 Discussions


    7 months ago

    For anybody with problems in setting up Arduino and compiling, I now released a .bin file you can upload:
    To upload it, follow the instructions for installing a bootloader, but instead of the bootloader, just install the .bin file:
    Note that if you already have a bootloader, it will be overwritten by the .bin file, and if you want to make changes in Arduino, you'll need the bootloader.


    Reply 3 months ago

    Flashed the .bin file successfully but when I connect the device (hp Spaceball 5000 FLX-A) it doesn't make the two beeps (it does when I connect via FTDI USB Adapter) but instead a constant chirp noise.. The device is recognized in the device manager and I could install 3DxWare but it doesn't work.. Also in joy.cpl I cannot even get button presses.. Is the device underpowered?


    Reply 3 months ago

    I am thinking that either some wiring is wrong or it's underpowered.


    Reply 3 months ago

    Okay, I have no soldering iron (need to buy one) so everything is only plugged maybe there is a contact problem.. My black pill looks exactly like the one on the last picture (with the 5V marked) so I tried to glue the VCC to the diode (with hot glue) but it just behaves the same.. Also I tried your tutorial with 3d.exe and USB/IP but there I always get "Error Cannot Confirm P20" after "Initializing Serial Connection" in a loop (here it beeps 2 times on every try..).. Will buy a soldering iron (have TS100 in mind) but anyway would love to know why the software only solution doesn't work for me..


    Question 6 months ago on Step 4

    Looks like everything went well programming the ST-Board.
    However, my Spaceball is not recognized (and not beeping).
    I'm using a 4-Pin RS232/TTL adapter (VCC, GND, RX,TX) and cannot connect RTS to B11.
    Could this be the reason ? (I already tried to supply 5V to the Ball with no success).

    Is it possible to grab RTS/CTS directly from the Max3232 (maybe pins 9+10) ?

    And another Question: i see, you also seem to have attached CTS to the ST-Board, but to which pin ?


    Answer 6 months ago

    I don't think CTS matters. But it is crucial that pins 4 and 7 on the RS232 plug be producing about 9V. Check with a voltmeter. That's where the Spacemouse gets its power.

    If you can connect RTS, that should do the job. But for that you may need to use an adapter board based on the CP chip.

    With the Max3232, you might be able to adapt this circuit:

    Though I think it would be a good idea to connect Pin 11 on Max3232 to B11 on the ST board instead of to ground. I don't know if that will work or not, or just blow something up.

    Also, there are lots of fake Max3232 chips out there, and these are likely to overheat and fry if you use them. I had that happen first time I tried it.


    Question 8 months ago on Step 3

    Sorry if I'm missing something here, but I don't see where to download the arduino sketch?


    Reply 8 months ago

    That's great, thanks.


    Question 9 months ago

    This is fantastic! Do you have any idea how the Spaceball 2003 would work with this or if the protocols between the 2003 and the 4000 are completely different?