I am attempting to control a stepper motor in a dash ((6405-1553) see link for motor data sheet) It is a small Bipolar motor that i am controlling with an H bridge(made with 2n3906 and 2n2222a transistors), i will likely switch to something capable of micro stepping this motor or using pwm as you supposedly can. I have figured out the math for number of steps needed and all, but these motors have a gear box with a stop. Is there a way to make the motor "sense" when it hits this stop or is the only way to do that by counting steps?
As far as I know, you have to run the stepper motor until you are sure the needle has hit the stop. Instrument steppers don't have a lot of torque, so it's ok to let them butt their needle against the stop.
Here's a project I did for Doug's Auto. The stepper is a unipolar stepper, but same idea. Just drive the needle to beyond the stop and zero it there. The zeroing code is at line 346, but it's specific to the classes I wrote so don't expect to be able to copy/paste it.
okay good to know. Ill just do that then. these motors actually have a gear box with a stop, so its not even the needle im relying on. Thank you.