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
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 21
Hi, I'm picking up my sim project again after a small hiatus. This question relates to a similar one I post a while ago, but I thought it best to make a fresh new topic.

I'm retrofitting an existing avionics panel for simming. I'm using the the existing knob assemblies which have very sweet detents of their own and I want to preserve that 'real feel.'I I think I need encoders behind and attached to them that have no detents, but have the correct number of steps in a rotation. When I look at Mouser, I'm faced with many options that I just don't understand yet. Currently, I need encoders that will have 8, 10, and 20 steps in a single rotation.

These are the criteria that I'm confused about: type (absolute or incremental), resolution, # of channels, output type, output supply voltage.

Thanks for any help anyone can offer.

Dave
2018-04-23 23:39
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4703
Supporter
Thats a confusing request !
Basicly there exist encoders without detents..
(I would check the are quadrature.... Include 3 Pins and finaly got the number of detents you need . NOT use BCD or other codes here)
But i not understand the problem finaly....

In your Panel (Original aircraft i think) there are already encoders installed.....

1. Question. Can you simply use this encoders..... Are the 2 Channel quadrature encoders ?
(If yes all the work is not needed.... you can simply use current encoders)

2. Question... IF NOT.... How do you plan to controll the additional encoder ?
If you want the "feeling" of Original encoders then the shaft must also controll the "working" encoder behind.
If you drill a hole through original encoder you will pretty shure destroy the mechanic and the "feeling" is not the same.... Also when you work with a Cogwheel then it feels different as before.

Let me say.... I hear a lot of stuff in my 3 years of cockpitbuilding..... We all like build it "real".... So Knob should looks same... Panel must be 1:1 .... And i have a guy in the past who installed a vent to simulate aircondition from the packs....
But i not know a guy who do a so massiv workflow to have a special "feeling" in a rotary Encoder.
So.... I understand if you like a nearly realistic detent level like 16-24 if original is 20..... BUT the same feeling ???? Sorry thats to hard for me !
Finaly NOTE.... If you have a painted Arrow on your knobs.... encoders can not by synchro.... So those arrows will not be correct while using Mobiflight (whatever number of Detents/Steps is use)

For more help.... Please explane your plans and how you will make it.... Then we can help you more !
Good Luck !
2018-04-24 04:39
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 21
Oh dear. It looks like I was confusing. That happens sometimes. I'm going to try again.

I purchased an item similar to this one on ebay, a used Cessna transponder:


I've broken it down, so I just have the faceplate and the mechanical dials and switches. The dials have posts that protrude out the back of the faceplate. These dial have the 'feel' I'm taking about. I want to attach encoders to these posts. I don't need detents in the encoders because the mechanical dials already have detents that click into position. On this particular unit, the dials have 8 positions in a 360 rotation. I hope this makes more sense now.

Dave
2018-04-26 00:26
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4703
Supporter
This will not work, pretty shure !

Your problem is that a encoder NOT synchro .... So if for example your Encoder is in Position "6" but in sim this Number is for example "1" at systemstart then it will not work....
A Encoder can only Increase or decrease... But not can send a specific command for a position.... Thats done by a Rotary switch !

BUT Another Problem,,,

For ADF there exist no SET command ( as i know).... So you can not directly config eatch position for a specific number.

"maby" there is a way.... i need to rethink that in the future ( or you can find a way and tell it to us) ... But at the moment i think thats not possible !
Good Luck !
2018-04-30 02:32
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 21
I’ll look into what you are saying about the ADF, it sounds like I won’t be able to do what I want to with that.

As far as the Transpoder goes, since FSX puts its value at 1200 at the start of the flight, I’m willing to make the trade off of setting my transponder device to 1200 before the start of flight as well. That would sync them up. With this info, do you now think it will work? And how do I spec out the encoders?
[Last edited by monkeysuncle, 2018-04-30 23:55]
2018-04-30 22:15
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4703
Supporter
Basicly Yes.... But you need to think about issues, too.... A Encoder can have a data com problem for example.... if only one Signal is not send correct then it will be not sync again.

Maby you use google or search this forum here.... I Remember a guy here that have the same problem ( and pretty shure the 1:1 same panel) like you.
Maby he find a way in the past.

Solution:
If you not need the analog style you can think about to remove the Nubered pices and you set a Digital Diggit Display behind the Windows.

With own code ( external of mobiflight) this will be possible too.
With Mobiflight again i think this is not possible (or verry difficult) but i have no time at the moment to figure this out.

