Homebrew Phase Laser Rangefinder

Just when you thought ARM micros couldn’t get any cooler, another project comes along to blow you away. [Ilia] created a phase laser rangefinder (.ru, Google translatitron) using nothing but a laser diode, a pair of magnifying glasses, a few components and an STM32F4 Discovery dev board.

The theory behind this build is using a laser’s phase to determine how far away an object is. By modulating the laser diode’s output at a few hundred Mhz, the reflection from the laser can be compared, giving a fairly reasonable estimate of how far away the target is. This method has a few drawbacks; once the reflection is more than 360 degrees out of phase, the distance ‘loops around’ to being right in front of the detector.

The laser diode used does not have any modulation, of course, but by using an STM32F4 ARM chip, [Ilia]was able to modulate the amplitude of the laser with the help of a driver board hacked out of a 74HC04 chip and a few resistors. Not ideal, but it works.

The receiver for the unit uses a photodiode feeding into the same microcontroller. With an impressive amount of DMA and PLL wizardry (the STM32F4 is really cool, you know), the phase of both the transmission and reflection can be compared, giving a distance measurement.

It’s all an impressive amount of work with a hacked together set of optics, a cheap dev board, and a few components just lying around. For any sort of application in a robot or sensor suite this project would fall apart. As a demonstration of the theory of phase laser rangefinding, though, its top notch.

You can check out a video of [Ilia]’s rangefinder below. Be sure to full screen it and check out the distance measurement on the LCD. It’s pretty impressive.

Thanks [Володимир] for the link.

