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! 

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
VR-FlightSim
From: United Kingdom
Posts: 97
Supporter
Hey gang
My Piper Aztec sim conversion goes really well (MF is such a great tool) however I stand in front of another challenge that will require little brainstorming from the community.
Another instrument I'll be working on shortly is Collins ADF Reciever with analog dials.



The conundrum is how to sync these dials with the sim, without having to use an enormous amount of Mobiboard pins.
At first, I was thinking rotary encoders but even if I managed to sync the frequency at system start, these often lose some steps over few turns.
Then I thought I could use my "two switch encoders" that I made for the VHF Collins radios earlier. Well again, this would need manual synchronization at the system start.
Also, if something goes wrong and it loses some steps I will not be able to recognize that the system is out of sync as the only frequency readout is possible through the little discs with printed numbers.
Then I started thinking infinite potentiometers and as I was googling about I found this:



This is basically a ten position rotary switch (very compact) with breakout board and nine resistors. It works something like a potentiometer but gives precise value to each position.
The beauty of this invention is that we would only need one input pin to read all 10 positions of one switch. Such feature could be very useful in other applications too (flaps lever, ignition key switch, fuel tank selector or just any other rotary switch in your cockpit).

So, my two questions are:
- can anybody think of another solution for my ADF Receiver?
- what would it take to "teach" MobiFlight so it would recognize a specific voltage drop on the pin?

Thanks for reading
Jay
[Last edited by VR-FlightSim, 2019-11-11 00:20]
2019-11-11 00:15
Avatar
VR-FlightSim
From: United Kingdom
Posts: 97
Supporter
More I think about it more I love the idea of "potentiometer switch",
Could we not utilize the analog inputs of mobiboard to do this?
We could then work with particular range that we could devide to several chunks with preconditions and assign respective actions to these chunks..
What do you think guys?

Regards
Jay
2019-11-11 13:27
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1463
It’s definitely an interesting idea. Let me think about it.

In the meantime I would simply use individual pins. Use a dedicated mega card for it. I think Encoder is the better approach than a switch with 8 positions for each digit.

Since the 7.5.3 release Encoder Events should be reliable. Please let me know if this is not the case.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-11-11 14:11
Avatar
VR-FlightSim
From: United Kingdom
Posts: 97
Supporter
It's not MF that's unreliable but the actual mechanical encoders them self and since I got no direct response via led display, I will never know if the system stays in synch (unless I check the virtual radio).

Jay
2019-11-11 14:29
Avatar
VR-FlightSim
From: United Kingdom
Posts: 97
Supporter
Regarding the analog input and potentiometer, I'm also thinking how to interface instruments like VOR indicator and similar where we have the little bug which turns a compass card.
At the moment the only viable solution is to disconnect the mechanical gears (bug-compass card) and attach encoder to the bug and stepper to the card.
This technique has a disadvantage of losing the mechanical feel of the "real thing" and it also introduces a delay to the response time.

If we could read potentiometers with mobiboard then we would use infinite pot to read compass card position being still mechanically geared with the obs bug.

I prefer to use the "real thing" with all its real feel though.

Thanks
Jay
2019-11-11 16:04
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3695
Supporter
Your "Problem" remain..... Whatever you use a Potentiometer system or a simple Multi Position Roatry Switch.....
Mobiflight do only a INPUT to Sim when a physical Input ( Turning the Knob) is done before.

So.... At System Start every Non Momentary switch ( like a ON/OFF switch or every Rotary Switch) "can" by unsync....
The only way to solve this is to use each button one time ( or run Mobiflight Autosync function one time) . OR You Startup the Sim in exact the same Systemstatus as your cockpit is at the moment ( Shoutdown via Checklist to always have same state..... Like setting your Device to same Frequency ADF as in the File you load at beginning).


Another spot i see a problem here.....
A other user try to build a XPDR Panel..... There the Knobs was 45° ( 8 Pos 360° ) ..... Your ADF is going from 0-9 right ??? So these are Knobs with 10 Pos for 360° ?? So 36° Swtiches ?? Never see those switches in shops until now.

