Custom KSP controller and display

Here’s my custom controller and display for Kerbal Space Program.

Fitted

Last year, after seeing this custom controller, I was suitably inspired. I wanted to build a simple physical device to control launch/stage, throttle, landing gear, lights, and maybe some custom stages. I knocked up a quick hack just to get a feel for how well it worked, using cardboard, a handful of switches I already had lying around, and a Teensy development board which can act as a USB keyboard.

Untitled  Untitled

Using a simple controller with physical switches and buttons as alternatives to keyboard keys was fun to use, but I was soon annoyed every time my hands had to go across to the keyboard – and especially the mouse – when checking things like radar altimeter, periapsis, time to apoapsis etc.

I soon wanted not just switches but screens and dials I could glance at. I especially knew I needed a physical radar altimeter. (Landing safely is hard!) What I needed was a way to get the data out of KSP.

Ideally, I thought, someone would have written a KSP plugin to give me easy access to live data about velocity, altitude, fuel levels, periapsis apoapsis, time to periapsis and apoapsis, height from terrain, velocity, surface speed, vertical speed, sensor data etc. Ideally something simple, lightweight, readable by a hacky little program that could pass the data on through USB serial to the controller.

I was really looking for a CSV or JSON plugin for KSP. It took a bit of digging to find it, and I feared I might have to write it, but I was delighted to find the Telemachus plugin which adds a nice simple JSON API to KSP and has a fully featured web interface built on that API. I don’t use the web interface but the JSON API is great. Getting live data out of KSP and into Ruby was a nice moment.

Look at all the lovely data

Now I had an approach that I knew would work, I started putting together a wishlist of parts and putting together a simple paper prototype; a rough sketch of what components I wanted where.

KSP controller paper prototype

Having seen various voltmeter clock projects I knew I wanted to use an analog output on an Arduino to have it display live data about altitude, fuel, velocity etc.

So I started playing with LCD screens and voltmeters to work out how to display different things simultaneously.


Next I went shopping for a good range of switches

Switches

A higher fidelity prototype came next, with holes punched in the cardboard where I thought the switches screens and meters needed to be. At this stage, I learned a lot about what felt comfortable, and moved a few things around.

KSP controller prototype

Starting to put it all together.

Displays

The displays all go in to the base

Untitled

Feels satisfying already

Untitled

Testing the displays

Preparing to drill the holes

Preparing to drill

Drilled and Dremelled

Drilled and Dremelled

Everything in place

Fitted

Source code

  • Teensy code for creating key presses from switches
  • Simple Arduino code for controlling LCD screen and voltmeters
  • Beginnings of a Ruby script for passing values from the Telemachus plugin to the Arduino

Components


I’ve subsequently seen this astonishing mission control desk which I now very badly want to make for my son / self.