31 thoughts on “Homebrew Phase Laser Rangefinder

    1. Somewhat, you still have an ambiguous range that you have to deal with no matter what the frequency. The key is to key frequencies that are not harmonics or unambiguous with each other

  1. Anyone interested should look at the RADAR post that occur a couple of days ago. This is the same theory that was used radar’s except it is lasers. LIDAR/RADAR very similar in general theory and operation

      1. Dustin might be referring to the heterodyning system which I think was presented in the RADAR post (at least in block diagram form); such a system is also discussed in the description to this LIDAR system, though I am not sure whether it is employed in the design (if it is, it is probably happening in the software).

        The schematic of this system is fairly simple – output via a laser diode from a DVD drive, amplified via a 7404 and current limited using resistors; input via 2-stage amplifier – first stage a dual-gate n-channel MOSFET, second stage a wide-band video amp IC – then into a 10 MHz band-pass filter.

        Ultimately, this is a fairly simple circuit – consisting of fairly common and easily available parts (while this guy used a PDIP version of the video amp, that part no longer seems to be in production – production parts are now SMT). The 10 MHz BPF is a challenge – though if you have the skills and proper RF test equipment (you mainly need an RF signal generator and a o-scope), it doesn’t seem too great of a challenge to build one.

        I’m pretty certain the main magic is happening in the software.

      2. he’s measuring the phase shift of the reflected signal to determing range. Radar (simplest) measures the time it takes for a pulse to travel from the transmitter to the target and back. There are a couple of ways to determin if the target is moving. The most obvious is if the time it takes for the echo to return changes pulse to pulse the target is moving. Another way is to compare the phase of back to back echo returns. If the returns have the same phase the target is stationary. If the echo return shows a phase (doppler) shift the target is moving.

      3. As an engineer who worked in radar for 11 years, I can tell you that not all radars use pulses. Police “speeding” radars use a CW signal, and use Doppler beat frequencies to measure radial velocity, but they can’t measure distance. Using phase in this way is similar to the radars on jet fighters, which vary the modulation rates to resolve range ambiguity.

    1. Why not? He’s modulating it with the microcontroller – unless he is using a fixed oscillator (timer interrupt or similar) or such in the microcontroller itself (which could very well be), it should be possible to vary it…?

    1. I got 80MHz out of the cheap Ebay laser pointers you get. This was for a uni final year project. I should have probably put my project on Hackaday but it was a few years ago now.

  2. ” once the reflection is more than 360 degrees out of phase, the distance ‘loops around’ to being right in front of the detector.”

    IIRC, the correct terminology for that is, “aliasing”.

    1. I was wondering about that problem, and a sequence of ‘bursts – with no output between modulated ‘pulses of the light at it’s fundamental wavelength’ might allow you to measure the overall delay + plus the time of the gap in reflections – to identify which output burst is being measured.

      1. With this approach, the laser is running for many cycles, so you can’t just use a guard time to prevent aliasing.

        but what you should be able to do is vary the frequency that you are modulating the laser at.

        I think that if you are not aliasing, the distance measured at the new frequency will remain the same, but if you are aliasing, the distance measured at the new frequency will change (even if you are still aliasing)

        As I understand it, the reason you don’t just use the lowest modulation frequency possible is that your accuracy decreases as the frequency decreases (something along the lines of “you can only detect the phase difference to a given accuracy, and at a higher frequency this translates to a shorter distance”), so the modulation frequency ends up being a compromize between accuracy and max distance.

        Therefor, if you can change the modulation frequency, you should be able to get very high accuracy at short distances (high frequency), but then lower the frequency to be able to get readings at longer ranges.

        If you are really clever, you may be able to get both accuracy and distance

        measure at both high and low frequencies, and use the low frequency to figure out how many multiples out you are with the high frequency.

  3. Nice project! I have found an interesting projects over DIY LIDAR systems, that are good described by: http://www.seattlerobotics.org/encoder/200110/vision.htm https://sites.google.com/site/todddanko/home/webcam_laser_ranger http://www.spelldreams.com/engi http://www.codeproject.com/Articles/91470/Computer-Vision-Laser-Range-Finder These projects using lasers with webcams mostly. But one project I think is with same principle as Ilia’s – nice finished LRF project: http://forum.arduino.cc/index.php?topic=110549.0 I don’t know if there is opportunity to get the sources or the project is still maintained. But there is a good ideas. Another cool project with mini LRF: http://diydrones.ning.com/profiles/blog/show?id=705844%3ABlogPost%3A906542&commentId=705844%3AComment%3A907043&xg_source=activity Offcourse, also was bunch articles on HaD of scavenging LRF and LIDARS from Neato X-11. Remembering another cool cheap LRF project that been on HaD: http://hackaday.com/2014/01/23/lidar-with-leds-for-under-100/

    Those articles are finest that I have found over whole internet, maybe there is more, that I dunno? But still LRF’s are tough for DIY with high precision with minimal costs.

    P.S. Когда то весь интернет разыскал насчёт самодельных далльномерах но это единственный проект, каторый так почти совершенно доработан. Пришла время и самому попробовать, поскольку у меня ест лишный STM Discovery F4 :) Другой раз буду искать интересных проектов и в рунете.

  4. Ca. 1943, the AN/APN-1 radar altimeter used a frequency-swept transmitter which beat the received signal against the transmitted signal to give a beat frequency proportional to the altitude.. It had two selectable ranges, as I recall: 0-400 feet and 0-4000 feet. It used a mechanically-modulated (voice-coil driven) resonant cavity called a wobbulator to generate the swept frequency. The center frequency was about 440 MHz, generated by a pair of 955 acorn tubes. Wonderful source of UHF components for hams in the 1940s and 1950s.

  5. I recall this from about 30 years ago. Here’s the summary from the Internet:

    “Hewlett-Packard’s HP 3820A Electronic Total Station, designed and first
    sold in 1980, uses a double heterojunction GaAs lasing diode. Its
    infrared energy is modulated so that the phase difference between the
    internal reference beam and the portion of the transmitted that’s reflected
    back from a 3-corner reflector can be measured. Three modulation frequencys
    are used. In excellent atmospheric conditions, distances greater than 5 Km
    can be measured with accuracy to about +/- 5mm per kilometer.
    A complete and detailed explanation is in the September, 1980, HP Journal

    You can find the entire issue here:

    I recall that THREE frequencies were used to modulate the laser in order to prevent aliasing and achieve a resolution of a few milimeters for distances up to 5km. Some of these details are discussed starting on page 6. Specifically the three modulation frequencies used are: 15MHz, 375KHz, and 3.75KHz. As this was part on a surveying theodolite, the articles contain considerable information on angle measurement as well.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s