***************
Summary.... I like your kind of panel..... Those Disc Displays looks verry real. And i agree with you that a Motor for the disc is bad ( Response time) and also a Encoder is not good here. So i think best solution ( also for feeling) is a simple Multi Position Rotary switch..... And thats working with Mobiflight already. So simply use 10 wires.... Create 10 Input Buttons and enjoy your panel !
Good Luck !
2019-11-11 16:17
Avatar
VR-FlightSim
From: United Kingdom
Posts: 97
Supporter
iconVR-FlightSim:

Well, in the defense of my case:blush:

iconQuote:

At System Start every Non Momentary switch ( like a ON/OFF switch or every Rotary Switch) "can" by unsync....


Since the complete cockpit will be very complex utilizing many Mobiboards and extremely long config list, I plan to implement the Autosync button into the panel anyway just to be on the safe side.

iconQuote:

other user try to build a XPDR Panel..... There the Knobs was 45° ( 8 Pos 360° ) ..... Your ADF is going from 0-9 right ??? So these are Knobs with 10 Pos for 360° ?? So 36° Swtiches ??


I'm not quite sure I understand your question but I'll give you an example.
ADF has rotary selectors 0-9 so I can install 10 position rotary switch behind each knob.
The common pin of the switch is connected to GND on our Mega. Each of the ten pins is connected to its own resistor of different values and then all of them brought to the same one analog pin on the Mega. MF can then determine which position the switch is in, simply by analyzing the voltage drop. One pin = Ten options:scared:
It doesn't matter how many physical positions or what angles there are on the switch. All that would be defined in MF connector.


iconQuote:

Those Disc Displays looks very real


They are actually real. I was so lucky to get my hands on the real cockpit section of Pa23 250 which I'm converting into the simulator. I'm very keen to keep everything in its original state as much as possible without losing the good old clicks and squeaks:)

iconQuote:

And i agree with you that a Motor for the disc is bad


I didn't wanna fit motors to the ADF numeric discs. I was referring to another instrument. Particularly the kind where we have a rotary BUG that directly turns its compass card.
VOR for example..



We can buy these units on ebay for next to nothing (for parts or not working). What I was saying is that if MF can read analog values, we could monitor the cards position via infinite potentiometer and abandon the cumbersome technique of "rotary encoder / stepper motor". It would make it so much easier to convert such instrument for the sim.

iconQuote:

So simply use 10 wires.... Create 10 Input Buttons and enjoy your panel !


I'm probably gonna do just that but I was trying to share my ideas on the future improvement of the great masterpiece:P
The ADF radio alone will take 37 pins though, and that just one of many instruments, switches, and levers in the cockpit.
Using the analog input too would only require 10 pins altogether.
Then there is the config part which is gonna get very very long and confusing too.
Don't take me wrong, I enjoy MobiFlight for what it is, I'm just trying to help simplify the whole thing for everybody (except Sebastian) :lol:


Over and Out
Jay

[Last edited by VR-FlightSim, 2019-11-11 23:31]
2019-11-11 22:54
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3695
Supporter
Hi Again.

Basicly i agree as you know.... I just remember to Sebastians Policy in the past..... "If Something is Possible a.t.m. then he normaly not plans to implement a new technic just to "save" Pins " .......
For example he said for long time he not plan for Matrix Systems...... Technical we can controll 64 Single LED with only 3 Wires and a Max7219 Chip..... Or it would be possible to build 100 Input Buttons with only 20 Pins in a 10x10 Matrix .
But in the past he simply say.... Number of Boards are not Limited..... System can be build at the moment..... So no new Device/System is in planing.

Whatever..... He is the Boss. If he like to do this i looking forward for it. Every new implemenation is a benefit for the System.

*********************

And about your Reply.....

1. Detent in Potti....
Sorry.... I not have a link to your part.... After rethink i understand.... this is NOT a Potti..... This is a Rotary.
Whatever...... If you Physical move your Disc then this Rotary need a Resolution of 10 Detents ( Cause your Disc also turn 10 Detents in 360° )
You said you need the "feeling" when you turn the switch..... So detent must be simmular to original element!
And pretty sure you also like that after turning the switch 1 full cycle 360° that also your Disk is again on that Position......
And here i see the Problem with XPDR..... In that Case you need a other switch..... One with 8 Detents and only 8 Outputs..... So the Angle of Detents must increase from 36 to 45°

