SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By SOI_Sentinel
#17937
Hey everyone,

I haven't had a lot of time lately, but one of my random interests that I run across every so often is optical rangefinders.

Short distance measurement can be done with ultrasonics, Sharp distance sensors (it's an off-axis PSD based system) or an off-axis laser-camera set (same as the Sharp, but using a CCD).

I've recently become interested in what I consider medium distance (around 100m) measurement. While a run-of-the-mill $150 Bushnell laser rangefinder would work just fine, I want to integrate this into my module plans. So, I'm researching the mechanics to build the lowest cost system possible.

Some background first...

There are two main different types of laser rangefinders.

One is the time-of-flight rangefinder, which uses a pulsed laser (Q-switched diode laser or a flashlamp pumped Ebrium rod) to fire off a massive IR pulse and time it, either via an integrating current ADC or via a fast digital comparator and timing circuit. We're looking at 6.6ns per meter, so one meter resolution requires a 150MHz counter. Start and stop need to be done via optical circuitry (so you know EXACTLY when it fires vs timing from a trigger pulse). The other issue is that you need a low pulse length. One calculation I ran across in research papers is that for a 75m return from any object, you'll need something around 40w of power in a 7ns pulse.

More conceptually complex but probably cheaper is the phase modulation rangefinder. This one takes an amplitude modulated light source (laser or otherwise), and uses two identical recieve paths, one that reads from the source and one that reads from the return. These signals (normalized) are mixed together and the resulting pulse width provides a distance measure. By varying the frequency, this method allows accurate measurement at a distance, although it takes up to a second to acquire.

A variation on the PM rangefinder is one that directly couples the laser to the inverse signal from the reciever. This one sets up an oscillating loop that the distance can be measured from. This may be the simplest of all.

Now, I'm leaning towards the PM rangefinder. It has the advantage of hopefully lower cost components and lower power and weight (higher average power so I don't need a 40W pulse!).

Biggest hurdle I've encountered? Price of components. Short range and "local" recievers can run on a PIN photodiode, but every design I've seen for the remote reciever uses an APD photodiode (300x gain vs PIN). PIN diodes are about $10. APDs start at $130 on Digikey. I'd like to make this IR not Red laser based, although red may be part of my initial prototype. I need to investigate the wavelength of IR lasers in CD-RW heads since they're common, and may be fairly powerful if I'm lucky.

Has anyone else been interested in this? Or at least knows if $130 is fairly normal for the bottom end of the APD's?

I also got my hands on an old TI optoelectronics book with a fully analog LED based rangefinder for up to 15 meters (again, uses an APD). I'll have to see about getting the schematics scanned.
By Philba
#17964
if your goal is to just integrate a laser range finder, why not get the bushnell and figure out how to control/read the device. The nice thing is it will have a reasonable form factor that you wound need to reproduce.

If your goal is to build one from scratch, never mind...
By SOI_Sentinel
#17987
It's probably not that simple. I believe most of the affordable rangefinders don't have a data uplink port. Plus, I'd probably want to play with laser data transmission with a similar setup, too.
By NleahciM
#17993
Interesting you're working on such a system - as I started researching building a system like this less than a week ago. I am planning on sending out a short pulse with a standard laser diode, using a high bandwidth laser driver chip so that the rising edge of the signal is very sharp. I will then have a lens collecting the returning signal, running it through a diffraction grating, and then I'll have a photodiode sensing that signal. I will be using an Acam TDC chip to measure the time of flight.

My goal is different from yours I think in that I want short range (5-10m) but with high accuracy (I'm hoping for cm accuracy). My plan is to first build the rangefinder, and then add on a 1 axis scanning circuit to it, and then eventually add on a 2nd axes so that it can take some pretty nice 3D scans of areas. The goal is to use it for navigation in a robot.
By SOI_Sentinel
#17994
Interesting idea. Mind you, I am no expert in this :) I'll probably end up building something similar to what you are eventually, especially if I use a few spare components laying around to build a 650nm test unit before moving up to a 780nm monster (those 120mW CD-RW laser diodes are pretty tempting).

