|
Post by rharrisa1 on Nov 30, 2016 10:10:26 GMT
Flightsim - Prepar3d v3.4
I have made a small autopilot control box: HDG-NAV-APP-VS-ALT using Leo Bodnar parts, BU0836X 12-Bit Joystick Board and Rotary encoders CTS288V.
When using it to change anything, HDG or ALT in particular I get quite a lot of lag resulting in a lot of overshoot once I stop turning the encoder resulting in having to turn the encoders quite slowly for it to be usable.
Looking at the BU0836 Rotary Encoders Configuration software I have them set to 1:1 and the pulse width to 152ms although I have tried various pulse widths to no avail.
I was wondering if this lag was normal or if anyone had discovered as way to get "Instant" response when turning the rotary encoders?
Also, I would like to try and make a pitch trim wheel using a rotary encoder to solve the autopilot disconnection issue. At the moment I am actually using a spare saitek throttle to control trim and as always, when disconnecting the AP the potentiometer for the trim is always at its last setting resulting in some wonderful behaviour on first touch! When I experimented with one of my rotary encoders I remember it needing something like 60 turns to move the trim wheel for max to min. Am I wasting my time trying to use a rotary encoder for this task?
regards Robert
|
|
|
Post by MarkH on Nov 30, 2016 18:12:02 GMT
Can we see a picture of your AP? Regarding the lag - in my experience this is not a feature of the encoder or the Bodnar board, it is almost certainly a Windows or FSX or LINDA scheduling issue. I see this sometimes across all my panels - if things are happening too fast for FSX the Bodnar boards will appear to stop responding but in fact the button events are being queued up somewhere and will eventually catch up, usually in an unexpected flurry of activity. I am guessing this happens for similar reasons to FSX blurry scenery - i.e. something is getting priority in processing over something else. You might want to look at playing with your AffinityMask for FSX - I wrote about this briefly in another thread here a couple of weeks ago in relation to blurries. Second, I would persist with an encoder for the trim. You are right, it takes lots of turns from end to end - but so does a real trim wheel. You can tune the speed by simply calling the 'trim up' or 'trim down' function multiple times in your Lua function (I am assuming you are using LINDA or Lua programs with FSUIPC). That's what I do (see code below). (I use a Saitek trim wheel but hacked to access the rotary encoder inside of it.) function Elevator_Trim_Down() if RotaryShiftActive == 1 then _AXIS_ELEV_TRIM_SET() else _ELEV_TRIM_DN() _ELEV_TRIM_DN() _ELEV_TRIM_DN() _ELEV_TRIM_DN() _ELEV_TRIM_DN() end end
function Elevator_Trim_Up() if RotaryShiftActive == 1 then _AXIS_ELEV_TRIM_SET() else _ELEV_TRIM_UP() _ELEV_TRIM_UP() _ELEV_TRIM_UP() _ELEV_TRIM_UP() _ELEV_TRIM_UP() end end
|
|
|
Post by rharrisa1 on Dec 1, 2016 7:02:41 GMT
Can we see a picture of your AP? --- Nothing to see here....Please Move on.
Being desperate to try something, I used some spare bits of string, 2 sticks of gum and some tent pegs to approximate a working mock up of a grand idea I had. Standing on one leg in a bucket of water with my trousers rolled up with a breeze on my back, it all just holds together if there is a "R" in the month. But to even dare dream there is anything worthwhile to photograph is an overreach. A few months back I wrote to Gwyn at www.aerosimsolutions.com.au/ enquiring about a throttle and explaining "I had no intention of building a cockpit, I just wanted a working throttle I could depend on". Famous last words. I have now spent months considering the possibility of converting an old half sea container into a possible sim housing and I am no closer to doing anything. For now I am just exploring directions to go in while making detailed plans and trying to learn how to play blues on my 3 string cigar box slide guitar! Trim Wheel
This is looking promising. Copied your code into LINDA and have got it working very well so I am now going to look into building a trim wheel with a rotary encoder. One thing I have noticed is that it takes 3 detents of the rotary encoder to make anything happen on the trim wheel while 1 detent makes the heading bug to move, is this normal? Thanks for your help Mark. regards Robert
|
|
|
Post by MarkH on Dec 1, 2016 7:30:58 GMT
One thing I have noticed is that it takes 3 detents of the rotary encoder to make anything happen on the trim wheel while 1 detent makes the heading bug to move, is this normal? No, it should work just the same. Try mapping your trim to the encoder you are using for the heading bug - does this make a difference? I suspect you have fiddled with the encoder setup parameters in the BU0863 setup program and left them in the wrong state.
|
|
|
Post by rharrisa1 on Dec 3, 2016 0:18:36 GMT
Took another look and everything was setup right so after pulling out what was left of my hair I took a look at the wiring. Found the culprit! Now everything is working as it should.
|
|
|
Post by MarkH on Dec 3, 2016 8:46:28 GMT
Took another look and everything was setup right so after pulling out what was left of my hair I took a look at the wiring. Found the culprit! Now everything is working as it should. Phew! BTW, I think this will suffice as a picture Being desperate to try something, I used some spare bits of string, 2 sticks of gum and some tent pegs to approximate a working mock up of a grand idea I had. Standing on one leg in a bucket of water with my trousers rolled up with a breeze on my back, it all just holds together if there is a "R" in the month. But to even dare dream there is anything worthwhile to photograph is an overreach.
|
|
|
Post by rharrisa1 on Dec 24, 2016 13:37:02 GMT
I am still chasing a solution to the lag problem I have with rotary encoders and as an experiment I took the assignments out of LINDA and just used FSUIPC. I was very surprised to discover I had no lag! Seems to be a LINDA issue which I will now look to experiment with and investigate further.
|
|