Jump to content

KSP Controller Build


cyberKerb

Recommended Posts

Hello cyberKerb,

after this difficult period, all the good remains to come.
I am French and I am writing this post with the help of google translate. Be forgiving.
Thank you for sharing your work. Can you tell us what is the name of the KSP mod you use for exchanging information with the arduino card?
Hexagonal friendships, Laurent

 

Link to comment
Share on other sites

  • 4 weeks later...
On 6/6/2020 at 8:25 PM, Iznogoud80 said:

 Can you tell us what is the name of the KSP mod you use for exchanging information with the arduino card?

The mod I'm using is made by Zitronen shown below. I've extended it a fair bit and will eventually share what I've learnt, but it's mostly just experiments at the moment.

 

Link to comment
Share on other sites

  • 2 weeks later...

16.JUL

Today's update is a bit of a shout out to @alexustas again and referring back to the first post all of 1 whole page back (I know... I post updates slowly).

I'd love some feedback if you have thoughts on what I've got so far and if there might be other ideas.

 

I've generated an animation for the planned internal mechanism for the throttle. I think I'll be fine with the electronics, but the pull-out and shove-down option was a bit tricky. I still think I'll used it for "shifting" into reverse thrust, but I suppose it could be used as a staging action. The downside is it would mean I'd have to cut throttle any time I wanted to stage though, which might not be ideal. 

Can't mentioned enough that credit for the design is all Alexustas. I've used that as the starting point and will be trying to bring it into the real world.

The throttle will be motorised to get to full and zero throttle. Other than QOL reasons, it will also help to automatically set the throttle to zero if I switch crafts in game.

Also, there will be another small potentiometer to the left of the LCD (not shown). This pot will have a small lever arm on it to allow me to push fwd and back to set the throttle limit for all active engines that you normally would do via the PAW in game. The current throttle value and throttle limit (if set) will both be visible on the LCD it to character high custom text sprites.

 

I've continued work to confirm the viability of what I want to build for a KSP Mk1 cockpit. I pulled on the reigns a bit after starting the throttle and tried to focus on software development so I wasn't spending money on cool switches and buttons just yet. When you browse cockpit building forums, it's really hard to resist the urge to jump on ebay or whatever and grab a few of the switches I just saw, but not having a detailed plan for where it goes in the cockpit or if it's the right shape, size, style.

My main fear with the project is to get to a point and find out I'd have to compromised whole section of what I want to build because it's just not possible with the limited API that KSP supplies to modders for cockpit builds. 

The KSP SerialIO mod had some limitations that worried me for my build. It was originally created with only 255 bytes to send data to a micro controller (which should be plenty for most people). But seeing as I potentially will be putting up to 800 RPM / MAS mod variables down the pipe to micro controllers for status lights, indicators, dials, displays and whatnot, I needed to know this limit could be completed stomped on.

I've worked out how to both extended that (up to 412 bytes now) and also figured out how to send data to multiple micro controllers at once to distribute the load the the data display outside of the KSP game using only one mod cobbled together for the bones of other mods.

All of this was to make sure that I could build what a want and be confidant that after learning a few skilled and a bit of time, it all should still be possible.

 

House repairs are mostly done, and I'm back in the mood for making stuff with electronics and KSP again. Shed infrastructure is still WIP, but progress is being make each weekend. I've got the CNC bench made and just need to unpack the CNC machine. Oh, also need to work out how that works too. Cheers to progress!

Edited by cyberKerb
Link to comment
Share on other sites

20.Jul

Okie dokie. I tinker of the code fairly regularly, but I don't post updates that often as it's mostly me trying to get code 'just right. I'm going to try something new and see if I can keep focused on this project longer by posting more frequently with smaller updates.

Yesterday I managed to add the drill/harvester information to the data available to sent to arduino / teensy devices. The plan would be to have a 'Harvester' sub panel for the resource gauges / indicators.

