I'm building a control panel for Kerbal Space Program. The focus will be around the control inputs, so I'm working on an attitude input (for pitch, yaw and roll), an translation input (up/down, left/right, forwards/backwards) and an engine thrust input (increase/decrease thrust). At the moment these are all fairly simple controls, and can be used without any add-ons - in effect they're just a fancy keyboard
I'm afraid it's been a while since I've posted any updates to this project. At this point, the project is functionally complete, but I really need to take some time to complete the documentation. This should be happening in the next couple of days, including
making sure all 3d printable files are up to date in the Github repo
completing the build instructions and parts list
adding a bit of information on wiring and the Arduino interface
In the meantime, I also wanted to share a couple of the other related projects I've been working on. While these all fit into the KSP/space sim theme, I've set them up on hackaday as different projects as the parts list and assembly is completely different.
Second is a set of parts to make a replica spacecraft hatch, starting the the locking latch mechanisms, and eventually the complex hinge mechanism and hatch lever system. You can follow this project here: https://hackaday.io/project/192181-spacecraft-hatch-parts
So, for the past few days I've been stuck waiting for parts to arrive. In the meantime I decided to spend the weekend designing and printing this:
The plan will be to motorise it and connect it through kRPC (yep, more waiting for parts on order), but that will have to wait until everything else is finished
After using the prototype of the attitude joystick the feel of the return springs was really unsatisfactory. Looking at high-end joysticks the common solution appears to be cams actuated by a roller - as the joystick is tilted a bearing is rolled across a cam surface on a lever, and the lever acts on a spring. Here's the resulting design:
By changing the shape of the cam surface you can achieve just about any resistance profile, for example an exponential curve where a small movement away from the center encounters little resistance, but a pushing all the way to the end-stops will result in an exponentially increasing resistance. A linear curve will give the same resistance from the center to the end-stops, and will always snap back to the center. Finally, all of the properties can be combined to produce a completely custom feel.
This isn't a new idea by any means, and you should check out the great work by Olukelo at Thingiverse which provided a great amount of inspiration.
Of course, I went through a lot of design iterations and test prints, here's the first one:
It was pretty clear that the pivots for the cam arms needed to be higher. This version also used a really simple design for the cam surface, and it was clear that some more math would be required to create the right shape (more on this below).
Here's the next prototype with cams for the x-axis:
The shape of the cam surface is pretty complex, and took a few iterations:
From top to bottom:
Cam surface based on a convex and concave circle.
Next attempt with a really simple v-shape with two straight lines. Because this is a cam, these straight lines do not result in a linear amount of deflection
This is the first version where the surface is based on a mathematical formula. Unfortunately the formula didn't take into account the radius of the bearing, and so didn't really work
The first successful version. This weird shape results in linear deflection - tilt the joystick 1 degree and the spring gets stretched by 2mm, tilt 2 degrees and the spring is stretched 4mm, and so on
There's a lot more to the design of the surface, and I plan on going into more detail in a future post.
So, what's next? Unfortunately I'm now waiting on a stack of parts to arrive so that I can make sure that everything works and fits together
I've been working on adding labels to the switches in the caution and warning panel. This name is a bit misleading, as it won't be acting anything like a real caution and warning panel that you would find in an aircraft. There are a lot of useful buttons that aren't part of the simulation, as they don't exist in the real world - things like pause and save, and time warp in Kerbal Space Program. I was looking for a way to have these buttons, but not have them look out of place. The solution I found was to make them look like a caution and warning panel, but with illuminated buttons instead of indicator lights.
Installing labels: the labels are printed on an overhead transparency and cut to size.
All switches and labels installed:
Illuminate!
There are a few more buttons here than I have inputs on an Arduino pro micro, so I intend to wire these up as a matrix keypad, which will only use 9 inputs (4 columns and 5 rows). As this will involve soldering all of the switches together, this will have to wait until I print the final version of the case (in a more attractive gray plastic).
OpenSCAD files have been added to a new Github repository, and the repo linked from the project page. I have also added some printable STL files, and will be adding more going forward. In the process I learned two awesome things, first that git can handle binary files using git-LFS and that github is able to display STL files. You can access the github repository from the link on the left of this Hackaday project page, or directly here https://github.com/tsnoad/ksp_controller
Animation of the exploded assembly of the translation controller. The translation controller is the joystick that moves the ship forwards/backwards, up/down, etc in linear movements, as opposed to pitch, yaw, etc provided by the attitude controller.
First round of OpenSCAD modelling is complete, and files have been uploaded. There's still a lot of work to do, and there will be many clearances and tolerances to update, so I'll be adding the github repo soon
Attitude controller:
Translation controller:
Thrust controller:
Switch panel:
CW (caution and warning) panel. At the moment I'm not going to be pulling data out of KSP, so this will be another input for game functions that aren't simulations (pause, save, etc).
Please note, these instructions are still very much a work in progress - hopefully they'll be finished over the next week or so. But, in the meantime, please bear with me
We'll start with the attitude controller, the joystick that we'll use to control pitch, yaw and roll. The instructions are pretty similar for the other controllers (translation and thrust), but I'll cover those next.
Please note that these instructions are still a work in progress and I've already found a few places that I've made mistakes and made assembly a bit difficult. I'll add notes to address these here, and once I have a better solution I expect to update the instructions and files
2
Prepare electronics
Unfortunately this is the step with the most problems - and they're because I made all the wires too short. What you really want to do is make the wires way longer than you think, and then terminate them once they're installed. live and learn.
3
Install threaded nuts into base
Parts required:
1 x printed part mk2_base2.stl
6 x threaded insert nuts M4 x 6.3mm (outer diameter) x 8mm (length)
If you have an arbor press that's fantastic, but you can install them just fine with a g-clamp. It also helps to use a M4 bolt when installing the nuts
I love OpenSCAD and I love KSP, so very excited to see this one develop.