MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
robroyaus
Posts: 5
Has anyone successfully used an Alps Alpine RKJXT1F42001 4-way joystick and encoder combo with Mobiflight? I want to use them for the G1000 Range Knob/Joystick.

The encoder part looks straightforward, but the circuit diagram and outputs for the 5 switches (Up/Down/Left/Right and Centre push) is confusing



Should I wire the "common" for the switches (i.e. ground on my Arduino) to the terminal labeled "Com" as you would expect, or to "Push" that looks to be more logical?

I'm hoping to send off a PCB once I can work this out, as the pins are not very breadboard-friendly :)

Thanks for any thoughts or experience.
Rob
2021-07-02 14:56
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

The Encoder should work logical without problems.

The joystick shematic looks strange.
On first view i will say the 4 directions will work..... But the Push may be a problem.



With this bad data sheet i not fully understand it. Would be cool to got this in my hand and a Multimeter to check the electrical situation.
Good Luck !
2021-07-04 15:23
Avatar
elral
From: near EDDL, Germany
Posts: 50
Hello,

this is a nice small combination of a 4way switch and encoder with push button. And the size is not really big.
BUT, as the datasheet also stated, pushing in one of the 4 directions the encoder push button is also pressed.

The connection is GND to "Encoder Com" and "Com". Encoder Button is "Push". Like the datasheet shows.
If you move to the upper direction (Y-direction), A and Push is connected AND Com and Push is connected. That means that Push and A is connected to GND.
If you press the encoder button, "only" Push and Com is connected, means that Push is connected to GND.

I planed also to use it for a G1000, but I have still no idea how to handle this.

Regards

Ralf
2021-07-04 20:06
Avatar
robroyaus
Posts: 5
Thanks for the replies.

Work in progress here - I soldered 10 wires so I could breadboard to a ATMega2560 Mini Embed.

Strangely the encoder I expected to work immediately is still not working, but have parked that for now. Probably my dodgy Dupont wires. Will play with that tomorrow night.

As for the joystick I got it working by not bothering too much with the "Stick Switch" diagram above and swapping the meanings of Push and Com. That is, I wired the "Push" pin to Gnd (as if it was Common) and treated the "Com" pin as if it was a "Push" button. I wired A,B,C,D and "Com" pins to buttons in Mobiflight, and assigned them to the G1000 MFD Joystick Up, Left, Down, Right and Push events respectively.

If you press the tip of the stick inwards you get the Push Button event as expected (in my case the arrow pointer appears and disappears on the G1000 MFD)
As for the joystick functionality, it also works as expected (moving the arrow pointer) when you tilt the joystick. The trick is not to tilt too far it until it clicks. Once it clicks you first get the Push Button event and then the Joystick direction event.

Now I just need to work out how to make the joystick event keep repeating and moving the pointer until I release the stick... Any ideas?
2021-07-05 13:58
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
No Way "at the moment" with Mobiflight !

Currently we not support "REPEAT" . Maybe in the future.
Here a "Joystick Controller" ( Whatever a LeoBodnar or a cheap Arduino with a Joystick Firmware) is better here ).

About the Part itself....

This sounds interesting !

Means if you move the Stick then the first circuit is working ( E.g. A and Push are closed) And if you reach the "Endstop" a internal Second switch is close a circuit to the "Com" Pin.
I not know the electrical setup internal.....

For our usage we not need this additional "Com" connection..... Just the ABCD Channels.
Maybe you can "hack" this by desolder these connections or so.

Otherwise it get difficult..... We would need a logic or a electrical solution that say..... IF Channles a,b,c, or d are ALL LOW then a COM Signal means a Button Press of the Top Push Button..... If one of the a,b,c, or d channels is HIGH in that moment then a COM Signal is NOT a Button press and must be ignorred.
Good Luck !
2021-07-05 15:04
Avatar
robroyaus
Posts: 5
The lack of repeat is disappointing - The rest of my VR-focussed controller has a rotary encoder for the trim wheel, a "Knobster"-style dual rotary encoder with six mode switches for G1000 interaction and the joystick/encoder for the G1000 Range knob/stick. All the Knobster mode logic should be easy with Mobiflight and preconditions, and my ATMega2560 Mini Embed has all the IO I need. I haven't researched joystick firmware much since Mobiflight seemed to be so perfect for the task, particularly with the G1000 hooks in MSFS. Oh well...

As for the joystick functionality of the RKJXT1F I should have been more positive about what I found. The click functionality at the limits of the ABCD movements needs a real deliberate push, so in practice I anticipate it should be easy to stay in the joystick range to get the pointer to move. If you DO press hard and invoke the click, the logic you proposed to ignore the PB would be nice to have, but it's not a deal breaker without it. I think it should work well (except for the lack of repeat)

