Jump to content

alps encoder stec16 pinout


chriss
 Share

Recommended Posts

hello all,

yesterday i got my encoders from schuricht and just for fun i measured the output waves with an scope. for this test i put the right and left pin with a 10k resistor to 5v and the middle pin to ground. just like the datasheet from alps descibes. then i measured pin right and pin left.

now i didn´t get the 60 degree shifted waves signals as expected, but something else which is to hard for me to  describe in english. its not so important anyway, because i changed the connections, so that the ground pin was on the left(if you look from the top). and i got the expected outputs. so it seems that only the pins are connected differently, but without a dual band scope it´s nearly impossible to check.

so the question is is there somthing wrong with me or with alps. i am asking because i did a pcb layout for all the encoders and would like to have a correct pinout.

thanks a lot and i am looking forward to learn MIOS.

chriss

Link to comment
Share on other sites

Hi Chriss,

thats a very interesting notice! I just have also tried the encoders from Schuricht (which are reserved for the MBSID Control surface) and came to the same results with my scope. Perfect that you already found the solution! By exchanging the pins, MIOS receives 4 transients for every pulse like expected instead of three, so that the encoders are usable again. Currently MIOS doesn't interpret this special order of transients correctly (one signal is inverted), but I will integrate a fourth encoder mode into MIOS so that you will not notice a difference.

Best Regards, Thorsten.

Link to comment
Share on other sites

hello thorsten,

thats cool that you got the same picture on your scope.

"but I will integrate a fourth encoder mode into MIOS so that you will not notice a difference."

what i don´t understand is,  if it will work when you don´t change the pins. because depending on the direction you turn the decoder, you will get output A starting simultaneously with output B, then going low befoe B goes low. if you turn in the other direction A starts to go high after B goes high but both go low at the same time. so you get a shift but only in the beginning (cw) or in the end (ccw).  if you think about what happens and look on the pinout (shematic) of the decoder, thats makes sense.

i am asking because i couldn´t understand your reply fully (do i have to change the pins or not ?) and because i am wondering if the pic can read such non correct waveforms?

sorry to bother you with this but all the MIOS is still to cryptical for me. (e.g. what you mean with encoder modes?)

thanks

chriss

Link to comment
Share on other sites

Hi Dan,

great to hear that your idea works!!! :)

Hi Chriss,

I wrote that you found the solution and thought that it was clear that the pinning has to be changed for STEC16B... however, in the meantime I tried the encoders directly with MIOS: no changes are necessary, the waveforms are not inverted like assumed (instead one channel of my scope was inverted...) - everything is fine! :)

In order to avoid additional confusion here some final infos:

Under http://www.rs-components.de a datasheet for STEC16B can be found where the terminals are shown in following order: C A B --- this is different from my documentation, where I wrote "A C B" (thats the common pinning for ALPS encoders)

Link to the modified schematic:

http://www.ucapps.de/mbhp/mbhp_dinx4_16enc_alps_stec16b03.pdf

Some more words to the supported encoder modes (or types): MIOS (and MIDIbox16E) allows to use the rotary encoders with double resolution. But this feature only works with non-detented encoders, the detented ones would increment two or four times with every "click". This has to be taken into account when configuring the hardware settings in mios_tables.inc:

;; --------------------------------------------------------------------------
;; In this table DIN pins have to be assigned to rotary encoders for the
;; MIOS_ENC driver 
;; 
;; up to 64 entries are provided
;; 
;; The table must be terminated with an ENC_EOT entry. Unused entries should
;; be filled with ENC_EOT
;; 
;; ENC_ENTRY provides following parameters
;;    o first parameter: number of shift register - 1, 2, 3, ... 16
;;    o second parameter: number of pin; since two pins are necessary
;;      for each encoder, an even number is expected: 0, 2, 4 or 6
;;    o the third parameter contains the encoder mode:
;;      either MIOS_ENC_MODE_NON_DETENTED
;;          or MIOS_ENC_MODE_DETENTED
;;          or MIOS_ENC_MODE_DETENTED2
;;
;; Configuration Examples:
;;    ENC_ENTRY  1,  0,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 0 and 1 of SR 1
;;    ENC_ENTRY  1,  2,  MIOS_ENC_MODE_DETENTED        ; detented encoder at pin 2 and 3 of SR 1
;;    ENC_ENTRY  9,  6,  MIOS_ENC_MODE_NON_DETENTED    ; non-detented encoder at pin 6 and 7 of SR 9
;; --------------------------------------------------------------------------

MIOS_ENC_PIN_TABLE
        ;; encoders 1-16
        ;;        SR  Pin  Mode
        ENC_ENTRY 13,  0,  MIOS_ENC_MODE_NON_DETENTED   ; V-Pot 1
        ENC_ENTRY 13,  2,  MIOS_ENC_MODE_NON_DETENTED   ; V-Pot 2
        ENC_ENTRY 13,  4,  MIOS_ENC_MODE_NON_DETENTED   ; V-Pot 3
        ENC_ENTRY 13,  6,  MIOS_ENC_MODE_NON_DETENTED   ; V-Pot 4
        ENC_ENTRY 14,  0,  MIOS_ENC_MODE_NON_DETENTED   ; V-Pot 5
        ENC_ENTRY 14,  2,  MIOS_ENC_MODE_NON_DETENTED   ; V-Pot 6
        ENC_ENTRY 14,  4,  MIOS_ENC_MODE_NON_DETENTED   ; V-Pot 7
        ENC_ENTRY 14,  6,  MIOS_ENC_MODE_NON_DETENTED   ; V-Pot 8

        ENC_ENTRY 15,  0,  MIOS_ENC_MODE_DETENTED       ; Jog-Wheel
        ENC_EOT

And here a diagram which illustrates the waveforms:

mios_encoder_modes.gif

Best Regards, Thorsten.

Link to comment
Share on other sites

Dear Mr. Thorsten,

Could it be that there is a 'typo' in the Midibox16E pages & in the pdf schematic ?

You mention STEC16B36 (at RS)

This part is very hard to find, I think it should read

STEC16B03

Not a big problem, but still it may confuse some ppl at first, (like me :) )

Best regards & thanks,

DriftZ

Link to comment
Share on other sites

You mention STEC16B36 (at RS)

This part is very hard to find, I think it should read

STEC16B03

thats because RS sells these encoders as "EC16B36", however, maybe a typo on their site. I changed the number to "EC16B", this should cover all types

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...