Jump to content

Kerbal Control Panel


SolarAdmiral

Recommended Posts

Hey everybody, I thought I'd share my current KSP project. Ever wanted to play the game with the satisfying click of a steel toggle switch? Combine my love of computer programming, retro industrial controls, label makers, and KSP, and this is what you get. (It might have gone a little over budget...)

Step #1-Holes

Everyone loves holes. My dad's a welder, and with a drill press it was easy. I got the panel for $20 at the local princess auto. It was originally a "Kantech 400" whatever that was. Nothing says you can like "Kantech".

4ptielq.jpg

Step #2-Paint

Nothing says space like matte grey spray primer. This is the third paint job. The first was interrupted by a plugged spay paint nozzle. The second paint turned out to be much darker and glossier than I wanted. Third time was the charm.

jWESeYq.jpg

Step #3-Hardware

This is why we're all here. Lots of stainless steel toggles, and even some molly-guards. The one on the top right is a key switch. And top middle is the old lock for the box, which I don't have the key for.

U2OErVh.jpg

Step #4-Labels

I like embossing label makers way more than anyone should. I am really happy with how it turned out. The remaining holes are for LED indicators.

WvEVZVA.jpg

Hope you enjoy.

Next comes mounting the LEDs, soldering the wiring, and programming it to input via USB.

Hopefully it will be ready just in time for 0.24!

Link to comment
Share on other sites

Good job, man!

Kantech 400 turns out to be some kind of encrypted door controller for pass access... Nevermind.

Quite good design you have here! (probably will be good to see moar boosters bigger pictures though ;) )

I am always impressed by any control panels for KSP. It is great to see how much impression this game has on people.

I am thinking of creating some control panel myself in future... When I will have my vacation at last. )

Link to comment
Share on other sites

;1265120']Good job' date=' man!

Kantech 400 turns out to be some kind of encrypted door controller for pass access... Nevermind.

