How to connect Encoder Feedback (diff A/B/Z)

28 May 2011 13:47 #10130 by coverpage
coverpage created the topic: How to connect Encoder Feedback (diff A/B/Z)
This is a newbie question that I did put some effort trying to find with a few documentation and reading forum posts, but I couldn't find a direct answer.

I'm using 3 phase brushless AC motors, both direct drive linear and rotatry motors. I use servo drives that can accept pulse and direction position command. I use an incremental encoders with index for homing. The outputs from these encoders are differential in A B Z. Z is index, A B are the quadrature square waves.

PID tuning and the closed loop control are all done in the servo drive. So the servo drive takes in the encoder feedback. I can split the feedback into two and connect it to the parallel port for EMC.

The questions are

1) Does EMC Require Encoder feedback to operate or can it send command in open loop sending step and direction command to a servo drive? I don't mind sending a digital "in position" signal to the EMC if it's in open loop.

2) What is the Maximum Encoder Counter rate for 4X AB in quadrature encoder input?

3) Can it accept differential signal (A+ A- B+ B- Z+ Z-)? (I can solve this with an IC but I just want to clarify)

4) How do I connect Index signal. Is there a dedicated pin? Separate from Limit switch that is. I have both on my encoders. The limit switches are for the end limits while the index signal is more precise and is for homing. So I want to have an idea on how to hook it up.

5) Can you guys point me to the pin diagram for the parallel port ?

Appreciate any help. I think those who use servo drives and AC motors will also find this very useful in coverting from motion control cards with specialized ICs, to this software based solution.
28 May 2011 15:59 #10134 by PCW
PCW replied the topic: Re:How to connect Encoder Feedback (diff A/B/Z)
1. No, feedback is not needed, EMC can work with pure step+dir drives

2. Maximum encoder read rate with software is 1/(BTP+BTJ) for perfect quadrature. If we allow 30% quadrature distortion this becomes .7/(BTP+BTJ), where BTP is base thread period and BTJ is maximum base thread jitter. So for example if you can manage a 50 KHz base thread with 5 usec of jitter you get a maximum count rate of 28 KHz. Note that this may be quite limiting, for example with a 500 line encoder (2000 counts per turn) this limits you to 880 RPM. Sofware encoder counting works fine with low resolution encoders such as would be useful on a spindle

3. Reading differential signals requires a interface chip (26LS32A etc)

4. EMC has a dedicated index signal, this needs to be connected to the proper I/O signal in HAL
29 May 2011 02:26 - 29 May 2011 02:28 #10142 by jmelson
jmelson replied the topic: Re:How to connect Encoder Feedback (diff A/B/Z)
There are, of course, a number of hardware interfaces that take in encoder signals at high rates and maintain a running position count fro EMC to read at will. Pico Systems and Mesa, for instance, have several devices for this purpose. They can also produce commands to the servo drives and do digital I/O for auxiliary functions.

For instance, the Pico Systems Universal Stepper Controller can read encoders at over 300 K counts/second and output step pulses at 300 K steps/second.

Last Edit: 29 May 2011 02:28 by jmelson. Reason: expand
29 May 2011 15:19 #10152 by andypugh
andypugh replied the topic: Re:How to connect Encoder Feedback (diff A/B/Z)
It's a little late now, but whilst step-direction servo systems can work well, the preferred way with EMC2 is to use "dumb" drives with the control loop (and tuning of that loop) done in software on the controller PC.

Such dumb drives need an interface to EMC2 other than the parallel port, both Pico systems and Mesa electronics make very popular interfaces which either plug into the parallel port (but use it as a communications interface, not individual bits). These are the Pico PPMC and the Mesa 7i43. Mesa also do a range of PCI cards with the same functionality. Both manufacturers also make servo drives, too. (Which tend to be relatively inexpensive, as they contain no cleverness), but as you already have drives you should stick with them.

The previous respondents have tried hard to not push a particular solution, as one of them is Pico, and one of them is Mesa. :-)

The basic message is as Pete described, you will quickly run into speed issues counting quadrature with software, rather faster than you will run out of step rate, because you have more encoder edges than steps in every rev.

Switching to an external step-generator / encoder counter will give you a lot more performance, and a lot more IO lines to use for other things.
The Mesa 7i43 is around $90 for 48 IO lines and hardware stepgens/counters. However, you will tend to also need a daughter-card such as the for differential encoder termination, stepgen buffering and PWM-voltage conversion. I _think_ that the 7i47S ($80) would suit your drives and encoders but you would need to check with Mesa

The Pico Universal Stepper Controller is $250 and has PC interface, step generators and encoder interface all on one board:

Of course, if you are not running out of encoder sampling speed, then your current hardware is probably OK (and you might well find that the encoders work fine simply by connecting all -ve lines to p-port grnd.)
The following user(s) said Thank You: bodhi_94
12 Jun 2011 04:30 #10438 by coverpage
coverpage replied the topic: Re:How to connect Encoder Feedback (diff A/B/Z)
Thanks everyone. I have a good idea now.

I should use another PCI card from Mesa or Pico to generate pulse and count the encoder. Generally I will need to have at least 4Mhz of pulse output and encoder input since I use 1 um encoder running on a linear speed of up to around 3 m/s. 4Mhz should provide a comfortable safety margin.

I really like the idea of this project. Using RTLinux on a liveCD makes it accessible to the masses and free at the same time. Also, the computing power of PC's today could easily interpolate paths for 3D machining. I'm hoping to try this out soon.
Time to create page: 0.067 seconds
Powered by Kunena Forum