I've done a search, and the results just did not go far enough for me. I'm setting up a custom Throttle Quadrant curtesy of HeliMech, and I've managed everything but the flaps and reversers. I get flap movement, but only from flaps 10 to 40 (in a B738). My lever is set to zero, but in sim are set at 10. I've included screenshots of my input config, and the HubHop page I used to get the formula to get me started. Can anyone help me with getting the flaps lever to correspond with the sim lever? My head is starting to hurt! Also, my Pot range is 348 to 641, and if there's anything else you need that I'm missing, please ask, I'll do my best to find it!
#PMDG flaps with a Potentiometer
1 messages · Page 1 of 1 (latest)
Try this preset
https://hubhop.mobiflight.com/preset/?simType=msfs2020&id=033590ac-e7a6-415e-a7ed-ccb2ebcbcf79
HubHop is an API which consolidates Microsoft Flight Simulator 2020 variables and events and provides unique, understandable and standardized events and variables.
You will need to adjust your potentiometer range to 0 to 100.
I'm sorry, but following your link , the page says This preset does not exist or has been deleted. Do you have any thing else?
@sour vector
I can see the linked page just fine.... can you try with a different browser? The not found message only appears for one second and then the page is displayed
I use Firefox
or try clearing your web cache
I
I'll give it a shot!
I've tried in two different browsers, let me try something else...
Do I need to be logged in?
I've trying...
Okay, I don't know what changed, but in the time it took to set up an account, I can now see the preset! I'm still not logged in or anything... Question, you said I need to change my pot range, do you mean the the event range?
Because my pot reads from 348 to 641. I'm sorry if I'm not understanding you , I've slowed down quite a bit in my old age.
@sour vector
It is, of course, a 0-1024 pot, but it's only reading the limited travel of the flaps lever...you probably know this better than I do. I'll shut up now.
@dark hull Hi Jim, it just so happens that I qualify with the age thing, but at the same time I have been working on this subject for a while. I will stand corrected, but its like this, often pots, or in my case Hall sensor output, are scaled to fall within the range 0-100 or 0-16383 depending on the requirements of the aircraft. You have a range 358-641 (presumably you haven't built in gears to utilize more of the potentiometer). Nevertheless, the challenge is to convert whatever pot input you have to something that the sim can work with. Hubhop is an easy way to do that.
I will be 70 years old in a few months, so I also qualify for the age thing.
Where do I plug in the 0-100 range info?
It is just plain math to map your potentiometer output range 348 - 641 into the 0 to 100 range, to be able to use the already made if gates shown in the preset.
Ouch! I'll be 59 this month, but the Parkinson's kinda accelerates things.
here is the Hubhop potentiometer tool calculation
@ 348 - 2.93 / 0 max 100 min s0
l0 5 < if{ 714101 (>K:ROTOR_BRAKE) quit }
l0 15 < if{ 714201 (>K:ROTOR_BRAKE) quit }
l0 35 < if{ 714301 (>K:ROTOR_BRAKE) quit }
l0 50 < if{ 714401 (>K:ROTOR_BRAKE) quit }
l0 64 < if{ 714501 (>K:ROTOR_BRAKE) quit }
l0 75 < if{ 714601 (>K:ROTOR_BRAKE) quit }
l0 85 < if{ 714701 (>K:ROTOR_BRAKE) quit }
l0 98 < if{ 714801 (>K:ROTOR_BRAKE) quit }
714901 (>K:ROTOR_BRAKE)
I should add that your potentiometer range is very limited
That is 293 units out of 1023
I calculate only 77 degrees rotation on the potenitometer
I'm 78 Jaime (haha) Hubhop is your friend to get the data output. for PMDG flaps I likewise scale my sensor to get 0-100 values, but its what you do with it that matters. PMDG has a series of Rotor-brake values that set the flaps, it then becomes a matter of testing the scaled pot output. Jaime very kindly taught me a bit of RPN which I now use... ... as he shows in his post directly above. It was steep learning curve at the time..thanks Jaime!
mapping 9 flaps positions to just 77 degrees makes a very sensitive flaps lever. On average just about 9 degrees between positions.
Okay, I got movement up top, but it skipsflaps five on top, and 30 at the bottom...
Yeah, not a lot of wiggle room.
I think it is because you are moving too much and the operating range is too short
do you have detents for the flaps positions?
I agree with Jaime. The problem I continue to have is the apparent low end variability in the Hall sensor and issues with Arduino A/D. To solve this I'm building a flaps quadrant which use cheap IR sensors at each mechanical stop, and a reflector on the flaps lever. Each flaps position then effectively become a discrete button push, eliminating the variability in AD conversion and noise etc. That s my theory anyway... see how it works.
Yes, it's a detented flaps lever like an actual b737
ok, I didn't know that... you will need the potentiometer reading for each detent.
Wow, if that works, it would probably be easier and less maintainance in the long run
I got them!
Or just have a series of switches built into the quadrant....
Its been a quest of mine from the start, just started with analog devices though and had similar problems Jim. Why use a pot, remove the need for gearing too? There are a number of applications such as the PC6 idle turbine (mixture) stops, the ATR equivalents, in these situations one only needs a way of switching.
Any way, I will keep you all posted on my quest with the new flaps build...
I geared the pots in my DIY TQ so a 100 degree lever movment translates to a 270 degree movement on the pots.
That way I get full potentiometer resolution.
Its a the best way forward for where you need continuous analog input- why build a pot system that only uses 1/3 the range? My rudders are geared similarly! I would advise anyone considering a build to use good quality pots though.
I'm not seeing where I can plug in my pot's reading for a particular flap setting, the equation on top doesn't make sense to me, and I am familiar with reverse polish notation... I guess I'm just not seeing it.
there is no direct number in that code block... everything has been translated to the 0 to 100 scale.
its the logic of Jaimes code that does that, the first line creates the scaled in put and those if statment test the value input and turn ona discrete switch (rotor-brake)
I will leave with it Jaime, hope my comments help!
It was done that way to try to standardize the scale being used in the preset.... everyone has a different potentiometer
You need to figure where in the 0 to 100 scale, each of your detents readings fall
That's what I was finally coming to realize.
If you are already familiar with RPN, then the first part gives you the scale translation
@ 348 - 2.93 /
I think I may have it, I'll let you know after dinner, the wife's calling!
I got you, Jaime, it took me looking at it in your note to me, go ahead!
I get the 0 max 100 min, what is "s0"?
The variable?
I gots my RPN calculator out, trying to find my variables for each position.
Okay, guys! Thank you so much, I have my flaps working just great now! If you'd like, I can post what I did, so it will help anyone looking for similar info! Now, on to reversers!
s0 means store top of stack to register 0
l0 loads top of stack from register 0
Oh, so that's an "L", if I knew coding better than what, c++, I might have known! Thank you, Jaime!
So it's loading register 0 with each line,runs the equation, and compares, then executes the rotor brake command 714 ___. Sometimes it takes me a while to figure these things out.
Awesome! I'll see you in the "reversers" thread!