Jump to content

My KSP control panel


stibbons

Recommended Posts

Another minor update without any pretty pictures. Random bits of electronics hardware are being delivered (to my office, to the bemusement of coworkers), and I've picked up the other stuff I need to mount and wire everything in the enclosure. I'm hoping to be able to get a fair bit of the assembly done over the weekend.

I am dipping back in to KSP plugin hacking though. The original KSPSerialIO mod uses some Windows-only interfaces, but my development machine is a Mac laptop. So I've been putting some effort in to updating marzubus' cross-platform fork, which has drifted behind the main release a little bit. My code builds and gets as far as attempting to scan serial ports, but doesn't detect a display. Not sure yet if I've messed up the plugin or my arduino code, but it's getting a little bit confusing. :(

Link to comment
Share on other sites

My development machine is a Mac laptop. So I've been putting some effort in to updating marzubus' cross-platform fork, which has drifted behind the main release a little bit.

THANK YOU!!!

I've been going all out with the feature set of my build, very MUCH worrying about how far behind the Mac version of the plugin actually is! :(

I do have a question... Do you know if the Mac version of the plugin streams attitude data... Aka, the Navball values? Yaw, pitch, roll, the various markers (prograde, etc)... I actually have a real navball, but I don't even know yet if there's even support for it in the plugin's data stream. I'm working on creating an arduino program and some support hardware to drive the synchro control signals required to move the ball, but I have not yet looked into whether the plugin even outputs that data. I'm actually using this project to TEACH myself C programming. I haven't done programming since the old days of BASIC, so I have a way to go yet..

Link to comment
Share on other sites

The latest cross platform build is forked from 0.17.1. It should have everything from the VesselData packet except the last three fields, MaxOverHeat, MachNumber and IAS. The ControlPacket is unchanged.

The plugin has been providing attitude data for a while (roll, pitch, yaw). But there hasn't yet been too much progress getting any of the velocity vectors in to a usable state except for admitting that it's pretty hard.

Edited by stibbons
Link to comment
Share on other sites

The latest cross platform build is forked from 0.17.1. It should have everything from the VesselData packet except the last three fields, MaxOverHeat, MachNumber and IAS. The ControlPacket is unchanged.

RE: MaxOverHeat -- when implementing this into the Mac version, be mindful that the original was wrong.

I worked with Zitronen to get the correct value (parts were overheating without any indication they were).

We established you want to get the skin temperature of *any* part that's overheating.

Link to comment
Share on other sites

I didn't know that. Cool. I'm just merging HEAD from zitronen's repository, so if a fix has been committed I've got it.

If it's dated the 16th of July, then yes.

Otherwise, give him a little nudge to update the repo ;)

Link to comment
Share on other sites

Yeah I did eventually dig up the original plug-in's thread, and found the attitude data was part of the packet.

My reply ended up being in the "Arduino Addon for Mac" thread, since it seemed more specific to there.

I will be posting to the original thread about a few things. I wonder if MechJeb could be used as a bridge to get the maneuver node/target/heading vectors. Obviously Mechjeb has full access to all that info, so it presumably can calculate the necessary data. Might it be possible to extract the necessary data from MechJeb, when installed? Kinda like how the NanoGauges mod extracts Mach and a few aero numbers from FAR if it's installed, and ignores that data otherwise?

Link to comment
Share on other sites

Still waiting on quite a few parts to arrive before I can build the display panels. But still managed to get a lot done today.

Starting with completing the enclosure assembly. The lid is held on with a piano hinge along the bottom. Very easy to work on things, it opens right up. Will probably add something to limit how much it opens, and a clasp to hold it closed.

tddTFoX.jpg

And then all of the finished panels went in.

QfZzBEK.jpg

I designed and made a quick cover for the back letting power and USB in. I didn't have any of my prepared perspex boards, so hacked something up from MDF instead.

qRtRfkM.jpg

Finished up by mounting the internal electronics. These are both MDF board clipped on to short lengths of DIN rail. Easy to remove to work on. First the Arduino mega and my custom display control board.

dbEC5d0.jpg

And then the 5 volt transformer and a terminal block for the power rails.

WwhqiB4.jpg

In the next couple of days I expect to have all of this stuff wired up properly and will be able to verify the existing stuff still works. Really hope the rest of the display components arrive soon too.

Link to comment
Share on other sites

The last components I'd ordered finally arrived this afternoon, so this evening I started assembling and testing the display boards. That quickly uncovered another fairly major mistake I'd made designing the PCBs. Half of the pins on my IDC connections between displays and controller are flipped.

j3fbeVf.png

Fixing that is going to be very fiddly, I'll break all of the cables out to a piece of protoboard and link up the conductors manually. But it's doable, and will save me $150 or so and another month of waiting for new boards and replacement parts.

Link to comment
Share on other sites

Half of the pins on my IDC connections between displays and controller are flipped...Fixing that is going to be very fiddly

Even my comparatively 'rough' version suffered a few cases like this - and I checked, double checked, triple checked, had wiring diagrams - everything.

You designed PCBs. That's maddening in itself. So don't feel don't bad. Or too frustrated.

Besides, you heard about the satellite / payload that crashed on reentry a couple years back because of a mixup in units of measure? (KM vs Mile)

Professionals do this all the time, with much greater consequences :)

Link to comment
Share on other sites

I have this:

http://richfiles.solarbotics.net/eb/KerbalCMVideoBoard.jpg

I only wanted the fader lever to use as a throttle, and the smart dot matrix LED alphanumeric display modules (they are hard to see, because the plastic masks many of them very well, unless actually lit). The keys are very nice, and they have removable caps, but there are far more than I'll need, and I have these awesome little clicky pushbutton switches with LEDs that I've wanted to use for YEARS. I've considered desoldering all of these buttons and dropping the leftovers for sale or something. Oh, and they are all illuminated buttons.

