This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8462: Motor Precision different between different driver settings

Part Number: DRV8462

Tool/software:

Hi,

I am running into an issue where I can't get the proper precision when running the drivers in either Automicrostepping Mode or Silent Step Mode.  For this application, we are using the DRV8462 driver to run a stepper motor that is connected to a grit roller via timing belt.  The grit roller is used to feed in plastic film.  We calibrate the motor through the firmware by figuring out the proper steps/mm using an external rotary encoder controlled by an Arduino.  We want the Auto Microstepping mode and/or Silent Step Mode because it allows us to run the motor at the speeds we want and at an acceptable noise level.  At both settings, they consistently fail the calibration step, and the failure mode appears random (ie: rotary encoder ticks do not correspond to the distance travelled in a linear or correlatable way).  However, the interesting part is that when I run the driver with these settings turned off, it consistently passes the calibration process - the main drawback here is that the motor runs too noisy.   So 2 main questions come out:

1) What could be the reasons for this discrepancy in performance?
2) What are ways we can get the precision we want and bring down the overall noise level?

Let me know if you have any additional questions. Below is more background information of the calibration process and Project Facts.  Thanks in advanced!

---------------------------------------------------------------------------------------

The process after setting up the encoder onto the machine is:
1. Set arbitrary steps/mm value.
2. Tell motor to go a certain distance (50mm in this case)
3. Count how many ticks the encoder counted.
4. Convert the number to ticks and arbitrary steps/mm to the actual distance travelled.
5. Recalculate the new steps/mm value.
6. Verification steps: tell motor to go same distance as in step 2.
7. Count how many ticks the encoder counted.
8. Verify the number of encoder ticks corresponds to the distance travelled within our allowable tolerance.
9. If it is within the allowable tolerance, set the steps/mm value.  If it is not, then it is a fail.
Notes: The motor turns at approximately 400 RPM (which comes out to about 500mm/min of paper feeding).  Also, we have successfully used this encoder and calibration process for another application.

Other Project Facts:
-We are building a custom PCB for a cutting machine that is driven by 2 bipolar steppers motors (one in the x-axis the other in the y-axis.  For the purpose of this, only the y-axis motor is applicable with datasheet attached).
-We are using the DRV8462 motor drivers in SPI mode to take advantage of some of the features available in SPI mode.
-The microcontroller is an Arduino clone, and the firmware is a modified GRBL code (the main modification is adding SPI communication)
-Before making and designing the custom PCB, we tested with the evaluation board hooked up to an Arduino board.  The evaluation board was configured using the web based GUI, and the firmware was just the normal GRBL code.  It worked fine.
-The cutting machine is using a 48V power supply.

