SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By alex.forencich
#147498
I have been mulling this over for a while and I think it may be possible to build a high resolution, high accuracy distance sensor (better than 5mm) with a high update rate (more than 1,000 samples/sec) at a relatively low cost (possibly $200-300) in the form of a laser rangefinder. Operation would be based on transmitting a high frequency modulated laser beam and then measuring the phase shift of the returned light. I will have to work through the design to be sure, but it could well be doable on a single board of about 3x5 in.

There are existing laser-based distance sensors, but they tend to be either extremely expensive and proprietary or lacking in range, resolution, and update rate. For example, Parallax makes one that uses a camera to look at the dot from the laser: http://www.parallax.com/StoreSearchResu ... fault.aspx. However, it only updates at 1 Hz and the accuracy varies over the range. Also, it has a rather significant minimum range (15 cm).

How much interest is there in a sensor with this set of parameters for $200-300? I don't want to put many hours into designing a sensor like this if nobody wants it, so please, reply if this sounds interesting!
Last edited by alex.forencich on Tue Jul 17, 2012 5:13 pm, edited 1 time in total.
By Duane Degn
#147499
I think you'd have a lot of people interested in an inexpensive, high sample rate, high precision, rangefinder.

You might want to take a look at this recently designed laser range finder.

http://www.lightware.co.za/index.php/prod-kits

There's additional discussion at the Parallax forums about developing the device.
http://forums.parallax.com/showthread.p ... ost1077074

And an evaluation of the final product.
http://forums.parallax.com/showthread.p ... evaluation

I personally think this is a pretty amazing device for the price.
By alex.forencich
#147501
Now that is a pretty cool device. I decided to shy away from measuring round trip time with pulses as it is very difficult to measure accurately with off the shelf components. It looks like they used an ASIC in their design, which is beyond what I can do. I'm planning on building this thing with all off-the-shelf components so anyone would (theoretically) be able to build it. Some parts of the circuit will operate at RF frequencies (specific frequency TBD) and may require careful routing and matching. The device I am planning on should be able to beat that lightwave unit in terms of update rate and precision and possibly rival it on range with an appropriate optical front-end (telescope).
By Duane Degn
#147523
alex.forencich wrote:Operation would be based on transmitting a high frequency modulated laser beam and then measuring the phase shift of the returned light.
I'm not familiar with this approach to distance measurement. What "phase shift" are you measuring?

The Parallax LRF is open source but the camera manufacturer requires a NDA before it will send out the datasheet. I think there are some software tweaks that could possibly speed up its sample rate (but I'm not sure by how much). It would also be possible to change its minimum distance measured by moving the laser and camera closer together. The LRF manual includes a diagram on where it's safe to cut the board in case someone what to reposition the laser.

The Parallax LRF also has the shortcoming of not working well in bright sunlight. This could be overcome by using a more powerful laser.

I have a Parallax LRF myself but I haven't used it in a real project yet. I've just experimented with it a bit.
By alex.forencich
#147531
Basically, it's a time of flight detector that uses a continuous wave instead of a short pulse. It works by transmitting a specially modulated light beam and then comparing the transmitted signal to the received signal and figuring out how long it was in flight.

Let's run some numbers here. If the laser is modulated at 500 MHz, the wavelength of the modulated light is about 60 cm, or 30 cm round trip. With a phase detector, you can compare the transmitted light with the received light and measure the phase offset, measured in degrees from 0 to 360 (or -180 to 180, doesn't really matter). The phase measurement will repeat every wavelength, so a distance of 5cm will have the same phase offset as 35cm or 65cm or 95cm etc. If you can measure the phase to within 1 degree, you can measure to 30cm / 360 degrees = 0.833 mm. Using a second, much lower frequency you can figure out which 'bin' the measurement is in. 50 MHz with a round trip distance of 3m can be measured to 8.33 cm, enough to approximate the distance and differentiate between 5cm and 35cm at 500 MHz.

