Welcome to Cockpitbuilders.com. Please login or sign up.

May 07, 2024, 11:21:58 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
351 Guests, 0 Users
Members
Stats
  • Total Posts: 59,641
  • Total Topics: 7,853
  • Online today: 398
  • Online ever: 831
  • (May 03, 2024, 12:39:25 PM)
Users Online
Users: 0
Guests: 351
Total: 351

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

Rotary Switch As A Pot (for Matt)

Started by ian@737ng.co.uk, March 06, 2011, 10:30:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ian@737ng.co.uk

g'day chaps......
well, i'm sorry Matt had so much grief with the rotary switch/encoder issue and recently, i have had four people looking to action a software switch from a rotary using bi-directional control that i had to look at this further because mating the position of the switch and the index marks on the panel also came into the equation.      i have a young friend who is building a C172 cockpit as part of his degree course and he had a problem with the magneto switch which he needs 5 positions for.    this made me do something.
years ago, i was taught how to ladder resistors, so i just applied this technique to a rotary switch.
now FS or FSUIPC will see the rotary as a pot.       then, pete dowson has given us the ability to send an action from a pot when it enters a range.    so that meant it became possible to use the values from each position of the switch to action something (in 3 cases i have been involved in, we are sending a macro).
works really well and hopefully may just help somebody else (yes you matt  ;)  )

here's a link to the 'How To' doc

http://www.737ng.co.uk/rotaryaspot.pdf

have a great day

ian
FS9 - PMDG/Prosim737 - Pokeys - Lots of BU0836X and a BEER FRIDGE :D

jackpilot

I stored that in my Docs file....will be handy for those  "uncharted" application which pop up inevitably.
Great doc Ian
Thanks.


Jack

matta757

Ian,

You are the best. Thanks for taking the time to do all this!

Matt

bussgarfield

Ian, you are a god send old mate.

I have been jiggling around with my autobrake switch for a week now without success. I wired it up as per your original instructions from your site but without too much success. I think it was the the range settings in FSUIPC that I was not getting right.

Your pdf attachment has explained more than I ever realised about FSUIPC so I will be treking off to my local electrical store here in Spain to get my resistors so I can try the laddering technique - which was very well explained on your site, it was FSUIPC I couldn't get to grips with.

Thanks again.
Gary
Gary Buss
Intel E8500, EVGA NF780i mobo, 8 GB DDR2 ram, 500GB SATA2 HD, TH2Go, 3 X NVIDIA GF9800 GT 512mb GPU's, 780W PSU, Vista 64 home, 3 X HANNS-G 22" monitors.
Running - FSX, FSUIPC/WideFS, FSX Booster, FSXpand, SIOC and numerous add on aircraft and utilities.

jackpilot

Just to complement this post here is a summary of the steps allowing the use of a pot for flaps.
It works perfectly.
The actions triggered by different pot values can be used for many other things than flaps.

http://www.cockpitbuilders.com/community/index.php?topic=686.msg5238#msg5238


Jack

matta757

Ian,

As I am reading through this amazing technique, I have discovered another hidden nugget of knowledge. For those of us, including myself, who are using Leo's BUO839X boards, now that my rotaries will be plugged in as AXES, that opens up a bunch of normal button inputs, and in my case, it's going to save me the purchase of another board. So thanks even more for that!

Matt

ian@737ng.co.uk

well Matt after all the probs you had with the C&K rotary's as encoders, i now can sleep at night  ;D
take care

ian
FS9 - PMDG/Prosim737 - Pokeys - Lots of BU0836X and a BEER FRIDGE :D

XOrionFE

Incredible work Ian!

Well I for one dont have a use for this right now but I must say for all that this once again shows the extreme value that Ian provides to this community.   Ian your work is just amazing and I think it is just wonderful that you make this stuff available in such a great format for all to understand.    It is just so nice of you to take your time to help and make these documents and I hope everyone appreciates the effort you have put forth and given.   I have used many of your ideas already and in fact my dual yokes would not have worked out without the design you made available through your work.  Just wanted to say thank you and of course I too will stuff this little nugget into my special document repository for the future need that I am sure will one day arrive.   

Thank you,
Scott

flyinjake

Great Information Ian,

I am not trained in electronics but the information is easy to understand and definitely will be useful.

Jake

matta757

Hey Ian,

Quick clarification question about your diagram... does the Variable wire need to be connected to the 5dvc wire? It appears with the arrow that it does, but I wanted to double check. I am getting some wacky inputs with my switch, but I'm figuring I probably wired it wrong  :-\

Thanks,
Matt

matta757

Wacky inputs fixed, I had the switch starting in a position other than the first. I got it to work both with and without the 5dvc wire connected to the Variable wire. Matter of fact, when the 2 wires were connected, I received a USB hub port power surge message...

bussgarfield

#11
Hi Matt.

