cancel
Showing results for 
Search instead for 
Did you mean: 

L6470 overcurrent errors

dmatsumoto
Associate II
Posted on July 09, 2013 at 00:07

I've gotten past all of my comms issues and seem to be able to talk to the L6470 reliably now.  However, I'm having trouble actually getting it to move.  I keep getting OCD events even when commanding moves at low acceleration and speed.  I have also removed the load and am just spinning the shaft of my Lin Engineering 4218L-01-11 motor.

Here is the pseudocode for my move:

reset device

get status

set max speed to 10 steps/s

set full step speed threshold to 10 steps/s

set accel and decel to 1 step/s/s

set full step mode

set OCD to 2A

set running kval to 255

run at 10 steps/s

As soon as I send the run command, I detect an error via the FLAG output and then read the status register.  I always get an error value where OCD is asserted, or additionally STEP_LOSS_B and STEP_LOSS_A are asserted.

If I take this same motor over to a different off the shelf motion controller, I can drive it without any protection faults occurring.

Can anyone suggest a step that I might have missed that is causing this problem?

#l6480 #l6470 #l6470
7 REPLIES 7
dmatsumoto
Associate II
Posted on July 17, 2013 at 22:41

I've been trying all sorts of things with the command set on the L6470, but I have yet to get it to run at a specified speed and acceleration without getting errors, even when I disable OCD and STALL events.  I have emailed ST support and have yet to get a response.  Is this chip actively supported or should I consider looking elsewhere for a solution?

Vojtech ELIAS
Associate
Posted on July 30, 2013 at 18:08

In case that ovecurrent detection prevents you from making the motor running, then you can start with Overcurrent shutdown feature disabled (bit 7 in CONFIG register).

stefan239955
Associate II
Posted on September 04, 2013 at 11:33

Hey Dave,

I've similar problems with the L6480 driver.

Using the evaluation software it works all out, but using my firmware there's just a short puls and reading the StatusRegister says OCD error and a steploss error.

I controlled the settings in the registers in my firmware with a logic analyser and by reading out the register values and all settings are exactly the same as in the evaluation software (I also read out the values from the evaluation software with the logic analyser. It's all exactly the same).

Just the motor does not move!

Could you solve your problem? Where is/was the problem?

Or has anyone a hint which could help me?

Thanks in advance

Stefan

stefan239955
Associate II
Posted on September 04, 2013 at 11:37

Oh, and diabeling the OCD in the CONFIG register is no solution cause we need to use the stallguard detction and so we need these thresholds...

But if I disable these settings, or setting a higher threshold for the OCD error, it works.

But as I told you, no suitable solution for our application...

David Walker
Associate II
Posted on August 03, 2017 at 08:59

Do you have the other parameters set in the part such as the starting and final slopes for the compensation? If these parameters are too large, it can increase the PWM duty cycle to the point where it is too high and the over current condition occurs. 

David Walker

Posted on May 24, 2018 at 10:38

Hello David,

can you clarify this a bit further? I am having trouble running a motor because of repeated over current faults. Sometimes the fault does not occur and instead the setup only makes noise. In this case, when I am probing the PWM outputs, they are all on for almost the same time.

My questions are: which starting an final slope parameters do you mean? Where can I find these parameters and what are they doing?

many Thanks,

Martin

Posted on May 24, 2018 at 18:38

The parameters are, of course, in the datasheet and accessible over the SPI interface. The L6470 is an open loop controller meaning that the PWM duty cycle is precomputed depending on the speed of the motor and the supply voltage (if EN_VSCOMP is set in the CONFIG register). To get this part to work well (reliably or at all), the parameters must be set properly. The important parameters for this are KVAL*, ST_SLP, FN_SLP_* and INT_SPEED. The slopes I mentioned are used to increase the duty cycle with increasing speed to compensate for the back-EMF of the motor. With that said, I would recommend the following procedure if you're having trouble even starting the motor:

  • Set FS_SPD to its maximum value, 0x3FF.
  • Configure the chip so EN_VSCOMP is off. This is the default. I'm doing this so I can know exactly what the duty cycle is.
  • Set ST_SLP, FN_SLP_ACC, and FN_SLP_DEC to zero. The value of INT_SPEED doesn't matter. This will disable the back-EMF compensation with speed.
  • Set KVAL_RUN, KVAL_ACC, and KVAL_DEC to the desired duty cycle. This can be calculated by:

    KVAL* = int(256*motor_rated_voltage / supply_voltage)

    For example, if the motor is rated at 5V and the supply voltage is 12V, set KVAL to int(256*5/12) = 106
  • Set the OCD_TH to a value greater than the rated current of the motor.

The motor should now spin at least. The L6470 is functioning as a simple constant-voltage stepper motor driver. Note that as there is no back-EMF compensation, the motor current (and thus the torque) will decrease with increasing speed.

I hope this answers your question.

David