PLEASE: If a User have fix this problem ( the guy from the past) please reply !
Good Luck !
2018-05-09 10:19
Avatar
monkeysuncle
From: Lake Peekskill, NY, United States
Posts: 21
Thanks everyone who’s thought about this and replied. Compared to all of the other tasks I have to get this project done, I’m abandoning this project for now. Seems like it’s not as simple as I think. Thanks all.
2018-07-15 13:27
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1470
Hey guys! I love the transponder retro fit idea. Question: are there no real switches inside? Like if you turn a knob and the dial flips, there should be some electronical information on the current position available. You could use this to trigger the right input on MF and send it to your Flight Sim.

I hope my comment makes sense.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2018-07-15 18:04
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4703
Supporter
Hi Sebastian ;)

This was done long time ago so i still not remeber 100%.

If i´m right the Problem is....

1. FSX not have a SET EventID for Transponder
iconCode:
XPNDR 1 DEC 66458
XPNDR 1 INC 65654
XPNDR 10 DEC 66457
XPNDR 10 INC 65653
XPNDR 100 DEC 66456
XPNDR 100 INC 65652
XPNDR 1000 DEC 66455
XPNDR 1000 INC 65651
XPNDR DEC CARRY 66459
XPNDR INC CARRY 66460
XPNDR SET 65715

So only the FULL 4 Nuber Value can be SET ... But NOT the 1,10,100 or 1000 Part Individual.


*******
2. Its not Possible to WRITE a Bitmasked Offset that include MORE then 1 BIT ( If 4 Bits are Marked then ALL 4 Bits write 1/0 simmular)
So a FSUIPC Offset Write is not possible ( or i not see the way)
iconCode:
0354 2 Transponder setting, 4 digits in BCD format: 0x1200 means
1200 on the dials.


To Write 1 Diggit individual we need to write via BCD Mode .... And Write to a Nibble Halfbyte .
For Example the 1000 Part must be write to Offset:0354 Size 1 Byte Bitmask 4,5,6,7 Active.
((EDIT: We could write it Binary instead of BCD like a 7 would be 0111 ... But that also need to write 4 bits individual) )

You say in the Past there is no need to WRITE multiple Bits .... So that wont work i think !


*********
Idea !
If we can NOT write a Nibble we MUST write the full Byte .... That means we must Write 2 Numbers in a row.
Thats the time to use Modulo, round or a verry Long IF/ELSEIF Line

Example: We like to change 1000 Part ... From 12xx to 22xx ....
The xx we can ignore cause this is a other Byte. So the Raw Value of Byte 1 in that example is "12"
So we must first define the value of the 100 Part to write it "again" when we change the 1000 Part.
Maby Modulo %10 will work to get "2" here. Then we only need to Add the needed 1000 Part we like to set like $+20 in that example
Syntax: $%10+20 (20 for the "2" of 1000 Part .... 30 for the "3" and so on .... For "0" $%10 should be enough. )



More Problematic is the second Position of the Bye i think.
Here we need to "carry" the first number,
Example : We like to change 100 Part from 12xx to 13xx
Now we need maby Round ....
Raw Data is 12 . If we Divide through 10 and round without decimals then 12/10=1,2 Round = 1 Then we must multiply it again to get 10 and add the needed number on right part.
Syntax: Round($/10,0)*10+3 ( 3 cause in example we like to swap from 12xx to 13xx ... so 4 for x4xx .... 5 for x5xx and so on)



Alternate is a long IF ELSE ... Like IF Valie is between 10 and 20 Then write 1x ELSEIF Value is between 20 and 30 then write 2x and so on ( x is the number we like to set on 2nd diggit)
Like if($>9||$<20,1x,if($>19||$<29,2x,if( and so on ....and so on )))))))))))))))

What do you think about.... Can this Work or do you know a better way ? Stepahn what do you mean ?
[Last edited by pizman82, 2018-07-18 06:37]
Good Luck !
2018-07-18 05:34
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4703
Supporter
REFRESH !!

Please check my last posting Above.... Did somebody test this ? Like Monkey or the other guy who request this months ago ?
I not be able to test this a.t.m. but i´m interested in a experience Report if the "theory" is working maby ??


Thanks for reading.... I also would be happy for some other Ideas.... Maby i completly miss a thing and this will go much more easy.
Good Luck !
2018-07-26 03:58
Avatar
StephanHo
From: EDDG, Germany
Posts: 1719
Supporter
Hi everyone,

