motion
New Member
YAN-1 said:Well the motor is a unipolar stepper motor so there are 4 windings. And The purpose of the comparator is not to just protect it from current rise when something wrong happens. The whole driving technique depends on applying a large voltage to improve torque and time response. An application note by Microchip (Stepping Motors Fundamentals) also demonstrates that and says that the comparator module can be used to do that.
What you are citing is an earlier section of AN907a. What I am suggesting can be found on the succeeding section on "Unipolar Microstepping" of the same application note. There is not much information in that note. Sense the current on each winding pair and calculate the PWM duty to adjust the current.
However, there is slight flaw in the circuit in fgure 23 of AN907a. I would not recommend putting freewheeling diodes because they slow down the current decay. Anyway, because of the bifilar windings, turning OFF one winding will cause the same voltage to appear on its winding pair in opposite direction.
Another method I know senses the combined current of all windings of the unipolar motor and adjusts the over-voltage drive to maintain this current. This way, only one PWM module is required.
And finally, I'd follow Nigel's suggestion to put a hardware over-current protection in case your PIC hangs and fails to limit the current.