Hi..
I am driving a stepper motor directly from a microcontroller. The microcontroller I am using has a built in stepper motor controller which enables me to do so.. attached to the motor is a needle like device which rotates, similar to the speedometer of the car.
In this project, while the stepper motor is running, the supply power to the mirocontroller can be cut off anytime meaning that without warning, the stepper motor will be left hanging when the power is cut off..
When the microcontroller is powered on again, the stepper motor need to return to the 'home' position because the home position is the reference point.
At the moment, the temporary solution that I am using is to turn the stepper motor in the reversed direction for a certain period until it is certain that the needle has reached the home position.. Because the position of the stepper motor is not know after the microcon is powered up, often than not, the needle of the stepper motor move past the home position and that is not desirable.
Is there any idea on how to move the needle of the stepper motor back to home without overshooting the home position..?
Thanks in advance..
I am driving a stepper motor directly from a microcontroller. The microcontroller I am using has a built in stepper motor controller which enables me to do so.. attached to the motor is a needle like device which rotates, similar to the speedometer of the car.
In this project, while the stepper motor is running, the supply power to the mirocontroller can be cut off anytime meaning that without warning, the stepper motor will be left hanging when the power is cut off..
When the microcontroller is powered on again, the stepper motor need to return to the 'home' position because the home position is the reference point.
At the moment, the temporary solution that I am using is to turn the stepper motor in the reversed direction for a certain period until it is certain that the needle has reached the home position.. Because the position of the stepper motor is not know after the microcon is powered up, often than not, the needle of the stepper motor move past the home position and that is not desirable.
Is there any idea on how to move the needle of the stepper motor back to home without overshooting the home position..?
Thanks in advance..