TI E2E Community
Motor Drivers Forum
Problem in Building the project of DRV8312 Stellaris kit
I have the Stellaris DK-LM3S-DRV8312 Kit and I am building it. The problem is when I reach level 7, i got a probelm which is the motor starts spinning then the fault LED goes on!! I read in the forum someone asked the same question but with no answer. Please Help!
I think you are over currenting with your motor
try upping this
else if(BUILDLEVEL == 7) RampDelay = 25;
Is this a very small, high current motor with high inductance?
I am using the motor attached with the kit itself.
I have a question. when I build level 6 or 7, if I want to change the SpeedRef or DFuncStartup, there is a relationship between the Speed RPM and these variables as an equation or so? Can I know where can I find it??
Correct me if I am wrong. RMP3 is used for first when Enabling the flag, then changing the speed controlled by RMP.
The motor is NEMA17 with 8 poles, with 1.2 mH inductance
Here is the datasheet.
I'll try to build this myself with HW tomorrow.
As for relationship:
Speed RPM = (Max speed used for scaling in Hz * Speed per unit) * 120 / # poles
DFuncStartup = duty cycle of PWM during start-up. The average of this duty cycle will correlate to an average voltage applied to the motor which can roughly equate to a % of max unloaded speed of the motor.
RMP3 controller is used at startup to control the "open loop / stepper" ramp rate and time (by setting an end target speed) to get the motor turning before you close the commutation loop with InstaSPIN-BLDC.
It iw working now after i changed the Kp and Ki of the speed. Try it and you will see that the Kp and Ki values are too high.
My Kp and Ki values are 0.75 and T/4.2 respectively.
My End Rpm is 60 only from settings.h
Rampdelay is 1
Thank you for your help.
I am having another problem. I am trying the InstaSpin SandStorm GUI on the Cascade mode, i enabke the motor on a speed of 0.3 PU. I am trying to stop the motor by changing the speed to 0 PU but then I get an error. I know that when the speed is zero then all three phases must be ON to stop the rotor of the motor.
Another question is, i saw in the GUI that the speed Ki is 3 but how can I change it to IQ PU?? because i want to use it in the build level program.
it depends on what the PI controllers of your speed and current loops are tuned to.
look at the outputs of the two PI controllers.
Are you getting a fault from the DRV chip? Moving fast from one duty cycle to 0 is probably the culprit as it can cause over current issues depending on your motor. You need to ramp these down.
I didn't change the values of the GUI comes with the kit.
The fault is coming from the DRV as the red led turns on. I am running the motor on 1500 RPM = 0.5 PU and then I turn off the motor by putting the speed to zero. The motor vibrates a bit then I have the error. Should I change the PI parameters for the current (i.e. torque) ??
In the build level program I changed the PI parameters and my response is fine but I have a very little vibrations at the beginning and have the same problem with 0 rpm.
In my program, the ramp delay is 1, the currentstartup, DFuncstartup are IQ(0.1). I increased the gain of the speed, and decreased the integrator. I changed the current integrator parameters a bit because I think the vibration problem comes from high torque (i.e. High current).
I hope you can help me.
setting the speed to 0 doesn't turn off the motor, it just sets a speed ref command of 0 to the input of the speed PI regulator. Remember that your control loop is stil running, and especially if you have a cascade current loop that current loop will be getting a command from the speed loop to apply negative torque to try to drive it to 0 speed. And then even when you are close to 0 speed, any variance away from a 0 speed estimation will produce a torque command to the current loop (depending on how aggressive your PI controllers are tuned)
what are you using for your power supply? one thought is that at high speed when you stop driving the motor it becomes a generator and puts power back onto the bus. This could cause an issue with your power supply, which could cause an issue with the DRV.
did you try using the DRV8301 SPI commands to see which fault was set?
I am using the same power supply too with 24V and 5.5A. I am driving the motor at 1500 RPM = 0.5 PU. I am thinking of a solution which is when the speed ref is zero, i shut down the PI controller and turn on the three PWM signals with no frequency so the rotor will stay fixed, is that applicable?? any ideas??
what are you trying to do, just bring the motor to a stop, or to a coast?
this is with the kit motor (NEMA17), and going from 0.5 PU speed to 0 PU speed causes a fault when it gets to 0?
I'll have to try this out....certainly isn't normal behavior
did you follow the InstaSPIN-BLDC lab document to tune the motor?
I am building a Delta Robot for my graduation project which is let's say a robotic arm with a small payload. what I want is that when the arm reaches certain position, the motor stops and stay fixed - I don't know if it is called coast - but not simply turn off the motor because this will cause the arm to fall down from the load exerted on it.
My objective is not to use an encoder to stop the motor, I need the encoder only to get position.
I followed the document step by step. You can't see this behavior with Duty Cycle mode but you will see it in Velocity or Cascade Mode.
I managed yesterday to stop the motor by turning on all the PWMs but of course the motor's temperature will rise.
I hope this will help you understanding my problem.
just having an encoder won't make the motor stop and provide torque against the weight for free.
what it can allow you to do is allow you to provide the right / minimum amount of torque to try to hold that position.
with a sensorless solution (self sensored based on currents/voltages) at some point the rotor position estimation gives out if the signals are small (no Bemf, low Bemf of motor, low currents).
to really try to do what you would like to do, you would have to consider some very advanced zero speed rotor position estimation techniques. there are several including high frequency injection, PWM pulsing, and some saliency techniques.
I think that is a bit out of your range for a class project, so I'd recommend a rotor sensor if you need positional holding torque.
after trying to solve the problem, I found the solution for that and wrote the code concerns. When the SpeedRef = _IQ(0.0), simply sync the PWMs by
GPIOPinWrite(RESETA_BASE, RESETA_PIN, RESETA_PIN);GPIOPinWrite(RESETB_BASE, RESETB_PIN, RESETB_PIN);GPIOPinWrite(RESETC_BASE, RESETC_PIN, RESETC_PIN); // Synchronize the three PWMs so they work at the same time to stop the motorPWMSyncUpdate(PWM_BASE, PWM_GEN_0_BIT & PWM_GEN_1_BIT & PWM_GEN_2_BIT);
This will cause the motor to hold its position.
Another thing is to reinitialize the variables if the previous speed ref was zero and the new speed ref is not zero.
I have tried this and it is working perfectly.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.