-
Posts
35 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by mountaineerman
-
Top-notch, professional job. Way to go!
- 231 replies
-
- 1
-
- totm jan 2022
- arduino
-
(and 2 more)
Tagged with:
-
There's been some interest about a guide for how to build a custom Kerbal Control Panel, so here is a high-level guide to the steps involved. I'll take you through the general flow, but something worth mentioning is that design is not linear - many things influence one-another. You often learn things you didn't know along the way. If you go into your build with that mindset, you can turn unexpected turns into happy accidents. Let's jump right in! Brainstorm Think about your Budget Tools Workspace A note on Documentation High Level Design Prototyping Detailed Design Circuit design Pin assignment Bill of Materials (BOM) Cardboard Aided Design, again! Computer Aided Design (CAD) Purchase stuff Prototype again! (Circuit Validation) Build casing Install Components, Wiring Programming 1. Brainstorm What do you want to build? Make a list of things that would be cool features you want your panel to have. Try sketching it out. Here are some sketches from my second panel design: Look at what other people have done. In our day-to-day lives, copying other people's ideas is looked down upon. But in this case, if someone did something you really like, include it in your work! Just be courteous and give credit where credit is due. Here are some ideas to get you started: Mulbin's Custom Hardware / Simpit Repository Real spacecraft and airplane cockpit designs Fiction: Books, Movies, Shows, Anime, you name it! Browse random electronics on Digikey Finally, break out the cardboard: 2. Think about your Budget Ah, yes. Flying high above Kerbin with daydreams of how cool that panel will be - a giant button to help blast off to other worlds; lights and sounds blaring in alarm at a steep re-entry trajectory; a joystick to masterfully complete that orbital rendezvous - we face our first obstacle - can you afford this? How much are you willing to spend? Your budget will strongly influence your design. Here are some ballpark numbers based on my experience. These numbers include only the materials involved. Things not included: tools, workspace, casing. Budget $150 For this pricetag, you should be able to add some nifty components to take your game to the next level. Buttons, Switches, and Joysticks are simple and affordable components. Medium $300 (Mk1 panel) Burn a Kerbol-sized hole in my wallet $2000 (Mk2 panel) Something often overlooked when thinking about budgets is time. Your time is precious and finite, just like your money. Keep it in mind. 3. Tools Depending how you build your casing, the tools will vary. For the guts of your build, here's what you'll need: Pair of eager hands Ruler/measuring tape Screwdrivers/Alan Keys/Wrenches Wire cutters Wire strippers Soldering Iron. You don't have to break the bank here if you do not often find yourself hunched over electronics. You can get a basic one for $30 from a hardware store. A soldering iron is a stick that gets hot to melt solder. As with anything though, if you look for fancy stuff, you can spend an arm and a leg. Multimeter. Look for one with a continuity test feature (beeps on closed circuit). Breadboard 4. Workspace A lot of us don't have the luxury of space. Don't give up, get creative! I renovated my laundry 'closet' to have a little space for projects: 5. A note on Documentation This seems really trivial, but spend a bit of time thinking how you want to track your documents for your panel. It can be as simple as a folder on your computer or as complex as a collaborative, version-controlled, cloud-hosted repository. I use git and github for my projects. Word of warning: git is not the most intuitive tool to learn. 6. High Level Design So, you have some idea of what you want as your end product. What next? It's time to dive a little deeper into how this box of parts will do something joy-producing. 2 good questions to answer at this stage are: 1) What are the "big boxes" in your panel? 2) How will your panel interface with your computer? KSP's awesome community has developed multiple tools to help with this: KSPSerialIO KSPEthernetIO kRPC Telemachus For my Mk1 panel, I had an Arduino Mega interfacing with every input and output directly. The microcontroller communicated to the game via KSPSerialIO. For my Mk2 panel, I also have an Arduino Mega at the core of the panel, but the numbers inputs and outputs has grown substantially, so now the Mega will talk over serial connections to a variety of other chips, including LED Driver Boards, Stepper Driver Boards, a Multiplexer (MUX), and so on... 7. Prototyping If you are new to the world of electronics/programming/circuitry, this is a good point to get your hands dirty. Get some basic components and experiment: there's vast resources online (like Instructables) for Arduino and Raspberry Pi projects. This will give you the foundational knowledge to prevent banging your head against the wall in the steps below. A breadboard comes in very handy here. Some ideas: Flash an LED Use a switch to control an LED Make a clock using 7 segment displays 8. Detailed Design This is a big one. Time to get to the details. During this stage, you'll work on: Circuit design Pin assignment Bill of Materials (BOM) Cardboard Aided Design Computer Aided Design (CAD) I highly recommend including links to the components you plan on getting, you'll want to refer to any dimensions or properties later on. See the next section for a list of suppliers. "But wait!", you're saying. "We already did Cardboard Aided Design! This guy is losing it." As much as it seems like extra work, this is the time to understand the ergonomics of your design. Say your control panel is uncomfortably high on your table: it's much easier to chop a cardboard box than a metal box. Especially if that box has a bunch of electronics in it, all nicely arranged, wired, and working. You'll notice in the pictures below there was quite a large evolution. As an optional step, depening on how complicated your panel is, you will want to model it using a CAD software. This is a must for techniques such as 3D printing, water-jetting, laser-cutting, and CNC machining. I use a program called Fusion 360. It's free for Hobbyists. 9. Purchase stuff Nuff said. Here are some sites I've used for getting parts (I live in North America): Scavenged electronics! Digikey Adafruit Sparkfun Elmwood Electronics (Canada-specific) Ebay AliExpress 10. Prototype again! (Circuit Validation) Now that you have (most) of the parts for your panel, test out how things work. You'll likely discover things you didn't plan on, which might impact your design. 11. Build casing Create the framework that will hold everything together. Materials I've seen used: Cardboard Plastic (3D printed as well as) Wood Aluminum If you do not have a tools or experience to do this, don't fear! You have some options ahead of you. Makerspaces have been growing in popularity, so have a look to see if that is an option for you. They often hold courses on woodworking and metalworking. Alternatively, you can contact a Machine Shop in your area to build a panel for you. This is where having a CAD model comes in extra handy. 12. Install Components, Wiring Mount your components and hook up! This is a very satisfying part of the process, as all the previous hard work starts to take shape and come together. Some tips: Colour-coded wiring comes in very handy. For example: Red = +5V Green = Ground Yellow = Digital Input Blue = Analog Input Modularly test your connections. Don't wait until the very end. Imagine finding a faulty connection in the wiring below after you have hooked everything up! Organize your wiring. I cannot stress this enough. You will make mistakes. You will need to troubleshoot them. Wire organization is the way to keep yourself sane during that process. 13. Programming We're almost there! Time to bring your panel to life. Before I talk about the tools you can use, I have a couple tips on your approach: Use Test Driven Development. This is a software development process in which, as you may have guessed, you create a test for your software before you have written the software. In our case, you could have a test for your LEDs, switches, etc. before they are connected/wired/integrated. As you connect them, you can run a little test script to see all your LEDs turn on, all your switch positions are picked up, and so on. Wikipedia has some more high-level information: https://en.wikipedia.org/wiki/Test-driven_development Test your backbone first. For example, if you've chosen to run your panel using an Arduino that talks to KSP using KSPSerialIO, test that your Arduino can talk to KSPSerialIO and to the game. Before you build anything! If you encounter problems here, it would be an enormous shame if you spent the last 6 months building your panel, only to be unable to interface it with the game. There are many methods and technologies you can use for programming. Here are some ideas if you are looking for a place to start. I will assume you are using an Arduino microcontroller to run your board: A) Keep it simple! Use the Arduino IDE (Integrated Development Environment). You'll need it to upload code to your Arduino anyways. It comes with a handy Serial Monitor which is a console with which you can output information to your computer screen. Very handy for testing. B) I know a thing or two about programming. Take me to the next level! Use an editor (e.g., Notepad++) and Version Control (e.g., git). Using an editor will give you greater control over things like indentation and syntax highlighting. Version control will allow you to manage your code as it grows and evolves. It also allows you to work collaboratively with a team on the same software. C) Most technical Use a professional IDE (e.g., Dev-C++, Eclipse, Visual Studio) and Version Control. They come with a variety of tools such as code auto-completion, a debugger, file management, and so on. That's all I've got! If you are interested, here are my control panels: Mk1: https://imgur.com/a/GFKPg https://www.youtube.com/watch?v=Nv8L_1PuXVM Mk2: https://photos.app.goo.gl/uBJ7KsR7KzYfuSmy6 https://forum.kerbalspaceprogram.com/index.php?/topic/167552-kerbal-control-panel-mk-ii/
-
Cardboard Aided Design - complete!
-
Ah, I think I understand now - thanks! Mentally picturing that at perpendicular to the slope, it is all pitch that indicates the slope angle; and parallel to it, it's all roll. Now I see why you need both!
-
I think I am missing something - isn't VData.Pitch just the incline of the rover, assuming the probe core is oriented the right way? Best $27 dollars I ever spent was on this game! No other game has ever come close to captivating my imagination, fueling my interest to learn more about space exploration, and pursuing it as a career! Sounds like a beautiful trip. I am so glad for this forum! I live in Vancouver, Canada. There isn't that many of us who want to build these control panels, so it would not be possible to connect with like-minded people without the internet.
-
Are you converting from degrees to %incline? Haha, my partner teases me about how ever since I've become obsessed with this again, that it's been months since I've actually played the game. Wow! Those are pretty awesome projects. How was the polar circle?
-
@ajden, that is a work of art! Such clean design, such elegant work! I just did several double-takes. Professional looking pictures too - ahhhh - so many things to compliment. I too, am curious about where you got such wonderful parts! I would love to use the switch guards, paddle toggle switches, and plastic-cover-backlit-pushbutton switches in my own build.
-
I like your idea about using the top switch on the joystick for switching rotation/translation, I will use that. Good point about wanting to know the angle of slope for a rover, I will add that in too! Thanks very much for your ideas, is your own mk II project still in progress?
-
In my experience, using an off-the-shelf joystick was quite inconvenient: switching between rocket/plane mode (yay, mods!) used to be a hassle, and at times I found the sensitivity to be more difficult than just using the keyboard. One of the key elements of the Mk II Konsole is it aims to customize the joystick experience. As I see that you have done @Freshmeat, I intend to add sensitivity control too - but mine will be a selector twist-switch with settings of 25/50/75/100% sensitivity. Additionally, I plan on using the one joystick for it all! Translation, Rotation, Rover-ing (mode selectable via a 3 position toggle switch), as well as Rocket and Plane mode (toggle switch). Thanks for the tip about the PSU - if I run into any issues with my wall-adapter, I will check it out!
-
Thanks, will do!
-
Thanks! I wish I had known about aliexpress, but too late now I suppose. My reasoning for using the secondary power supply is a concern that I will overload the DC-DC converter on the Arduino. My preliminary tally is to drive 127 input/outputs. Along with the 12 stepper motor coils, it would be a substantial load on the dinky 3x3 mm converter - quite certain to overheat it.
-
Lovely, thank you very much! I will have a look.
- 231 replies
-
- totm jan 2022
- arduino
-
(and 2 more)
Tagged with:
-
More pics, as requested
-
Hey @richfiles, Do you mind me asking what those joysticks you are using are called, or where you got them? They look like 2-axis potentiometer based. I've been having a hard time finding something good for my own project. Thanks!
- 231 replies
-
- totm jan 2022
- arduino
-
(and 2 more)
Tagged with:
-
After building my first Control Panel for Kerbal Space Program back in 2014 (reddit link), I am happy to report that after playing with the mk I console for the last 3 years, the almighty Kerbal Winds of Inspiration have filled my sails and I intend to embark on another sleep depriving build: with even more lights, switches, gauges, and a proper stand for Jebediah! I will try to update this as regularly as possible, as the build progresses. Stay tuned! Milestones Create post Power Plan Find good joystick. (4-axis potentiometer-based, and cheap!) Evaluate existing electronics stockpile Preliminary Documents: Electrical Schematic(s) Arduino Pin Assignment Bill of Materials Purchase Electronics Cardboard Mockup (WIP) Computer Aided Design (Fusion 360) (WIP) Electrical Circuit Verification Build Aluminum Casing (WIP) 3D Printing Toggle switch tips Switch guards Precision twist switch handle Analog gauges Assemble/Solder/Build Modules Programming: Class Diagram/High Level Design (tool: ArgoUML) Learn Version Control (using: Git and TortoiseGit) Detailed Design Implement & Test Design Mission Checklist Documentation Github repo: https://github.com/mountaineerman/KCP2 Pictures! Found the interface for loading pictures via imgur was quite painful, so here is the google photos album: https://photos.app.goo.gl/uBJ7KsR7KzYfuSmy6 CAD Model (Fusion 360) TBD
-
Thanks @c4ooo, I will make a post on Mulbin's forum @zitronen, I wanted to ask you a question - I find that rarely, my Arduino is losing connection every now and then with the computer. I saw your suggestion to increase the Arduino Serial buffer, which I increased from 64 to 256 (both RX and TX). However, I am still experiencing the problem. Do you think it could be that I am overpowering my Arduino, and it is shutting down from too much current draw? After the loss of connection, it always manages to re-establish a connection within about 1-2 handshake delay intervals. Thanks for your input!