2013-07-08 03:07 PM
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 #l64702013-07-17 01:41 PM
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?
2013-07-30 09:08 AM
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).
2013-09-04 02:33 AM
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 Stefan2013-09-04 02:37 AM
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...2017-08-02 11:59 PM
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
2018-05-24 03:38 AM
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
2018-05-24 11:38 AM
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:
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