mr_mojo97 Posted November 29, 2012 Posted November 29, 2012 I'm looking at using rotaries with switches (cheapo ones from eBay that I also use for the comms panel without issues) for ILS/ tacan frequency adjustments and on-off push button. Can this be done? I'm having issues even getting them to work correctly - ie for each switch I have the 2 positives and ground set up and working but when I try to attach the 2 cables for the push button I get a conflict - when I turn the swicth either way the signal for the push button is issued (without pressing it). Anyone know a workaround other than using a seperate switch? Ta MSI M5 z270 | Intel i5 7600k (OC) 4.8GHz | MSI GTX1080ti Gaming X 11Gb | 500gb Samsung 970 Evo NVME M.2 (DCS World) | 500gb Samsung 850 Evo SSD (OS and Apps) | 32Gb 2400MHz DDR4 - Crucial Ballistix | Be Quiet Silent Loop 240mm | NZXT H440 case | Thrustmaster Warthog - 47608 with Virpil Mongoose joystick base | MFG Crosswinds - 1241 | Westland Lynx collective with Bodnar X board | Pilot's seat from ZH832 Merlin | JetSeat | Oculus Rift S | Windows 10 | VA |
JG14_Smil Posted November 29, 2012 Posted November 29, 2012 (edited) Hello, It would help if you provided a pic of your hardware and hook up. I am not familiar with the A-10 controls. Are you referring to a rotary encoder with a push button built in? Sounds like you might be. There are different types of these and some will always show that button pushed in both directions as it is a counter bit. The other lead should go to the directional bit and a controller or code is used to get output in both directions. yes, they do work when set up correctly, but need more info. Edited November 29, 2012 by JG14_Smil
agrasyuk Posted November 29, 2012 Posted November 29, 2012 No, its not "two positives". each ebay switch has A and B connection , and ground (+ two more leads for push action if equipped). When you turn the encoder one detent it will send a quick AB pulse. Turn it the other way and it will send BA. Hardware will translate incoming pulses into direction and ammount. Bodnar card can deal with those. I managed to write autohotkey script that decoded rotary encoder input coming from regular joystick card, did quick and dirty debounce calculation and sent a keystroke out. But it IMHO that stuff is better left on hardware level - use bodnar card! Anton. My pit build thread . Simple and cheap UFC project
mr_mojo97 Posted November 29, 2012 Author Posted November 29, 2012 Hi, yes I'm using 3 BU0836X boards with the rotary encoders. I also meant positives to be 2 switch inputs plus a ground. On the generic encoders I'm using there is a 3 pin side and a 2 pin side - thee 3 pins obviously for the clockwise/ anticlockwise turning. The 2 pin side is therefore for the inbuilt push button but when I connect this there is the conflict I was talking about whereby in Helios and Windows game controllers when the encoder is turned either way it sends push button signal intermittently as well. Hope that makes more sense! MSI M5 z270 | Intel i5 7600k (OC) 4.8GHz | MSI GTX1080ti Gaming X 11Gb | 500gb Samsung 970 Evo NVME M.2 (DCS World) | 500gb Samsung 850 Evo SSD (OS and Apps) | 32Gb 2400MHz DDR4 - Crucial Ballistix | Be Quiet Silent Loop 240mm | NZXT H440 case | Thrustmaster Warthog - 47608 with Virpil Mongoose joystick base | MFG Crosswinds - 1241 | Westland Lynx collective with Bodnar X board | Pilot's seat from ZH832 Merlin | JetSeat | Oculus Rift S | Windows 10 | VA |
agrasyuk Posted November 29, 2012 Posted November 29, 2012 (edited) Did you configure the board pins you connected A and B leads of the encoder to be a rotary input? There is a utility for that on bodnar's site . Edited November 29, 2012 by agrasyuk Anton. My pit build thread . Simple and cheap UFC project
mr_mojo97 Posted November 29, 2012 Author Posted November 29, 2012 Yes, those bindings work. It's only the push button I'm having issues with MSI M5 z270 | Intel i5 7600k (OC) 4.8GHz | MSI GTX1080ti Gaming X 11Gb | 500gb Samsung 970 Evo NVME M.2 (DCS World) | 500gb Samsung 850 Evo SSD (OS and Apps) | 32Gb 2400MHz DDR4 - Crucial Ballistix | Be Quiet Silent Loop 240mm | NZXT H440 case | Thrustmaster Warthog - 47608 with Virpil Mongoose joystick base | MFG Crosswinds - 1241 | Westland Lynx collective with Bodnar X board | Pilot's seat from ZH832 Merlin | JetSeat | Oculus Rift S | Windows 10 | VA |
agrasyuk Posted November 29, 2012 Posted November 29, 2012 Oh , I completley misunderstood the issue then. You get press signal on even though you not pressing it. This must be because miss-wiring then . Which lead are you using as common on encoder side? IIRC it is the middle. If you used either A or B it will indeed trip the button as you rotate Anton. My pit build thread . Simple and cheap UFC project
mr_mojo97 Posted November 29, 2012 Author Posted November 29, 2012 I'm pretty certain it's wired correctly. Middle is ground outers are to 2 switches on leo's board and they work perfectly without the switch connected, it just seems when I connect the press switch cables that's when the issue starts! I've tried a couple of encoders with the same result too. Grrr, it's annoying me now MSI M5 z270 | Intel i5 7600k (OC) 4.8GHz | MSI GTX1080ti Gaming X 11Gb | 500gb Samsung 970 Evo NVME M.2 (DCS World) | 500gb Samsung 850 Evo SSD (OS and Apps) | 32Gb 2400MHz DDR4 - Crucial Ballistix | Be Quiet Silent Loop 240mm | NZXT H440 case | Thrustmaster Warthog - 47608 with Virpil Mongoose joystick base | MFG Crosswinds - 1241 | Westland Lynx collective with Bodnar X board | Pilot's seat from ZH832 Merlin | JetSeat | Oculus Rift S | Windows 10 | VA |
JG14_Smil Posted November 29, 2012 Posted November 29, 2012 Have you tried reversing the two switch leads? Do you need to use a switching diode with a Bodnar board?
agrasyuk Posted November 30, 2012 Posted November 30, 2012 (edited) no switching diodes needed for bodnar X board. in the blue ebay 10 for 10$ encoders the two switch leads are completley isolated from the encoder side (i took one apart). so the only way i see this happening is if to either A or B to short also the switch lead to the ground. i guess is a time for you mojo to go in with a multimeter and test things out. EDIT: i can definetly see how this can be annoying Edited November 30, 2012 by agrasyuk Anton. My pit build thread . Simple and cheap UFC project
JG14_Smil Posted November 30, 2012 Posted November 30, 2012 yes, can never assume anything with electronics. Get the multi-meter out. Make sure both switch leads to the encoder side are on the same return row.
Hansolo Posted November 30, 2012 Posted November 30, 2012 (edited) Hi Did a small test today as I am also setting up ILS with rotary incremental encoders through a BU0836X card . It works fine for me but I am also connecting the switch directly to the game i.e. I am not using helios although it shouldn't make any difference. Only thing of cause is to make small change to the lua code so that one push turns on the ILS power and second push turn power off. In short I was unsuccessful in replicating the observation. Have you tried with another similar encoder? Could be the one you have tried is actually defective. Cheers, Hans Edited November 30, 2012 by Hansolo 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Recommended Posts