Hmmm... just found a "cheap" industrial laser rangefinder with serial output for only $600...

You're working in ranges that you don't have to deal with the expenses of an APD. Time of flight is nice, but CM range would require a stable resolution of 66.7ps to get within one centimeter. I have a hard enough time swallowing a 6.67ns per meter time-of-flight timing requirement for meter accuracy. Plus I'm curious as to the power generation required for that. Back-calculating from an "optimum" value of 35W at 75m (some IEEE article I remember reading), at 10m you'd need about 0.6W, and I remember that high accuracy time-of-flight measurements normally need picosecond width pulses? I think it has to do with gaussian distribution of the result across the width of the pulse, so you want as short as possible but you still need to cram in the wattage. This especially applies since I see 1ns rise and fall time of PIN photodiodes being normal, which would give you about 15cm accuracy. You also might need pulse discrimination circuitry.

Ah yes... the "basic research" in the range I was basing that 35W off of

http://fie.engrng.pitt.edu/fie99/papers/1507.pdf

The timing of a high accuracy TOF rangefinder:
http://herkules.oulu.fi/isbn9514272625/

For the self-resonant system, I did some quick number crunching for last night. Ignoring circuit based delay timing I'd be looking at these frequencies:

Range vs Frequency
1m 75MHz
10m 7.5MHz
100m 750KHz
1000m 75KHz (hahahaha... don't even want to think of the required gains and SNR for this one)

Since I'd be working with square wave on/off pulsing, this would be fairly easy to buffer and shove into a high speed counter... or just switch in a clock divider circuit and even use a uC counter subsystem to run it.

Internal delays would obviously slow down the frequency a little bit, which would be to my advantage if I attempt this method :)

I just took a brief look at that ACAM series of chips. Nice chips, how much are they? Their highest accuracy standard chip (10ps) should give you 1.5mm range. I also believe you're going to be pushing it in PCB design. I'm slightly worried about power requirements and timing delay/analog design on a standard FR-4 double sided board (assuming here, you might have a 16 layer G-10 fab sitting in your backyard for personal use for all I know).

Quick addendum: I'm guessing that most eyesafe laser rangefinders probably don't actually use laser output as-is. They probably spread it out via optics to 1-2cm diameter to reduce the concentrated energy, then recapture it as per your optics. I didn't think to use a diffraction grating. I was more thinking coating or filters on the optics. Might have to look into that.
By npk
#17995
Before you say that you need an APD, or a massively q-switched laser, or whatever, you're better off showing us some simple calculations of what you actually NEED. [edit: apparently, I can't read.] Remember, the power returned goes as 1/r^4. Oh, and this business about higher average power makes no sense to me. What matters is the power of the beam. If you need 40W of power to get a decent return signal, then you need a 40W diode laser for heterodyne detection.