The circuit operates at RF frequencies (500 MHz) and so is relatively complex, but the result is almost an instantaneous measurement, allowing thousands of samples per second at sub-cm accuracy and sub-mm resolution. Also, as the detector only needs to be sensitive to a narrow band at 500 MHz, it is rather insensitive to external interference. Coupled with an optical filter for the laser wavelength, and it should possible to achieve excellent performance even with significant background illumination. For extended range, a more powerful laser diode can be used and the detector can be coupled through a telescope to improve the SNR. It would be possible to measure distances of hundreds of meters without losing resolution or accuracy. Long range accuracy is dependent on the absolute frequency stability of the driving oscillator and short range accuracy is dependent on the accuracy of the phase measurement. Think about it - 1000+ measurements per second with sub-cm resolution and accuracy!

Direct time of flight detectors require extremely high speed timers. To measure distances accurate to 1cm, you need clocks with a period shorter than 70 picoseconds - that's about 15 GHz! There are solutions that involve taking thousands of measurements per second at a lower frequency and then averaging, but these methods yield rather slow update rates. Also, the laser pulse needs to be very short and well-defined and it's quite difficult to reliably extract the laser pulse out of the background as it is so wideband. Generally the lasers used are multi-watt, pulsed lasers and the detectors are avalanche photodiode detectors. These detectors are extremely sensitive, biased at hundreds of volts and capable of providing a gain of 1000x or more. However, this is a very wideband gain and so the overall light hitting the detector must be very limited, requiring very narrow band optical filters and carefully designed enclosures. A continuous wave detector doesn't have as much gain internally, but it can be coupled through an RF amplifier chain with various frequency-selective stages and narrow bandpass filters, providing gain only to the band of interest and making the system more reliable.

The Parallax LRF calculates distance with triangulation, requiring processing a large picture pixel-by-pixel on the controller. The accuracy varies with distance as the angular size of the pixels (and therefore distance resolution) varies with distance. It is a relatively simple task to carry out on a general purpose controller, but there is a very well defined limit on how well it can scale as it becomes more and more difficult to measure the ever shrinking angle at long range. Moving the camera farther from the laser scales up the range - long range resolution degredation happens farther out and the minimum range is increased. Moving the camera closer does the opposite, decreasing the minimum range and moving the point of resolution degredation closer.

Think of it as x vs tan(x). Measuring the time of flight is directly measuring x, be it measuring the phase offset or flight time. The Parallax LRF measures tan(x), which has a very obvious limit at short and long range.
By lyndon
#147552
If you can make it work reliably, you can probably find a market that will pay a lot more than $200 for it. That's really why the ones for sale are so expensive: no point bothering with hobbyists when industry will pay 5x that for essentially the same thing.

