Hello Steve,
The sequence is coming from hall sensors.
The duty cycle is to change the speed of the motor. The speed of the motor is varied by varying duty cycle.
The PWM is done at 63usec of time period.
Do you mean to say, I have to do seq+1 in my code. But it is depends on the hall sensors . What they will give that will be the position of rotor.Then for what reason the sequence should be increased.
PWM should be there, without PWM it is not possible to vary the speed of the motor.
Please suggest me your views.
Code:
Where does seq come from?
The sequence is coming from hall sensors.
Code:
And why is there a duty cycle involved? The main difference between a bldc and a three phase pm synchronous motor is that you supply a constant voltage to the windings for the period they are energised.
The duty cycle is to change the speed of the motor. The speed of the motor is varied by varying duty cycle.
Code:
What frequency is your pwm done at? Aside from being unusual, the frequency may result in the windings being energised for a fraction of the time you expect them to be, especially at higher speeds.
The PWM is done at 63usec of time period.
Code:
If the "seq" is the motor position, and assuming it goes 1,2,3,4,5,6 then I might consider passing seq+1 to your code and higher motor speeds. Of course you will need to allow for the fact that you are now passing 7 (which should be treated as 1) to your function. This is pretty crude, but might work.
Do you mean to say, I have to do seq+1 in my code. But it is depends on the hall sensors . What they will give that will be the position of rotor.Then for what reason the sequence should be increased.
Code:
So, after seeing your code, your problem may also be due to the PWM that you already to be using as well as due to latency in your system.
PWM should be there, without PWM it is not possible to vary the speed of the motor.
Please suggest me your views.