Jump to content

How to build your own Kerbal Control Panel


mountaineerman

Recommended Posts

There's been some interest about a guide for how to build a custom Kerbal Control Panel, so here is a high-level guide to the steps involved. I'll take you through the general flow, but something worth mentioning is that design is not linear - many things influence one-another. You often learn things you didn't know along the way. If you go into your build with that mindset, you can turn unexpected turns into happy accidents. Let's jump right in! 

  1. Brainstorm
  2. Think about your Budget
  3. Tools
  4. Workspace
  5. A note on Documentation
  6. High Level Design
  7. Prototyping
  8. Detailed Design
    • Circuit design
    • Pin assignment
    • Bill of Materials (BOM)
    • Cardboard Aided Design, again!
    • Computer Aided Design (CAD)
  9. Purchase stuff
  10. Prototype again! (Circuit Validation)
  11. Build casing
  12. Install Components, Wiring
  13. Programming

 

 

1. Brainstorm

What do you want to build? Make a list of things that would be cool features you want your panel to have. Try sketching it out. Here are some sketches from my second panel design:

U8nFSRk.jpg

bfQVOwU.jpg

Look at what other people have done. In our day-to-day lives, copying other people's ideas is looked down upon. But in this case, if someone did something you really like, include it in your work! Just be courteous and give credit where credit is due. Here are some ideas to get you started:

Finally, break out the cardboard:

F4dErQe.jpg

dR2h94im.jpg    csfzeyPm.jpg

 

2. Think about your Budget

Ah, yes. Flying high above Kerbin with daydreams of how cool that panel will be - a giant button to help blast off to other worlds; lights and sounds blaring in alarm at a steep re-entry trajectory; a joystick to masterfully complete that orbital rendezvous - we face our first obstacle - can you afford this? How much are you willing to spend? :0.0: Your budget will strongly influence your design.

Here are some ballpark numbers based on my experience. These numbers include only the materials involved. Things not included: tools, workspace, casing.

Budget $150
For this pricetag, you should be able to add some nifty components to take your game to the next level. Buttons, Switches, and Joysticks are simple and affordable components.
Medium $300
(Mk1 panel)
Burn a Kerbol-sized hole in my wallet $2000
(Mk2 panel)

 

Something often overlooked when thinking about budgets is time. Your time is precious and finite, just like your money. Keep it in mind.

 

3. Tools

Depending how you build your casing, the tools will vary. For the guts of your build, here's what you'll need:

  • Pair of eager hands
  • Ruler/measuring tape
  • Screwdrivers/Alan Keys/Wrenches
  • Wire cutters
  • Wire strippers
  • Soldering Iron. You don't have to break the bank here if you do not often find yourself hunched over electronics. You can get a basic one for $30 from a hardware store. A soldering iron is a stick that gets hot to melt solder. As with anything though, if you look for fancy stuff, you can spend an arm and a leg.
  • Multimeter. Look for one with a continuity test feature (beeps on closed circuit).
  • Breadboard

 

4. Workspace

A lot of us don't have the luxury of space. Don't give up, get creative! I renovated my laundry 'closet' to have a little space for projects:

DOlmjlW.jpg

 

5. A note on Documentation

This seems really trivial, but spend a bit of time thinking how you want to track your documents for your panel. It can be as simple as a folder on your computer or as complex as a collaborative, version-controlled, cloud-hosted repository. I use git and github for my projects. Word of warning: git is not the most intuitive tool to learn.

 

6. High Level Design

So, you have some idea of what you want as your end product. What next? It's time to dive a little deeper into how this box of parts will do something joy-producing. 2 good questions to answer at this stage are: 1) What are the "big boxes" in your panel? 2) How will your panel interface with your computer? KSP's awesome community has developed multiple tools to help with this:

For my Mk1 panel, I had an Arduino Mega interfacing with every input and output directly. The microcontroller communicated to the game via KSPSerialIO.

For my Mk2 panel, I also have an Arduino Mega at the core of the panel, but the numbers inputs and outputs has grown substantially, so now the Mega will talk over serial connections to a variety of other chips, including LED Driver Boards, Stepper Driver Boards, a Multiplexer (MUX), and so on...

 

7. Prototyping

If you are new to the world of electronics/programming/circuitry, this is a good point to get your hands dirty. Get some basic components and experiment: there's vast resources online (like Instructables) for Arduino and Raspberry Pi projects. This will give you the foundational knowledge to prevent banging your head against the wall in the steps below. A breadboard comes in very handy here. Some ideas:

  • Flash an LED
  • Use a switch to control an LED
  • Make a clock using 7 segment displays

