Optical or Hall Effect sensing the home position of a unipolar stepper motor

This may give you some ideas