Please link me that Hardware ...... I like to learn more about that !



2. Sync.
Here your right to but you not see the Problem.
Mobiflight ( if Analog Potti gets in system) will work as you say.... It will recognize a Voltage on Pin and define in What position it is and execute the command to Sim.... BUT This not solve the Unsync Problem. Mobiflight will also with a anlog Input NOT Execute that command on systemstart..... It will only do if you move the Switch first time and the Power on Pin is change....
Thats the Main logic of MF (at the moment) that a command is only executed if its CHANGE..... Mobiflight never check a status when you press RUN .....
So if i understand the current code logic then your Switch will ocure in a voltage from maby 1,00V if Switch is in POS1 ...... But Mobiflight not care about that when you pres RUN cause it will only execute a command if you increase/ decrease the value and MF "detect" a change of status.

To get what you want Sebastian must build here a different logic for those Analog Inputs... So they are "scanned" all time in the System finaly.
Good Luck !
2019-11-12 00:21
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3695
Supporter
Additional Note.....
Got a idea while read your topic twice.

Do you still own this switch ???

If yes you can do a nice testing.
Mount this switch to a Joystick Controller ( Like LeoBodnar or any HID Joystick Controller Card) on a free Analog Pin.
Then this Pin/Device should be a AXIS input now.

If the resistors work in same way as a standard Potti and generate the same "Range" from 0% to 100% then this is technical a Potti ( Just with possible override from 100% directly to 0%.

And NOW the key is FSUIPC ( Registred Version)
Here you can define a Axis Point/Area on that a command should be executed.....
So you turn your Switch to "1" ..... Check the current "axis Value" and define in FSUIPC that it should SET now OffsetXY to BlaBla.
Same for the other 9 Pos..... Normaly if your a bit lucky this should work. ( Whatever i not know if it Sync automaticly)
Good Luck !
2019-11-12 00:30
Avatar
VR-FlightSim
From: United Kingdom
Posts: 97
Supporter
My proposal is not just a "pin saver" but a whole new feature though.

The XPDR is on my "to do" list as well and these are the kind of switches I'd like to use (8 and 10 position).

https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F112073905103

https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F254300688740

Regarding the Synch issue, I think that an AutoSync function is sufficient enough.
You fire up your sim, press AutoSinc button once and you're sorted for the rest of your flight..

I agree, FSUIPC and LeoBodnars card could do the same trick with pots but I'm running exclusively X Plane and as you know, XPUIPC does not support these advanced features.

Regards
Jay
2019-11-12 08:26
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3695
Supporter
Thanks for the Links..... Will Check this next time.
Good Luck !
2019-11-12 14:20
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1463
Hey Jay,

I am thinking about hooking up real instruments for a long time. I got an ASI - easy, just add a stepper. I got a VOR with GS, complicated... I was thinking to actually stimulate it with PMW signals as if they were coming from the VOR receiver... but I haven’t tried it yet and I don’t know the signal levels and so on yet.

I am now also starting to 3D print instruments.

Regarding the instruments that have an adjustable card like DI, Altimeter, VOR, and ADF - I always had in mind to attach the adjustment knob to an Encoder and have a stepper drive the card. This would allow that if for any reason the values get adjusted in the sim, the instrument is synced correctly.

I am not sure how you would like to realize this with your potentiometer, especially because the card turns infinitely in any direction.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-11-12 14:26
Avatar
VR-FlightSim
From: United Kingdom
Posts: 97
Supporter
Hi Sebastian
Having real instruments in your pit makes a whole lot of difference. Although brands like Flight Illusion making some very nice replicas, there is no comparison to the real thing.
Also since we got MF at our disposal, adapting real gear comes even cheaper than the new kits.
I too own a 3D printer and desktop CNC mill but I only manufacture parts that go inside of the gauges (cog gears, brackets, servo/stepper mounts, etc.)

I don't think that replicating PWM for these instruments would be an easy task. At least not easy for others to adopt. Again we have your great tool so let's use it to its full potential.

"Instruments with adjustable card"
Here as I was explaining earlier the only option we have today is to attach the rotary encoder to adjustment bug and stepper to the card (same what you had in mind).
Unfortunately, this will introduce an ugly delay between the two but most importantly, we'll lose the nice mechanical feedback of the bug.
It's also very time consuming to rework all the internal mechanics for this purpose.
Instead (if we had analog capabilities in MF) we would simply attach an "infinite" potentiometer directly to the compass card inside the instrument (1:1 turn ratio), and we're done..
These potentiometers can turn continuously, with no hard stop. One I've got my eye on is here:

https://www.ebay.co.uk/itm/Bourns-6639S-1-102-Potentiometer-with-6-35-mm-Dia-Shaft-Continious-Turn-1k-Ohm/282846853977?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m1438.l2649

This particular pot has 1k ohm resistance so we would need to setup MF connector something like: 0 ohm = 0%, 1000 ohm = 100%. Then 0% = 360°, 50% = 180° etc.

I understand why you're concerned about synchronisation here but if for any reason the values get adjusted in the sim, could we not simply overwrite them again with the pot input signal?
I mean the analog option would be so benefical that it's definitely worth the little trouble. If the setup page in MF connector is done right, we could even assign the rotary switches with resistors that I was writing about earlier in this topic.

I really appreciate you taking the time to consider this idea and if its of any help I can order few of these parts and setup simple testing unit to verify its practicality (meaning you would have to send me a beta to work with).

Thank you
Jay
[Last edited by VR-FlightSim, 2019-11-12 23:34]
2019-11-12 23:19
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3695
Supporter
Hhmm.

Here i personaly miss experience. In case Mobiflight not work with Pots until now and my axis imputs ( Pedals, Yoke Throttle) are done by premade Saitek Hardware i never build a analog Input via Arduino myself.

The question will be ...... How accurate is the Data we recive from this Pots ???

In the example from the ADF ( Lets simulate this is not a Rotary with resistors.... Lets say its a real Poti) we have 10 Positions (Areas) where 10 Commands must be send.
Here we can create something like a "Dead Zone" ...... So we define the "middle" of a Position ( in that example 36° per Detent so lets say the sensetive area is from 6-30° )
That means between every Position there exist a 12° Angle where NO COMMAND is set. ( The last 6° from former Position and the first 6° from current one)
I do this for example with Flaps Handle by FSUIPC

Why..... Simply to prevent a flickering beween two commands.
If i observe my Joystick in settings, then its always "flickering" a bit. the Value is normaly not stay compeltly.
So if we make real hard borders like on Value X Command A is set and on next little step Command B is set and our Poti is set to this border then i think it will send always commands if you just touch the panel or move your hands on the joke and a little virbration is in the room.

Problem will maby occure if you think about your 360° OBS Switch.
Here the room for DeadZones is verry small cause 1° is the full angle of a command.
Not sure if a Poti finaly give us 360 readable clear values overall or if the number is much more smaller by something like "noise reduction" of the signal.

*********************
Maby all my thoughts here are completly wrong and unneeded...... If i would own a poti i can try and test.
Just want to bring this fact into the disussion.
Good Luck !
2019-11-13 07:52
Avatar
VR-FlightSim
From: United Kingdom
Posts: 97
Supporter
Yes, thats exactly right!
We want to send the command when the switch clicks into its detent and have dead zones in between switching positions.
That way, the input command stays triggered in case of any unwanted changes happens within the sim it self and we won't have a problem with flactuating output from the potti.

I thought that this dead zone/sensitivity could be adjustable in MF connector as part of the other parameter setup.

I agree, we don't know how such system would behave in reality but there's only one way to find out;)

Jay
[Last edited by VR-FlightSim, 2019-11-13 08:27]
2019-11-13 08:18
Go to page 1Go to page 012Go to page 2Go to page 2