Jump to content

Custom hardware / simpit repository. For people who take KSP a little too far.


Mulbin

Recommended Posts

11 hours ago, richfiles said:

I highly recommend looking into a Teensy if you wish to create a "universal" HID controller, that interfaces like a gamepad, vs the way KSP Serial I/O does it.

I'm using an Arduino Pro Micro clone for emulating joysticks in my project. Any 32u4 based arduino board can emulate keyboard and mouse right out of the box. Emulating joysticks requires an addon library (ArduinoJoystickLibrary) but it's trivial to use if you have 1.6.6+ of the Arduino IDE. (It was trickier in previous versions)

KSP however has a strange quirk in the joystick handling. If I have several arduinos and emulate one joystick on each, everything works as expected. If I have a single Arduino and emulate two or more joysticks on it, KSP becomes confused of which joystick has which axes. You can assign the x-axis of one emulated joystick and KSP still tries to read values from the same axis on another joy during gameplay in an unpredictable way. The joystick buttons on the other hand works just as expected even when using multiple joysticks on the same Arduino so it's simple to use more than the 32 buttons per joystick that windows is able to handle.

I solved the problem by writing the same axis values to all emulated joysticks at all time thus eliminating the need to predict any behaviour on the KSP side. This had the downside that I had to add an extra axis to the USB descriptor of each joystick in order to have enough different axes for rotation, translation and throttle.

Link to comment
Share on other sites

