Jump to content

Psimax CS40 Telemetric Joystick


marzubus

Recommended Posts

Psimax CS40 Telemetric Joystick

CAqlzxZ.jpg

Features:

  • 400mm wide
  • Modular design
  • ±40x Latching, Safety and Momentary Switches
  • 1x 4-axis Potentiometer Joystick
  • 3.5" LCD
  • 2x 0.96" LCD's
  • 2x Arduino MEGA's ( at least for dev, probably 1 UNO and a shift-register later )
  • 1x Arduino DUE
  • 1x linear motorized potentiometer for throttle

Update 2 Sep 2015

Back from Hiatus, Sorry I have been AFK quite a while, but other duties and kept be all too busy. I will be back in full swing soon,

In the mean time, here is the source files for the panels for the ABLOX case. ( 40CM ) version.

https://www.dropbox.com/s/r1s02352iikcrvy/KSP%20Joystick.skp.zip?dl=0

Update 1 Mar 2015

OLEDS!!!

So I have succesfully tested the mini SSD1306 OLED HUD.

EnNkVFM.jpg

Here is a shaky

while waiting for my next session at Qcon 2015.

The source for the bar element is up at github

The SSD1306 takes around 45ms to draw, so I can only afford to update it a couple of times a second. So I will be managing these OLED's from a Arduino which is NOT running KSPSerialIO, but rather some i2c slave code. I have managed to run this all on one Arduino, but I had to drop some packets in SerialComms to stop the Arduino choking.

B.O.M

  • Retex Abox Chassis from retex.es
  • 2x Arduino MEGA
  • 1x Arduino DUE
  • 2x 0.96 4-wire/SPI/ic2 OLED
  • 4 axis 10K potentiometer joystick from aliexpress
  • Many HBE-12 swiches with 6V LED's from aliexpress
  • 1x Linear motorized potentiometer

CAD Work

I drew the upper and center plates in sketchup and then sliced them up to be able to print them on my Printrbot simple metal. Ultimately I want to have some aluminium laser-cnc'd.

hZYthMv.png

Software Development

I have spent quite some time preparing for this build by determining what drivers needed to be developed for KSP, and what to flash the Arduinos with to be detected as HID devices. My solution currently stands at:

1x Arduino MEGA as a HID Joystick ( HoodLoader2 )

1x Arduino MEGA as a KSP Serial IO

1x Arduino DUE as a i2c HUD driving 3 LCD's and other feedback instruments.

I have put together the Psimax Serial Library, which is a generic Arduino interfacing library for KSP, allowing direct interfacing of Serial devices with the game. No Network proxies and such. Psimax Serial Library for KSP: https://kerbalstuff.com/mod/542/PsimaxSerial%20Library

I have ported KSPSerialIO to use my Serial Library: KSPSerialIO for Mac / Linux: https://kerbalstuff.com/mod/540/KSPSerialIO%20Mac/Linux/Win

Hardware

I have 3d printed many of the parts for my setup, and ordered lots of Buttons which feature 6V LED's The Switches and LED's will be independently connected to allow the game state to be reflected on the button, regardless of button state. This prevents control changes when switching vehicles until buttons are essentially double tapped.

The DUE drives a 3x LCD screens where things like fuel, g's and so on can be easily plotted.

The Last MEGA is used as a Joystick HID for a possible 7 axis and 40 buttons in total. I hope to combine the Serial and HID into one board if possible. Possible solutions exist in NicHood's HoodLoader2 + HID project.

Update: 25 Feb 2015

Most parts printed and the joystick is assembled, DUE is mounted, MEGA's being prepped for programming. Most buttons are mounted in their panels, and the wiring will commence shortly!

Previously

Button Panel Assembly:

UYXG57B.jpg

oTFqvmIl.jpg

Main Panel Assembly:

WjAlb0Xl.jpg

HUD Work:

This was a early prototype HUD where a Arduino using TVout library was driving a AV LCD directly. Its a bit too glitchy unless you REALLY want the analog feel, including rolling shutter like blips.

l3Q0EGz.jpg

Edited by marzubus
Link to comment
Share on other sites

Hej Stibbons,

I literally went through thousands of switches before I found these: http://www.aliexpress.com/item/HBE10-10mm-on-off-illuminated-led-light-pushbutton-switch-6V-12V-24V/850393919.html

In the order you specify the voltages, colours and shapes. They are a touch on the small side for the rectangular ones, 16mmX12mm, but I could not find better.

Link to comment
Share on other sites

Ah yeah, I should put in the info.

Its a Retex Abox, I have 3d printed the top plates in multiple interlocking parts, though I wanted to laser CNC the aluminium.

http://www.retex.es/en/Enclosures/Desktop-enclosures/Abox.axd

Excellent, thank you!

Have some rep :)

I found a local supplier even.

If you do want to go the Laser CNC route, I've used Front Panel Express for the panel on my Midibox Sid.

The results were excellent, but it was a bit pricey (around $90USD irrc).

Link to comment
Share on other sites

Hi marzubus,

What are you using to display the info on the PC monitor?

Are you outputting direct from the arduino or is there another shield type thingy betwixt the two?

Also, with the LCD panel on your control box, would you think the Arduino/KSPIO plugin combo could display a rudimentary orbit graphics ala GHUD?

xmpNrPd.jpg

Edited by T.A.P.O.R.
Link to comment
Share on other sites

The Arduino connected to the monitor is just via 2 resistors. It's very low res though, like 128x96 is the max on a uno. More ram = more res. see Arduino TVout library.

https://code.google.com/p/arduino-tvout/

My original design incorporated a small lcd with AV signal input from a Arduino. The res was too low for some of my use cases, so I have ditched that for now.

