There are three main issues that come to my mind:
- Wire resistance: you already took it into account.
- Wire inductance: you already took it into account, too (more on this later).
- Transmission line effects: these will affect your circuit if the wires have a length which is comparable or greater than the minimum wavelength of the "signal".
About point 3: since you are not concerned with signal integrity (your "signal" is the power rail to the relay) you only need to worry if your switching times are too quick (some energy could be reflected back from the line toward your transistor ad fry it). If you switch the MOSET relatively slowly the frequency content of the "step" (a ramp, actually) won't hit that limit and you won't have problems, apart from higher power dissipation in the MOSFET during switching, but given the extremely low duty cycle of the system it is of little concern here probably.
Anyway LTspice has two different models that can represent transmission lines: a lossy one and a non-lossy one. Excerpts from the online guide:
T. Lossless Transmission Line
Symbol Name: TLINE
Syntax: Txxx L+ L- R+ R- Zo= Td=
L+ and L- are the nodes at one port. R+ and R- are the nodes for the
other port. Zo is the characteristic impedance. The length of the line
is given by the propagation delay Td.
This element models only one propagation mode. If all four nodes are
distinct in the actual circuit, then two modes may be excited. To
simulate such a situation, two transmission-line elements are
required. See the schematic file
.\examples\Educational\TransmissionLineInverter.asc to see an example
simulating both modes of a length of coax.
and:
O. Lossy Transmission Line
Symbol Name: LTLIN
Syntax: Oxxx L+ L- R+ R-
Example:
O1 in 0 out 0 MyLossyTline .model MyLossyTline LTRA(len=1 R=10 L=1u
C=10n)
This is a single-conductor lossy transmission line. N1 and N2 are the
nodes at port 1. N3 and N4 are the nodes at port 2. A model card is
required to define the electrical characteristics of this circuit
element.
Model parameters for Lossy Transmission Lines
[...table with all parameters omitted...]
Point 2 is more problematic, especially when switching the relay OFF: you could have an inductive kickback that destroys your MOSFET due to the wire inductance. Note that the diode across the relay won't protect you in this case. Thus a protection Zener at the switching transistor output (between drain and ground, cathode connected to drain) may be necessary to dampen that inductive kickback.
An article on the subject is here (not directly related to your specific case, though).
You could consider making your own linear pot using a piece of nichrome wire and a sliding contact, preferably precious metal (cannibalize it out of something).
A straight 40cm piece of AWG 30 Nichrome wire would have a resistance of about 8 or 9 ohms. If you put 100mV across it (use a voltage divider from your ADC reference and an op-amp buffer), that's only about 11mA. Then amplify the wiper voltage with a decent op-amp and you're done. Linearity should be excellent (in the 0.1% class most likely).
Best Answer
At 2mm, time-of-flight is not used. Interferometry is. Unlike time-of-flight which can only really determine distance (and velocity indirectly), interferometry can be used for measuring many other properties and has a much higher sampling rate. Some amazing things have been done using this principle including LIGO or verify the influence of Earth's gravity on the speed of photons travelling towards and away from the Earth's surface. Or eavesdropping on someone from outside the house by measuring the vibrations of something in the room.
Interferometry most directly measures velocity. It's a bit less straightforward to measure distance.
You can play with this yourself fairly simply (as long as you have an oscilloscope) using the self-mixing technique which requires a laser diode with an integrated monitor diode, otherwise you need a lot of expensive optics which then puts it beyond reach of your typical hobbiest.
It's super cool. You should try it. The required laser diodes with integrated photodiode can be bought for a few dollars (1/10th the regular price) if you look at surplus electronic shops like Jameco, rather than places like Mouser or Digikey. Just make sure to check the datasheet to ensure that there is a photodiode inside. You also don't want a laser module that might already be wired to monitor the photodiode to maintain constant optical power since you need access to the laser diode.
Layman video demonstration: https://www.youtube.com/watch?v=MUdro-6u2Zg
A paper which makes a lot more sense after watching the video if you're not already in the know: http://sci-hub.tw/http://iopscience.iop.org/article/10.1088/1464-4258/4/6/371/pdf which can also be read in semanticscholar.org and is paywalled here. Giuliani et al. J. Opt. A: Pure Appl. Opt. 4 (2002) S283–S294