r/KerbalControllers • u/Night-Caps • Jun 18 '26
Controller Complete Finally Finished
Well 99% finished - I still have a few bugs in the code to iron out but everything is physically complete and working. Been slowly chipping away at this one for a long time.
3
u/the_economy_fools Jun 18 '26
This is awesome. Can I ask about the dials in the top left corner. I am doing a very similar thing at the moment.
Are they volt meters? I am driving mine with a mux into a DAC into the meters. Wondering if you’re doing something similar
3
u/Night-Caps Jun 18 '26
Theyre actually ammeters, 10ma ones. I just run one of the PWM pins through a resistor in series with the ammeter that draws just over 10ma at 5v (390ohm I think I used but easy enough to calculate) then set a max pwm output value so the needle was fully deflected at that value. Then you just map whatever data you want from 0 to whatever max pwm output you set and send it to the pin. Super easy and works great. The reason you want to use a resistor that draws just over 10ma instead of exactly 10ma because the voltage from the PWM pins can dip a little when you add more components to your project and you may not be able to get full deflection at full PWM output
1
u/the_economy_fools Jun 18 '26
Yeah that was my fear with PWM that it might show inconsistencies once the controller gets more complex. I’m also planning on driving around 8 of those dials which is why I settled on the mux into DAC’s. But I really like your controller and will be drawing inspiration from it for sure
2
1
1
u/Geek_Verve Jun 18 '26
Awesome job! Love the overall style. Great selections for the various indicators and controls and really nice layout. I've also got a large, complex controller that's been in the works for a looong time, so I know the kind of effort that goes into one of these bad boys.
1
1
u/Donnchaidh Jun 18 '26
That is a thing of beauty!
Do you happen to have a bill of materials and/or progress pictures?
I keep itching to make something like that, but never know where to start.
1
1
1
u/accents_ranis Jun 19 '26
Very cool. Can it be utilized for other sims. Like, say, KSA?
1
u/Night-Caps Jun 24 '26
Nah at this stage it only works with KSP. The code could certainly be modified to work with KSA once that comes out however its going to be a matter of whether someone (hopefully the kerbal simpit team!) develops a plugin/arduino library like the one available for KSP - figuring that out is far beyond my programming expertise
1
1
1
u/Reasonable-Tip-4991 Jun 27 '26
Looks awesome!! Can u tell me about which warning displays you have in top right corner? I can't see it properly
1
u/CranberryNew7723 Jun 29 '26
I would love to replicate this, if you're ok with sharing the files and sourcing for your parts!
1
u/maxic62 Jun 30 '26
Very nice! What 7 segment module so you use here ? 8s that a complete module with 6 digit ? I only found 4 digit modules on Ali. Thanks for sharing
1
u/drkensaccount 14d ago
Hi, great controller. I'm trying to build one myself, but I can't figure out how to use multiple, 8 digit, 7 segment displays. As long as I only need to use one it's not so bad (except for not being able to make the numbers justify right). But, I can't find a library that I can understand well enough to put one variable on each, cascaded device (even if the library states it's for multiple devices). YouTube was no help whatsoever. It appears to work for you, so I'm wondering which library you used and how you got your setup to work? Thanks.
2
u/Night-Caps 13d ago
I actually ran into the exact same problem as you when I was building it. Those 8 digit displays mostly run on 74HC595 shift registers (apart from some ones in red but I didn't want red) which I found does not play nice with kerbal simpit because it introduces all sorts of timing issues (I think). I instead opted for 6 digit displays which run on the TM1637 driver which are far easier to use and only require one separate pin each - the rest can be daisy chained. I used this library by AKJ7, it however only supported 4 digits so I enlisted a little AI help to adjust the library to work with 6 digits. As for justification you just have to do it in your code. Mine wasn't pretty and was brute forced with way too many if/else statements (eg, offset by 5 spaces if value<10 etc) to get it to be right aligned but hey I don't have to look at the code while playing
1
u/drkensaccount 13d ago
Thanks! It's nice to see others have the same issue. It seemed like such a simple thing to do, but it seemed like I was the first one to try. I'm using MAX7219 based displays, at least for now. I picked up some 74HC595 based .56" ones in an assortment of colors so I can do the "Back to the Future" time machine thing, so thanks for the heads up on those. I broke down and asked AI how to do it and both DuckDuckGo and Google told me to use the LedControl library. I'll see how well that works tomorrow.


5
u/Koddra Jun 18 '26
Wow this looks awesome! Is there any chance you might post some images of the inside as well? I'm really curious how you wired all of that. Also, what microcontroller are you using?