BTW, the device is very much a sealed unit - there will be no desoldering inside to change the logic hardware-style!
2021-07-06 00:42
Avatar
SergeyPe
Posts: 45
It's a well- known feature of this ALPS switch family. As the ALPS application document says: "Firstly it makes contact between a direction terminal and the PUSH terminal, then the already connected direction and PUSH terminals are connected to COM terminal". So you need either to program a condition that the central push signal is generated only when none of the directional signals are present or to assemble a small circuit that will serve the same purpose.
2021-07-06 12:23
Avatar
robroyaus
Posts: 5
Thanks SergeyPe. I haven't seen that application document and couldn't find it on the Alps site anywhere. It would be good to read.

If your application needed to separate a centre press click from a directional click (i.e. when pushing the stick past the active tilt area until it clicks) you would need to use the extra logic in software or hardware as you describe. However, for my application (just the Range knob and joystick on the G1000) I don't need different click events, just one will do. If I get a click from a hard directional move I can just treat it like centre button click and can live with it. So my backwards wiring of Push and Com should do the job.

I should say... it will do the job if I can find a way to get the stick move event to repeat. Ideally you could turn on the directional move on "key down" and repeat until you get the "key up" of the stick move.
2021-07-06 13:02
Avatar
SergeyPe
Posts: 45
You are welcome, robroyaus:). Honestly speaking, I don't remember where I found the document- anyway, here is the link: https://disk.yandex.ru/i/4_VMUMBrS_ImpQ.

As for the repeating commands- yes, it's an issue; I do hope it will be introduced in some later MobiFlight version. A possible compromise is to built a simple pulse generator (I've made it based on 555 timer) which can be connected to the common (or push) terminal of the switch, so that you have a repeating connection to ground. The trick here is to select the pulse frequency so that you have a single pulse with a short push of the switch but a reasonably fast repetition of pulses when the switch lever is held in a position. Not the best way, I know, but no other solution so far...
2021-07-06 17:56
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
May we can workout a other "Improvisional" solution for now.

Is the function you like to controll available within the Standard Sim Controlls ( You can assign inside the Sim) ?
And we talk about FS2020 ... Or P3D???

If not....
Do you got a FSUIPC in registred (Payware) Version ???

***********

The Idea:
There exist "Virtual Joysticks" . One system inside FSUIPC ..... the other as a standaloane system (VJOY) that is supported via Mobiflight.

MF itself have no repeat ( in case of our main firmware logic) ..... So we can only do something on Press..... And do something on Release.
If we say " On Press please set a Virtual Joystick Button to PRESS" ..... And On Release we say "Please RELEASE the virtual Joystickbutton again"
Then aslong we "hold" our Switch the virtual Button is "Pressed and Hold"
And here comes the tricky part..... These Virtual Buttons are detected ( By FSUIPC via the Joystick Offsets and by Sim AND FSUIPC via VJOY) same way like a real Joystick..... And you know Joysticks can be used with the REPEAT Option !

In easy words.... Your 4 Direction Buttons should "simmulate" 4 virtual Joystick Buttons..... And these are assigned to the 4 Functions (with Repeat) as you expect !
Good Luck !
2021-07-07 22:17
Avatar
robroyaus
Posts: 5
Thanks Pizman

I want to control the panning of the map on the MSFS2020 G1000 MFD using a joystick, so don't have any standard keys to work with in the sim.

In Mobiflight, there are Action Type entries for MSFS2020 Events in the G1000 MFD group
AS1000_MFD_JOYSTICK_UPjou
AS1000_MFD_JOYSTICK_LEFT
AS1000_MFD_JOYSTICK_DOWN
AS1000_MFD_JOYSTICK_RIGH

These are the ones that work with the RKJXT1F (although only one joystick movement at a time)

I just paid for FSUIPC, so will try out your vJoy -> FSUIPC idea this evening. Looks promising, although I'm still trying to find the appropriate controls for the map panning.

Will let you know how I go.
2021-07-08 08:13
Avatar
elral
From: near EDDL, Germany
Posts: 50
Hello robroyaus,
I hope I am not to late and I understoud your question.
For the encoder I use the follwoing events:
"AS1000_MF_RANGE_INC" and "AS1000_MF_RANGE_DEC" for the encoder and "AS1000_MF_JOYStICK_PUSH" for the pushbutton of the encoder out of the G1000MFD group.
For the joystick function I use the same as you.
Regards
Ralf
2021-07-09 13:18
Avatar
RadPaul1964
Posts: 1
Hello I got the RKJXT1F42001 4-way switch to work great with pan and zoom using this wiring method at my link.

https://youtu.be/306aYMAT7vw?si=A7e9aX6R_LcPAUYE
2024-02-12 20:27
icon