Skip to main content
Kurtnelle
Associate II
April 6, 2021
Solved

powerStep01 Constantly tripping Overcurrent.

  • April 6, 2021
  • 16 replies
  • 4018 views

My powerStep01 is constantly triggering the Overcurrent alarm whenever I give a movement command, even if there is no stepper connected. What could possibly be causing this? Previously I was getting a similar effect on the L6470 chip. When I turned off the overcurrent shutdown feature the chip fried and apparently took out GPIO25 of the Raspberry Pi that was command it. In both cases, the motors never moved.

This topic has been closed for replies.
Best answer by Dario CUCCHI

Yes, looking at the status register I only see that the device has detected an UVLO and and UVLO on the ADC (both bits = 0). Also OCD is active low, so OCD =1 means no overcurrent detected. UVLO and UVLO_ADC are the ones that keep the red LED on.

An UVLO_ADC is detected because the X-NUCLEO-IHM03A1 by default does not have any component mounted on the ADC pin, so the voltage on it is around zero. In my board I've already some components on ADC, I forgot to specify it :grinning_face_with_sweat: .

I see two possibilities:

  1. If you don't need the ADC in your application (it is not mandatory to run a motor), you can just disable the related alarm using bit4 in Reg. 0x17 (ALARM_EN).
  2. If you need ADC, just mount a proper couple of resistor on R27 and R28: UVLO threshold is max. 1.35V, the voltage on ADC pin must not exceed 3.3V.

The other bit UVLO is referred to Vs: at the start up there is always a detection because the voltage supply is ramping-up

All these bits are latched, meaning that even if the UVLO condition is gone, the bits stay in the error condition until a "GetStatus�? command is sent.

I expect that if 18V are applied on Vs and you send a "GetStatus�? , the UVLO bit becomes 1 (error released).

16 replies

Dario CUCCHI
ST Employee
April 6, 2021

Hi @Kurtnelle​ ,

a common cause for this issue could be the configuration of the device.

Can you share the content of the registers, used to program the POWERSTEP01 ?

And which evaluation board are you using ? Is it an ST eval board or a custom board ?

Kurtnelle
KurtnelleAuthor
Associate II
April 6, 2021

I am using the ST eval board ( the IHM03A1). I'll have to write a function to generate a textual dump of the registers, however, should the driver even experience an overcurrent event even if no motor is connected? Would fluctuations on the power rails (VDD and VS) trigger a false positive?

Dario CUCCHI
ST Employee
April 6, 2021

The overcurrent detection is based on the measurement of the drain-source voltage of the embedded power MOSFETs. Wrong settings of the gate drivers (gate current, tcc, blanking and deadtime) or overcurrent thresholds too low can trigger spurious overcurrent. For example, if the commutation of the OUT pin is too slow, a Vds higher than expected is detected: overcurrent is triggered even if it is not a real overcurrent.

VS or VDD fluctuation, within the operative range should not trigger a false positive, and I don't expect big fluctuation on VS if no motor is connected to the driver.

Before writing a script, I can suggest a quick check. try to use the following configuration:

Reg 0x13 (OCD_TH) = 0x06

Reg 0x18 (GATECFG1) = 0xA6

Reg 0x19 (GATECFG1) = 0x20

Do not connect the motor and try to send a movement command. Is the overcurrent issue still present ?

Kurtnelle
KurtnelleAuthor
Associate II
April 12, 2021

I've purchased a NUCLEO-F401RE off Amazon so that I can keep up with those tests. When we figure out what the problem is, I'm sure I'll be kicking myself.

Dario CUCCHI
ST Employee
April 16, 2021

Hi @Kurtnelle​ , finally I did the tests !

Here a step by step sequence that you can try.

I think its only a matter of providing the supply voltages and sending the right SPI commands.

So, you can use any control hardware you want: can be the Raspberry Pi or the NUCLEO F401 board.

First, check the connection between the control board and the IHM03A1; you need:

  1. Vs motor voltage and main supply
  2. 3.3V for the digital part and pull-up resistors
  3. A common GND reference
  4. The SPI lines (CS, CK, SDI, SDO)
  5. RESET line (this is active low, so it must be set high for normal operation)

Here is the operation sequence:

  1. Supply the VS = 18V (as you mentioned)
  2. Supply the 3.3V and initialize the communication lines
  3. Clear the status flags sending the command “GetStatus�?. Once is executed, you should see the red LED (D2) turning off.
  4. Send the commands to write all the registers in order to configure the device (see the list below)
  5. Send again a “GetStatus�? command
  6. Send a movement command, for example a “Run�? at 100 step/s

I suggest to try this routine without the motor first and check that no Overcurrent or other error occurs.

If it works, stop the power stage setting it in high impedance, connect your motor and try to run it in the same way.

Consider that I tried the configuration on my motor. Probably yours will move as well, but then you will have to fine tune the configuration according to the target motor and application.

Here is the list registers to be written: the configuration is in current mode, about 0.85A of phase current on IHM03A1.

Addr. 0x05       ACC               = 0x15

Addr. 0x06       DEC               = 0x15

Addr. 0x07       MAX_SPEED   = 0x106

Addr. 0x08       MIN_SPEED    = 0x000

Addr. 0x09       TVAL_HOLD    = 0x0A

Addr. 0x0A      TVAL_RUN      = 0x0A

Addr. 0x0B      TVAL_ACC      = 0x0A

Addr. 0x0C      TVAL_DEC      = 0x0A

Addr. 0x0E      T_FAST          = 0x35

Addr. 0x0F       TON_MIN        = 0x08

Addr. 0x10       TOFF_MIN      = 0x29

Addr. 0x13       OCD_TH         = 0x08

Addr. 0x15       FS_SPD          = 0x3FF

Addr. 0x16       STEP_MODE  = 0x0C

Addr. 0x17       ALARM_EN     = 0xFF

Addr. 0x18       GATECFG1     = 0xA6

Addr. 0x19       GATECFG2     = 0x20 

Addr. 0x1A      CONFIG          = 0x3F88

Kurtnelle
KurtnelleAuthor
Associate II
April 19, 2021

The red light never goes out.

Clear the status flags sending the command “GetStatus�?. Once is executed, you should see the red LED (D2) turning off. <- It doesn't turn off.

I haven't tried setting any registers beyond that.