Pages: [1] 2 3   Go Down
Author Topic: Open source, TOF laser rangefinder  (Read 19352 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some years ago the story went around that the laser from the Neato XV-11 would become available as an open source LRF/LIDAR: http://www.hizook.com/blog/2009/12/20/ultra-low-cost-laser-rangefinders-actualized-neato-robotics. For some reason this didn't happen and subsequently many hacks have been presented to show how this laser unit works. Unfortunately, this hasn't resolved the main issue of how users can get their hands on a open source, low cost LRF. For almost three years I've been looking for a way to fill the LRF part of this technology gap. The idea was to design an open source LRF that could be turned into a scanning LIDAR by the open community. So here it is...

In this thread I'll cover the workings of the open source LRF module, imaginatively called the OSLRF-01, and to start with I'd like to dispel the notion that you need to have clocks running at GHz in order to make a time-of-flight LRF.

Measuring the round trip time of a laser pulse is not as simple as having a counter that starts when the laser fires and stops when the return signal comes back. Although this brute-force timing method can be used, the resolution of the result is going to depend on how fast you can clock the timer. It would take a 15GHz clock to achieve one centimeter resolution. In the 1960's, Tektronix made a name for themselves with a sampling oscilloscope that could measure signals in the GHz range without using high speed clocks. How they did this is summarized here: http://www.cbtricks.com/miscellaneous/tech_publications/scope/sampling.pdf. The OSLRF-01 uses a modified version of "sequential-equivalent-time-sampling" (SETS). With this system it can easily achieve an "equivalent clocking rate" of more than 90GHz whilst using much lower frequencies.

The second issue that I'd like to address, is amplifying the very weak return signals that come back from the targeted surface. Since the laser pulse is very fast, typically around 10ns long with rise and fall times of a few nanoseconds, the detection and amplification circuitry would need to have a bandwidth of about 500MHz in order to preserve the shape of the pulse during amplification. This means that the "gain-bandwidth product" of a suitable amplifier would be more than 5GHz. Designing an amplifier circuit with this kind of specification is very difficult. The OSLFR-01 addresses this problem by amplifying the signals after the sequential-equivalent-time-sampling has taken place. This works because the SETS process expands the timebase of the signal, thereby reducing its bandwidth. Amplifying this slowed down signal can be done with conventional op-amps having a gain-bandwidth product of a few MHz.

The OSLRF-01 uses conventional electronics to solve the very unconventional design problems associated with a TOF laser rangefinder. It doesn't include any signal processing but with the signals being so slow, a regular ADC is fast enough to digitize the entire waveform. You can add your own signal processing and timing algorithm using an Arduino or similar microcontroller.

In subsequent posts I'll go into more detail about every element of the design and I'll post a link to the circuit diagrams. In addition, www.lightware.co.za will soon be manufacturing complete units for sale at US$100 if you want to experiment with the device.


The bottom trace on the oscilloscope shows the outgoing laser pulse after SETS on a timebase of 5ms per division.


Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In the picture below you can see the small circuit board that carries the electronic parts for the OSLRF-01. There are no special ASICs or FPGAs used in this design. Instead, most of the components can be bought from Digi-Key, RS or similar with a few parts coming from more specialized suppliers. The 0.1" connector along the back edge provides signals that include processor interrupts to synchronize ADC conversion, analog representations of the outgoing and return laser pulses and power connections.

The OSLRF-01 open source laser range finder

The oscilloscope trace below shows a typical return signal, in this case, from a white wall about 8.5m away. The red trace is a time marker (Synch) that is used to start an ADC conversion sequence in order to digitize the blue return signal. The total span of measurement is between consecutive falling edges of the Synch signal which in this case is 28.27ms, corresponding exactly with a distance span of 18.33m. Not all of this range is useable however, because there are a few nanoseconds delay between the Synch marker and the firing of the laser which equates to about 5ms on this trace. To convert the data from the return signal into an exact distance, this firing delay would have to be subtracted from the return signal value. Fortunately, there is a similar output for the Zero on another pin and this has a perfectly matching image of the outgoing laser pulse.
The fun part of using the OSLRF-01 will be inventing signal processing algorithms to locate the return signal and deciding upon a method of timing the exact position of the signal, especially when the signal strength changes. To me this sounds like a classic undergraduate project.


Return signal from a white wall at 8.5m

The circuit diagram below shows the complete design. The www.lightware.co.za version of the PCB is made using 0402 and SC70 size components and some QFN packages. These small parts improve the performance of the system but I've tested the concept using a conventional breadboard and it still works, although with significantly higher noise levels. I'm sure many of you will recognize the circuits used, like the differential amplifier for the return signal. Using these circuits is only possible because of the dramatic effect of the SETS system that slows down the timebase of the signals by more than a factor of 105. There is a control input that lets you adjust the timebase and therefore the update rate and resolution of the system.
 

OSLRF-01 Circuit diagram

As a final point of explanation, the FET switches are part of the SETS circuit and work the same way as a typical sample-and-hold circuit placed in front of an ADC. However, instead of stopping at that point, the capacitors immediately after these switches store the voltage until they are updated by the next sample. This creates an almost perfect reproduction of the high speed laser signals on a much slower timebase, and these slowed down signals can then be amplified using conventional op-amps.
When I have a chance I'll put together parts lists (BOMs) with part numbers from the major suppliers.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The OSLRF-01 takes care of many of the performance related issues associated with a TOF LRF design. These include the power of the laser, the sensitivity of the detector, the design of the optics etc. It now becomes a matter of analyzing the electrical signals that come out of the device, and the performance will depend on how good these signals are. One of the characteristics of a good signal is low noise and the table below shows some measured noise values under different conditions:

     Conditions     RMS noise
Indoors, normal lighting           9mV
Outdoors in shadow          12mV
Fluorescent  lamp at 0.5m          25mV
Worst case          45mV

The signal itself should be large compared with the noise in order for it to be easy to analyze. Unfortunately, the strength of the signal will change depending upon the distance to the target surface and the reflectivity or color of the surface. The second table shows the height of the signal when measuring to two different  surfaces, one white and the other matt black. Each surface was measured at different distances. The height of the signal changes by more than 20:1 under these differing conditions:


Distance[m]    Color     Signal height [mV]
     0.5     White              310
     0.5     Black              90
     1.0     White              2180
     1.0     Black              550
     2.0     White              2180
     2.0     Black              650
     3.0     White              2150
     3.0     Black              420
     4.0     White              1970
     4.0     Black              380
     5.0     White              1460
     5.0     Black              270
     6.0     White              1220
     6.0     Black              180
     7.0     White              940
     7.0     Black              140
     8.0     White              740
     8.0     Black              95

It's interesting to note that one of the weakest signals is received when the target surface is only 0.5m from the laser. This is due to the effects of parallax. The first two tables establish the signal-to-noise-ratio (SNR) for return signals under various conditions. A white surface at a few meters from the face of the laser gives the strongest signal and therefore the best SNR.

With a good SNR, how accurately can the OSLRF-01 measure distance? This depends almost entirely on how good the signal processing algorithm is. Processing the signal using software means that you will be simulating a digital-signal-processor (DSP). This may be intimidating at first but simple algorithms to perform DSP functions can be very effective. As an example, I tested out a basic "constant-fraction-discriminator" (CFD). This fancy name is simply another way of saying that the position of the return signal on the time axis is defined as being at a point that is midway between the front and the rear of the signal. This method cancels out some of the effects of changes in the signal strength which, as we have seen in the table above, can be quite significant.

I first measured the laser firing delay which equated to a distance offset of 6.55m. This value was subtracted from the distance of the return signal in order to get an absolute result. Next, I measured the span which was 28.18ms, equating to a distance of 18.33m. Then I measured the positions of the front and the rear of the return signal from a white target moving from 4m to 8m in 1m steps. The update rate was 35 readings per second:


Target[m]     Front[ms]     Rear[ms]     CFD[ms]     Distance[m]
        4.00        13.50        18.89        16.195        3.98
        5.00        15.62        19.86        17.740        4.99
        6.00        16.86        21.63        19.245        5.97
        7.00        18.01        23.76        20.885        7.03
        8.00        139.96        24.81        22.385        8.01

From these results we can see that the distance error was never greater than three centimeters, even with such a simple CFD algorithm. More intelligent signal processing methods will yield better results over a wider dynamic range of conditions.
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Very interesting product and a good explanation.
Will the Sensor work with an Arduino? And can you provide a sketch example?

Robert
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Robert,
Thanks for the kind words. Yes, the OSLRF-01 will work with the Arduino. We've got a few sketches planned, each one demonstrating a different method of signal processing. Unfortunately, all my stock was sold before I had a chance to get this part of the project done!
I've ordered new components, trying out a bunch of different supply companies (RS, DigiKey, Jameco etc) so that I can see which parts they can supply and then I can make a part code cross-reference. I'm going to put some of the more difficult to get components up for sale and also offer blank boards for people who would like to make their own OSLRF-01. You will find these parts here as soon as they arrive:
 www.lightware.co.za
 We've had some requests from people who want to use the OSLRF-01 in bright sunlight. Our narrow band, 905nm filter fits into the optical section of the receiver and it cuts out most of the solar spectrum, improving the SNR under bright conditions. If anyone orders an OSLRF-01 and the matching filter from our shop, we will instal the filter for you at no charge.
« Last Edit: February 18, 2014, 04:44:05 pm by Laser_Developer » Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 152
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I nearly ordered one yesterday. Had it in the cart already. On the website it looks as if they were on stock.
What is the lead time if I order now?

Regards,
Robert
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

They are in production and should be finished on Friday for delivery Monday 24 Feb 2014. Sorry if the website isn't 100% up to date - were still learning how to manage the system. Quite interesting  smiley-confuse
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The video linked below demonstrates how the timebase of the OSLRF-01 can be controlled using a very simple circuit. In this case, a 1k potentiometer is used as a voltage divider that feeds the Control input. As this voltage is changed, the timebase expands over several orders of magnitude without any significant distortion of the signals. Don't forget that the original signals are traveling at the speed of light.
http://youtu.be/IaKxn3DQSSE

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


When I have a chance I'll put together parts lists (BOMs) with part numbers from the major suppliers.


Hi, I was just wondering if you had the chance to put together the parts list for the OSLRF-01. If so, where can I find this list?

Thank you in advance.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm also curious if you have had any time to put together the list of parts. I'm working on building a laser rangefinder as a physics project and I would love to see more about how this particular one works.  I have a reasonable budget so I may get one of these modules as a reference as well.

Thanks for this really cool project and all the freely available information!
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the delay. The preliminary BOM is here:

The top overlay is here:

And the bottom overlay is here:

Still to come are the Gerber files and the Eagle CAD files.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow, that was a very welcome surprise!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the great job, eager to build one on my own.
I have downloaded the user manual of OSLRF-01 and checked the schematic.
But the BOM and Gerber images looks blurred.
May you provide the BOM list and Gerber file as raw file(zip)?
 smiley-grin
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

We're putting together a complete pack of high resolution info that will soon be available for download on the lightware.co.za website. It takes a little time to get everything perfect...  smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much!

I can't wait for the complete pack to come out.

I bought one of these laser and I am excited to play with it.  smiley-mr-green
Logged

Pages: [1] 2 3   Go Up
Jump to: