This is totally random question, but for my arduino project i am hoping to measure linear displacement and record the voltage reading. I was thinking of using a linear potentiometer, the only problem is finding one that is long enough (i need it to travel about 5 or 6" ). Does anyone know where i can find one that long, or if there is any other component that could work?
You might have to "gear down" the linear motion output in some manner (perhaps using a compound lever mechanism) in order to use a regular linear potentiometer.
Another option would be to use a multi-turn potentiometer (again, possibly with a gear down).
If you have the room, a regular potentiometer could be hooked to the linear travel part via a long lever, so that the travel causes the lever to move in a small arc.
You could also possibly measure distance using something like a Sharp IR sensor, or something like a Ping (ultrasonic) sensor.
A complex method might be to use a long linear CCD (like in a scanner), and measure the position of a light or a slit as it travels along it (by clocking the data out from the CCD and finding which element in the CCD is sensing the light/slit).
You could attach a linear gradient pattern to the linear portion, progressing from light to dark (or clear to opaque); such a pattern could be printed on a laser printer onto transparency plastic, or onto paper like for PCB etching and transfered via heat. Use a photodetector and light source of some kind to sense the level of light being reflected/transmitted by the pattern.
Similarly, you could print a binary pattern in a linear fashion and do the same thing with an appropriate sensor; look up "shaft encoders" to understand the idea; except instead of a "round" encoder, your encoder would be printed linearly. Note that depending on the precision needed (steps between measurements), your encoder may need a lot of bits (past about 10 bits, it is difficult to homebrew such an encoder - 10 bits would give you about 0.006 inches per step, though, over 6 inches of travel).
RuggedCircuits >> That is perfect, exactly what i was looking for. Thanks everyone!
crosh: I was thinking of doing the same thing, only thing by using the levers i will lose some resolution, which is pretty important in this particular application.
I don't know what your budget is but in the industrial automation world there are devices called "string potentiometers".
Interesting, but they don't look like anything more than a retractable cord reel attached to a multi-turn potentiometer (perhaps with some extra-gearing on the long travel versions); you could probably homebrew one using a surplus multi-turn pot and a retractable keychain mechanism...
If one needs to go inexpensive for ~6" of travel, a "string potentiometer" could be from the plastic lid of a 32 oz citrucil jar (~4.5" dia.), a standard Radio Shack pot, and some other simple materials.