Spinning a mirror is nice but complicated. You have to deflect two beams: outgoing laser and incoming detector.
If you are talking 100 meters, the intensity of the two beams can differ by 10^6: milliwatt out to nanowattt receive.
You have to be careful that *none* of the outgoing beam leaks into the incoming beam.
Detecting time of flight can be simple but not easy.
A simple way is to use phase shift of the return beam to the outgoing beam.
Assume a laser that puts out a 1 mW pulse with a width off 100 ns and a 200 ns period.
This 50% duty cycle pulse will get delayed by the trip out and back at 6.7 ns/meter.
Note: Remember for a class 1 laser, you get 1 mW PEAK, independent of duty cycle.
The only way you get more energy in the beam is to increase the duty cycle.
50% is usually the best trade off.
AND the received signal with the inverse of the transmit signal, i.e. the last half of the cycle.
If the received signal has very little delay, very little of it will be in the last half of the cycle.
The result is a narrow pulse.
If the received signal was delayed by a full ns (~14 meters), you get almost a full 100 ns pulse.
The result scales linearly with distance, 6.7 ns = 1 meter.
Now for the fine print.
Problem 1.
There will be delay in the detector between receiving the photons and generating an electrical pulse.
This delay can be calibrated out, but will probably drift with temperature.
Note that a 7 ns total delay = 1 meter of error (!).
If you want an accuracy of 2 cm, you have some work to do.
Problem 2:
Return intensity falls off as the square of the distance.
Simple Lidars have min (near) and max (far) range values.
If max/min = 10, then the return at max will be 1%of the return at min.
The net result is a tradeoff between not saturating the detector at min range
and having enough signal at max range to have acceptable signal to noise ratio.
This is true for simple as well as avalanche photodiode detectors.
That is why you mat modulate the laser amplitude for very close targets.
Unfortunately, you have to receive the too-bright signal first,
*then* reduce the laser power at that range point for following cycles.
A subtlety of this problem is that signal intensity decreases as the square of the distance,
but we are using phase time delay to measure the distance.
If we look at the received pulse, its amplitude decreases with distance but not time.
The 5 MHz square wave is received at a specific distance from the Lidar,
and its amplitude is determined by this distance.
But the amplitude of the signal remains constant throughout the pulse train.
You have to keep this in mind if you are going to try sophisticated compensation schemes,
Good luck,
Dave