It looks like the ACAM cheap is fairly cheap (a google board said ~ 25 euro/per.) If you can get the oulu chip, (maybe they're in mass production) get it! I can tell you that I know it works. Of course, you have to be SAFE. Shooting a high powered pulse to the eye kind of sucks.

If you're going to go with the heterodyne detection, you have to be aware: you need to modulate the signal around the same length as what you're trying to detect. So, you need to spit out something like a 200m wave to measure up to 200m (within a factor of 2, I'm not thinking clearly.) Though you can do relative measurements at shorter wavelengths. Also, you're going to need optics to convert the diode output into something that looks like a nice beam, and you'll have a lot of difficulty getting back all the light.

Maybe you could get sparkfun to carry the chip?
By SOI_Sentinel
#18084
It's 1/r^2. Anyway... I ran across another article that's leading me back to considering doing a TOF system with a flashlamp pumped ND:YAG solid state laser. Looks like it'd be cheaper for this mid range work, and eyesafe if the beam is enlarged to a 1" diameter colminated beam

The oulu was a master's thesis I believe. They're not going to be mass produced.

Optical gain and SNR are always going to be a huge hurdle. Probably around 160dB gain required to recover a signal (from notes on police laser radar detection somewhere...). This is easier to do at lower peak power with a modulated CW laser as you can take in the data and FFT and oversample it to boost your SNR due to the repeating waveform.

A modulated laser would actually be quite interesting for the laser radar of NleahciM. A standard laser diode and wavelength matched/filterd PIN diode should work fine. You could do sweeps. First sweep would be at a full range frequency (10m would need 15MHz), and if you needed more accurate readings after that, say, a 75MHz sweep could be taken (increasing detection by 5 fold) to get a better relative fix on scan points.

The resonant time of flight is still interesting to me, but I'm just not sure. It doesn't look good on being able to get amps that work well from 100khz to 100MHz.

Anyway, more research...

(Addendum: Laser Radar)

NleahciM, thoughts on your laser radar. Building a real great one (pro grade actually) would probably involve the following:

-Rotating mirror with constant speed control (example: 817Hz mirror rate, 120 degree sweep, $30 surplus)
-Galvometer attached mirror (vertical axis? Available and also design-accessible from laser lightshow enthusiasts)
-laser diode and driver (I think I've seen circuits for this, laser diodes when driven by the right circuit can do several hundred MHz)
-PIN photodiode setup with coaxial mount to laser (Building isn't bad, check out amateur radio enthusiasts doing work with laser comm)
-PIN photodiode directly monitoring laser (glass slide beamsplitter)

Per my reading, laser diodes aren't as nicely lasing from standstill as are solid state lasers, so you'd need a second photodiode to monitor the outgoing pulse.

I haven't fully read the specs on the ACAM chips, but I don't know how fast it can reset for the next reading. I do know you're going to have a minimum distance of about a meter. It appears that the F1 and GPX have a minimum time of 5.5ns, the GP1 is 3ns (but the 125ps jitter would result in a 2cm resolution). I can't find the repeat rate for the GP1...

Now, assuming 10MHz is a good repeat rate for all these chips in a middling resolution mode, without doing some rough geometry calcs...

10Mhz*(120/360 degrees)* (1/817Hz)=~4080 absolute max laser readings per scan line. That is assuming you can trigger your laser and read a 10MHz data rate, though. If the ACAMs can feed a FIFO, though, you could trigger a "line" and then process the data at your leisure. It looks like the fastest commercial (airspace imaging) units run at 100KHz.

I figure you might start this whole thing with servos. I'd actually recommend working with two galvometers. If you can build or get good ones, you'll have high speed and high accuracy mirror positioning. If you decide to take my suggestion and move on to a rotating mirror assembly, it should be fairly simple to accomplish, but with galvometers it may be a moot point then.
User avatar
By bertrik
#18088
I don't know much on optical ranging, but I've always wondered if you can make one of these by modulating the laser light with a pseudo-noise waveform. Then by cross-correlation of the transmitted wave signal and the received wave (integrating the product of these waves for various delays) you can find the delay that results in best correlation. From this you can calculate the distance. Sensitivity can be improved by simply integrating longer. I think that by starting with a low chip rate, you can get an initial rough estimate of the distance, which can then refined by increasing the chip rate.
This sounds a bit similar to the phase modulation method you described, except now using a pseudo-noise waveform.
By npk
#18089
Ok, I read the IEEE TOF presentation. Didn't really help.
It's 1/r^2
Check this out: You shoot an isotropic 10,000W beam at a target 10 m away. It falls off as 1/r^2 so it hits the target with 100W. The target reflects the beam fully 10m, and now you're left with a 1W beam. 1/r^4
This is easier to do at lower peak power with a modulated CW laser as you can take in the data and FFT and oversample it to boost your SNR due to the repeating waveform.
This sounds easier to you?? Maybe it is, but I don't understand what oversampling does. Are you saying that given a repeated waveform ,you can reconstruct it from incomplete data? Maybe that's possible, but are you going to do the heterodyne detection in software? Also, the problem that police scanners are trying to solve is different then yours, so what works for them, does not mean it will help you do what you need to do.


RE: Sweeping..
Let me think about sweeping, but for the 100m distance you were quoting, you would need to start 1.5MHz. But then, i'm not sure here, that you'll need to keep track of output phase information very well. And I'm not sure if you've done much high speed electronics, but if you now want to bump up to 100MHz BW, well, gosh, that's scary.

good luck
n
By SOI_Sentinel
#18153
Ok, you're right on the ranging idea, I was doing calculations separately for each reflection so I could do adjustments on reflection area and reflectivity, so just different terminology.

As for the scanning, that's not for me, that's for the 10m range LIDAR system NleahcIM is working on.

As for oversampling, that's how Delta Sigma ADCs work to get their high SNR and high bit depths.
By Grimm Spector
#18191
NleahciM wrote:Interesting you're working on such a system - as I started researching building a system like this less than a week ago. I am planning on sending out a short pulse with a standard laser diode, using a high bandwidth laser driver chip so that the rising edge of the signal is very sharp. I will then have a lens collecting the returning signal, running it through a diffraction grating, and then I'll have a photodiode sensing that signal. I will be using an Acam TDC chip to measure the time of flight.

My goal is different from yours I think in that I want short range (5-10m) but with high accuracy (I'm hoping for cm accuracy). My plan is to first build the rangefinder, and then add on a 1 axis scanning circuit to it, and then eventually add on a 2nd axes so that it can take some pretty nice 3D scans of areas. The goal is to use it for navigation in a robot.
let me know if you have any success with this, I'm working on a similar system but sticking to ultrasonics and finding they are a bit too large :(
By jpmarno
#18420
I am also trying to build a laser rangefinder - the application is much less stringent though. I ony need to know 1m to 15m to 0.5m accuracy. The application is for load determination insideof a truck. Sonar is possible but a little tough since the truck is sometimes refrigerated.

I have been looking at triangulation with a CCD camera - any ideas on a low cost (<30$) camera with USB? I could put a laser pointer at an angle and measure where it hits on the CCD and have a security camera as a by product. IR camera would be best -

Here is a link I found useful for laser rangefinders - http://www.repairfaq.org/sam/laserlia.htm#liarccd
By Grimm Spector
#18423
jpmarno wrote:I am also trying to build a laser rangefinder - the application is much less stringent though. I ony need to know 1m to 15m to 0.5m accuracy. The application is for load determination insideof a truck. Sonar is possible but a little tough since the truck is sometimes refrigerated.

I have been looking at triangulation with a CCD camera - any ideas on a low cost (<30$) camera with USB? I could put a laser pointer at an angle and measure where it hits on the CCD and have a security camera as a by product. IR camera would be best -

Here is a link I found useful for laser rangefinders - http://www.repairfaq.org/sam/laserlia.htm#liarccd
actually I had an idea of using multiple CCDs since you're using a 3D area, or better yet just some of the sparkfun cmos cameras, they don't have to be super accurate, because the math will still be very close.

You're looking at volume and not a 2D grid so 3 - 4 of these are various angles and a single laser at a known angle to all the cameras and a known distance between each camera should easily set you up to do the math, you'll just have to make your software 'grid' and build an interface.
By manton
#81076
npk wrote: Check this out: You shoot an isotropic 10,000W beam at a target 10 m away. It falls off as 1/r^2 so it hits the target with 100W. The target reflects the beam fully 10m, and now you're left with a 1W beam. 1/r^4
I don't think you have this correct. The inverse square law says that the power density is proportional to the square of the distance. A 10000W beam will still hit the target with 10000W 10m away. The spot it hits with will be larger, so the energy density per unit area will be lower. The power is not absorbed by the air, it is just spreads out.

The spot size you get for a given distance is dependent on how well collimated the beam is. One can improve the spot size at large distances by expanding the beam at the source, as for each doubling of the beam diameter, the divergence is reduced by a factor of two. This is why when they target the retroreflectors on the moon for determining its distance, they send the laser beam through a telescope in reverse to expand it, otherwise the spot size on the moon would be too large to detect.
By MichaelN
#81078
I highly recommend you guys look at lasers in the "eyesafe" wavelengths, for safety. Commercial laser rangefinders use lasers about 1500nm wavelength, which is absorbed by the cornea / lens of the eye, and hence doesn't make it to the retina.