accurate position of stepper motor

Hello all! I have a 28BYJ-48 stepper motor and wanted to get accurate position feedback from it. It will be going through less than 360 degrees and I was thinking of using a hollow potentiometer. However, I have not been able to find a hollow potentiometer with a 5mm shaft opening! Does anyone know if such a part exists, and if not, any recommendations for some other inexpensive way of getting position feedback from that motor?

Thank you very much in advance!

What is wrong with keeping track of the steps you sent it?

That is kind of the whole point. Now, you might need a limit switch to set the initial zero.

Thanks for the reply!
I was concerned about jitter and missed steps, so was thinking constant position monitoring would be the way to go. With the limit switches, do you have an example of what you mean?

Thanks!

If the motor is not overloaded, there are no missed steps.

Put a switch at one end of the travel. At startup. step away and then towards the switch. Monitor the switch each step. When it changes state, you have your zero point.

I am having a hard time finding examples of limit switches in a project. The concept is very straight-forward, but I'm unclear about the mechanical parts and mounting - what kind of switch would you use? how would you attach it to the motor? Thanks for your help!

You don't attach it to the motor you put it on the rail. Usually you use a microswitch. My garage door opener has one to indicate the end of travel.

Or as in printers, a vane with an opto-interrupter.

KeithRB: What is wrong with keeping track of the steps you sent it?

That is kind of the whole point. Now, you might need a limit switch to set the initial zero.

Its a 28BYJ-48, it has lots of backlash, perhaps 20 steps or more.

Its a 28BYJ-48, it has lots of backlash, perhaps 20 steps or more.

What??? As Keith says, a stepper should never be off by one step... unless something goes wrong. You do normally need a home sensor.

[EDIT] - . OK, that's the gears. But since it's geared-down, the error-backlash should be less than one motor step (1.8 degrees).

...wanted to get accurate position feedback from it. It will be going through less than 360 degrees and I was thinking of using a hollow potentiometer.

I think you really want a servo motor. A servo has built-in positional feedback and it also has a built-in motor driver circuit. If you force a servo out of position (in either direction) it will "fight" against you, and when you release it, it will return to the target position sent by the microcontroller.

DVDdoug: [EDIT] - . OK, that's the gears. But since it's geared-down, the error-backlash should be less than one motor step (1.8 degrees).

The motor steps are 5 degrees or so, the gear ratio is large, the gears are cheap tiny pressed steel, the backlash is of the order of 20 steps. I've taken one of these motors apart, you clearly haven't!