In general ksp has some strange problems with joysticks. Mine used to work, but the current version makes it super sensitive, and it completely ignores the axis bindings...I had thought it was do to its age. cough ms precision pro cough, but several people seem to be having issues :(

Link to comment
Share on other sites

  • 2 weeks later...

My basic understanding of Raspberry Pi is that it's more like a tiny computer, complete with a light Linux OS, rather than an embedded microcontroller, like Arduinos. All you need then is a Pi with Ethernet or Wifi to connect to Telemachus, and then you can go from there, like @Freshmeat said.

Link to comment
Share on other sites

Looking at doing a desktop mounted panel, with a auxillary mount for my stick and throttle, with spaceball for docking/eva control, and a small switch/indicator panel. Considering doing a touch screen monitor for readouts....does anyone know if you can export mechjeb controls, orbital map, and nav ball out? (Would break monitor into 3x zones, one for each.)

Link to comment
Share on other sites

Ship attitude is currently outputted, and work is being done on the node vectors.

MechJeb is currently not handled, as far as I know. Someone mentioned wanting to add that functionality, but I'm not aware of any progress.

You could, in theory, create an orbital map by knowing the absolute universe time, the SoI, and all the orbital data. I think that's all there, but you pretty much get to package it on your end. You'll need to have the data for every body and every SoI, so you can render that stuff on the screen. Beyond my skill level, unfortunately. I'd love to see an orbital display created though. It'd be awesome! Even a dual 2D configuration would be cool. A top down and an edge on view would still provide good info, and maybe two keys to rotate the view angle, and two to zoom in and out? Maybe?

Link to comment
Share on other sites

@artwhaley has been doing some hacking integrating MechJeb with kRPC, but I'm not sure if it's a user friendly state yet. It's very easy to get enough data out of the game to render your own orbital map, and I know that the KeRD interface to telemachus was rendering a full 3D orbital view.

Actually, thinking about it some more, KeRD also had a navball. I suspect the easiest way to get up and running might be to just start using that.

Link to comment
Share on other sites

14 hours ago, richfiles said:

MechJeb is currently not handled, as far as I know. Someone mentioned wanting to add that functionality, but I'm not aware of any progress.

Someone was working on integrating Mechjeb controls to kRPC a couple of months ago. I don't know if the patch has made it into the official release but there was a working fork done for 1.0.5 last time I checked.

Link to comment
Share on other sites

  • 2 weeks later...

Eew! Too much glass cockpit! I need toggles! :sticktongue:
In all honestly, if you got yourself a few spare monitors, and set them up in portrait mode, you could probably recreate a LOT of what's there using Telemachus.

I have, fortunately, overcome one of my minor, but still project impeding hurdles... I replaced my printer!

Printer_HP.jpg

It's HUGE! That APC machine below is an uninterruptible power supply that mounts into a 19 inch equipment rack. With this, I can now print replacement meter legends, as well as new button inserts for my DSKY and my new keypad...

KerbalCM_Hakko927Keypad_DSKY.jpg

The keypad is to control a Hakko 927 Soldering station. I'll be building the soldering station into the Kerbal control panel, and mounting the socket to the front of the unit. I've mentioned before, that I sometimes like to take small projects to my desk to work on. A soldering iron built into my Kerbal controller will be nice! I need a 24 volt transformer to provide power for the current loop meters I have, and Hakko soldering stations run on 24 volt supplies. A pair of toggles will be available to power on the transformer and current loop hardware, and at the other to power not he transformer and the soldering station. Either switch will power up the transformer, but will also connect the appropriate device so it receives power. The keypad will have legends printed to match the DSKY keypad (obviously haven't done that yet). I had considered letting a button on the DSKY keypad control the Hakko board, and I might still do that, but I really wanted to throw together that little keypad, just because I like how it looks. I'll be replacing the red LED displays with green ones, on the Hakko board, so it matches the rest of the controller. The Hakko works perfectly fine, but was knocked off a work bench, and the case broke all the screw posts. If you have never used a Hakko soldering iron, you are missing out. They are, by far, the best brand of soldering irons I've ever used! I have a couple Hakko 936 stations at my workbench, with two different sizes of handle. The Chinese clones truly are no match, but on a budget, they certainly will do the job if you can't get a genuine Hakko.

KerbalCM_Hakko927Keypad.jpg

Also got a dual tracking power supply for my workshop, as well as a hot air rework station! I popped the top to examine it, before first powering it on (it was bought used). Everything checks out, and it works great! :D

PowerSupply_GWI_30v-2a.jpg

Edited by richfiles
Link to comment
Share on other sites

Nice article there!

I'm going nuts right now! :confused: I finally have that printer, but I have a solid week or two of rush work, but I suspect I'll have to pick up more work after that. it's killing my free time, not cause I don't have any, but I've been set back cause my OTHER job had someone call in three days in a row, and I had to come in early and stay late more than half the week. On top of that, the whole month of May is entire;y derped up, and I'm covering extra weekend shifts! Part of me wants to sit down and start screwing around with this stuff. The fact that I now have what I need to start doing meter legends is a big deal for me! The fact that I can't... Well... AHRGLEBARGLE! :0.0: That is a legit word. Totally true... It means "Frustrated!", including the exclamation mark! :P

Soon™

Link to comment
Share on other sites

So I've had an idea, and if it is possible I'd imagine it'd be quite easy to do, but it might not be possible at all, I'm not sure.

The idea is to get a small (6-7 inch) portable CRT TV, possibly put it in a new housing (just for aesthetics), connect it to my computer, and (this is the bit I'm not sure about) use it to display the Navball/Docking Camera/Pretty much anything that a Raster Prop Monitor display would show I guess.

The problem is I have little experience with this kind of thing and I don't even know where to start with the last part, although the rest sounds relatively simple. Any ideas?

Edited by BlueCanary
Link to comment
Share on other sites

I had the same idea for my project.

There are multiple ways to do it, the first way would be to use a vga to rca converter and connect the tv to the computer as a second monitor. This may work for you but for my project I'm going to be running a 3 to 4 monitor eyefinity so all the outputs on my main computer will be used so this solution will not work for me. The problem is getting a rpm like gui on the screen, one solution is Telemachus it has a few user made Interfaces https://github.com/richardbunt/Telemachus/wiki/Alternative-Telemachus-Interfaces as for docking cameras I have no idea how it could be done.

The second option is to use a this plugin and the tvout library, but this requires coding a custom gui. The problem with this option is its slow and you could not do graphics like a navball or docking cameras, it would look like a 70s - 80s terminal ui so this is probably not what you are looking for.

Another option would be to use a raspberry pi as a slave computer, a raspberry pi has a composite video output build in so there is no need for a converter and a raspberry pi is powerful enough to run telemachus or a very complex custom gui. This is the solution I will be using for my tv display.

 

There may be other options, but these are the ones I have come up with.

 

 

Shawn

Edited by Krewmember
Link to comment
Share on other sites

13 minutes ago, Krewmember said:

There are multiple ways to do it, the first way would be to use a vga to rca converter and connect the tv to the computer as a second monitor. This may work for you but for my project I'm going to be running a 3 to 4 monitor eyefinity so all the outputs on my main computer will be used so this solution will not work for me. The problem is getting a rpm like gui on the screen, one solution is Telemachus it has a few user made Interfaces https://github.com/richardbunt/Telemachus/wiki/Alternative-Telemachus-Interfaces as for docking cameras I have no idea how it could be done.

The second option is to use a this plugin and the tvout library, but this requires coding a custom gui. The problem with this option is its slow and you could not do graphics like a navball or docking cameras, it would look like a 70s - 80s terminal ui so this is probably not what you are looking for.

Another option would be to use a raspberry pi as a slave computer, a raspberry pi has a composite video output build in so there is no need for a converter and a raspberry pi is powerful enough to run telemachus or a very complex custom gui. This is the solution I will be using for my tv display.

 

There may be other options, but these are the ones I have come with.

Thanks for the advice, sounds like the Raspberry Pi is the nearest thing to what I want to do, so I guess I finally have an excuse to buy one now.

Just out of interest, which of these do you think would look best for the monitor (bearing in mind the rest of the stuff I'm planning is mainly analogue gauges, a physical version of the KSP altimeter (maybe based on an odometer or something), kind of 1950s/60s/Vanilla KSP style):

Normal LCD display - probably the easiest to do I guess, or a colour CRT, or a black and white one? I'm thinking a really old, flickery, black and white CRT could look really cool, but also might not have as many options for how to use it as a colour display. Also apparently CRTs are really dangerous when you remove them from their housings? I'd be wanting to put it in a nicely painted case with a bunch of toggle switches and things and apparently that's a great way to blow fingers off.

Edited by BlueCanary
Link to comment
Share on other sites

Tiny black and White CRTs are actually extremely clear and crisp, so long as they are functioning correctly. That's because they operate by lines, rather than pixels. If the circuit can handle it, you can pack a lot of horizontal resolution into a line, and adjacently lit "pixels" actually are seamless.

Color CRTs and LCDs split all pixels into quantitative regions, both horizontally and vertically. This creates clear divisions in resolution. LCDs and OLED displays can now be purchased with very tiny, almost imperceptible pixels, allowing the image quality to surpass classic B&W CRTs, cause the pixels are small enough to be seamless vertically and horizontally.

Color CRTs will have the most visible pixel separation, as they will have the largest pixels, generally. Figure on most small color CRTs giving you around 300x200 to 340x280 resolution, roughly. Depends on model. That being said, occasionally, you can find a very nice, decent resolution CRT. My color CRT is a 3.5 inch RCA model, and it actually has great color and resolution. No higher than other portable CRT TVs, but due to the smaller 3.5 inch display, the pixels are more densely packed, and I find it still looks decent, even up close. It's by no means HD... Something you COULD get in an LCD, mind you, but for a navball, it ought to be possible.

RCATVpicture.jpg

And DEFINITELY go Raspberry Pi if you go with a CRT. It's designed to produce a composite video output. You will struggle to do this on other boards. If you go with an LCD, then you could probably get away with using some other device without composite out, like a Teensy. Those still have a decent amount of CPU oomph, giving you enough room to work on the math and graphics elements of the software. A Raspberry Pi still works absolutely fine with an LCD as well. It's actually STILL more convenient with the Raspberry Pi, since most (all? *Zero?) will directly take an LCD display.

 

*Correction: Raspberry Pi Zero does not take an LCD... Because it is a unicorn, and does not exist! Anywhere!
Can't take an LCD if you don't exist... Anywhere! :rolleyes:

Disclaimer: I really do not know the Pi Zero specs, other than the spec that defines it as not existing anywhere I can get one. :confused:

Edited by richfiles
Link to comment
Share on other sites

7 minutes ago, richfiles said:

Tiny black and White CRTs are actually extremely clear and crisp, so long as they are functioning correctly. That's because they operate by lines, rather than pixels. If the circuit can handle it, you can pack a lot of horizontal resolution into a line, and adjacently lit "pixels" actually are seamless.

Color CRTs and LCDs split all pixels into quantitative regions, both horizontally and vertically. This creates clear divisions in resolution. LCDs and OLED displays can now be purchased with very tiny, almost imperceptible pixels, allowing the image quality to surpass classic B&W CRTs, cause the pixels are small enough to be seamless vertically and horizontally.

Color CRTs will have the most visible pixel separation, as they will have the largest pixels, generally. Figure on most small color CRTs giving you around 300x200 to 340x280 resolution, roughly. Depends on model. That being said, occasionally, you can find a very nice, decent resolution CRT. My color CRT is a 3.5 inch RCA model, and it actually has great color and resolution. No higher than other portable CRT TVs, but due to the smaller 3.5 inch display, the pixels are more densely packed, and I find it still looks decent, even up close. It's by no means HD... Something you COULD get in an LCD, mind you, but for a navball, it ought to be possible.

And DEFINITELY go Raspberry Pi if you go with a CRT. It's designed to produce a composite video output. You will struggle to do this on other boards. If you go with an LCD, then you could probably get away with using some other device without composite out, like a Teensy. Those still have a decent amount of CPU oomph, giving you enough room to work on the math and graphics elements of the software.

Awesome, I think I'm going to go full 1950s-60s and get a black and white CRT then. Will I need to get one with a composite video input or is there a way around that, since most of the ones I've looked at on ebay don't seem to have one?

Link to comment
Share on other sites

4 minutes ago, BlueCanary said:

Awesome, I think I'm going to go full 1950s-60s and get a black and white CRT then. Will I need to get one with a composite video input or is there a way around that, since most of the ones I've looked at on ebay don't seem to have one?

If you get a tv that has no composite video input you can use a rf modulator.

 

Shawn

Link to comment
Share on other sites

A lot of portable B&W CRTs have a small jack on the side that can be used for video input. Sometimes it requires an adapter (they use a plug like earphones, not RCA jacks). Sometimes they have a similar connector marked antenna. This is not the same. You'll need a modulator to connect to that, along with an adaptor. One of those boxes that lets you plug composite video in and get a channel 3 or 4 signal out over coax, that's what you'd need for a TV with that style input.

If you're not familiar with the high voltages used in CRTs, be careful. Depending on CRT size, voltages can range from several thousand volts, to over 20 thousand volts. Most small TVs will be int he thousands of volts range. I once burned/electrocuted my fingers on the bottom of a flyback transformer, on part of the horizontal circuit. It was on a Macintosh Performa 550 (around a 1993, all in one Macintosh computer). It had these two plastic ridges on the side that were perfect for picking it up by, so one day, when aligning the CRT, I instinctively grabbed the rails to adjust it's position, and instead grabbed onto high voltage. I lost the ability to see in color for about half a minute, and it hurt like a somebeach. My whole body went numb, and I was dazed for a good minute. I think I eventually figured out it was either 4 or 8 thousand volts, at the horizontal refresh frequency. It put what looked like 2 "whitehead pimples" on my finger tip... These were actually mounds of white ash. there would have been a path of similar white ash traveling from one finger to the other. had that been hand to hand, I'd be dead, and it would have gone through my heart, so BE CAREFUL with CRTs. PLEASE.

Honestly, you can actually mimic the CRT look with a high enough resolution LCD, and still get color node markers and such. Think Fallout style imagery.

If you use the CRT, exercise caution. If you are inexperienced, you might be better building an enclosure around the existing whole portable TV. It's the safest option. If you have some electronics experience, and are willing to go further, take safety precautions. When working with high voltage, work with one hand only. do not let other parts of your body be grounded. If you must be grounded, make it the hand you're working with. Wear insulating gloves. Learn how to discharge capacitors and the anode of the CRT... safely! Also, assume everything is live!

 

Oh yeah! Those are called old rules of thumb for working with high voltages... cause only people who follow them get old:P

Edited by richfiles
Link to comment
Share on other sites

Another option, if you decide to go the safest route and use an LCD, is if you can get a rectangular lens, you can not only mimic the imagery of a CRT using an LCD, but even mimic the curvature of one... And ironically, due to the small size of portables, few portables have the CRT curvature of vintage CRTs anyway! You can get a cheap rectangular magnifying lens to do this trick, and it'll cost very little, and be very safe.

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