How to Use a Breadboard - learn.sparkfun.com

 

8. Detailed Design

This is a big one. Time to get to the details. During this stage, you'll work on:

  • Circuit design
  • Pin assignment
  • Bill of Materials (BOM)
  • Cardboard Aided Design
  • Computer Aided Design (CAD)

I highly recommend including links to the components you plan on getting, you'll want to refer to any dimensions or properties later on. See the next section for a list of suppliers.

Hg1bDHq.jpg

"But wait!", you're saying. "We already did Cardboard Aided Design! This guy is losing it." As much as it seems like extra work, this is the time to understand the ergonomics of your design. Say your control panel is uncomfortably high on your table: it's much easier to chop a cardboard box than a metal box. Especially if that box has a bunch of electronics in it, all nicely arranged, wired, and working. You'll notice in the pictures below there was quite a large evolution.

Ce0OnGrl.jpg

X9BkyK0l.jpg

As an optional step, depening on how complicated your panel is, you will want to model it using a CAD software. This is a must for techniques such as 3D printing, water-jetting, laser-cutting, and CNC machining. I use a program called Fusion 360. It's free for Hobbyists.

6efsxwYl.png

H6hVQocl.png

NcX49frl.png

 

9. Purchase stuff

Nuff said. Here are some sites I've used for getting parts (I live in North America):

  • Scavenged electronics!
  • Digikey
  • Adafruit
  • Sparkfun
  • Elmwood Electronics (Canada-specific)
  • Ebay
  • AliExpress

 

10. Prototype again! (Circuit Validation)

Now that you have (most) of the parts for your panel, test out how things work. You'll likely discover things you didn't plan on, which might impact your design.

HrDDOc1l.jpg

 

11. Build casing

Create the framework that will hold everything together. Materials I've seen used:

  • Cardboard
  • Plastic (3D printed as well as)
  • Wood
  • Aluminum

If you do not have a tools or experience to do this, don't fear! You have some options ahead of you. Makerspaces have been growing in popularity, so have a look to see if that is an option for you. They often hold courses on woodworking and metalworking. Alternatively, you can contact a Machine Shop in your area to build a panel for you. This is where having a CAD model comes in extra handy.

12. Install Components, Wiring

Mount your components and hook up! This is a very satisfying part of the process, as all the previous hard work starts to take shape and come together. Some tips:

  • Colour-coded wiring comes in very handy. For example:
    • Red = +5V
    • Green = Ground
    • Yellow = Digital Input
    • Blue = Analog Input
  • Modularly test your connections. Don't wait until the very end. Imagine finding a faulty connection in the wiring below after you have hooked everything up!
  • Organize your wiring. I cannot stress this enough. You will make mistakes. You will need to troubleshoot them. Wire organization is the way to keep yourself sane during that process.

W53s38q.jpg

 

13. Programming

We're almost there! Time to bring your panel to life. Before I talk about the tools you can use, I have a couple tips on your approach:

  • Use Test Driven Development. This is a software development process in which, as you may have guessed, you create a test for your software before you have written the software. In our case, you could have a test for your LEDs, switches, etc. before they are connected/wired/integrated. As you connect them, you can run a little test script to see all your LEDs turn on, all your switch positions are picked up, and so on. Wikipedia has some more high-level information: https://en.wikipedia.org/wiki/Test-driven_development
  • Test your backbone first. For example, if you've chosen to run your panel using an Arduino that talks to KSP using KSPSerialIO, test that your Arduino can talk to KSPSerialIO and to the game. Before you build anything! If you encounter problems here, it would be an enormous shame if you spent the last 6 months building your panel, only to be unable to interface it with the game.

 

There are many methods and technologies you can use for programming. Here are some ideas if you are looking for a place to start. I will assume you are using an Arduino microcontroller to run your board:

A) Keep it simple!
Use the Arduino IDE (Integrated Development Environment). You'll need it to upload code to your Arduino anyways. It comes with a handy Serial Monitor which is a console with which you can output information to your computer screen. Very handy for testing.

B) I know a thing or two about programming. Take me to the next level!
Use an editor (e.g., Notepad++) and Version Control (e.g., git). Using an editor will give you greater control over things like indentation and syntax highlighting. Version control will allow you to manage your code as it grows and evolves. It also allows you to work collaboratively with a team on the same software.

C) Most technical
Use a professional IDE (e.g., Dev-C++, Eclipse, Visual Studio) and Version Control. They come with a variety of tools such as code auto-completion, a debugger, file management, and so on.

45fiZ2K.jpg

 

 

That's all I've got! If you are interested, here are my control panels:

Edited by mountaineerman
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...