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.

InstaSpin BLDC startup current spike

I am using the Instaspin BLDC code to run a small 12 volt motor. We are using the cascaded level 8 configured code. I notice a current spike when I enable the motor to start. This initial spike sometimes trips my 6 amp TZ circuit. The max running current of our motor is about 4 amps. The start current is set to IQ(0.1). 

From what I can see in the code when the motor is first started it uses the start current to feed into the current PID. I assume the PID is the cause of the intitial current spike as it takes time for it to stabilize the current. Are there any examples or methods used to make the startup current be more smooth and reduce the initial current. I know I could disable the TZ on startup, but I would rather make the current start slower and reduce the current spike. 

I also have a problem when our motor voltage drops from 19 volt to 12 volts quickly. This is due to a user unplugging a power cord. The motor will stall and try to keep running which will cause an over current TZ event. What is the best way to keep the motor running smoothly with a sudden drop in voltage?

  • Hello Gary,
    Regarding the current trip at startup, it sounds like the PID loop coefficients are not set correctly. For the current loop PI controller, D should be set to 0, so it is really a PI controller. Also, the I coefficent will depend on whether you are using a series or a parallel PI structure. In both cases, P = desired bandwidth (in rad/sec) times the motor inductance. The I term should be used to cancel the second pole that forms when you close the current loop, and should be set to R/L in a series structure, and P*R/L for a parallel structure. When set correctly, and assuming that your sampling frequency is high enough, the PI controller should respond quickly enough to catch the overcurrent spike at startup.
    If this doesn't fix the problem, then it could be that you have a very low inductance motor, which is usually associated with very high speed motors. In these cases, you will probably have to increase the PWM frequency, and consequently your sampling frequency. If this still doesn't help, you may have a di/dt that is so high that you need to perform current regulation in hardware. For example, this is often the case for high speed bldc motors used in model race cars.
    When you remove power, there are many reasons why you might see an overcurrent event. The best way to handle a sudden undervoltage condition is to sense the bus voltage via a spare ADC pin, and when an undervoltage condition is detected, simply disable the PWM outputs and let the motor coast down gently. If the speed is very high, the motor may still pump up the bus voltage through the backbody diodes, but it should still be a smoother shutdown compared to just yanking the power cord on a spinning motor.
    Regards,Dave