Thanks Thanks:  0
Likes Likes:  0
Needs Pictures Needs Pictures:  0
Picture(s) thanks Picture(s) thanks:  0
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Location
    Melbourne - Mexico
    Posts
    655

    Default Encoders with steppers

    Any thoughts on this.
    I have been thinking of buying some 1000 count or 500 count units and putting them on the machine.

    Of course this is only useful when you loose steps, but some feedback on how much work is involved to integrate it with Mach3 and other uses would be appreciated

    /M

  2. # ADS
    Google Adsense Advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many





     
  3. #2
    Join Date
    May 2003
    Location
    Perth WA
    Posts
    3,784

    Default

    Hi Mike,
    I am sure it can be done and Russell is the bloke to ask. It goes beyond just fitting an encoder as you have to then compare it to where it thinks it is and then make it move to where it should be. Quite simple really but I think it would involve making new drivers or getting drivers that can do this. All too hard for me but good to see you thinking about these things. New ideas are born from inquisitive minds.
    Cheers,
    Rod

  4. #3
    Join Date
    Nov 2008
    Location
    Far North Queensland
    Posts
    330

    Default

    Well looks like I better put a post in since Rod has put me in the deep end

    There are a few ways of looking at this, the great thing about steppers is the price (and low RPM torque), for under lets say about $100.00 bucks an axis you can get a drive/motor combo, whack it on your machine and you are in business, but as you say it is open loop. Now plenty of people will chip in here and say that if a machine is setup properly and the steppers sized correctly there will never be a need to worry about feedback, and they are correct.

    For the price of an encoder, then the time to fit it you are kinda (In my opinion anyway ) starting to get into servo territory as far as cost and time/effort goes, maybe not so much cost as the encoders I use were about $30.00 bucks or so each, but it will add up a bit. Then you have to get it to work.

    I am not trying to put you off with all of that, just think it is worth a mention.

    Now down to business, lets say you have a 200 step/rev stepper, you give a step command in one direction, the motor moves one step (1.8 deg from memory?) If you have an encoder that is 50 counts per revolution, this will give you 200 pulses per revolution (using quadrature), so for every step pulse given there should be an encoder pulse returned. Sounds simple enough, a micro would be used to monitor the step/dir output from Mach/EMC, then count up/down as required, then read the encoder position and calculate the following error.

    The tricky part as I see it is that most people use microstepping drives, so now instead of 200 steps per revolution you have 400, 800, 3600 whatever, so the encoder really needs to match the steps per rev of the drive to give a decent enough accuracy. If you did it for one drive, the next one for the next machine would probably be a different step per rev. The encoders I use are count per rev selectable, so this would be helpful.

    It is certainly do-able, with some code, a small PCB for each axis and a little extra wiring you would be in business. What you would have is basically a servo drive without the motor PWM generation enabled and no power stage.

    I could possibly help with some code as that is something I playing around with at the moment, once I get a few basic projects working I intend to make my own servo drive.

    Cheers.

    Russell.

  5. #4
    Join Date
    Nov 2008
    Location
    Far North Queensland
    Posts
    330

    Default

    Actually come to think of it it is EXACTLY a servo drive with its motor output disabled, I have a few bits and pieces lying around I could plug a G251 drive into a stepper, stick an encoder onto it, send the signals to one of my original servo drives and double up the step/dir signals, this would test the theory anyway.

    All with stuff lying around my shed, time is a bit of a killer right now, but I will give it a go when I can.

    It sounds a little crazy though, piggybacking a servo drive onto a perfectly good stepper drive/motor combination... ah well we ARE hobbiest's after all It sounds expensive but not really, my servo drives cost me about 15 to 20 bucks to make (including the power stage) They have their limitations (100,000 pulses per second) but work a treat.

    Another couple of things to mention, do some searching for Gecko PID stepper servo. Also EMC has provision for encoder feedback with steppers to calculate a following error, I don't know of anybody actually using it but it is supposedly there.

    Russell.

  6. #5
    Join Date
    Mar 2007
    Location
    Melbourne - Mexico
    Posts
    655

    Default

    Cheers Russell for the feedback.

    Now i didn't think that there was that much work in adding encoders, but I appreciate the explination.

    My big plus with using encoders would have been the home and in the event you lost steps, you might be able to ref back to the correct path and continue (Given you dodn't drive the cutter through the work).

    So in essence (trying to get my head around you statement) you would use a servo drive to take the input from the encoder. The stepper drive would still drive the stepper and between the two (paired to count the same) you would configure Mach to derive the steppers current position.

    I wonder why someone hasn't just made a small board that allows for encoder input for say 4 axis only. For $90 + encoder board you could ensure repeatibility and accuracy.

    I mean we spend #### loads on other stuff like limit switches, drag cable tray. This seems to me to be a nice little have. EDIT: I like how it auto sensored me with ####)

    /M

  7. #6
    Join Date
    Nov 2008
    Location
    Far North Queensland
    Posts
    330

    Default

    Hi Mike, by using the encoders for home, do you mean to use the index pulse AND'ed in logic with the home switch's ? This is a great idea and I intend to do this if I ever make a machine good enough to go to the effort.

    You have the right idea, I just thought instead of going to the trouble of writing a custom app from scratch, you could use existing code and trick it into doing what you want.

    So the stepper drive/motor works unchanged, the servo drive is plugged into the same step/dir signals and reads the encoder. The servo drive "thinks" it is moving a servo and the encoder feedback tell it that all is well, never mind that the power stage is missing and no motor(servo) is actually plugged in.

    All that Mach gets is an fault signal to say that something is wrong, if you have enough inputs available you could make it distinguish which axis has the fault, or just look at the fault LED on whatever board all this sits on. The fault just goes into either the limit or estop circuitry if you want to keep things simple.

    My proto servo board is at a Mate's place that happens to be away at the moment for a few more weeks, I am sure I have some programmed chips kicking around, I might have to make a little PCB to test this, if I get time before my mate gets back I will try it out.

    I don't really know how well it will work, but one way to find out !

    Cheers.

    Russell.

Similar Threads

  1. Matching Power supply, driver and steppers?
    By gaffa in forum CNC Machines
    Replies: 3
    Last Post: 2nd March 2009, 02:10 PM

Tags for this Thread

Posting Permissions

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