go_away

Author Topic: Missed step detection  (Read 744 times)

0 Members and 1 Guest are viewing this topic.

Offline PogerttTopic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 3
  • Pogertt
Missed step detection
« on: March 01, 2012, 03:08:33 AM »
A project has:

A stepper motor with 200 steps per revolution.

A Gecko 203V Drive, that microsteps at a resolution of 10.
This drive has an adjustable current limit, which acts as an electronic shear pin.
If the torque required to move the load is more than the drive is adjusted to provide, the drive will stall until the load is lowered.

A quadrature encoder with 1024 pulses per revolution.

The motor, encoder, and drive are existing, and can not be modified or changed.

To make one complete revolution of the motor shaft and encoder, the drive must receive 2,000 pulses.

Each step pulse moves the  motor shaft .18 degrees.
Each encoder pulse detects .3515625 degrees of shaft movement.

I am able to issue a step command, and check encoder position for a Clockwise Move, No Move, or Counter Clockwise Move well before the time required to issue the next step command.
A step pulse is issued every .0002 seconds. (5,000 steps per second)
Solving for an encoder position change requires 45 clock cycles at 80_000_000 clock speed
or .000000563 seconds to solve.
This relationship allows plenty of thinking time between issuing a pulse, and detecting that it was not consummated.

Since there is not an exact 1 to 1, 1 to 2, or 1 to 3 relationship between the two movements, how do I detect a situation where a step pulse was issued, and the motor failed to move?

A second requirement is that a missed step is corrected, so at the end of the move, the shaft ends up in the correct position.
Mmmmmmmm....Cookies

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Missed step detection
« Reply #1 on: March 01, 2012, 03:48:53 AM »
Hi there :)

Very similar topic <-- :) and You were one of the advisers...
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline PogerttTopic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 3
  • Pogertt
Re: Missed step detection
« Reply #2 on: March 01, 2012, 04:30:41 AM »
Same only different.

That solution requires that the encoder and the stepper have the same or an integer multiple of counts, steps per revolution.

This problem has an encoder and stepper that do not have an integer ratio between step and count resolution.

With the ratio of 1.953125 steps per encoder count, after missing numerous moves the error increases until scrap is produced.
Mmmmmmmm....Cookies

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Missed step detection
« Reply #3 on: March 01, 2012, 05:00:46 AM »
Are You allowed to add extra items to the system? Extra encoder maybe? Hall switch?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline PogerttTopic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 3
  • Pogertt
Re: Missed step detection
« Reply #4 on: March 01, 2012, 08:52:39 AM »
Have to work with just what is provided.
Mmmmmmmm....Cookies

Offline Resilient

  • Full Member
  • ***
  • Posts: 111
  • Helpful? 4
Re: Missed step detection
« Reply #5 on: March 01, 2012, 01:31:45 PM »
You know it must synch up at every full revolution.

So just experimentally test at which points in the revolution you get only a single step instead of two steps for an encoder pulse.

Offline PogerttTopic starter

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 3
  • Pogertt
Re: Missed step detection
« Reply #6 on: March 01, 2012, 06:40:07 PM »
You know it must synch up at every full revolution.

So just experimentally test at which points in the revolution you get only a single step instead of two steps for an encoder pulse.


Some of the moves are less than 1 complete revolution.
The Z pulse is not available.
The intent is to detect a missed step as it happens in real time, and correct it B4 the end of the move.

There are 2 axises moving simultaneously, sometimes at different feed rates, and if one of the axises misses pulses the machine will produce scrap.
Mmmmmmmm....Cookies

Offline Resilient

  • Full Member
  • ***
  • Posts: 111
  • Helpful? 4
Re: Missed step detection
« Reply #7 on: March 01, 2012, 07:18:38 PM »

Some of the moves are less than 1 complete revolution.
The Z pulse is not available.
The intent is to detect a missed step as it happens in real time, and correct it B4 the end of the move.

There are 2 axises moving simultaneously, sometimes at different feed rates, and if one of the axises misses pulses the machine will produce scrap.

Can you run an initialization routine with no load if there is no Z pulse? Send it 2000 pulses, see where in those 2000 pulses only a single pulse is needed to trigger the encoder and save how many pulses from the start it was.

It is going to be what, roughly every 21 steps? So you will have an array of around 100 positions where you expect only a single pulse to trigger the encoder instead of two. You keep a pointer to the array so you know where next to expect only a single pulse. If it takes two pulses there, then you know you missed a step. Anywhere else, if it takes 3 pulses to trip the encoder you missed a step.

 


Get Your Ad Here