Building a Better Kerbal Space Program Controller

If you have even the most passing interest in space and what it takes to get there, you’ve probably already played Kerbal Space Program (KSP). If you haven’t, then you should set aside about ten hours today to go check that out real quick. Don’t worry, Hackaday will still be here when you get back. Right now you need to focus on getting those rockets built and establishing a network of communication satellites so you can get out of low orbit.

For those of you who’ve played the game (or are joining us again after playing KSP for the prescribed 10, 12, 16 hours), you’ll know that the humble computer keyboard is not very well suited to jaunts through space. You really want a joystick and throttle at the absolute minimum for accurate maneuvers, but even you’ll be spending plenty of time back on the keyboard to operate the craft’s various systems. If you want the ultimate KSP control setup, you’ll need to follow in the footsteps of [Hugo Peeters] and build your own. Luckily for us, he’s written up an exceptionally well detailed guide on building KSP controllers that should prove useful even if you don’t want to clone his.

Wiring switches and buttons to the Arduino.

At the most basic level, building a KSP controller consists of hooking a bunch of switches and buttons to a microcontroller such as the Arduino or Teensy, and converting those to USB HID key presses that the game understands. This works fine up to a point, but is limited because it’s only a one-way method of communication. For his controller, [Hugo] forked KSPSerialIO, a plugin for KSP that allows bidirectional communication between the game and your controller, enabling things like digital readouts of speed and fuel levels on the controller’s panel.

Once the logistics of how you’ll talk to the game are settled, the rest is really up to the individual. The first step in building your own KSP controller is deciding what you want it to do. Are you looking to fly planes? Control a rover? Maybe you just want a master control panel for your space station. There’s a whole lot of things you can build in KSP, and the layout, inputs, and displays on your controller should ideally reflect your play style.

[Hugo] went with a fairly general purpose panel, but did spend quite a bit of extra time to get some slick LED bar graphs hooked up to display resource levels of different systems on his craft. That’s an extra step that isn’t strictly required for a build like this, but once you see it, you’re going to have a hard time not wanting to include it on your own panel. He also went through the expense of having the panel and case professionally laser cut and etched, which definitely gives it a polished feel.

We’ve covered quite a number of custom KSP controllers here at Hackaday. The overlap between KSP players and hackers seems unusually high, but of course a game that lets you build and fly contraptions of your own design does sound like something that would be right up our alley.

Hackaday Links: June 4, 2017

Quick question: what was the first personal computer? We love pointless arguments over technological history, so let’s just go down the list. It wasn’t an IBM, and the guy who invented the personal computer said he didn’t invent the personal computer. The Apple I is right out, and there were some weird Italian things that don’t quite count. Here’s an auction for, “The first personal computer”, a MICRAL N, released in 1974. There’s an 8080 running at 500kHz with 16kB of RAM and ‘mixed memory’. This is an important bit of history that belongs in a museum, and the auction will start at €20,000. The starting price might be a bit high; recently an original Apple I sold at auction for €90,000. This is a pittance for what these things usually go for. Is the market for vintage retrocomputers dropping out from underneath us? Only time will tell.

In Upstate NY? There’s a Hacker con going on June 16-17. You can get 20% off your ticket to ANYCon by using the code ‘HACKADAY’.

Colorblind? Hackaday readers suffer from colorblindness at a higher rate than the general population. [João] created this really neat tool to differentiate colors on a screen. Windows only, but still handy.

Everyone’s excited about the $150 3D printer that will be released by Monoprice sometime this summer. Here’s a $99 3D printer. Yes, it’s a Kickstarter so the standard warnings apply, but this bot does have a few things going for it. It uses actual NEMA 17 motors, and the people behind this printer actually have experience in manufacturing hardware. The downsides? It’s entirely leadscrew driven, so it’s going to be very, very slow.

What do you call the dumbest person with an EE degree? An engineer. It’s at this point where you should realize the value of a tertiary education is not defined by the most capable graduates; it’s defined by the least capable graduates.

Here’s your Sunday evening viewing: [Bunnie] gave a talk on RISC-V and the expectations of Open Hardware.

Hey, OpenBuilds has a new Mini Mill. It’s a basic CNC router designed for small ~1HP Bosch or Dewalt laminate trimmers. Small, but capable.

Kerbal Space Program, the only video game that should be required study materials at the Air Force Academy, Embry-Riddle and for everyone working at NASA, has been acquired by Take-Two Interactive. By all accounts, this is good news. According to reports, the original dev team left for Valve a few months ago, reportedly because of terrible conditions at Squad, the (former) developer of KSP.

The Stratolaunch carrier aircraft has rolled out of the hangar. It’s two 747s duct speed taped together.

Mission Control for Kerbal

[Niko1499] had a plan. He’d built a cool hardware controller for the game Kerbal Space Program (KSP). He got a lot of positive reaction to it and decided to form a company to produce them. As many people have found out, though, that’s easier said than done, and the planned company fell short of its goals. However, [Niko1499] has taken his controller and documented a lot about its construction, including some of the process he used to get there.

If you haven’t run into it before, KSP is sort of half simulator, half game. You take command of an alien space program and develop it, plan and execute missions, and so on. The physics simulation is quite realistic, and the game has a large following.

