Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 5 months ago.
Defining a home position for a unipolar stepper motor using c language
Hi, i'm using a unipolar stepper motor and i can't figure it out how to bring it to a home position or define a home position using c language. I'm working on platform ARM lpc2148. any suggestions plz ???
1 Answer
10 years, 5 months ago.
You cannot detect the home position without additional hardware.
You will find a lot of info When you Google for stepper motor home position sensor.
There are several solutions to detect the home position :
- Micro switch
- Optical slot
- Reflective optical sensor (eg : https://www.sparkfun.com/products/246)
- HAL sensor + magnet on the motor shaft.
- ....
The output of the sensor needs to be connected to an input on the microcontroller and either you read this input regularly (polling method) or use an interrupt (preferred method).
I hope this helps,
Frank