cancel
Showing results for 
Search instead for 
Did you mean: 

Using STSPIN220, how to detect torque increase and stall ?

AlexandreR
Associate II

Hi,

I'm using STSPIN220 to drive a stepper motor with a pushrod.

I only using full step mode, in order to have max. torque.

I would like to detect when pushrod gets in contact with some item (increase torque), and also if stall/blocking.

what would be the best way to achieve these detections?

actually:

  • only using full step mode
  • 500Hz constant clk frequency
  • Ref voltage is set constant, but it is possible to control dynamically
  • SenseA and SenseB resisors are also connected to procesor ADC inputs, so current can be measured.

Thank you in advance,

Alexandre

3 REPLIES 3
Dario CUCCHI
ST Employee

Hi @AlexandreR​ !

Consider that the STSPIN220 drives the motor in order to regulate its current.

So, sampling the current does not give an extra information about the stall or torque increasing.

The interesting information comes from the voltage on each phase of the motor.

In case of stall, the BEMF generated by the motor becomes zero.

Therefore, the phase voltage will decrease with respect to the normal operation one.

At the same time the energy provided to the system increases because the load condition is heavier.

According to this, I can suggest two different methods:

1) Measure the phase voltage on the motor

Just one phase is enough, for example measure the voltage between OUTA1and OUTA2 pins.

Since the OUT pins switches with a PWM signal you have to filter them with a low-pass filter.

If you see that the envelope of the voltage decreases it means that a stall occurred.

2) Measure the average current supply, so the current flowing in the VS pin.

When the torque increases or a stall occur, this current increases.

Both methods requires additional external components to be added to your system.

I suggest to try them both and see which is the most effective for your needs.

In any case the difficult part is to find the right threshold that allows you to detect the stall/stop condition.

In fact, variation of the signal between normal mode and stall mode could be very small, depending on the motor used.

If during the tests you find something interesting and you want to share more details on this post, feel free to do it do it.

Let me know how it is going.

AlexandreR
Associate II

Hello Dario,

Sorry for late reply, and thank you for the informations.

It sounds very clear what you wrote, and I'm confident this should work.

Actually I'm working on other parts of this project, so torque measurement will come later, as wired on prototype, or maybe on next version of PCB.

Anyway, I want to keep other users informed about it.

AlexandreR
Associate II

Hello Dario,

In case anyone is wondering about the same question:

According to the tests I have made, solution 2 seems quite easier to implement.

Solution 1) OUTA1 and OUTA2 have switching voltage. It is quite anoying to filter out some data that can be usefull. Also, even visually when looking at scope, I'm not able to recognize when stepper motor is stall.

Solution 2) I put a series resistor into positive supply of STSPIN220.

1 ADC Channel will be used for measuring on each side of this resistor, so the voltage drop will give information about current consumption.

Maybe, supply voltage value must be taken also into consideration, in case it may also drop a little bit when more current is required.

Solution 2) has advantage the voltage signal is much less AC.

Whatever solution someone may use, do not forget to set "ref" of STSPIN220 high enough... else, current may not increase significantly in case of stall, if limit is already close to normal current.

I have drawn new PCB, and will make tests once I get some assembled devices.