When we first saw the photos, we thought it was an old Heathkit trainer, and–indeed–the case is from an old Heathkit. However, the panel is laser cut, and the software is Arduino-based. [Niko1499] covers a few different methods of letting the Arduino control the game by emulating a joystick, a keyboard, or by using some software to take serial data and use it to control the game.

Continue reading “Mission Control for Kerbal”

DIY Command Station for Kerbal Space Program is Overkill

We’ve seen custom controller mods for Kerbal Space Program before, but a group calling themselves the Makerforce went a step further with their design and build of the KSP “Overkill” Command Station, which has much more in common with a fancy standup arcade unit than a custom controller. Kerbal Space Program is a hit indie game that, among other things, simulates the challenges of spaceflight. Like most games, you use the mouse and keyboard for control but many fans find this too limiting. With the help of a software mod that exposes control and status information over hardware serial communications, the door to full telemetry and remote control was opened to just about anyone to craft their own custom hardware such as flight sticks and status displays. Not content with the idea of having just a joystick and a few buttons critical for the flight process, this project took a different approach.

Continue reading “DIY Command Station for Kerbal Space Program is Overkill”

Nomograms: Complex Analog Calculators Simple for Everyone

In the late 1800s, a railway engineer named Philbert Maurice d’Ocagne was part of a group of men faced with the task of expanding the French rail system. Before a single rail could be laid, the intended path had to be laid out and the terrain made level. This type of engineering involves a lot of cut and fill calculations, which determine where dirt must be added or removed. The goal of earthwork is to create a gentle grade and to minimize the work needed to create embankments.

In the course of the project, d’Ocagne came up with an elegant, reusable solution to quickly  solve these critical calculations. Most impressively, he did it with little more than a pen, some paper, and a straightedge. By developing and using a method which he called nomography, d’Ocagne was able to perform all the necessary calculations that made the gentle curves and slopes of the French railway possible.

Continue reading “Nomograms: Complex Analog Calculators Simple for Everyone”

Quadrotor Control Systems And Kerbal Harriers

Kerbal Space Program, the game that teaches engineers at JPL and SpaceX the basics of rocket design and orbital mechanics, recently had a giant update. There are now science contracts that require you to fly Kerbals all over their tiny globe, collect data, and transmit it back to the Kerbal Space Center. As would be expected, this is a grind for XP, and the contracts sometimes don’t make sense – you need to collect data from cliff faces and mountain tops. Landing a Kerbal jet at these places is hard.

[Matt Thiffault] wanted to do these science contracts more efficiently. The best way to get to a remote location without a landing strip would be a helicopter, but a harrier jump jet would do just as well. This isn’t supported in the stock game, so [Matt] wrote a complete control system for four engines to control a hovering Kerbal jet.

[Matt]’s work is built on kOS, a scriptable autopilot mod for Kerbal that was originally intended to be something like the Apollo Guidance Computer. People have been using it to make computerized skycranes and automated rendezvous and docking programs, but these are actually relatively simple examples; there’s far more math involved in flying a quadcopter than there is getting into orbit.

To build his automated hovering harrier, [Matt] needed an aircraft. His Kerrier has parts from the Kerbal Aircraft Expansion, B9, and Infernal Robotics mods for KSP, but this is only half the problem. Anyone can put four tilt jets on an airplane, and it takes a real wizard to force a control system to hover. Hover control of the Kerbal harrier is accomplished with a complete control system for a four-engined aircraft, with proper PID control loops and code updating at 20Hz.

With kOS, the proper plane, and the right software running on this emulated guidance computer, [Matt] is able to park his plane in mid-air, have a Kerbal descend the ladder, perform some science, and return to base. It’s an impressive amount of work for a video game. A good thing, too: [Matt] is looking to get into controls engineering professionally. Whether this will go on his resume is another question entirely.

Hacklet 39: The Kerbal Way Of Doing Things

Kerbal Space Program is a space flight simulator based on an extremely stupid race of green space frogs that have decided to dedicate all their resources towards the exploration of space. It is a great game, a better space simulator than just about anything except for Orbiter, and the game is extremely moddable. For this edition of the Hacklet, we’re going to be taking a look at some of the mods for KSP you can find over on

1271491420181365398Like most hardware builds for Kerbal Space Program, [lawnmowerlatte] is using a few user-made plugins for KAPCOM, a hardware controller and display for KSP. The Telemachus plugin is used to pull data from the game and display that data on a few screens [lawnmower] had sitting around.

There are a few very cool features planned for this build including seven-segment displays, a throttle handle, and neat enclosure.

IMG_20140419_013717[Gabriel] is working on a similar build for KSP. Like the KAPCOM, this one uses the Telemachus plugin, but this one adds three eight-digit, SPI-controlled, seven-segment displays, relegendable buttons, and a Kerbal-insipired frame made out of Meccano.

[Lukas]’ KSP Control Panel is another complicated control system that breaks immersion slightly less than a keyboard. He’s using a Raspberry Pi to talk to the Telemachus server to control every aspect of the craft. From staging to opening up the solar panels, it’s all right there in [Lukas]’ control panel.

You may have noticed a theme with these builds; all of them use the Telemachus plugin for KSP. Even though it’s fairly simple to create plugins for Unity, there really aren’t that many KSP plugins build for these immersive control panels and space flight simulators. Or rather, Telemachus is ‘good enough’. We’d like to see a fully controllable KSP command pod model, just like those guys with 737 flight simulators in their garage. If you have any idea how that could happen, leave a note in the comments.