Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stepper and Encoder Concept help neeed

Status
Not open for further replies.

originator

Industrial
Dec 12, 2004
71
0
0
US
Hello

I posted to another forum but probably should have posted here instead now that I am a bit more informed:

Could someone please describe what the concept is for using a shaft encoder on a stepper for tracking with a controller? I want to learn what is the most accurate way to track stepper motion to avoid drift between pulses out of the controller, and the pulses counting back in from the encoder translator. In the application there will certainly be occasional obstructions that will block the motion, and therefore a method to get things back in sync is what I am after. There must be several different approaches, but would it be safe to assume the the controller should also act as the up/down counter and pulse generator simultaneously? Second, is it typically coded where a pulse goes out to the motor, then the controller immediately looks for the corresponding pulse from the encoder, and makes decisions from there if the pulse is missed?

I am ordering an E2 USDigital encoder with an interface IC for translation to up/down clocks. The stepper will be half stepping at 400 pulses, and the Encoder outputs 400 pulses as well. Currently I am experimenting with a Stamp and once I get the details sorted out will move the project to a PIC or SX, or maybe even the new Propeller chip for production. I don't know any language other than some Basic and am trying to get my feet wet with how this works.

I appreaciate any enlightenment on the subject.

Thanks!
 
Replies continue below

Recommended for you

Hi originator.

I believe nbucska has a point.

Generally your understanding is correct. Most "fedback" systems do exactly what you have described. Issue a pulse and count the encoder counts. If not enough, issue another step. You can do this with a stamp. You will be speed limited but depending on what you are attempting this might not pose a serious limit.

Most encoders tend to be quadrature and so encode the direction also, based on whether the A or B transitions come first. There is also a single strange pulse each revolution to allow location of an absolute reference.

You might want to consider servo motors which have no appreciable steps.

Keith Cress
Flamin Systems, Inc.-
 
That is an excellent point about the resolution. I appreciate the reply.

I am ordering the part below which decodes the quadrature into up/down clocks on separate outs, but I'll look in to using the additional absolute output at well. Out of countless hours of digging I haven't seen any code yet that included any encoder counting. Outputting the clock is simple, and in the stamps case it is close to being fast enough, although not cost effective. It is a great learning tool however, I really appreacitae the tip way back to have looked at Parallax. I think once I have the encoder being read, and a serial count update going to an LCD, that will likely make the stamp underqualified speedwise. The SX is almost as simple with its SX/B-asic, so the code will slide over with few changes, then the speed will be fine. There is the thought of using their Propeller which is 8 - 32bit processors in one IC, then I could use one cog for counting only, another for control and they can share the Count variable.

I am using a servo now which is flawless, but the motor/gbox/contoller system is too costly. I can cut the cost by75% with my own code and driver and stepper, plus have a whole lot of fun in the process.

Thanks for the heads up

 
Status
Not open for further replies.
Back
Top