A linear pot would be ideal, and as I understand it, is what they use for telemetry on factory team race bikes. But I was looking at prices and they are in the several hundred dollar range.
I assume you are thinking of "slide potentiometers" (when talking potentiometers, the term "linear" refers to a linearly proportional change in resistance for a given displacement - vs. eg. logarithmic or exponential potentiometers).
You can buy very cheap slide potentiometers in "every" electronics store, but the common variety have a slide range of 60mm to 80mm and are not build for anything seeing moisture and dirt, so wouldn't live long in your app - probably only a few kilometers.
You can get any kind of potentiometer, even custom build to your specs, if you're willing to bleed gold for the cause, of course, just look at this page
- while I don't know their prices, I am sure they're not cheap and getting anything sturdy enough to survive such harsh environment will be expensive.
I am trying to figure out something that could do the same thing for less that I could use on my bike and maybe package and sell to other amateur motorcyclists who would like to start messing around with telemetry for less of an initial investment.
There are several ways to measure linear displacement. LVDT's
are the industry choice, as they are very resilient, but they're very expensive (unless you build them yourself).
The main parameters that sets the price is; precision, resolution, repeatability and MTBF/MTTF.
DIY will be cheap for most types of displacement sensor and you can use a broad range of methods besides resisance measurement. Inductance, capacity, light, magnetism etc.
If you add in a microcontroller, the sensor doesn't even have to be linear, as the equivalent linear value can be calculated or found in a look-up table to get a linear output from a non-linear input from the sensor.
But first, you need to find out which precision etc. you need and being realistic here might save a lot of trouble - if you don't need 0.1mm resolution, it will be money/work thrown out of the window to get it.
If the resolution (approx. 1mm) will do and you can live with the relatively low speed (around 45ms/reading worst case and 38ms typical [i.e. 22..26 readings/s]), you might wanna consider using the Sharp infrared PSD GP2Y3A001K0F
as a rugged and fairly cheap solution. Its range is 40mm to 300mm (as is) and I'd assume that it could be fitted on the front stem/fork, measuring the distance to the fender.
Yet another infrared application would be to make a "ruler" with a Grey coded pattern. This can be read extremely fast and a pattern drawn in a CAD program can be photographically transferred to film with extreme precision (at a repro house or similar - I'd guess around $10 to $20 for a sheet of A4 size) or photo etched into stainless steel foil.
A strip of film mounted on a piece of polycarbonate going through a reader (a screen for the reader could be made on the same film) can be made into an almost friction-less distance reader. If it has to be small to accommodate a high resolution, a CMOS line sensor/photo array chip can be used, while a lower resolution build could be done with conventional IR LED's and photo transistors.