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.

DRV8301-69M-KIT: InstaSPIN FOC 11e motor control with hall not working correctly

Part Number: DRV8301-69M-KIT

Hello,

I bought the DRV8301-69 kit with F2806xF to evaluate it as my motor control (e-Bike application). I went through most of the labs, which are provided. So motor identification works, the motor control in 4 in speed and torque mode is working. But as you can imagine under load from zero senseless is not possible, that's why our motor has HALL sensors to make a better start.

So I tried the labs 11 until the lab 11e with the example of the HALL start. And the motor starts better/quieter (in all other labs motor makes big noise in low rpm under load on startup).

Unfortunately this is is the only lab, which acts weird. The motor does spin, but there are a couple of weird things:

1) I have to put a negative value in gMotorVars.SpeedRef_krpm in order to make it spin forward direction, In all other labs I can put in a positive number for forward spinning.

2) No matter how big the value is I put in gMotorVars.SpeedRef_krpm, it does always accelerate to the maximum rpm of the motor. Evevn if I put in just -0.2. Why?

3) The estimated speed does is also completely wrong. In all other labs this number matches with the gMotorVars.SpeedRef_krpm after the ramp up/down.

4) If the motor was started once, I can not stop it by putting zero in gMotorVars.SpeedRef_krpm, motor will make loud noises. DC voltage increases until my over voltage protection on DC side shuts off. Motor can only be stopped by putting a 0 in Run_Identify. But even then, if I change the gMotorVars.SpeedRef_krpm to zero then, put a 1 back to Run_Identify, motor controller is acting crazy --> loud noises, some spinning --> definitely unstable state.

I don't know, why this is happening. For me it seems like, that something basic is missing here... But I have no clue, because other projects work well... Also, do you have maybe an example with hall sensors and torque mode ? 

Hall sensors are connected on J4 connector. They are working correctly. If I spin the motor by hand I can see the hall changes In the watch window changing.

I attached my user.h settings.

Hope you have an idea.

42618.user.h

  • The right commutation sequence value must be set in gHall_PwmIndex[8] based on the hall sensor input. You might change the value or change the hall sensors wires connection order into the interface.

  • Hi,

    thanks for your reply. I'm not sure, if this is really the issue.

    The startup, even under load, seems ok/very good even under load. No weird noises or stuff like that. But like I wrote in my first post, the speed estimation is completely wrong and no matter what speed I put in in gMotorVars.Speed_krpm motor accelerates to full speed.

    When I put in a zero into this variable after startup motor starts making noise. Once this has happened, I have to reboot the program, even if I put in a 0 to gMotorVars.Flag_Run_Identify, then I see high values, which are constantly updated in gMotorVars.Torque_Nm (between 2 to 4 )

    If I put gMotorVars.Flag_Run_Identify back to zero slow down/shutoff works as expected. And I can put it back to 1, motor starts again normally.

    I think the main problem here is the complete wrong estimation of the speed. The question is: Why does this happen?

    I tried other hall wiring, all lead to very weird issues, this can not be right...

    Maybe I should mention, that these hall sensors are 60° distributed. Is the example for 120° degrees ? Or does it don't matter ?

  • So, I did one more test: I set 

    gHall_Flag_EnableStartup to false to disable hall startup. Now speed estimation in gMotorVars.Speed_krpm is correct again, like in all other labs. 

    But I see a major wrong estimation in gHall_speed_fdb_pu. For example at 1000 rpm, the hall feedback speed only says 200 rpm.

  • Hi,

    so I did further testing and found the problem. All my halls had wrong polarity. So I did NOT all Hall Sensor Values and now it is working.

    One other question: How do I make the acceleration faster in torque mode ?

  • Change the reference torque current ramp control and the gains of the PI controller of the Iq.

  • Hi, 

    how do I change the  reference torque current ramp control ?

  • The lab11e only supports speed loop mode. You may disable the speed loop by commenting "gIdq_ref_pu.value[1] = speed_pid_out;" code, and set the torque current to gIdq_ref_pu.value[1] directly if you want to implement the torque mode.