584,842 active members*
4,269 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2) > How To Connect Spindle Encoder to EMC via Mesa?
Page 1 of 2 12
Results 1 to 20 of 28
  1. #1
    Join Date
    May 2011
    Posts
    55

    How To Connect Spindle Encoder to EMC via Mesa?

    I am running Mesa control boards for a Cadillac CNC controller new build. A 5I20 Anything I/O for the computer interface. It is fed from a 7I29 for x & z servo (including encoders), 7I37TA for limit swithes, start/stop, etc.

    The only thing I need to hook up is the spindle encoder. It is a absolute type encoder with A, B, and Index channels. It has 5V+ and common. Somehow I need to get this terminated to get the feedback so EMC can know spindle location for threading.
    I am thinking I may need another input board to terminate the spindle encoder too, but what kind? I can't find any boards specifically for encoders only, and all of them seem to be geared for axis control, by that I mean they have a servo power feed, and an encoder feed working together. I only need to get the encoder signal deciphered and back to EMC.

    I am not 100% sure what type of encoder this is with the A, B and Index channels?

    So, what I am asking is how do I get the encoder terminated back to EMC via the Mesa Anything I/O board? Someone must have done this in using Mesa boards on their lathe! Or, do I need something totally different to get this spindle encoder tied in?

    I believe I need a board in between the encoder and Anything I/O that will power the 5V encoder, and decipher the channel signals to feedback to EMC.

    Thanks for the help!

  2. #2
    Join Date
    Dec 2003
    Posts
    24216
    If the encoder is A B & Index, then it is a quadrature encoder, not absolute.
    There are a couple of types of output, differential is considered the best as it has complements of each of the three signals, the other is just AB&I and this is either single ended push pull or open collector.
    The other thing is the voltage, many especially diff. or P.P. are 5v.
    Most motion cards accept differential but in some cases can be set for single ended.
    It is common for controllers and drives to multiply the basic quadrature count and times it x4, so the resolution increases proportionately.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Apr 2005
    Posts
    1778
    Have you used pncconf to generate a config for your lathe. It has setup in there for the spindle encoder. That should tell you which pins need to be connected to the 5i20 for the spindle encoder. I have a 7i43 with 7i42TA boards to break out the signals.

    What are you using to actually connect the wires to the 5i20?

    Alan

  4. #4
    Join Date
    May 2011
    Posts
    55

    REPLY

    Yes, I have used PncConf to setup the system - I get that there are inputs needed at the 5i20 level. I know EMC has a section for spindle encoder, but I don't understand where it pulls its information from at the board termination level, and how to set it up to match my A, B, I inputs.

    What I am trying to find out is what I need to use to actually connect the wires to the 5i20!

    Right now from the 5i20, I have a 50pin cable to the 7i29 for servo X & Z, and 2nd 50pin cable to 7i37TA for inputs/outputs for spindle on/off, coolant, limit switches, etc.

    I have no idea where to terminate the A, B, I, gnd and +5V wires from the spindle encoder!

  5. #5
    Join Date
    Apr 2005
    Posts
    1778
    It looks to me like you hook the encoders to the 7i29 (see page 5 of the 7i29 manual) then the 50 pin cable between the 7i29 and the 5i20 makes the connection to the 5i20.

    Alan

  6. #6
    Join Date
    Nov 2005
    Posts
    496
    If you used pncconf post the README from the config folder. It should tell you where the spindle encoder is expected to be hooked up.

    But really you should know already. what connector tab was showing when you configured the spindle encoder? It corresponds to the connector number on the 5i20.
    Is that the connector that the 7i37 is connected to?

    if you are using EMC 2.4, What pin number is beside the encoder combo box that you picked for the spindle encoder?
    The position of the combo boxes relates to the 5i20 connector.
    The top left combo box is pin 1 on the connector , next combo box down is pin 3 and so on.

    Hopefully that helps

  7. #7
    Join Date
    Jan 2007
    Posts
    148
    you are using a BIT file which includes an encoder ?
    that will give you the connection detail for the pins for A,B,I ( OR ABZ which is the same)
    using the 7I37TA , using pncconf will set up the spindle configuration

    you do not need any other connection interface , connect directly to the 7I42TA pins

  8. #8
    Join Date
    Apr 2005
    Posts
    1778
    NICKKINSMAN, Chester and CNCBasher,

    The 7i29 has two connectors for the encoders to the attached servos. The manual says:
    The 7I29 is a dual 22.5A 165V Hbridge intended for motion control applications
    when used with the MESA 4I27, 4I34M, 4I65, 4I68, 5I20, 5I22, 5I23, or 7I60 motion control
    cards. The 7I29 uses a 50 pin flat cable interface to the motion control card. The 7I29 is
    a 2 Axis card but can connect to 4 axis/cable FPGA controllers, allowing 2 7I29s to share
    a single flat cable from the controller.
    Motor power and motor connection are made with screw terminals. 10 pin encoder
    connectors allow TTL or differential encoders to be connected to the motion control system
    through the 7I29 card

    The 7I29 has overcurrent protection to prevent damage to the Hbridge from stalled
    or shorted motors. Each channel has two user selectable current limit values, full (22.5A)
    and low (11.25A)
    The 7I29s control circuitry is galvanically isolated from motor power and has 2500V
    RMS isolation for safety.
    Alan

  9. #9
    Join Date
    Jan 2007
    Posts
    148
    correct , but where is the confusion ?
    servo card 7I29 is for x & z servo drives and axis encoders

    the question was for Spindle rpm & spindle sync for screw cutting etc , this can connect to a 7I42TA .

  10. #10
    Join Date
    Apr 2005
    Posts
    1778
    I missed that Nick was only asking about the spindle encoder. In Nick's case the 7i37TA rather than the 7i42TA.

    I wonder if his confusion is over which input pin on the 7i37TA matches which input pin on the 5i20? Or that the bitfile reconfigures gpio pins to encoder pins and the 7i37TA just routs the encoder signals back to the reconfigured input pins on the 5i20?

    Alan

  11. #11
    Join Date
    Apr 2005
    Posts
    1778
    Nick,

    Chester asked you to post the "README" generated by pncconf. It will show the pinouts that need to be connected to the 5i20. From that we should be able to help you with which encoder wires would go to which pins on your 7i37TA.

    I am using a 7i43 so this does not directly apply but is merely an example of the info available in the "README" from pncconf. It shows that I need to connect:
    pin# 7 (Pulse Width Gen-P)
    connected to signal:'s-pwm-pulse'

    pin# 9 (Pulse Width Gen-D)
    connected to signal:'s-pwm-dir'

    pin# 11 (Pulse Width Gen-E)
    connected to signal:'s-pwm-enable'

    pin# 14 (Quad Encoder-B)
    connected to signal:'s-encoder-b'

    pin# 15 (Quad Encoder-A)
    connected to signal:'s-encoder-a'

    pin# 17 (Quad Encoder-I)
    connected to signal:'s-encoder-i'
    Alan

  12. #12
    Join Date
    May 2011
    Posts
    55

    Found EMC selection, now how to connect board?

    Thanks for weighing in everyone!

    I did a little more experimenting today in PncConf.

    I found that if I upped the encoder count from 2 to 3 in the Mesa board setup tab, that added the extra A, B & I pin selections (even says quatrature!) on the port 2 tab (ports 2, 3, & 4).

    So, now under port 2 I have the x & z encoder pins used for the 1-25 pinout. And I have the 3 pins for the spindle encoder under the 25-50 pinout section.

    Right now I have a 50 pin connector going to the 7I29 board which takes care of the 1-25 pins for x & z control & encoders.

    I assume I need to jumper another 50 pin connector from the 7I29 to another board to pickup the 25-50 pins and grab that spindle encoder.

    The question now is, what board does that jumper need to go to to provide the interface where I can terminate the encoder wires? Is it just a standard termination board, or is it something special which will take that encoder signal? Also, what supplies the 5V for the encoder?

    Thanks for the help so far!

    Nick

  13. #13
    Join Date
    Apr 2005
    Posts
    1778
    I thought that the spindle encoder was going to be picked up on the 7i37TA board.
    My understanding was that you would have one 50pin cable running from the 5i20 to the 7i29 and a second 50 pin cable running from the 5i20 to the 7i37TA.
    The cable running to the 7i29 should pick up all of the 7i29 stuff (PWMs, enables and x & z encoders). Then limit switches, estop, home, and spindle encoder should all be connected to the 7i37TA.

    Alan

  14. #14
    Join Date
    Nov 2005
    Posts
    496
    What firmware are you using?
    I think I finally am understanding your problem. you want the spindle encoder to show up on the next 5i30 connector or you want to utilize the unused pins on connector 2 ( the ome with the 7i29).

    The single 7i29 only uses half of the pins on 5i20's 50 pin connector.
    You were on the right track increase the encoder count untill you have an encoder on another connector and use that as a spindle encoder.
    or you could build a custom 50 pin cable that goes from the 5i20 to the 7i29 that breaks out the unused pins. Of course this pins would have no filtering or protection they are connected directly to the 5i20.

    you would have to look in the 7i29 manual to figure out which wires to break out.

    Am i finally understanding you right now ?

    Chris M

  15. #15
    Join Date
    Jan 2007
    Posts
    148
    nothing special required , just a straight breakout board will do
    although i use the mesa addon 7I42TA

    use a seperate 5v psu or you can use the 7I42TA
    from the 5v connector , you have the option of 5v power via the 50pin ribbon cable , but i prefer to keep the pc seperate from the machine power rails

  16. #16
    Join Date
    May 2011
    Posts
    55
    Yes Chris, you are understading correctly! I'd probably prefer to just run an add-on jumper from the 7i29 to a sub-board, I'll look into the 7i42. I guess because I am burning the 1-25 pins on the 7I29 board, any sub board I may loose 1/2 of the pins for connection.

    It would be great if I could get it to configure on another port off the 5i20 for these pins, too a 7i42 or equal, but I'm not good enough with the program to know how to customize it to do this. (I have an unused port, that way I could connect the other board directly and have the extra inputs to use as well!)

    Thanks for the help, if I am reading this correctly I will need to procure a 7I42 or similar board and cable and I should be good to go!

  17. #17
    Join Date
    Jan 2007
    Posts
    148
    you have 3 connections to use on the 5I20 P2,P3,P4
    you can configure to use one of the others

    if your stuck with the firmware , let me know what functions you need on
    one of the other connectors and i'll make a custom BIT file if it helps
    if one of the prebuilt configs does not suit

    also let me know which bit file your currently using

    pncconf should take care of the build from then on

    Dave

  18. #18
    Join Date
    Apr 2005
    Posts
    1778
    Dave,

    Nick has a breakout board (his 7i37TA). The main difference between it and the 7i42TA is that because the 7i37TA is opto-isolated the first 16 odd pins are dedicated in and the next 8 odd pins are dedicated out.

    That is why I suggested just running another 50pin cable from the 5i20 to the 7i37TA. Unless he needs either more inputs than available on the 7i37TA or more outputs, switching to a 7i42TA really won't change the need to run a separate cable from the 5i20 to the BOB (7i37TA or 7i42TA).

    Alan

  19. #19
    Join Date
    May 2011
    Posts
    0
    cncbasher has the right idea, I personally use 2 of the 7i42ta and 2 7i29's with the 5i20 with good results. You are headed along the right path by setting additional encoders in pncconf. You will lose some i/o by setting additional encoders, but with the 5i20 you aren't at a shortage of i/o. Set 5 encoders in pncconf, this will set an additional 2 encoders on your cable that is connected to your 7i29 (wasted i/o) but it will force the additional encoder over to your next 50 pin cable, which you probably have connected to your 7i37. Basically, set the 5i20 up as if it is running 2 7i29's. Just a thought. Good choice on cards, Mesa is an awesome company to deal with.

  20. #20
    Join Date
    Nov 2005
    Posts
    496
    Nickkinsman What firmware are you using.

Page 1 of 2 12

Similar Threads

  1. How to get Encoder readings and change analog output using Mesa 5i20 + 7i33?
    By Shen Bingquan in forum LinuxCNC (formerly EMC2)
    Replies: 10
    Last Post: 10-04-2010, 05:58 AM
  2. anyone connect a gecko 540 with colombo spindle?
    By xspyke in forum CNC Machine Related Electronics
    Replies: 1
    Last Post: 05-25-2010, 12:30 PM
  3. Purpose of Capacitor connect with Spindle Motor?
    By cjchands in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 11-13-2009, 05:05 PM
  4. EMC2 mesa 5i22 with linear encoder, Does it work?
    By jbcj in forum LinuxCNC (formerly EMC2)
    Replies: 20
    Last Post: 06-17-2009, 01:19 AM
  5. Spindle Encoder to Mesa 5i20
    By RogerN in forum LinuxCNC (formerly EMC2)
    Replies: 3
    Last Post: 10-17-2008, 01:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •