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.
Hello friends,
This post is a group of questions I have come across during using DRV8711 to drive a stepper motor and gear-box assembly at 900rpm (min.).
These questions could be pretty naive, but would help me in developing my application.
Application quick look:
Start motor from rest.
Take it to desired gear-box output angle.
In doing so, for certain time till the desired angle is reached, motor should rotate at max. speed.
Once desired angle starts approaching, motor speed should get reduced.
Ref.:
DRV8711EVM GUI
DRV8711 datasheet
DRV8711EVM User's guide
DRV8711 Quick Spin and Tuning Guide
Questions:
Best regards,
--Utpal
Hi Utpal,
To answer you questions.
1/2. Start and Stop Speed are as they sound. The speed at which the motor starts and stops. You do not have to start and stop at 0 rpm if you motor can handle an instantaneous start up/stop speed.
3. Steps to Stop is intended to gurantee that that motor stops within a certain number of steps. This is outlined furthur in the EVM User Guide on page 17-18.
4. The DRV8711EVM lets you run the motor in Speed or Step mode. Speed mode ramps to a desired speed while Step mode issues a specific number of steps. # of steps specifies how many steps to take in Step mode.
5. This is dependent on the application and the position resolution required. Other factor can be peak speed and vibration requirements.
6. The current settings let you precisely tune the current regulation. This is outlined in detail in the datasheet starting on page 13.
7. They are independent. Current settings are not affected by the microstepping level.
8. ISGAIN is decided by the value of the sense resistor and the peak motor current that you require. You can see Page 13 of the datasheet for more details.
9. Dead-time is the period of time between one FET switching off and the other switching on. Prevents shoot through.
10. There are different scheme for regulating current. Different applications have different requirements.
11. Generally Auto-Mixed and All-Mixed give the best performance. You can look at the current waveform for your specific motor to determine which gives the best performance for ripple, speed, and step accuracy.
12. A zero current step is when the indexer is suppose to be regulating 0A.
13. Blanking time is how long the current trip level is ignored. Shorter blanking time allows for faster response but more susceptible to noise.
14. The driver will continue to drive untill it reaches ITRIP.
15. TON is determined by how long it takes the current to reach ITRIP.
16. These are configured through the SPI registers. You will have to provide more details on the application to determine there settings.
17. I don't quite understand this question. Please clarrify.
18. The MSP430 source code is provided on the EVM tool folder. There is a zip folder under the Design Files section, "Hardware: DRV8711EVM".
Hi Utpal,
I would like to add one comment regarding the motor speed of 900RPM. This can be done without modifying the code if mode is set to full step, half step, quad step, or eighth step. I suggest you try these settings prior to modifying the code.
Assuming your stepper is a typical 200 full steps/revolution (1.8 degrees), set the Target Speed to:
Full step 15 rev/sec * 200 full step/rev * 1 (steps/full step) = 3000 PPS (pulses per second)
Half step 15 rev/sec * 200 full step/rev * 2 (steps/full step) = 6000 PPS
Quad step 15 rev/sec *200 full step/rev * 4 (steps/full step) = 12000 PPS
Eighth step 15 rev/sec *200 full step/rev * 8 (steps/full step) = 24000 PPS
The GUI limit is 32000 PPS, which limits the speed as the number of microsteps/step increase.
Hello Nicholas,
Many thanks for a prompt reply.
Following are my comments necessarily outlining my understanding of these answers.
I had gone through the datasheet, EVM user's guide and a Quick spin and tuning guide.
Here I'm trying to understand the physical significance of the features.
=====
Nicholas Oborny said:1/2. Start and Stop Speed are as they sound. The speed at which the motor starts and stops. You do not have to start and stop at 0 rpm if you motor can handle an instantaneous start up/stop speed.
I consider this feature as an intermediate speed profile when motor speed needs to be increased (if target position is way too off) or decrease (when target position approaches).
=====
Nicholas Oborny said:3. Steps to Stop is intended to guarantee that that motor stops within a certain number of steps. This is outlined further in the EVM User Guide on page 17-18.
In real time this feature can be thought of implementing an emergency halt for the motor.
=====
Nicholas Oborny said:4. The DRV8711EVM lets you run the motor in Speed or Step mode. Speed mode ramps to a desired speed while Step mode issues a specific number of steps. # of steps specifies how many steps to take in Step mode.
In a typical application I intend to develop, this feature can be employed as follows:
a. On motor start, with "0" rpm, motor is in "Speed" mode where the speed gets ramped up to desired value, say 900 rpm.
b. Once 900 rpm is reached, I specify the # of pulses to be issued to DRV8711, based on the speed that I wish to continue, again here 900 rpm.
=====
Nicholas Oborny said:5. This is dependent on the application and the position resolution required. Other factor can be peak speed and vibration requirements.
I shall be working on this. An experimental result might help in understanding this feature more.
=====
Nicholas Oborny said:6. The current settings let you precisely tune the current regulation. This is outlined in detail in the datasheet starting on page 13.
I shall be working on this. An experimental result might help in understanding this feature more.
=====
Nicholas Oborny said:7. They are independent. Current settings are not affected by the microstepping level.
I employed the DRV8711EVM on a stepper motor mounted on a gear-box assembly.
Initially I could not got beyond 300 rpm on the set-up.
The TORQUE register was set to 123 decimal.
This value was later on changed to 255 and the motor could run till 500 rpm without stalling.
This told me that the current pumped in was not sufficient.
During this experiment, resolution was 1/16.
When I changed the resolution to full step, the motor stalled even before reaching desired speed.
TORQUE was set to 255 here.
Am I moving in right direction of thinking?
=====
Nicholas Oborny said:12. A zero current step is when the indexer is suppose to be regulating 0A.
Am I correct in assuming this scenario as the time when, for example, in 1/8 step resolution, at 180deg electrical angle, current in winding A is zero?
=====
Nicholas Oborny said:16. These are configured through the SPI registers. You will have to provide more details on the application to determine there settings.
Here is a description of what the application is intended to do:
1. Start from rest.
2. Ramp to the required / permissible max. speed.
3. Continue at this speed till degree differential between the motor current position and required position is 2 degrees.
4. Slow down to a lower speed.
5. Advance to required position with successive decrease in speed.
6. If meanwhile, user changes required position, decide upon the speed and direction of rotation.
7. Change the speed run time (meaning without coming to stand still and starting back).
=====
Nicholas Oborny said:17. I don't quite understand this question. Please clarify.
The current solution that we are using needs external PWM clocking fed to MOSFET driving IC.
With DRV8711, I believe, in PWM operation mode, only AIN1, AIN2, BIN1 and BIN2 can be given to decide:
Asynchronous Fast Decay, Reverse Drive, Forward Drive or Slow Decay for A or B winding as per Step Directions (Table No. 3, Page 12, DRV8711 datasheet).
Or does the DRV8711 need external PWM to be fed like IR2112 currently used?
=====
These comments, as said, are my understanding for DRV8711 and its implementation in the application stated above.
Best regards,
--Utpal
The spreadsheet attached helped me in understanding the step resolution and current profile in two windings of the stepper motor I used.
Reason for sharing it here is this spreadsheet might come handy for quick references.
The sheet "Step Position Ref. Diagram" gives reference for Winding A and Winding B positions.
Best regards,
--Utpal
Hello Rick,
Many thanks for the suggestions.
Indeed, the rpm speed gets doubled while traversing from 1/16 to 1/8 to 1/4 to 1/2 step resolution.
I tried this technique with unloaded stepper motor and with stepper motor loaded with gear box assembly.
The results are attached herewith.
The target speed was set reference of 1/16 step resolution
As can be seen from the spread sheet:
Full step resolution was never supported.
1/2 step resolution was supported up to 240 rpm
1/4 step resolution was supported up to 400 rpm
1/8 step resolution was supported up to 650 rpm
1/16 step resolution was supported up to 500 rpm
(This is because target speed is set at reference of 1/16 step resolution and for smaller step resolution like 1/8 or 1/4 and so on, rpm gets doubled and trippled w.r.t. that at 1/16)
Looking at this scenario, it becomes necessary to modify the source code in order to test the system at 900 rpm.
Best regards,
--Utpal
Hi Utpal,
There are two conditions that you are seeing here.
First appears to the point at which the motor stalls, which appears to be between 650 and 700 RPM. For all steps except full step, the next step tested at each resolution is greater than the point at which the motor stalls in 1/8 mode.
The second condition may be the initial speed. For full step, you are changing the speed from 0 RPM to 266 RPM instantly. This is probably the reason the for the stall at full step. It appears like the motor can change from 0 RPM to 133 RPM based on the half step reaching 240 RPM. This condition started the motor at 133 RPM.
Once the motor stalls, it is unlikely that changing the source code will correct this.
Do you know the maximum speed of this motor? This motor may not be rated to 900 RPM. Also do you know what the maximum start speed is?
You tried to spin the motor at 800, 900, and several speed above 1000 RPM (up to 7200 RPM).
Hello Rick,
=====
Rick Duncan said:First appears to the point at which the motor stalls, which appears to be between 650 and 700 RPM. For all steps except full step, the next step tested at each resolution is greater than the point at which the motor stalls in 1/8 mode.
My sincere apologies, but I didn't quite understand this point.
=====
Rick Duncan said:The second condition may be the initial speed. For full step, you are changing the speed from 0 RPM to 266 RPM instantly. This is probably the reason the for the stall at full step. It appears like the motor can change from 0 RPM to 133 RPM based on the half step reaching 240 RPM. This condition started the motor at 133 RPM.
Do you mean, that if the motor is running at 1/2 step resolution at 240 rpm, the next rpm can be 133 for full step, provided the motor was "running" at 240 rpm under half step?
=====
Rick Duncan said:Do you know the maximum speed of this motor? This motor may not be rated to 900 RPM.
This motor is rated to work at 1200 rpm free speed under full step resolution.
We have manufacturer's test report depicting below parameters:
Supply voltage = 48 V
Motor current = 3 A
Full step resolution:
900 rpm Pull out torque: 0.9 N-m
Max. free speed: 1200 rpm
1 N-m max. speed: 750 rpm
1/16 step resolution:
900 rpm Pull out torque: 0.8 N-m
Max. free speed: 950 rpm
1 N-m max. speed: 700 rpm
=====
Rick Duncan said:Also do you know what the maximum start speed is?
What is this exact parameter?
Does it refer to max. allowed initial acceleration?
=====
Best regards,
--Utpal
Utpal Tembe said:=====
First appears to the point at which the motor stalls, which appears to be between 650 and 700 RPM. For all steps except full step, the next step tested at each resolution is greater than the point at which the motor stalls in 1/8 mode.My sincere apologies, but I didn't quite understand this point.
=====
[/quote]
The point I was trying to make is that for 1/4 and 1/2 step, the next motor RPM tested appears to be past the motor stall point. For instance, at 1/2 step the motor ran @ 240RPM but the next RPM tested was 720 RPM. Based on the results at 1/8 step, the motor appears to stall between 650 and 700 RPM.
In general, the motor will run at the same RPM for all step rates. The difference is the current waveform is more sinusoidal as the microsteps are increased.
If you test the motor at 650 RPM with 1/4, 1/2 and full steps (9750, 4875, and 2438 PPS) and the acceleration profile is not too harsh (see next paragraph below), the motor should run.
Utpal Tembe said:=====
The second condition may be the initial speed. For full step, you are changing the speed from 0 RPM to 266 RPM instantly. This is probably the reason the for the stall at full step. It appears like the motor can change from 0 RPM to 133 RPM based on the half step reaching 240 RPM. This condition started the motor at 133 RPM.Do you mean, that if the motor is running at 1/2 step resolution at 240 rpm, the next rpm can be 133 for full step, provided the motor was "running" at 240 rpm under half step?
=====
[/quote]
No, I am referring to the starting speed of the motor, which is increased as the mode changes from 1/16 to full step. At 1/16 the starting speed is 17RPM while at full step the starting speed is 266RPM.
The motor manufacturer will sometimes provide a spec stating the maximum start speed. This can be something like the "Maximum no load starting speed" or "Self start range". Both are important as they describe how fast you can go from 0 to the target speed, or change speeds without an acceleration/deceleration profile.
In your case, at full speed your acceleration profile is 0 to 266 RPM instantly. I am assuming the stall happens as the motor starts at full step. By changing the starting speed to 500 PPS, the motor should now start and run when using full steps. You may have to change the Acceleration rate to 1000 PPSPS also.
Utpal Tembe said:=====
Also do you know what the maximum start speed is?What is this exact parameter?
Does it refer to max. allowed initial acceleration?=====
[/quote]
The name of the parameter may be different, but it should describe the maximum speed the motor can start with no load and no acceleration profile. For example, a 1200 RPM motor may have a maximum starting speed of 200 RPM. This means that with no load the starting speed can be set for 200 RPM (approximately 750 PPS at full step).
Under load, the maximum starting may be less.
Hello Rick,
What I understand:
I believe above sequence (g to h to i) will offer smooth transition.
Best regards,
--Utpal
Hi Utpal,
I will respond in more detail later, but there appears to be a misunderstanding about how the GUI works.
Utpal Tembe said:
- DRV8711EVM Software GUI limitation
We can set starting speed to desired rpm for a given step change, but the thing is everytime, we start motor, it starts from zero. I will check if the start speed and step resolution can be changed dynamically when the motor is still running.
You are correct that when you start the motor, it will start at 0.
Once the motor is running, you can change the speed (increase or decrease) by selecting a new target speed and selecting the "Update Speed" button. The motor will then change to the new speed.
You can also change the step mode dynamically, but this may create stalls. This is because changing the mode is effectively an instantaneous change in speed. For instance, changing from 1/4 to full step without changing the target speed increases the motor speed 4x.
By the way, have you looked at the quick spin and tuning guide http://www.ti.com/lit/pdf/slva632 ? This document helps tune your motor. It also provides more information on how to set up the various parameters when you are ready to build your own board.
Hi Utpal,
Utpal Tembe said:Starting the motor from rest (Step 1 of my application requirement)
For lower rpm speeds, a 1/16 step resolution will offer better smooth performance compared to full step. Performances would go on deteriorating while moving from 1/16 to 1/8 to 1/4 to 1/2 to Full step.
For low rpm speeds, 1/8 and 1/16 can help by reducing the probability of stalls due to motor resonance. But you may notice some uneven movement in the motor between full steps.
Utpal Tembe said:2) Motor running at desired rpm speed (Step 2 of my application requirement)
Full step resolution will offer better performance compared to 1/16 step resolution.
Performances would go on deteriorating while moving from Full step to 1/2 to 1/4 to 1/8 to 1/16.
In theory, 1/8 will provide similar speed performance as full step if you use the same current settings unless you are changing current setting between 1/8 and full step. See question below.
Utpal Tembe said:3) Above points consider that the set-up (gear-box assembly + stepper motor) is ideal. Also, current supplied is always 100% of the full-scale.
Variation in current supplied is kept on hold right now.
If the current chopping settings are not changed between 1/8 and full step, you are approximately 2.1A RMS in both modes. The reason is that full step only uses 71% of the current chopping value.
If you want 3A in full step, set the current chopping to 1.41 * 3A or 4.24A. This will set the current in the motor to 3A and may allow the motor to spin faster. Based on percentanges, you may achieve 1000RPM in full step mode.
Utpal Tembe said:4) Assuming the current set-up I have, I assume that maximum rpm speed that can be achieved is 600 rpm regardless of the step resolution.
This appears true, unless you have changed the current chopping in full scale mode.
Utpal Tembe said:5) DRV8711EVM Software GUI limitation
We can set starting speed to desired rpm for a given step change, but the thing is everytime, we start motor, it starts from zero. I will check if the start speed and step resolution can be changed dynamically when the motor is still running.
This was addressed a little in the prior response, but to answer. Start speed cannot be changed dynamically. Think of it as a step function. When starting the motor from 0, some speed must be commanded. The start speed is the speed being commanded. If too little, the motor barely moves. If too much, the motor stalls.
The step resolution can be changed dynamically, but this can create stall conditions. This is because the motor speed is increase or decreased by 2X for each change in step mode.
Once the motor is running, to go to a new speed set the target speed and select "Update Speed".
Utpal Tembe said:6) "Starting rpm" for next Step
I assume the "Starting rpm" for step resolution (2/n) should be the running rpm for previous step (1/n).
Vice-versa for deceleration profile.
I am not sure what is meant by this. The starting speed is based on the motor and how fast it can transition from 0 to a new speed. In the case of your motor, it appears to have no problem with a start speed of 133RPM.
Utpal Tembe said:7) With above points in mind, I think of following algorithm, for motor start, ramp-up, continuation in desired speed for time T, ramp-down, stand still.
Please confirm / guide
- Acc_Rate = 5 rpm / s (300 ppsps)
- Step = Step_1_16
- Start_speed = 0 rpm (0 pps)
- Desired_speed = 1_16_Speed = 25 rpm (1500 pps)
- Motor_EN = 1 (Motor will start running / ramping up)
- Wait for (Desired_speed / Acc_Rate) time. By now, motor has reached 1_16_Speed.
- Start_speed = 1_16_Speed
- Desired_speed = 1_8_Speed = 50 rpm (3000 pps)
- Step = Step_1_18
The general flow when ramping the motor speed up and down using the GUI is to:
a) set the starting speed, target speed, accel rate, and stopping speed based on the step mode. Do not adjust # of Steps or Steps to Stop unless you are moving the motor a specific number of steps.
1) The starting speed should be slow enough to allow the motor to move without stalling. For your motor, that was 133RPM. The stopping speed is typically set to the same value as starting speed.
2) The target speed set to less than 700RPM based on your findings. You can always adjust this if you find that the motor can run at higher speed.
3) Adjust the accel rate to reach the target speed faster.
b) set all the registers as desired
c) set the ENBL bit in the Control register. This is usually done prior to running the motor, as the motor will begin consuming current.
d) select the Start Steps button. The motor should now increase to the target speed.
e) Enter a new target speed (say 350RPM in PPS)
f) select the Update Speed button. The motor should now decrease to the new target speed.
As long as you remain with one step mode, changing speeds should be easy to do. Once the step mode is changed the mode step is increased or decreased immediately. This may cause the motor to stall depending on the difference in speed.
I hope this helps.