Connecting quadrature encoder to spindle on Mesa 7i76e

More
25 Mar 2023 15:46 #267471 by bird-dogman
  1. This is in preparation for rigid tapping.
  2. Encoder is a Chinese knock off 2500P/R 12~24V DC E6B2-CWZ5B PNP.
    1. Added the encoder to linuxcnc using pncconf
    2. Encoder only has connections OUTA, OUTB, OUTZ, COM and (+5v-24v)
  3. Field power is 24v
  4. Using TB3 encoder section of the Mesa 7i76e board. Ignoring differential pins.
    1. Pin 7   A+
    2. Pin 9   GND
    3. Pin 10 B+
    4. Pin 12 +5v
    5. Pin 13 Index+
Questions:
  1. Do I change jumpers 10,11 and 13 to use single ended.
  2. Do I supply 5v from TB3 pins 2 and 4 or use field power at 24v.
Thank You
jim

 

Please Log in or Create an account to join the conversation.

More
25 Mar 2023 17:11 #267477 by PCW
Unfortunately that's not really a suitable encoder

Best is 5V differential (linedriver) interface

Next is 5V single ended (TTL)

12-24V NPN will work as the outputs are just open collector
with a ground reference so you end up with 5V signals when connected to
the 7I76E's encoder inputs with their 2K Ohm pullups to 5V

12-24V PNP is a sourcing output device with 12-24V outputs
To make this work with the 7I76E's 5V single ended pulled-up inputs
you would need a voltage divider on each pin with a low enough resistance
to swamp the built in 2K ohm pullups. Say for A:

Encoder A --> 1K Ohm --> 7I76E ENCA --> 330 Ohm --> GND

Please Log in or Create an account to join the conversation.

More
25 Mar 2023 18:01 #267485 by bird-dogman
Thank you.
I just ordered 5V differential (linedriver) KOYO TRDA-20R1N2500VD from ebay. Seemed like a good deal.

I appreciate the help.

Jim

Please Log in or Create an account to join the conversation.

More
31 Mar 2023 19:00 #267977 by bird-dogman
Encoder KOYO TRDA-20R1N2500VD arrived from ebay. New open box unit.
Changed jumpers W10,W11 and W13 to the differential position. Wired per Mesa 7i76e document for TB3 encoder section.
Spun the encoder shaft by hand see nothing that indicates its working

james@LinuxCnc:~$ halcmd show pin hm2_7i76e.0.encoder
Component Pins:
Owner   Type  Dir         Value  Name
    26  s32   OUT             0  hm2_7i76e.0.encoder.00.count
    26  s32   OUT             0  hm2_7i76e.0.encoder.00.count-latched
    26  bit   I/O         FALSE  hm2_7i76e.0.encoder.00.index-enable <=> spindle-index-enable
    26  bit   OUT          TRUE  hm2_7i76e.0.encoder.00.input-a
    26  bit   OUT          TRUE  hm2_7i76e.0.encoder.00.input-b
    26  bit   OUT         FALSE  hm2_7i76e.0.encoder.00.input-index
    26  bit   IN          FALSE  hm2_7i76e.0.encoder.00.latch-enable
    26  bit   IN          FALSE  hm2_7i76e.0.encoder.00.latch-polarity
    26  float OUT             0  hm2_7i76e.0.encoder.00.position ==> spindle-revs
    26  float OUT             0  hm2_7i76e.0.encoder.00.position-latched
    26  bit   OUT         FALSE  hm2_7i76e.0.encoder.00.quad-error
    26  bit   IN          FALSE  hm2_7i76e.0.encoder.00.quad-error-enable
    26  s32   OUT             0  hm2_7i76e.0.encoder.00.rawcounts
    26  s32   OUT             0  hm2_7i76e.0.encoder.00.rawlatch
    26  bit   IN          FALSE  hm2_7i76e.0.encoder.00.reset
    26  float OUT             0  hm2_7i76e.0.encoder.00.velocity ==> spindle-vel-fb-rps
    26  float OUT             0  hm2_7i76e.0.encoder.00.velocity-rpm ==> spindle-vel-fb-rpm
    26  bit   IN          FALSE  hm2_7i76e.0.encoder.hires-timestamp
    26  u32   IN     0x017D7840  hm2_7i76e.0.encoder.sample-frequency
    26  s32   IN             -1  hm2_7i76e.0.encoder.timer-number

Tried setting signal spindle-index-enabale still nothing. I expected to see at least hm2_7i76e.0.encoder.00.count to go up.

Any debug suggestions.

Thanks
jim
 

Please Log in or Create an account to join the conversation.

More
31 Mar 2023 21:05 - 31 Mar 2023 21:11 #267986 by PCW
I would measure the differential A and B inputs (measure between ENCA- and ENCA+
and ENCB- annd ENCB+)

By moving the spindle you should be able to get + and - differential voltages on both A and B
If you get any differential voltages less than absolute 2V (any voltage in the range from -1.99V to 1.99V)
there is likely a wiring error.
Last edit: 31 Mar 2023 21:11 by PCW.

Please Log in or Create an account to join the conversation.

More
01 Apr 2023 12:38 #268017 by bird-dogman
I was rushing.
There was a problem with the 5v ferrule crimp.  Seems to be working as it should now.
I have to machine a part to mount the encoder next, then try a G33.1.

thank you

jim

Please Log in or Create an account to join the conversation.

More
05 Apr 2023 16:18 #268342 by Tarja
Hi, I am in a very similar situation with single ended pnp 24V inductive encoder.
@PCW do you have any hint where to find or how to build such a voltage divider

I mean in theory I know how but is there something special to know for this specific case

Please Log in or Create an account to join the conversation.

More
05 Apr 2023 16:47 #268343 by PCW
I would use a 2 resistor pair per A/B/IDX:

24V PNP encoder signal --> 1K 1W --> 5V encoder input --> 240 Ohm 1/4W --> GND

Please Log in or Create an account to join the conversation.

More
05 Apr 2023 19:25 #268349 by Tarja
I will try this, thx

Please Log in or Create an account to join the conversation.

More
06 Apr 2023 05:02 #268381 by Tarja
I found a 240ohm 600mW should work.

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.169 seconds
Powered by Kunena Forum