[/quote']

Well, now I learned something.

Here are some big pictures, with the LEDs.

I'm pretty busy, so I probably won't get anymore work done until the weekend. But the outside of it is pretty much done.

Ask and you get; Here are full size pictures.

Would anyone be interested in a more detailed breakdown? Step by step, follow along instructions?

eq6OgUX.jpg

g8AXRr1.jpg

Link to comment
Share on other sites

Two things, one you need some yellow and black stipend tape somewhere on it!

Two, what are you using for USB encoding? I'm quite familiar with analog electronics, bit I've never tried to interface with a USB bus before...

Link to comment
Share on other sites

tg626: A simple way to do it is to use an old keyboard controller. You can trace the wires from the keyboard layout to the controller quite easily and then re-solder the wires for your buttons and switches where you need them. Buttons will work out of the box, but for switches you'll need to use some software to track your switch states and release the keypress after switching.

Edited by spec10
Link to comment
Share on other sites

Or compromise by using "spring return" momentary switches. I've done the other trick before, go down to the local thrift store, grab a USB keyboard for a buck and rip out it's guts. Keyboards use a "row and column" system so you have to match the right leads for what you want.

I was thinking it would be a purpose built circuit, which I know some people do (at least in the Flight Sim community), but those are ususally for both switches and rotary controls.

I made one of those, but I gutted and old USB joystick for the buttons and axes....

(I still say it needs some of this on it)

419101.jpg

http://bit.ly/1wqEFNy

Link to comment
Share on other sites

Stripy tape could be good... But I think for now I'm going to go with a couple sticky notes.

I'm using an Arduino Leonardo. A little USB controller chip with open headers. At $30, it costs about what it would to buy a keyboard to cannibalize. There will be a bit of C++ involved. But I should be able to handle it.

I have spring return switches, for the abort, cut engine, and stage switches under the molly guards. I wouldn't use those for stuff like gear and RCS and whatnot though.

All in all, I still think the hardest part was getting a good paint job on the thing.

Link to comment
Share on other sites

Alright, update time.

I have fought off the siren call of 0.24 to finish the panel and I can happily report all systems green. Although, funnily enough in very Kerbal fashion, everything worked fine but the fail-safe failed.

I learned some things in this last day. You can combine your indicator LED and the pulldown resistor... but not if your LED is so bright you have to increase the resistance to the point it no longer functions as a pull down. And the Keyboard.end() function doesn't apparently end keyboard functionality, who knew?

The story,

Without working pulldowns, all the panel could do was scream at me, "gggggggggggggggg58885888588gggggg588585". But a few new pulldowns installed and that cleared right up. I was supposed to be able to escape the function loop by tripping I/O pin zero. But that didn't work.

After that was done it worked like a charm.

The only other problem, is the toggle for precision control. I don't think Caps Lock is an ASCII figure. But, I figure I can just use backslash and remap the KSP control.

And here's some pictures.

Here's the panel all lit up.

3tvM5oD.jpg

Anyway, hope you enjoyed it. I'm off to play some 0.24.

I've been thinking about uploading some videos of the panel in action on youtube, we'll see if anything comes of that.

Edited by SolarAdmiral
Link to comment
Share on other sites

If anyone is interested in the code,

So far this seems to be working, using the Arduino Leonardo.

[spoilerbutton]

boolean anni[5];

boolean digi[12];

void setup()

{

pinMode(0,INPUT_PULLUP);

pinMode(1,INPUT);

pinMode(2,INPUT);

pinMode(3,INPUT);

pinMode(4,INPUT_PULLUP);

pinMode(5,INPUT_PULLUP);

pinMode(6,INPUT_PULLUP);

pinMode(7,INPUT_PULLUP);

pinMode(8,INPUT);

pinMode(9,INPUT_PULLUP);

pinMode(10,INPUT_PULLUP);

pinMode(11,INPUT);

pinMode(12,INPUT_PULLUP);

pinMode(A0,INPUT);

pinMode(A1,INPUT);

pinMode(A2,INPUT);

pinMode(A3,INPUT);

pinMode(A4,INPUT);

pinMode(A5,INPUT);

if (digitalRead(1)==HIGH)

{

digi[1]=true;

}

else

{

digi[1]=false;

}

if (digitalRead(2)==HIGH)

{

digi[2]=true;

}

else

{

digi[2]=false;

}

if (digitalRead(3)==HIGH)

{

digi[3]=true;

}

else

{

digi[3]=false;

}

if (digitalRead(4)==HIGH)

{

digi[4]=true;

}

else

{

digi[4]=false;

}

if (digitalRead(5)==HIGH)

{

digi[5]=true;

}

else

{

digi[5]=false;

}

if (digitalRead(6)==HIGH)

{

digi[6]=true;

}

else

{

digi[6]=false;

}

if (digitalRead(7)==HIGH)

{

digi[7]=true;

}

else

{

digi[7]=false;

}

if (digitalRead(8)==HIGH)

{

digi[8]=true;

}

else

{

digi[8]=false;

}

if (digitalRead(9)==HIGH)

{

digi[9]=true;

}

else

{

digi[9]=false;

}

if (digitalRead(10)==HIGH)

{

digi[10]=true;

}

else

{

digi[10]=false;

}

if (digitalRead(11)==HIGH)

{

digi[11]=true;

}

else

{

digi[11]=false;

}

if (digitalRead(12)==HIGH)

{

digi[12]=true;

}

else

{

digi[12]=false;

}

if (digitalRead(A0)==HIGH)

{

anni[0]=true;

}

else

{

anni[0]=false;

}

if (digitalRead(A1)==HIGH)

{

anni[1]=true;

}

else

{

anni[1]=false;

}

if (digitalRead(A2)==HIGH)

{

anni[2]=true;

}

else

{

anni[2]=false;

}

if (digitalRead(A3)==HIGH)

{

anni[3]=true;

}

else

{

anni[3]=false;

}

if (digitalRead(A4)==HIGH)

{

anni[4]=true;

}

else

{

anni[4]=false;

}

if (digitalRead(A5)==HIGH)

{

anni[5]=true;

}

else

{

anni[5]=false;

}

Keyboard.begin();

}

void loop()

{

if (digi[8]==false)

{

if (digitalRead(8)==HIGH)

{

digi[8]=true;

}

}

else

{

if (digitalRead(8)==LOW)

{

digi[8]=false;

}

}

if (digi[1]==false)

{

if (digitalRead(1)==HIGH)

{

digi[1]=true;

Keyboard.write('5');

}

}

else

{

if (digitalRead(1)==LOW)

{

digi[1]=false;

Keyboard.write('5');

}

}

if (digi[2]==false)

{

if (digitalRead(2)==HIGH)

{

digi[2]=true;

Keyboard.write('r');

}

}

else

{

if (digitalRead(2)==LOW)

{

digi[2]=false;

Keyboard.write('r');

}

}

if (digi[3]==false)

{

if (digitalRead(3)==HIGH)

{

digi[3]=true;

Keyboard.write('t');

}

}

else

{

if (digitalRead(3)==LOW)

{

digi[3]=false;

Keyboard.write('t');

}

}

if (digi[4]==false)

{

if (digitalRead(4)==HIGH)

{

digi[4]=true;

}

}

else

{

if (digitalRead(4)==LOW)

{

digi[4]=false;

if(digi[8]==true){

Keyboard.write(8);

}

}

}

if (digi[5]==false)

{

if (digitalRead(5)==HIGH)

{

digi[5]=true;

}

}

else

{

if (digitalRead(5)==LOW)

{

digi[5]=false;

Keyboard.write('6');

}

}

if (digi[6]==false)

{

if (digitalRead(6)==HIGH)

{

digi[6]=true;

}

}

else

{

if (digitalRead(6)==LOW)

{

digi[6]=false;

if (digi[8]==true){

Keyboard.write(32);

}

}

}

if (digi[7]==false)

{

if (digitalRead(7)==HIGH)

{

digi[7]=true;

}

}

else

{

if (digitalRead(7)==LOW)

{

digi[7]=false;

if (digi[8]==true){

Keyboard.write('x');

}

}

}

if (digi[9]==false)

{

if (digitalRead(9)==HIGH)

{

digi[9]=true;

}

}

else

{

if (digitalRead(9)==LOW)

{

digi[9]=false;

Keyboard.write('m');

}

}

if (digi[10]==false)

{

if (digitalRead(10)==HIGH)

{

digi[10]=true;

Keyboard.write('4');

}

}

else

{

if (digitalRead(10)==LOW)

{

digi[10]=false;

Keyboard.write('4');

}

}

if (digi[11]==false)

{

if (digitalRead(11)==HIGH)

{

digi[11]=true;

Keyboard.write(92);

}

}

else

{

if (digitalRead(11)==LOW)

{

digi[11]=false;

Keyboard.write(92);

}

}

if (digi[12]==false)

{

if (digitalRead(12)==HIGH)

{

digi[12]=true;

Keyboard.write('3');

}

}

else

{

if (digitalRead(12)==LOW)

{

digi[12]=false;

Keyboard.write('3');

}

}

if (anni[0]==false)

{

if (digitalRead(A0)==HIGH)

{

anni[0]=true;

Keyboard.write('8');

}

}

else

{

if (digitalRead(A0)==LOW)

{

anni[0]=false;

Keyboard.write('8');

}

}

if (anni[1]==false)

{

if (digitalRead(A1)==HIGH)

{

anni[1]=true;

Keyboard.press('b');

}

}

else

{

if (digitalRead(A1)==LOW)

{

anni[1]=false;

Keyboard.release('b');

}

}

if (anni[2]==false)

{

if (digitalRead(A2)==HIGH)

{

anni[2]=true;

Keyboard.write('g');

}

}

else

{

if (digitalRead(A2)==LOW)

{

anni[2]=false;

Keyboard.write('g');

}

}

if (anni[3]==false)

{

if (digitalRead(A3)==HIGH)

{

anni[3]=true;

Keyboard.write('9');

}

}

else

{

if (digitalRead(A3)==LOW)

{

anni[3]=false;

Keyboard.write('9');

}

}

if (anni[4]==false)

{

if (digitalRead(A4)==HIGH)

{

anni[4]=true;

Keyboard.write('u');

}

}

else

{

if (digitalRead(A4)==LOW)

{

anni[4]=false;

Keyboard.write('u');

}

}

if (anni[5]==false)

{

if (digitalRead(A5)==HIGH)

{

anni[5]=true;

Keyboard.write('7');

}

}

else

{

if (digitalRead(A5)==LOW)

{

anni[5]=false;

Keyboard.write('7');

}

}

delay(50);

}

[/spoilerbutton]

Edited by SolarAdmiral
Link to comment
Share on other sites

To start with,

2.2 Forbidden content

g. Links to commercial initiatives;

So if I did, don't think I could sell or advertise them here.

That being said, I had considered it. And I do enjoy making them. But there are a number of problems I can't get over. And they would be expensive, I would have to sell them for around $300-$400 dollars at the least, even with "mass producing."

If anyone is looking to build one, I would be extremely willing share my expertise, give you easy to follow step by step instructions, and tell you where you can get the parts. I could even write the programming for you for free.

It isn't too hard. All you have to be able to do is solder wire, and cut the holes in the metal panel. Or, you could use some sort of plastic or wood case and that would make cutting much easier. You could build one yourself for about $200. Or, if you want a smaller one with less switches, you could build one as cheaply as about $100. Although, unless you are experienced, I recommend you only use round mount switches. Nothing square. Square holes are hard. But as long as you can cut a hole and solder a wire, you can build one of these.

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...