As you see I have a better lcd mounted on a Due, so it would be nice to do stuff like orbit on that.

I have not looked into GHUD. But I will now!

Edit: omg, these equations!?!? I will play with this! KSPSerialIO probably needs to expose some more values before I can do it.

Hi marzubus,

What are you using to display the info on the PC monitor?

Are you outputting direct from the arduino or is there another shield type thingy betwixt the two?

Also, with the LCD panel on your control box, would you think the Arduino/KSPIO plugin combo could display a rudimentary orbit grapich ala GHUD?

http://i.imgur.com/xmpNrPd.jpg

Edited by marzubus
Link to comment
Share on other sites

Just a quick update, while bored on a plane with no internet, you got nothing to do but take out a arduino and make something!

So today I started work on the OLED display module gauges. Heres a preview:

EnNkVFM.jpg

The code is stupidly simple, but it allows me to display single and dual bar's for my KSP Serial IO integration. The dual bars will be awesome for Stage vs Total quantities of whatever from the VesselData.

Code if anyone is interested: https://github.com/unixunion/arduhud2/blob/master/pgfx.cpp

This depends on Adagruit GFX libraries and uses SSD1306 draw methods, but you can just hack in whatever you use.

LLAP!

Link to comment
Share on other sites

Oh wow, this now means I have to get an OLED display and a Mega and a TFT :)

I'm going to go buy at least one of those retex cases today.

According to the local supplier they're not being made anymore and they only have 6 in stock.

I'm not sure if I'll use them for my KSP Simpit, but I have many other projects that could use these cases.

Does the Joystick give you enough control?

While it looks like a great addition to the board, I'll probably leave it out as I have a separate flight stick that works nicely.

Edited by T.A.P.O.R.
Link to comment
Share on other sites

Man thats sad if they stop making it, since its the ONLY case I found that worked for me. I guess I better by a second case for future sake.

I have not really worked on the joystick inputs yet. I have only lightly touched on it with UnoJoy, and that seems works well. I am still uncertain if I will use KSP Serial IO for input or some other Arduino Joystick witchcraft.

I want a second ABOX case for having the joystick external to my chassis. Also, the MEGA is not needed if you use a stage shift. I am investigating it now.

Link to comment
Share on other sites

I didn't end up making a purchase, the ABOX case in the shop was tiny!

It looked like it was 1/4 the size of yours.

Also, really expensive for what it is.

I'll hunt around for a bigger one, but am tossing up between a few other options.

They'll go in their own thread & not hijack yours ;)

Edit:

Found another supplier, closer to home, but harder to get to.

Much better prices, but the worst website(no search function).

And they carry the larger one!

Edited by T.A.P.O.R.
Link to comment
Share on other sites

Ah ok, here was my plan-B housing

Its a little heavy though since its iron and shipping to Sweden at least sucked.

Edit: The largest is 400mm, so its not huge. I was actually thinking of getting 2, a 400 and a 250 on the side. And they are pricey, but It was the best I could find for what I wanted. There are many desktop enclosures or control enclosures on aliexpress if you want to browse. The hard part is finding the right search terms.

Edited by marzubus
Link to comment
Share on other sites

Note, I highly recommend you separate you're KSPSerialIO board, and the HUD board, since OLED's take a couple millis to update, you can easily outrun the serial buffers on the Arduinos. Even updating the OLED every 1000ms at a cost of 50ms per update, seems to pile up the buffers on my 32u4 at least.

I will test more with a Mega and a Uno running the whole stack, since maybe my Pololu 32u4 is a bit weak for the task.

My current plan is using the 32u4 to power the small oldeds running a very simple 4 gauge per OLED setup, then I can i2c the variables for the gauges.

Link to comment
Share on other sites

Your plan-b housing is a good one, the closest I've found (affordable or not) doesn't have the two angle slope.

I've got one of these for a project I'm working on for a friend.

The quality is good, but like your Plan B the lack of removable panels makes things hard to print on or customise.

I'm not great at cutting rectangular holes in any medium.

In light of this, I've been considering 3d printing bezels for my 7 segs & LCDs to cover up the rough edges.

There's a service at one of the local libraries that prints very cheaply.

Thanks for the advice on the Serial/Hud too. Will definitely keep this in mind.

Link to comment
Share on other sites

Just a quick update, while bored on a plane with no internet, you got nothing to do but take out a arduino and make something!

So today I started work on the OLED display module gauges. Heres a preview:

http://i.imgur.com/EnNkVFM.jpg

The code is stupidly simple, but it allows me to display single and dual bar's for my KSP Serial IO integration. The dual bars will be awesome for Stage vs Total quantities of whatever from the VesselData.

Code if anyone is interested: https://github.com/unixunion/arduhud2/blob/master/pgfx.cpp

This depends on Adagruit GFX libraries and uses SSD1306 draw methods, but you can just hack in whatever you use.

LLAP!

You did this on a plane? What??

Link to comment
Share on other sites

  • 2 weeks later...

Hej!

This is not possible at the moment. I use one Arduino as a KspSerialIO board and the others i2c or spi to the main board.

What's the use case? It should not be too hard to make it support multiple boards.

Howdy Marzubus,

How do you get KSPIO working with multiple Arduinos?

Is it as simple as messing with the config XML?

Link to comment
Share on other sites

Marzbus, awesome work. I have been playing with ideas like this for months. How are you getting the aurdinos to function as joysticks? When last I checked, firmware hacking was required to get them to do this. Are you simply inputting the data into the program, and skipping letting windows recognize the device as a jostick?

The pre-built case was a great idea. What has consistently stopped me was putting the project into a desirable case. My control pannel ended up getting mounted to a piece of plywood!

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