It includes the following status flag indicators:
 - Drills Extended (off =no, on=if at least one is extended) 
 - Drills Active (off =no, on=if at least one is actively digging)
 - Active Drill Count (not sure if/how I'll use this value yet)

Also added three numeric values for some indicator dials giving what I'd like to monitor at a glance
 - Drill Core Temp (only give the average core temp of active drills, if at least 1 is active / if none are active, give average core temperature of all drills)
 - Thermal Efficiency (only available when drill are running, so gives average of all active drills)
 - Resource Abundance (I'll only allow this value to be visible on two conditions,  1) I have the surface scanner part on the vessel and 2) the vessel is under the max scanner height, usually 1000m above the ground)

Below is a mockup of what I'm thinking. IT would be using 3 of the cheap rectangle panel meters rotated so they look like quadrant meters. might put a scale selector switch for the Abundance meter. This will allow for x10, x1, x0.1 scaling.

HNZDoIb.png

 

 

Link to comment
Share on other sites

  • 1 month later...
On 6/4/2020 at 11:39 PM, cyberKerb said:

I just need to build a bench for it.

You just need to build a bench ...

for the CNC machine you just got ...

after building a different bench (but not any bench, one with a self-made Biesemeyer fence) ...

for a table saw ...

in a shed (don't even need to ask if you built that, too) ...

because you got weak-in-the-knees for a very specific throttle controller from @alexustas's ASET IVA for the Mk1 Lander Can that makes you go all googly-eyed and stare distractedly at the controls ...

and the gauges...

and the dials ...

(and Lions, and Tigers, and Bears, Oh my!) ...

which will eventually a sundry list of other trinkets you've built over the years ..

 ** breaths deeply **

to put in a cockpit mockup ...

with 4 digit, 7segment LED modules ...

warning light ...

bells ...

whistles ...

a disco ball and ...

a dual-monitor set-up modeling the Mk1 Lander Can viewports.

 

Did I miss anything?  Wait, you forgot the kitchen sink and the snackbar.

You sir are a kerbal among men.  Bless you.

 

(I literally had to go find out what a Biesemeyer fence was ... )

g9Oa3Ar.png

P.S. Following this because you're my newest hero.

Link to comment
Share on other sites

Aug 27

On 8/27/2020 at 6:31 PM, TranceaddicT said:

warning light ...

bells ...

whistles ...

a disco ball and ...

:sticktongue: I don't remember mentioning the disco ball....  but Good guess! ;)   It's been planning to use it  for a while.
Here is my bootstrapped time warp display. I'll rip it apart and have the micro controller do the light display for specific patterns for physic-warp vs high time warp. Might rebuild a POV display for it, but it'll do for a starter item.
Wr04zJkl.gif

 
As for warning lights, I just got delivery for the little dome covers with fresnel lens included - (they are just repurposed pilot light lens covers)
I love these as they match pretty closely to the ASET model

6oBWDx3l.jpg?1voWtRBLl.png
(you can see them in screenshots here from the ASET lander can mod)
So far, I've allocated them for the 'RCS' & 'SAS' lights. 'Contact' & 'Gear deployed' lights. Red will be a 'Master warning light'. I've got an Amber lens on order for 'Master caution'. Yes, I know I'm starting to veer into Flight Sim cockpit territory, but I had to get inspired from somewhere other than KSP. The clear light is undetermined as yet, but maybe something to like a science alert.

No plans for bells or whistles... yet.

For dials and displays, I'm just starting the 3 hand altimeter (another construction guide nabbed from a flight sim blog. Very interesting work Mike has done. His home made altimeter is towards the bottom of the linked post and very inspiring). One stepper motor will drive all three hands with a 1:100:100 gear train connected to three concentric shafts.  No store that I found sells 3 shaft stepper motors. Was only able to find dual concentric shaft ones. They just means I'll have to fabricate it myself. Working with brass tube is new for me, but what isn't in this project :D 

I'm yet to mount these beauties too... I left them alone in a dark corner to multiply and now there are 20 22 of them now. All Most are already allocated to various displays in the cockpit, they are only 6.5cm tall, but I've got one that is 6inch tall and that one will be horizontal for the Atmosphere depth gauge you normally see at the top of the KSP GUI

GWVd5nVl.jpg

Resources (switch to toggle between stage amt /total vessel)
 - LiquidFuelTotal 
 - LiquidFuel
 - Oxidizer
 - SolidFuel
 - Xenon
 - MonoProp
 - Ore
 - Karborundum (Mod / not stock)
 - Ablator
Power
 - ElectricCharge
 - SolarPanelEfficiency (horizontal on power display dash)
Navball related
 - PitchRate 
 - RollRate (Navball related)
 - HeadingRate (Navball related)
Propulsion
 - EngineTemp
 - ThrottleLimiter
 - ThrottleValue
 - TWR
 - ReactionWheelAuthority
 - RCSLimiter

 

Throttle note: While looking back at the 3D throttle model I made, I later worked out how to straight up import the ACTUAL ASET MODEL into sketchup. Took a bit to find the process, but after using a blender plugin to open and convert it to a DAE file, it worked fine. While I wish I'd know that BEFORE I hand-crafted it from isometric views, I promptly deleted that exact ASET model and I'll keep utilising my own version, flaws, warts and all. Oh well, live and learn something. It helped learn 3D modelling, so I can't really complain as I'm not going to an accurate replica anyway, just something close.

 

Thanks for the interest.

The shed came with the house, but I suppose now I think about it, you're not wrong.  I did gut it back to bare metal and installed framing, insulation and OSB panels. No paint as yet. Mainly did all that to take the sting away while working in there during Australian summers. I didn't anticipate this KSP cockpit to be the major project at the time, but it works.

Your post made me think I should post some pictures on what I've managed to get done in the shed last weekend. As it wasn't strictly KSP related, I never thought to post anything about it. The CNC bench was done a few weeks back. But last weekend I got the CNC frame and waste board constructed, just need to round over the edges. Saturday is when I get to add the X, Y & Z axis to the machine, hoping I have enough time to wire it up as well.

Until then, I've added these view I make in sketchup for the planned benches I made.

N9Ga7NJl.jpgMfrGMREl.jpg

Spoiler

Uk0Nf7fl.jpgdcIyY6Ol.jpg

And what they look like after construction. The above table saw photo is old showing the crappy Ozito table saw. Below is the latest that shows the DIY Biesemeyer fence and replacement Makita Saw (Ozito wasn't accurate enough - I've got the Makita down to a 0.5mm wobble at the saw kerf. Need to do a replacement zero clearance insert. Also shows the CNC mid-construction on the other bench.

DUbKTrkl.jpg95JvIh1l.jpg

 

Edited by cyberKerb
Link to comment
Share on other sites

  • 2 weeks later...

Hey! I really like the build! I've been wanting to build my own controller for a while and am wondering what I need. I know I need to make a controller (duh) and need an Arduino (and LCD screens/ LEDs for coolness) but I don't know if I need to write a mod or if I just need to write the code for the Arduino?

Edited by Kerminator1000
Link to comment
Share on other sites

2 hours ago, Kerminator1000 said:

Hey, I've been wanting to build my own controller for a while and am wondering what I need. I know I need to make a controller (duh) and need an Arduino (and LCD screens/ LEDs for coolness) but I don't know if I need to write a mod or if I just need to write the code for the Arduino?

It's mostly just writing code for the Arduiono. In that you have two options,

You could just make a keyboard emulator using a Arduino, (only certain models can be seen by the computer as a keyboard, UNO cannot) you'd then need to write an Arduino script/program that listens to button presses and sends the desired key press to KSP. KSP let's you remap the controls, this will help avoid conflicts. The issues is not all controls are mappable. (Eg park brake) it's also a one way connection, no displays as the keyboard only sends information.

The alternative is to use a mod that takes the information from the game and makes it available to interact within the arduino code. This includes both vessel controls and information displays.
Plenty of options here, I've listed a few below. (I'm using KSP Serial IO)
KSP Serial IO
KSPEthernetIO
Kerbal Simpit
KrPC
Telemachus

Check this link out and browse through people builds so you get an idea of what's out there.

There isn't really much in the way to avoid programming at least something. @hugopeeters project is the closest to having complete plans available where you would do minimal programming. However, you'd be building that controller, and not something that you might want to modify.

Edited by cyberKerb
Link to comment
Share on other sites

  • 3 years later...

Yep - just been on pause with other projects - but it is still a goal of mine.
I'm just returning to KSP1 and I'm currently trying to investigate which version of KSP works with the KURS camera mod. I need that for my split screen / dual monitor cockpit view

Having said that, I finally got that 3D printer I needed for this project now, but I'm thoroughly distracted with wanting to made a scaled landercan model for one of the old KSP sand Shapeways models I snagged before Squad pulled them from sale.

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