Electronic – Optical linear encoder for motion tracking

encoderlaserlinearmotion

I need to find a cheap optical solution to measure the position of an object in relation to a surface.

The object glides in a linear motion along an axis, around 30mm away from the surface.
The maximum distance the object can travel along the surface is about 3m.
The accuracy of the system can be +/- 5mm.

What I'm really looking for is a hobbyist-level solution, such as printing a 3m long tape with reference markings to cover the surface, and attaching a laser scanner to the object that can interpret the markings and relay the coordinate to a computer.

I'm happy to create the reference tape myself and program the encoder, though I don't know where to begin looking for the hardware. Any ideas / alternatives?

Best Answer

Your asking for an accuracy of 0.16% full scale! This shouldn't be too much trouble, actually, for a long enough QUADRATURE ENCODER strip, but thats a relative encoder (i.e., needs to be zeroed to some point, and then you count how many ticks away from that point you've moved).

Two offset strips of 10mm spaced on-off patterns would certainly do your job. The problem is that you'll be 30mm away from the strip. I think it might take some iterative fooling around w/ optical components, maybe an IR led and matching phototransistor would be able to sense if its pointed at a black section of strip or a white section of strip.

HERE is an IR photoreflector with a 1" (25mm) working distance. It's analog, so you can push the output to a comparator, and dork around to find your light/dark borders. Be sure to add a smidge of hysteresis to your comparator so your transitions are clean. You'll want two sensors, as you'll be dealing w/ two parts of the encoder strip.

The quadrature pattern would look something like this. linear quadrature pattern

For your case, the black bars would be 10mm long (or you can go finer). The width would be a function of the focus of the ir pair. HOPEFULLY that ir pair can give you your resolution, but by all means, read the sheets!

Depending on how fast your sled is moving, a standard microcontroller might be able to keep your count. If its moving very fast, I recommend a microcontroller with a built in peripheral to deal with quadrature encoders, like the PIC 18F4331. If you do that, you won't even need to implement a quadrature encoder counting algorithm, just set up the peripheral and read from the correct register at constant intervals. If you need an algorithm, post the question and I'll work one up.

Since its a RELATIVE encoder, you will need to have some sort of sensor to zero to.