Stratify: sell the $100 version one with a 1cm precision and the $1500 one with 1mm precision.
By thecodebenders
#147560
I used a Time to Digital (GP2 - http://www.acam-usa.com/Time-To-Digital-Converters.html) convertor by Acam in a laser range finder design I did as a senior design project. I designed two peak detectors, one on transmit, one on receive, based on the ADCMP582 an 8GHz comparator from analog devices that I fed into the TDC. They're relatively easy to interface with and highly accurate.

One thing I found surprisingly helpful when I took the project on was all the work Nuc-E's did back in the 70's in measuring/generating short pulses. A lot of the pulsing circuitry etc is pretty easy to make work well as long as your diode responds well to rapid changes in the driving signal. If you do this above ground and go with IR you shouldn't have any issue finding diodes you can modulate fast enough at high enough power to make detection easy. (The Osram 10W guys respond ridiculously quickly) The higher the power you apply, the less likely you'll want to do the CW thing though, brief pulses at higher power give you high-detectability and keep your heat down. Basically, the trade off from phase detection to ToF is found in the sensitivity of your receiver, your now detecting levels instead of presence. You have to be able to accurately detect more subtle shifts in signal level with a phase shift system than you do with a ToF system but you catch a break in the time domain.
By alex.forencich
#147567
It seems like there are some pretty good chips for time-of-flight and there are a few good products out there right now, including the lightware product mentioned above. I think it would be far more interesting to try the phase shift method because I think it could be more flexible in terms of raw update rate and it may be more reliable. There are certainly a number of engineering challenges, though.

The Analog Devices AD8302 RF/IF gain and phase detector facilitates precise phase difference measurements between signals with up to 60 dB difference in power to an accuracy of about 1 degree, all the way from DC to 2.7 GHz. It uses log amp detectors to amplify and normalize the signals for comparison. It also outputs the magnitude difference of the two signals in dB, with both the magnitude and phase outputs having a bandwidth of 30 MHz. It's quite a popular chip for people who want to build their own VNA. If you run this at its maximum frequency and measure to an accuracy of 1 degree, you should be able to measure distance with an accuracy of 0.15 mm. That would require a counter with a resolution of 5 picoseconds. The best resolution it looks like you can get out of those Acam chips is 10 picoseconds. If you can measure better than 1 degree or at an even higher frequency, then you can measure even more precisely. 10 gigabit ethernet over fiber is modulated at around 5 GHz. 100 gigabit ethernet will be modulated 4x 25 Gbps, or around 12 GHz. That's 35 micrometers if you can measure it at 1 degree. And you can take measurements as fast as your ADC will run (100 million measurements per second, anyone?). Try that with a digital counter!

I think it would be an interesting project that would require a good bit of high frequency analog. Not everything can be solved with software and CMOS!
By Gnibur
#161796
Hello,

It is interesting to read your ideas making a range finder with a high update rate.
I can't see if you have continued with this project since last year.
I am looking for such a device with a mapping project which needs a high measuring rate in a rang of 0-30 meters.
Please let me know if you have been working with this project lately.

Best regards

Gnibur
By UNTEngineer
#161982
alex.forencich wrote:I have been mulling this over for a while and I think it may be possible to build a high resolution, high accuracy distance sensor (better than 5mm) with a high update rate (more than 1,000 samples/sec) at a relatively low cost (possibly $200-300) in the form of a laser rangefinder. Operation would be based on transmitting a high frequency modulated laser beam and then measuring the phase shift of the returned light. I will have to work through the design to be sure, but it could well be doable on a single board of about 3x5 in.
By the way, you're not the first person to think of this (I myself followed this research some months ago):

http://forums.parallax.com/showthread.p ... nge+finder

And:

http://forums.parallax.com/showthread.p ... evaluation

Its good to note, this project is underway in South Africa. So the founder is having a bunch of problems with US import laws regarding his system. Hes using a high power laser thats not easily available here, so this may be an issue in your project. Im excited to see progress on your project; maybe we can bring the price tag down AND make it available to folks here in the US.
Last edited by UNTEngineer on Sat Jul 27, 2013 8:56 am, edited 1 time in total.
By UNTEngineer
#161990
Mee_n_Mac wrote:Working now, perhaps the forum was down?
Perhaps. :?

Heres the Laser Prof Braino uses in his design:

http://www.ebay.com/itm/SPL-LL90-3-Hybr ... 1059907116

If you want massive overkill on your diode, try this for size:
http://www.swissrocketman.fr/laser-a-di ... r,3,60.cfm
By alex.forencich
#162197
Gnibur wrote:Hello,

It is interesting to read your ideas making a range finder with a high update rate.
I can't see if you have continued with this project since last year.
I am looking for such a device with a mapping project which needs a high measuring rate in a rang of 0-30 meters.
Please let me know if you have been working with this project lately.

Best regards

Gnibur
I have done some proof of concept work, but at this point I need to get some test boards manufactured to test the RF and optical component of the rangefinder. As this requires a significant investment of time and money, I have been holding off as other, more important projects have popped up. I also ran into some issues with a component assortment of low-value capacitors and inductors so building any filters or other simple RF components must wait until I go through and measure all of the component values.

Can you give me some more details of your application? Are you thinking about building a product or just a one-off prototype?