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?