3757.ML23HS0P4100.pdf

  • Hi Phillip,

    Thank you for your post. Please let me review and get back.

    Regards, Murugavel 

  • Hi Phillip,

    Thanks for sharing the motor datasheet. It is a NEMA23 stepper with high inductance 16 mH. You mentioned the application speed was 400 RPM. For a 1.8 ° motor this would be 1333 steps/s in full-step mode or 341.248 steps/s in 1/256 steps mode. We recommend to keep the step rate max 100 kHz. While the digital input of STEP can accept up to 500 kHz current rise and decay time  likely won't be able to keep up, distorting the sine wave. Bumping down the step rate to 1/64 would help bring down the step rate to 85.3 kHz. If you use auto microstepping please select 1/64 step mode. When silent step is enabled internally the driver uses 1/256 step mode. In this use case do not use the silent step mode. To minimize audible noise please the smart tune ripple control decay mode or the smart tune dynamic decay whichever gives you best results. 

    Can we get captures of the current waveforms at steady state velocity if you still have issues after making these changes? Thank you.

    Regards, Murugavel 

  • Hi Murugavel,

    Thanks for getting back to me.  There was an error in my application speed in my initial post.  The top end is at 400 RPM, but the calibration is actually done at 30 RPM.  At this slower speed, I am seeing the calibration fail in the settings I mentioned in my initial post.  Does this change your suggestions?

  • Hi Phillip,

    Thank for the follow up. Yes at 30 RPM using 1/256 step mode or auto microstepping with 1/256 should not cause any issues. To minimize audible noise please the smart tune ripple control decay mode or the smart tune dynamic decay whichever gives you best results. 

    Regarding silent step mode, if the tuning for a proper current regulated sine wave phase currents waveform is not correct there is a possibility of losing steps. As well as enabling and diabling silent step mode while the motor is running or setting too low a silent step transition step rate could result in missed steps. For consistent performance you should run with either silent step mode with proper PID tuning during the entire operation full time. You can set the silent step  transition threshold to the higher step rate value. If not, you may want to avoid silent step mode. Thank you.

    Regards, Murugavel  

  • So this is what doesn't make sense to me.  My assumption is that at slower speeds, the drivers should be more precise and less prone to skipping steps.  However, my encoder readings are telling me otherwise.  I'm in the middle of trying all your suggestions so I'll update you with that when I get through them.  In the mean time, what could be causing issue where the motor loses precision when using auto microstepping or silent step, but is precise enough without using them?

  • Hi Phillip,

    You're correct. At slower speeds it the stepper motor is less likely to stall or skip steps because its output torque tends to be higher. This is the nature of a stepper motor speed vs. torque characteristic.

    My first point was, if you were to dynamically switch between silent step mode and non-silent step mode while the motor was spinning you could lose steps. To avoid this from happening you could set the silent step transition threshold to the maximum value just so the driver will operate in silent step mode for the entire range of speeds. See below example setting.

      

    My second point was, ensure proper tuning of the silent step mode PI loop for distortion free sine wave output at the desired current amplitude level. Note, the current regulation in Silent step mode is not done using Itrip comparator logic. Instead it uses the PI loop for current regulation using a fixed fPWM. See below block diagram from the datasheet. If the SS step mode PI loop was imperfect this could result in missing steps. This was what I meant.  

    Auto microstepping is based on a digital interpolator which interpolates sub steps from one full cycle of the STEP input. As soon as auto microstepping is enabled the sub steps period will be calculated from the time between the two previous STEP input pulses 

    If there is a variation in STEP input frequency such as acceleration or deceleration the interpolation either auto corrects or holds as per the direction of frequency change. See below info. As long as the STEP pulse input is between 10 Hz and 300 kHz auto microstepping is expected to function pretty accurately with no step loss. Thank you.  

    Regards, Murugavel 

  • Thanks for the explanation.  Just ran through a bunch of tests with different settings, and I noticed something that could be causing the imprecision I'm seeing.  When the motor spins and stops, right when it stops I can see the spindle rotate in the opposite direction ever so slightly.  At first I assumed it was an issue with the timing belt mechanism the motor spindle is connected to.  However, when running the motor disconnected from the mechanical system, I still see this occurring which leads me to believe it is an electrical issue.  Have you seen this issue before?  Can you explain what could be going on here?  Thanks!

  • Also, to add a bit more detail, there is a very slight delay between after the motor stopping and when the opposite rotation occurs.  The opposite rotation does not occur right when the motor stops so it seems unlikely a mechanical issue.  

  • Hi Phillip,

    When the motor spins and stops, right when it stops I can see the spindle rotate in the opposite direction ever so slightly.

    Did you see any difference in this behavior auto microstepping enabled vs. disabled? 

    At the instant STEP input is stopped I expect the motor to he held in position with the last indexer position currents in coils A and B assuming the ENABLE pin remains at logic high. If ENABLE was made low at the same instant the motor was stopped there could be an overshoot due to inertia - when unloaded it would be the rotor inertia and when loaded it would be the system inertia. However, if you had ENABLE high while the STEP input was stopped electrically we do not expect an unwanted drive. You should be able to capture this with an oscilloscope and analyze - capture coils A and B current which includes the last falling edge of the STEP input. The hold currents in the coils would be a function of the last indexer position. 

    Mechanically the rotor can have a 2nd order impulse response with full-step or half-step especially if it the motor output is not damped adequately. The rotor would bounce back and forth ever so slightly and eventually settle down to a steady state value. This would not cause a position error though.  

    See below screen capture. This shows full-step mode. The blue plot is encoder position output without any load on the motor shaft and the red plot with a load on the motor shaft. In microsteps mode this behavior would be pretty much gone. Thank you.

    Regards, Murugavel 

  • So I figured out what the issue was.  Our firmware has a "Step Idle Delay" configuration option where after a motion completes the firmware disables the motor after a set delay.  Once I disabled this, it solved this issue entirely.  However, this brought up a separate issue where the motors are kept enabled indefinitely.  I would like to be able to reduce the motor power while still maintaining its holding power when the motors are idle.  Is there a way to configure the DRV8462 driver to achieve this?  And if so, how would you recommend I go about it?  Thanks!

  • Hi Phillip,

    Thanks for the update. I'm glad you located the root cause of this issue.

    However, this brought up a separate issue where the motors are kept enabled indefinitely.  I would like to be able to reduce the motor power while still maintaining its holding power when the motors are idle.  Is there a way to configure the DRV8462 driver to achieve this?  And if so, how would you recommend I go about it? 

    The Stand Still Power Saving mode in this device allows you to configure a lower hold current with a programmable delay time and fall time setting using registers so the lower current kick in after the stop action had stabilized. This will help the motor from getting overheated during regular levels of hold current. When a new step pulse is issued the Stand Still mode is automatically and instantly exited and the drive resumes with normal current setting. The below section of the EVM GUI helps evaluate this feature. Thank you.

    Regards, Murugavel