cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure POWERSTEP01 ocd_th and stall_th?

ARöss.1
Associate II

I've set up the POWERSTEP01 driver in voltage mode, which works nicely. Now I want to use the sensor less stall detection feature to implement sensor less homing. How must the stall_th and also the ocd_th values be dimensioned for this to work correctly.

Let's say for example I have a 1.68A stepper and my shunt resistor is 30mOhms. I've configured the hold current to be ~50% of the run current 1.68A using the formulas from application manual.

To calculate the voltages used in the register, I use U = R*I, v_stall = 30mOhm*1.8A = 0.054V, which results in stall_th register value of 1, meaning 31.25mV. Is this correct?

In general, how big shall the stall and overcurrent values approximately be for a stepper?

1 ACCEPTED SOLUTION

Accepted Solutions
Cristiana SCARAMEL
ST Employee

Hi @Alex Rössler​,

first of all I would like to make a note: you are working in voltage mode, why have you the shunt resistor?

The shunt resistor is needed when you work in current mode.

When the motor is driven using the voltage mode approach, a stall condition corresponds to an unexpected increase of the phase current.

The powerSTEP01 measures the load current of each phase sensing the VDS voltage of the low-side power MOSFETs.

In your case you have to calculate the stall threshold taking into account also the drop on the sense resistor.

For example if you want to set a stall threshold of 2.5 A:

you can estimate the drop on the MOS using the Rdson --> Vstall = 23 mOhm x 2.5 A = 57.5 mV

In this case I suggest to round up to 62.5 mV (STALL_TH = 00001).

If you have the sense resistor: Vstall = (23 + 30 ) mOhm x 2.5 A = 132.5 (Vstall_th = 156,25 mV).

There is no general rule, but when you set the stall threshold you should taking into account some points:

  1. the Rdson variation in temperature
  2. lower threshold is more sensitive to a noise
  3. the Stall detection performances can be reduced in the following conditions:​
  • low speed​ (negligible BEMF value)​
    • high speed​ (current can be low because the low pass filtering effect of the inductor)​

With regard to the overcurrent threshold the load current of each half-bridge sensing the VDS voltage of the all integrated MOSFETs.

The first two points of the previous list also apply to the OCD threshold.

If you feel a post has answered your question, please click "Accept as Solution"

View solution in original post

15 REPLIES 15
Cristiana SCARAMEL
ST Employee

Hi @Alex Rössler​,

first of all I would like to make a note: you are working in voltage mode, why have you the shunt resistor?

The shunt resistor is needed when you work in current mode.

When the motor is driven using the voltage mode approach, a stall condition corresponds to an unexpected increase of the phase current.

The powerSTEP01 measures the load current of each phase sensing the VDS voltage of the low-side power MOSFETs.

In your case you have to calculate the stall threshold taking into account also the drop on the sense resistor.

For example if you want to set a stall threshold of 2.5 A:

you can estimate the drop on the MOS using the Rdson --> Vstall = 23 mOhm x 2.5 A = 57.5 mV

In this case I suggest to round up to 62.5 mV (STALL_TH = 00001).

If you have the sense resistor: Vstall = (23 + 30 ) mOhm x 2.5 A = 132.5 (Vstall_th = 156,25 mV).

There is no general rule, but when you set the stall threshold you should taking into account some points:

  1. the Rdson variation in temperature
  2. lower threshold is more sensitive to a noise
  3. the Stall detection performances can be reduced in the following conditions:​
  • low speed​ (negligible BEMF value)​
    • high speed​ (current can be low because the low pass filtering effect of the inductor)​

With regard to the overcurrent threshold the load current of each half-bridge sensing the VDS voltage of the all integrated MOSFETs.

The first two points of the previous list also apply to the OCD threshold.

If you feel a post has answered your question, please click "Accept as Solution"

Hi @Cristiana SCARAMEL​ 

The board has a shunt resistor since it was designed to work both in current and voltage mode. Is the shunt resistor degrading the voltage mode performance in any way?

The voltage mode BEMF compensation parameters are calculated using the motor resistance Rm, do I need to add my shunt resistors resistance to this value to calculate the parameters correctly?

So, to calculate the OCD threshold correctly, do I need to use the Rdson and my shunt resistance or just the Rdson.

Thanks,

Alex

Hi @Alex Rössler​,

no the shunt resistor does not affect the voltage mode performances and it is not involved in the BEMF compensation calculation.

Concerning to the OCD threshold the set value (OCD_TH) will compared to:

  • VDS for the high side MOSFETs ('Vs - Vout')
  • 'VDS + Vsense' for the low side MOSFETs ('Vout - Vgnd')

In short the OCD threshold on the low side MOSs will be higher than the OCD threshold on the high side MOSs.

If you feel a post has answered your question, please click "Accept as Solution"
ARöss.1
Associate II

Okay, thank you.

Hi @Alex Rössler​,

please select your Best Answer to the original post to help the Community to find a faster solution for similar questions.

If you feel a post has answered your question, please click "Accept as Solution"

I use SPINFamily tool for ihm03a1 to calc my settings. I try to select Vth, but I can see unreal Ith like 38,46 A. Why?0693W000003POeHQAW.png 0693W000003POeCQAW.png0693W000003POe7QAG.png0693W000003POe2QAG.png0693W000003POdxQAG.png

ARöss.1
Associate II

@dungeonlords789​ The 38.46A seem reasonable with an over current threshold of 1000mV. How did you arrive at this value?

If 1000mV threshold means 38.46A why ST gives me possibility to use this level for 10A powerstep01? 38.46A is unreal for 10A driver, isn't it?

It's a theoretical limit based on the Rdson I guess. @Cristiana SCARAMEL​