well, the transponder needs 4 times a detent of 0 .... 7, so 8 detents. That would be a turn completed. 360 ° / 8 are 45 ° per detent. I think there is a Rotary switch with 8 detents à 45 °, which must be mechanical connected to the existing front panel. So if the numbers of the front panel with the rotary switches are "hard wired", it no longer needs synchronization, they are sync'd.

How then would the internal logic of MF look like, pizman would have to say. I'm not deep enough in the matter.

It may also be possible to use the existing mechanic, but I would need to have the device here to say something about it.
An encoder is here for the reasons mentioned by pizman not suitable.
Grüße,
Stephan
2018-07-26 11:44
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4703
Supporter
Thanks my friend....
Your short awnser already show me a little problem i not see in first brainstorming.

iconStephanHo:

So if the numbers of the front panel with the rotary switches are "hard wired", it no longer needs synchronization, they are sync'd.



Yes AND No.

I agree with you. this must be 45° Rotary with 8 Detents.... And i see pictures in the web about those Panels. It looks like there is a cockwheel gear from the Rotaryswitch shaft to another shaft where the "printed disc" is set. This Disc is maby wooden, paper or plastic and the numbers 0-7 are Printed.
Now if Rotary is turned the disc is turned too and will show the current number in the cut hole of the Panel.

So about Sync....
If we turn a Rotary switch here then "Display" and Virtual Sim Value are sync at all times.....
BUT. On Startup we got the same Problem like on every other Switch that is NOT momentary ! It will simply show the position it have in Homecockpit BUT in Sim there "can" be another state at the moment.

Finaly we got our 3 options like in other situations....

1. Use Mobiflight AutoSync Function with a fake Button somewhere in Cockpit one time on Systemstart (Look up for On-Off-On switches)
2. Turn the 4 roatary Switches for one detent, each. This will execute a command one time and so will sync every switch one time.
3. Use a "StartUp State" ... Load always same Start File and set Real Transponder to same Value like in this loaded File BEFORE you power up your Cockpit.
Good Luck !
2018-07-26 15:42
Avatar
StephanHo
From: EDDG, Germany
Posts: 1719
Supporter
You are welcome ;)

I think, in the original, the switches are controlled by photocells and the last value is saved when the device is switched off.

As far as the start is concerned, this will always be the problem, unless you switch the machine to cold & dark. Then a defined squawk should always be set beforehand (if noted in the checklist) and at power up there will never be any problems.

In all other cases, to synchronize the display with the simulation of one of the sync mentioned grab, otherwise the display does not match. The decision lies with the user.
Grüße,
Stephan
2018-07-26 20:33
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4703
Supporter
OffTopic.

iconStephanHo:


I think, in the original, the switches are controlled by photocells and the last value is saved when the device is switched off.



Just a idea.... Cause i know you are interest in those stuff, Stephan.

This Panel is realy old from the beginning of Transpnder technics i think ( Cause it use a mechanical system for the Display at all) .
So i think the internal function is pretty easy and mechanical, too.
A Number from 0-7 can be shown binary with 3 diggits .... 0=000....1=001 and so un until 7=111 ... So with a Switch (Rotary 8 Position) we need a simply 3 Bit grey code so 4 Wires are need ( 1 Input and 3 Output) . the switch is build in a way that every detent will open/Close the Outputs in the binary logic like 0-1-1 for the "3" Position .
Same is done for all 4 switches.

Finaly we bring all 3x4=12 Lines to one ending point and we have a Readable Information in form of a 12bit electrical Information.
Sqwak 7700 for example is now 111-111-000-000.

So finaly i think in this old technic they not work with photocells or so stuff.... If you set XPDR from OFF to ON there will be power on Input.... and on the 12 Outputs the Used Freqency is executed. ( and will be transmitted with the radio equipment ).

maby all this is stupid.... But i just think thats logical. ... Check also this ....https://de.wikipedia.org/wiki/Gillham-Code
Good Luck !
2018-07-27 04:40
Avatar
paul_max
From: United Kingdom
Posts: 74
Supporter
A simple solution is an 8 to 3 encoder, which generates a 3-bit binary code that MF can read with 3 pins.

A total of 12 pins for the whole XPDR is well within a Mega's capacity and always accurate (if read at power up)

The 74HC148 chip will do that and you can buy 4 for $2.

Connect 8 rotary switch pins to the encoder chip.

[Last edited by paul_max, 2018-07-27 09:55]
2018-07-27 08:42
Go to page 1Go to page 012Go to page 2Go to page 2