Author Topic: the last challenge is: how to detect if a stepper-motor is rotating  (Read 7243 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
so, you have four stepper motors, you can't touch them, neither you can directly sniff their phases, you can't do it!
And you can't attach a sensor, i.e. a quadrature encoder, to the mechanical load. You can't do it.

But you have to detect if your step-motors are rotating. Don't matter of which speed, and increments.


Hints? I am tempted to "sense" the phases with a sort of magnetic sensor, since when current flows in a wire ... it produces a magnetic field, and an impulse (from the stepper-driver) for sure will alter the magnetic field around the wire of one of the stepper's phase.

here, *if* the motor's driver doesn't use micro stepping, you have one phase changing per increment
Code: [Select]
motor's phases {a, b, b, d}

abcd
0000
0001
0011
0010
0110
0111
0101
0100
1100
1101
1111
1110
1010
1011
1001
1000


sort of circuit based on an hall-effect sensor amplified by an OA, and then triggered to a flip-flop if one of the four phases has a change in the magnetic field (0->1, or 1->0) ?


what do you think?  :popcorn:
« Last Edit: August 19, 2018, 02:42:21 pm by legacy »
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 744
  • Country: us
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #1 on: August 19, 2018, 02:34:19 pm »
That's what dual shaft steppers and rotary encoders are for.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #2 on: August 19, 2018, 02:42:22 pm »
...neither you can sniff their phases,...
Quote
I am tempted to "sense" the phases with a sort of magnetic sensor,

Your distinction between "sniff" and "sense" is likely lost on most of us.

Just because you sense a changing current amplitude or direction in a wire doesn't tell you whether the rotor is actually turning.
 
The following users thanked this post: hans

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #3 on: August 19, 2018, 02:43:31 pm »
That's what dual shaft steppers and rotary encoders are for.

and you can't change your steepers, neither add an encoder, in my case: you can't, that's *THE* problem :D
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #4 on: August 19, 2018, 02:54:17 pm »
Your distinction between "sniff" and "sense" is likely lost on most of us.

Four wires go the stepper-motor from the driver. Right? You can't cut them to add a patch to them, in order to know if the current flowing through them. This is what I called (current) "sniff".

You can't do any intrusive measurement, and you can't touch the cable between the driver and motors.

Hence, my ... well, it's just an idea, is about attaching a sensor to the cable, in order to indirectly know if there is a current flowing in one of the phases since if there is a current flowing change, there is a magnetic field change, and you can measure it without being intrusive.

Just because you sense a changing current amplitude or direction in a wire doesn't tell you whether the rotor is actually turning.

why not? You mean: the driver forces the rotor to keep the position?
in this case, there is no changing current, the current should be constant  :-//



better ideas are welcome  :D
« Last Edit: August 19, 2018, 02:58:43 pm by legacy »
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #5 on: August 19, 2018, 02:57:52 pm »
Do you need to know if the driver is sending the movement order or a closed loop to see if the rotor is acctually rotating?

  If just checking the driver is trying to move it you could use a hall sensor to see the change in the magnetic field of the core.

JS

If I don't know how it works, I prefer not to turn it on.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4426
  • Country: dk
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #6 on: August 19, 2018, 03:02:36 pm »
Your distinction between "sniff" and "sense" is likely lost on most of us.

Four wires go the stepper-motor from the driver. Right? You can't cut them to add a patch to them, in order to know if the current flowing through them. This is what I called (current) "sniff".

You can't do any intrusive measurement, and you can't touch the cable between the driver and motors.

Hence, my ... well, it's just an idea, is about attaching a sensor to the cable, in order to indirectly know if there is a current flowing in one of the phases since if there is a current flowing change, there is a magnetic field change, and you can measure it without being intrusive.

Just because you sense a changing current amplitude or direction in a wire doesn't tell you whether the rotor is actually turning.

why not? You mean: the driver forces the rotor to keep the position?
in this case, there is no changing current, the current should be constant  :-//

better ideas are welcome  :D

can't touch the cable but you can attach a sensor to the cable?

 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #7 on: August 19, 2018, 03:05:58 pm »
Hard to conceive how you could accurately sense the magnetic field of each wire accurately without "touching" them at least to the point where you can separate the wires to get independent measurements?  Your thought experiment quickly devolves into practical issues.

Certainly your scheme would be a decent monitor whether. the drivers were operating properly.

But, unless you can actually do some (invasive) experiments with locked-rotor (or even missing rotor), hard to see how examining the magnetic flux in the wires will tell you anything about the mechanical operation of the rotor.  Even high-end stepper-motor products use optical encoders on the shaft to close the loop for actual position confirmation.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #8 on: August 19, 2018, 03:17:11 pm »
Do you need to know if the driver is sending the movement order

in theory, this means assuming the mechanic-stuff is OK and there is no stall: I have to properly consider how strong is this hypothesis, it might be considered the first order of approximation to my problem.

a closed loop to see if the rotor is actually rotating?

eh, this should be the best answer to the problem, whose question digs into remote controlling a closed-source 3d printer, to the question: is everything ok? is there any stall with the printing-wire-loader?

similar questions dig to the tree axis step motors, and I can't add an encoder sensor, neither I can convince other guys to find a mechanical solution, so ... I wonder I can sort it out by the hall-sensor approach  :-//


I know we'd better abandon that 3d-printer, buy a new one, already designed to remote control, or moving ourselves to an opensource one where you have the full control of the firmware &C ... but life is so complex ... and guys in the team have already said "definitively NO!, we won't change the 3dprinter!", so ... that's life  :palm:

(I am tempted to buy a single ticket to Haiti, they have three "internet-off" weeks where wifi and cell-phones are put off-line around all the island and nobody can physically reach you)
« Last Edit: August 23, 2018, 01:04:54 am by legacy »
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #9 on: August 19, 2018, 03:22:44 pm »
Hard to conceive how you could accurately sense the magnetic field of each wire accurately without "touching" them at least to the point where you can separate the wires to get independent measurements? 

the driver uses a big shielded sock to route the cable around the mechanical frame, but at some point, near the motor, the shielded sock ends with four separated wires, and they go into the motor. There are 2mm between each wire, and 20mm from the end of the shielded sock and the motor's connector, I assumed (maybe I am wrong) enough to wrap a wire around each one  :-//
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7588
  • Country: au
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #10 on: August 19, 2018, 03:27:11 pm »
Fasten a microphone to the outside--- there will be a whirring sound when they are rotating.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #11 on: August 19, 2018, 03:37:07 pm »
hard to see how examining the magnetic flux in the wires will tell you anything about the mechanical operation of the rotor

the idea is: if you can sense a current change in all of the four phases and save it into a latch, you (by a CPLD) can compare the current status with the previous, and understand if the motor trying to rotate

e.g.
previous status: 0001
current status: 0011
------------------------------
the difference --x-   

is it an increment? a decrement? don't have closed-loop information to confirm, but the router has been driven to rotate

Code: [Select]
0000
0001
0011
0010
0110
0111
0101
0100
1100
1101
1111
1110
1010
1011
1001
1000

if in a large time-window (of minutes), there is no difference between the current-status and previous-status at sensing the stepper's phases, you might be able to conclude that
- there is a mechanical stall (the rotor is driven to rotate, but it doesn't)
- the printing-wire is finished (the rotor is really stopped)
- the printer is halted (the rotor is really stopped)
« Last Edit: August 19, 2018, 03:39:18 pm by legacy »
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #12 on: August 19, 2018, 03:37:48 pm »
Fasten a microphone to the outside--- there will be a whirring sound when they are rotating.

intriguing  :D :D :D :D
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4426
  • Country: dk
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #13 on: August 19, 2018, 03:39:11 pm »
Hard to conceive how you could accurately sense the magnetic field of each wire accurately without "touching" them at least to the point where you can separate the wires to get independent measurements? 

the driver uses a big shielded sock to route the cable around the mechanical frame, but at some point, near the motor, the shielded sock ends with four separated wires, and they go into the motor. There are 2mm between each wire, and 20mm from the end of the shielded sock and the motor's connector, I assumed (maybe I am wrong) enough to wrap a wire around each one  :-//

if there is a connector on the stepper just make a short extender cable to get to the wires

 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #14 on: August 19, 2018, 03:40:11 pm »
if there is a connector on the stepper just make a short extender cable to get to the wires

this can't be done, there is not enough space there for a patch.
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #15 on: August 19, 2018, 03:57:24 pm »
if in a large time-window (of minutes), there is no difference between the current-status and previous-status at sensing the stepper's phases, you might be able to conclude that
- there is a mechanical stall (the rotor is driven to rotate, but it doesn't)
Does the current-status in any of the wires actually change when the rotor is turning vs. locked?  I would bet that there is no practically discernible difference that would be useful for this scheme.

Quote
- the printing-wire is finished (the rotor is really stopped)
Surely there are simpler and more straightforward ways of sensing when the printing-wire is finished?

Quote
- the printer is halted (the rotor is really stopped)
Again, it comes back to whether there is any practically measurable difference between the rotor turning vs. not.  The very fine "teeth" used on the rotor and the large number of poles that I have seen in stepper-motor tear-down videos suggests to me that there probably isn't much variation in current whether the rotor is turning or not.  But only a practical test can prove that right or wrong.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4426
  • Country: dk
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #16 on: August 19, 2018, 03:57:56 pm »
seems like a big waste of time to try an invent rube goldbergish workarounds for self imposed limitations, what's next, have to do it blindfolded with one arm behind back? just patch into the cable and be done with it. 

if not, it seems the rest of the team just volunteered to fix the problems themselves
 
The following users thanked this post: thm_w, kony, nugglix, schmitt trigger

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4426
  • Country: dk
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #17 on: August 19, 2018, 04:01:21 pm »
if in a large time-window (of minutes), there is no difference between the current-status and previous-status at sensing the stepper's phases, you might be able to conclude that
- there is a mechanical stall (the rotor is driven to rotate, but it doesn't)
Does the current-status in any of the wires actually change when the rotor is turning vs. locked?  I would bet that there is no practically discernible difference that would be useful for this scheme.

Quote
- the printing-wire is finished (the rotor is really stopped)
Surely there are simpler and more straightforward ways of sensing when the printing-wire is finished?

Quote
- the printer is halted (the rotor is really stopped)
Again, it comes back to whether there is any practically measurable difference between the rotor turning vs. not.  The very fine "teeth" used on the rotor and the large number of poles that I have seen in stepper-motor tear-down videos suggests to me that there probably isn't much variation in current whether the rotor is turning or not.  But only a practical test can prove that right or wrong.

the current rise time should be faster when the motor isn't turning and there isn't any bmf 

 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #18 on: August 19, 2018, 04:06:24 pm »
the current rise time should be faster when the motor isn't turning and there isn't any bmf
Perhaps. But how big is that difference?  Can it be measured with the very passive methods within the limits of this scheme?  How sophisticated would the sensing method need to be?  How sensitive?  How fast (sampling rate)?  It feels like the sophistication and complexity of reliable sensing may have crossed the line of cost/benefit practicality. But maybe that doesn't matter if this is only a theoretical thought-experiment?
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9810
  • Country: 00
  • Display aficionado
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #19 on: August 19, 2018, 04:07:48 pm »
Can we get a comprehensive situational sketch of the actual problem? Now it all feels a bit contrived, with limitations randomly popping up.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4426
  • Country: dk
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #20 on: August 19, 2018, 04:14:28 pm »
Can we get a comprehensive situational sketch of the actual problem? Now it all feels a bit contrived, with limitations randomly popping up.

I can speculate, they don't want him to touch the printer because he has a history of fixing things until they break ;)

or they are crazy ...
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #21 on: August 19, 2018, 04:16:20 pm »


This idea posted on hackaday measures the filament movement by a wheel and encoder.

Interesting. It doesn't completely solve my problem, but it's a good step ahead  :D
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #22 on: August 19, 2018, 04:18:26 pm »
I can speculate, they don't want him to touch the printer because

Mainly for warranty reason. if you modify the 3d printer in a permanent way, you can say goodbye to the warranty. It's a ~>2.5K euro 3d-printer, the warranty-extension will cover the product until 2020.
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #23 on: August 19, 2018, 06:01:56 pm »
Microphone and analyze the audio?

Motor moving makes a sound, motor stuck makes another sound.
 
The following users thanked this post: Richard Crowley

Offline Fred27

  • Supporter
  • ****
  • Posts: 726
  • Country: gb
    • Fred's blog
Re: the last challenge is: how to detect if a stepper-motor is rotating
« Reply #24 on: August 19, 2018, 06:31:53 pm »
I can speculate, they don't want him to touch the printer because

Mainly for warranty reason. if you modify the 3d printer in a permanent way, you can say goodbye to the warranty. It's a ~>2.5K euro 3d-printer, the warranty-extension will cover the product until 2020.
Does it work right now? Then leave it alone.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf