Jocman Posted July 20, 2024 Posted July 20, 2024 Hi all. This time, I'm getting an issue with the ADF channel selector. I'm using a voltage divider and an AnalogMultiPos snippet. As per Bort, the ADF channel selector is a 10 positions device. So, my voltage divider is made by 9 resistors (10k). The snippet is: DcsBios::AnalogMultiPos adfChannel("ADF_CHANNEL", A7, 10); Running DCS and testing the rotary switch, everything seems working fine, but when switching the channel from 7 to 8, the ADF channel selector jumps from 7 to PSP (the most right position), the initial one. No way to choose channel 8. Reading the BORT values, the value jumps from 89% (channel 7) directly to 0%, but I'd expect a 100% and channel 8 selected (if I switch the channel selector by mouse, when on channel 8 BORT shows 100%, the next click jump to PSP (most right position), with value 0%) What's wrong? I made other voltage dividers and (at least until now) they seem working fine. PS: Sorry, I could get rid of this table.... Jocman "For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci) Prev. Projects: https://forums.eagle.ru/showthread.php?t=50071
No1sonuk Posted July 21, 2024 Posted July 21, 2024 Sounds like it might be a hardware issue. It's like the switch isn't making contact in the 8 position. Check all your solder joints, and maybe reflow them just to be sure they're making good contact where they should. Also check that the switch is making contact in that position.
Jocman Posted July 23, 2024 Author Posted July 23, 2024 Double checked, but everything is working as expected, all the contacts are working In 10 steps, these are the values I get: From 0 to 8 (9 steps) it's a normal sequence, but the last step send a "10" instead of "9" (jumping to PSP most right pos - but it is not the pos 0???); same going back to 0, value "9" is missing. Or maybe there's something wrong in my knowledge on how build the voltage divider? n steps => n-1 resistors 10 steps => 9 resistors GND connected to pin 1, +5V connected to pin 10, + the SIGNAL pin Jocman "For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci) Prev. Projects: https://forums.eagle.ru/showthread.php?t=50071
Vinc_Vega Posted July 23, 2024 Posted July 23, 2024 I'm not familiar with your switches and the connection. But for a 10 position switch maybe the all OFF position also counts as a step. Than there are 9 more positions to connect. So you need 8 resistors. Regards, Vinc Regards, Vinc real life: Royal Bavarian Airforce online: VJS-GermanKnights.de [sIGPIC][/sIGPIC]
No1sonuk Posted July 23, 2024 Posted July 23, 2024 Am I right in that your resistors are 10k each? If so, try 1K. There might be an issue with the amount of current going into your device baing too low. The Bodnar switches that use resistors, use 1K.
Jocman Posted July 25, 2024 Author Posted July 25, 2024 On 7/23/2024 at 7:58 PM, Vinc_Vega said: I'm not familiar with your switches and the connection. But for a 10 position switch maybe the all OFF position also counts as a step. Than there are 9 more positions to connect. So you need 8 resistors. Regards, Vinc As for my "experience" in DCSBIOS, position 0 is the ALL OFF (just for clarity: pos 0 - or pin 1 of the switch - is when the signal is connected directly to GND, pos 1 - or pin 2 of the switch - is when the signal pass trough 1 resistor to GND, etc etc), so I think yes, ALL OFF position counts as a step. On 7/23/2024 at 8:56 PM, No1sonuk said: Am I right in that your resistors are 10k each? If so, try 1K. There might be an issue with the amount of current going into your device baing too low. The Bodnar switches that use resistors, use 1K. I have a loads of 10k resistor (but no 1k), that's why I'm using this one. Nevertheless, I've searched on the web if using 1k or 10k makes someway the difference, but found no clues.... So I made some pragmatic test, simply by programming an arduino to read the analog value and mapping it, and it works correctly.... But maybe you're right...The only problem will be to disassemble all the rotaries I made, once got the 1k resistors. Well, I'll resign myself to do it, and let you know if things will change or not Jocman "For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci) Prev. Projects: https://forums.eagle.ru/showthread.php?t=50071
Jocman Posted July 25, 2024 Author Posted July 25, 2024 Ok, i got some 1k resistors and made the change 10k > 1k. But nothing changed, channel 8 is always skipped. Honestly I don't see any difference between 1k or 10k. And I got the same issue with tbe Ballistic data rotary (I'm working on this one too), but (it's a 11 steps rotary) but the jump here is between 4 and 6 (nr. 5 skipped); and the resistors in this case are all 1k. Jocman "For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci) Prev. Projects: https://forums.eagle.ru/showthread.php?t=50071
No1sonuk Posted July 25, 2024 Posted July 25, 2024 1 hour ago, Jocman said: And I got the same issue with tbe Ballistic data rotary (I'm working on this one too), but (it's a 11 steps rotary) but the jump here is between 4 and 6 (nr. 5 skipped); and the resistors in this case are all 1k. Can you jury rig this switch to run the other control? I'm suggesting this to try to determine if the switch itself has a problem.
Jocman Posted July 26, 2024 Author Posted July 26, 2024 12 hours ago, No1sonuk said: Can you jury rig this switch to run the other control? I'm suggesting this to try to determine if the switch itself has a problem. I already made this tries several times, by testing the same rotary with other snippets, or by adding / subtracting resistors (depending on the steps needed), changing rotaries, multimeter checks, even changing the snippet (by setting 1 step more/less and see what happens), and so on. So, several combinations, several switches tested, but nothing changed: the hardware side is OK, but issues still there. Until now, I can say that (luckly) it seems this problem is related only to ADF channel selector and the Ballistic data selector. Wherever else I used a rotary (i.e. NAV light switch) it seems work correctly. I'll go on with the check of the last panel racks (still the back panels rack and the front panel rack to check), then I'll go on with a full test of all the racks wired to RS485. At this point, maybe it could be better if I'll wrote such a report when I'll finish all the checks and tests, writing all the issues found; as far as I remember, there are really only few things working partially (like the ADF selector). Jocman "For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci) Prev. Projects: https://forums.eagle.ru/showthread.php?t=50071
No1sonuk Posted July 26, 2024 Posted July 26, 2024 Hmm. If other, similar-size analogMultiPos controls work properly, there's nothing wrong with the Arduino library. Might be worth filinf an issue on GitHub for this too.
Recommended Posts