Nice, I haven't seen one of these since I went to TV & Film school :)

Link to comment
Share on other sites

Spent all day making four of these and then hated everything.

Iy36ybv.jpg

And then I had some confusion about how to drive the MAX7219 chips I'm using for the displays. That led to breaking some LEDs and scrapping one of my boards, but at 10pm I finally got my code talking to a completed display.

RgEjEbN.jpg

Nowhere near as much progress as I would have liked. But I reckon I can finish up the display assembly on Sunday.

Link to comment
Share on other sites

Spent all day making four of these and then hated everything...

Nowhere near as much progress as I would have liked. But I reckon I can finish up the display assembly on Sunday.

I think that's just how it goes. Slow but steady.

Hang in there! It'll be awesome once its done :)

Link to comment
Share on other sites

Yeah, I know. :) Most of this build has been great, but those cables were the most backbreakingly tedious part of the job. Not even joking when I say I spent six hours soldering those little 26AWG conductors together. Invented a few new swear words along the way.

Today I built an annunciator panel. I'd been avoiding using one in my earlier designs, because I preferred to keep controls and displays grouped by function. There's still some random LEDs strewn around the board, hopefully enough to look interesting. But I've come around to thinking a central annunciator is a good idea after all. So here we are.

Started by using a box design tool to draw up a box with lots of internal dividers, making a series of six compartments long by four deep. Laser cut that out of some scrap perspex and put it together. It's deliberately fairly deep because I had a number of clear LEDs on hand, which have a fairly direct light.

LIMzquk.jpg

I then hand-drilled mounting holes for the LEDs in the base of the box, because some numpty had forgotten to add them to the laser cut design. The box sections were a remarkably tight fit, but I gave the final thing a coat of paint on the interior walls anyway to try to seal any remaining gaps and give it a brighter surface than the black scrap I'd used.

That was all a few weeks ago. :) Today I started by sanding the outer side walls to roughen them up a little, and attached a couple of small angle brackets with superglue. Then I used used the same glue to fix 24 RGB LEDs in to the mounting holes in the bottom.

The LEDs I used for the annunciator, and indeed everywhere else on the panel, are addressable RGB lights. They have a standard 5mm LED housing, but embed a little WS2812 IC. That makes them great for applications like this. I just had to supply 5V to all of them in parallel, and daisychain the data lines together. They end up taking a single pin of your microcontroller to drive, and the FastLED arduino library makes controlling them super easy. Here's what the back of the annunciator looks like after wiring everything together. It looks complicated but it's really not that bad. :D Each column of LEDs has the anode on the right hooked up with red wire, cathode on the left hooked up with black wire, and the data pins run through the middle with blue wire joining columns.

IWgU4D3.jpg

For the faceplate, I loaded up the original box outline in inkscape and used that as a template to draw up a top-down cross-section. Filled the gaps between compartments in black, and then added my labels. Deciding what to put on the annunciator and where was another one of those agonising things that I'll never be certain I got quite right. ;)

Once that was done, I just printed it out on a sheet of blank white paper and cut to shape. Then used a sheet of thin clear plastic salvaged from an old document holder, also cut to shape, as a protective cover. Taped the two together, cut a couple of mounting holes. And then finally bolted the box to a perspex top panel, with the faceplate sandwiched between. The end result:

Dij5cMh.jpg

The paper blocks out a lot more light than I was expecting, this will end up completely washed out in sunlight. But it's functional and I'm pretty pleased with the effect. May try printing another one on a more translucent paper soon, but it's not really pressing compared to all of the other stuff I want to get done.

Link to comment
Share on other sites

That looks so nice! :D

Do you have a link to those LEDs? They sound fun / fascinating!

As an alternative - you could try baking paper? :P

Or you could find some lower GSM paper at Officeworks that could work too :)

Link to comment
Share on other sites

You could also purchase transparency film that is compatible with a laser printer. Even if you don't have a laser printer, you should be able to feed it through a photocopier and photocopy your page. Then you can use any manner of thin material as your diffuser/background, whether you can print on it or not.

Just wanna say that is one very nice looking annunciator panel! Very Cool! :cool:

Link to comment
Share on other sites

Do you have a link to those LEDs? They sound fun / fascinating!

Sure. I've been buying Sparkfun LEDs, part number COM-12986 for the diffused body, or COM-12999 for the clear body. I like Little Bird for a great Australian reseller.

And for some reason it never occurred to me to just print them on a transparency sheet and stick a translucent sheet behind it. That sounds like a more reasonable option. Hrmn.

Link to comment
Share on other sites

That's looking awesome! :D

You could also purchase transparency film that is compatible with a laser printer.

I tried finding some transparency film recently. I asked the friendly staff at officeworks. They just looked at me blankly.

I explained 'over-head projectors'... They eventually understood what I was talking about. But they couldn't help me.

At least, not at the store I was in. Their ebay store has it. Freakin' expensive! o.O

I got water-slide decals that I can print on with laser printer. Eventually I may use these. But I like what I did with my label maker :)

Opaque Perspex would also work with the transparency over it (just trying to think of ways to diffuse the light the best).

Though, that's at least another $20 Aus.

Link to comment
Share on other sites

I did a little bit of poking around, eventually found something at Eckersleys that should fit the bill. It's still something like a dollar per A4 page, but I'd be willing to pick up half a dozen at that price to play with. If Victoria has any of those shops you should check them out.

Oh, this is translucent "tracing paper" film I'm talking about, not plain transparency film. Kind of surprised officeworks doesn't have reams of that stuff lying around.

Edited by stibbons
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...