I might be able to answer your question for you as I have today bought the resistors and wired up the rotary switch for the first time. I am want to use mine for the autobrake and I am using 4 resistors.
In Ians diagram, the red wire is connected from the +5v of the BU0836X card (which is what I'm using) and soldered to the first terminal you need to use on the switch along with the tail of the first resistor. Just 'ladder' the resistors between the terminals that you require and the tail of the last resistor is soldered together with the black ground cable to the last terminal. The black cable is connected to GND on the BU0836X. The yellow variable is the 'sweeper' which is soldered to the centre terminal of the switch and connected to the axis slot (between GND and +5v) on the card.
I have got the switch appearing in FSUIPC and altering the figures as it should when turned and the parameters have been entered in the FSUIPC ini file but as yet I have not got brakes on my 737 to work. I will have another play tomorrow.

O'h yes, I had to swap the GND and +5v leads over on the BU0836X card to get the correct sequence of numbers but the actual switch now works fine.

Little tip, I set the switch to the off position and then I used a multi meter connected to the centre terminal and moved it around the terminals until I found out which one was the 'first' terminal that I needed. When looking at the switch, the terminals do not necessarily line up to where you think they should be.

Hope that may of been some help.

Gary

Edit - Matt - posted as you obviously found the solution but I thought I would post anyway as it may help someone else.
Gary Buss
Intel E8500, EVGA NF780i mobo, 8 GB DDR2 ram, 500GB SATA2 HD, TH2Go, 3 X NVIDIA GF9800 GT 512mb GPU's, 780W PSU, Vista 64 home, 3 X HANNS-G 22" monitors.
Running - FSX, FSUIPC/WideFS, FSX Booster, FSXpand, SIOC and numerous add on aircraft and utilities.

matta757

Gary,

Thank you for that excellent explanation. Do you have any idea what might be causing me to get a "Power Surge on USB Hub Port" message?

Matt

bussgarfield

Matt,

Not quite sure what you mean by saying 'when the two wires were connected' but it seems like you may have had a short circuit some where.

In position 1 they are both connected without going through a resistor and shouldn't cause a problem.

Like you I think, I am a relative novice at this switching game and am very much reliant on our good friend Ian's remarkable knowledge. I can only echo what Scott said earlier about the great man.

Ian will read this and he may come up with an idea as to the power surge for you.

Gary
Gary Buss
Intel E8500, EVGA NF780i mobo, 8 GB DDR2 ram, 500GB SATA2 HD, TH2Go, 3 X NVIDIA GF9800 GT 512mb GPU's, 780W PSU, Vista 64 home, 3 X HANNS-G 22" monitors.
Running - FSX, FSUIPC/WideFS, FSX Booster, FSXpand, SIOC and numerous add on aircraft and utilities.

matta757

Gary,

Having the VARIABLE and 5dvc connected was something I thought caused the power surge as well... so I disconnected them and all seemed fine... but then it happened again. So I'm at a loss. Is it possible to have too many game controllers plugged into the same USB hub?

bussgarfield

Matt.

Sorry, it was 1.00am here when I sent the last message and I was dog tired so went to bed.

To answer your question, I don't know. I have 3 hubs connected (at the moment) and all are externally powered, 2 X 7 connections and 1 X 4 connections. The 4 point hub is 'full' with MCP, radio, NAV and XPNDR and I have no issues. One of the 7 point hubs is plugged into the other and that doesn't produce problems (yet). I am sure they would not produce them unless they were capable of being utilised to the full. When you think about it, using the BU0836X you are effectively connecting multiple games contollers through one usb port and I don't recall seeing problems in any forums where there have been issues with overloading.
If you have a spare hub or another that you can swap over, try that one. It will at least rule out any issues that you may have with the original hub.

Can someone else come in here to offer any advice as I do not want to mis-guide Matt with my limited knowledge.

Gary

 
Gary Buss
Intel E8500, EVGA NF780i mobo, 8 GB DDR2 ram, 500GB SATA2 HD, TH2Go, 3 X NVIDIA GF9800 GT 512mb GPU's, 780W PSU, Vista 64 home, 3 X HANNS-G 22" monitors.
Running - FSX, FSUIPC/WideFS, FSX Booster, FSXpand, SIOC and numerous add on aircraft and utilities.

ian@737ng.co.uk

Quote from: matta757 on March 12, 2011, 01:43:26 PM
Wacky inputs fixed, I had the switch starting in a position other than the first. I got it to work both with and without the 5dvc wire connected to the Variable wire. Matter of fact, when the 2 wires were connected, I received a USB hub port power surge message...

hi matt....
sorry been out of range the last couple of days, so haven't been here.
ok, gary seemed to answer your question perfectly.     the arrow in the diagram is part of the
switch legend and represents the internal contact which connects to each terminal of the rotary as you rotate it thru each position.   sorry if it mislead you.    you should not attach the 5v directly to the wiper (yellow).
re:the USB problem.   the USB bus should support upto 255 USB devices.   the more you have attached, obviously the more power you are going to draw.    so, could be a Power Supply issue like maxing out the available power
and thanks chaps for the compliments, makes you feel like you did a good job  ;D
take care



ian
FS9 - PMDG/Prosim737 - Pokeys - Lots of BU0836X and a BEER FRIDGE :D

matta757

Ian,

Let me just reiterate how INGENIOUS this solution is. Seriously, I cannot possibly express my full gratitude. As mentioned before, besides making those bloody C&K switches work and allow me to maintain realism, this also completely opens up my BUO836X for more buttons, thus saving me considerably cash.

AND the calibration in FSUIPC is brilliant. I am hoping that this will solve the problem of switches not properly responding as well, but that remains to be seen as I am finishing the conversion of all my switches first then doing all the calibration (maybe a bad idea, but oh well).

Again, your contribution to the community is immeasurable!

Best regards,
Matt

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate