Log in

View Full Version : Encoder wiring problems



danipelos
10-17-2012, 11:31 AM
Hello. I am trying to connect 4 encoders to an OC Master card using an input connection box. I used 8 consecutive inputs (18-25) and connected the 4 grounds to the common ground of that group.

When I use the SIOC Monitor software to check all connections I found that each encoder is activating 2 inputs no matter in which direction I turn the encoder. For example, the first encoder is connected to inputs 18 and 19. If I turn the encoder clockwise one detent I get the input 18 ON, next detent activates input 19 but also keeps input 18 ON. Next detent turns off input 18 but keeps input 19 activated. Next detent switches both inputs off.

So if I turn the encoder clockwise I get this sequence of events:

First detent: input 18 ON - input 19 OFF

Second detent: input 18 ON - input 19 ON

Thrid detent: input 18 OFF - input 19 ON

Fourth detent: input 18 OFF - input 19 OFF

Fith detent: Same as first one.

If I turn it counterclockwise I get the same results except that input 19 is the first being activated instead of input 18.

Are my encoders working as intended or there is something wrong with them? I have never used an encoder before but I thought it would activate a diferent input depending on which direction I turn it.

I hope you can help me understanding how this should work.

Regards, Daniel.

bobsta63
10-17-2012, 11:37 AM
Hi Daniel,

Although I've never used encoders with the OpenCockpits master card I have used them with a BU0836X card and until running the BU0836X configuration software and setting the two inputs (for example in your case inputs 18 and 19) to be configured as a single encoder the result is the same as what you are seeing - rotating the knob in effect turns both the inputs on and then off/randomly very fast so....

I would assume that everything is definitely OK you now just need to configure in SIOC that the inputs should be used as an encoder and then should work fine in MSFS :)

Hope this helps or atleast gives you something to think about/try,

Cheers,
Bobby

danipelos
10-17-2012, 12:01 PM
I must confess that I havent started learning SIOC yet. I hope you are right and my encoders are working as intended. Now I better start learning how to use SIOC. Thank you for your quick reply Bobsta63!

Regards, Daniel.

jonesthesoftware
10-17-2012, 12:36 PM
Hi Daniel
what you are seeing is the action of Gray code encoders. This is a method of determining which way an encoder is rotating by checking which input has a rising edge first. The odd sequence of ons and offs is because Grey code requires that only one of the 2 inputs changes for each click of the encoder. Search" Gray code" on Wikipedia for example
regards
geoff

bobsta63
10-17-2012, 03:13 PM
Yes Daniel - jonesthesoftware is correct and my first response still applies though. I just left out the technicalities regarding the encoders in my response!... I reckon once you've written your SIOC script you'll be fine :)

danipelos
10-17-2012, 03:21 PM
Thank you both of you!