laser/ultrasonic range finder

Discussion in 'The Projects Forum' started by nick.dellimuti, Sep 23, 2010.

  1. nick.dellimuti

    Thread Starter New Member

    Aug 30, 2010
    3
    0
    i understand how a range finder circuit it self works however i find it very difficult to find any info on how to interface it to a digital circuit for calculating the distance if some one could point me in some kind of direction i would really be thankful
     
    Last edited: Sep 23, 2010
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    If you use the digital circuit to perform the ranging operation, it is self explanatory.

    The uC (microController) sends the pulse from a transmitter and starts a timer.
    The receiver, connected to the uC, stops the timer when the pulse is received.

    So now you have the amount of time that the signal took to fly TO the object and BACK.

    So you divide by 2, to get the amount of time TO the object.

    Depending on what type of transmitter you are using, i.e. ultrasonic or laser etc., you can now divide by the speed that the signal travels in a millimeter.

    That results in the distance in mm the object is away from the device.
     
    nick.dellimuti likes this.
  3. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    In theory that would work retched, I was thinking of doing something like that myself. But, the problem is, the speed of light is 299,792,458 m/s, so if you had a 1 MHz processor clock (say a PIC with a 4 MHz xtal), your resolution would be 299 meters.
     
    nick.dellimuti likes this.
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    You better be using it for astral distancing. :)

    1 ghz would be .29 meters.. thats not..too...bad.
     
    nick.dellimuti likes this.
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Retched,

    I think the point that tom66 is making with his comment is based on the fact that using the microcontroller with the parameters he has given would be limited by its sample rate. The microcontroller could not sample the returned signal fast enough to resolve time-of-flight signals that took less than several tens of microseconds to travel out and back.

    hgmjr
     
    nick.dellimuti likes this.
  6. nick.dellimuti

    Thread Starter New Member

    Aug 30, 2010
    3
    0
    could i write the directions for the uc micro controller in c program code
     
  7. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    As mentioned above a standard microcontroller is impractical for this. Laser distance measurements are impractical for resolutions higher than 3m.
     
  8. Ghar

    Active Member

    Mar 8, 2010
    655
    72
    That's not true, I've been using a commercial laser range finder for a few months now and it works down to a few centimeters.
    They must use a different method.

    http://www.opticsplanet.net/leica-disto-brand.html

    Look at that, 5cm to 200m and they claim < 3mm accuracy.
     
  9. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,535
    This is the problem using µC, they can't and shouldn't be expected to do everything internally.

    In the case of a LASER rangefinder it should be a self contained unit, feeding the completed measurements to the µC. This means using a internal high speed clock and fast logic.
     
    nick.dellimuti likes this.
  10. Milamberinx

    New Member

    Jan 13, 2013
    1
    0
    I see this thread has been dead for a while, but thought I'd chip in anyway. I believe the way that a commercial laser distance sensor would work is by parallax. That is to say that the optical sensor would be at some known distance away from the laser source and the sensor would see the dot off centre by varying amounts depending on the distance, which could then be worked out by trigonometry.
     
  11. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    The first thing to keep in mind is that the effective speed of light is cut in half because you are not measuring time of flight to the target, but time of flight to the target and back. Thus, instead of 1ns per foot of resolution desired, you only need 2ns/ft (rough numbers to keep things simple). So to get one meter resolution we are only talking about a timer that is running at about 150MHz. The next thing to keep in mind is that you don't need to run the MCU at 150MHz, only the timer. And the timer only has to run at that speed while a measurement is being made, so the fact that it will probably be a bit of a power hog is not a big concern unless measurements need to be made continuously (or with a very high duty cycle) -- but under those conditions you have to deal with the power needed to run the laser in the first place, anyway.

    Direct time-of-flight is not the only way to make the measurement and, even with time-of-flight measurement, a high speed oscillator is not the only option. One way to get high time-resolution from low-frequency signals is to use two sine waves in quadrature synched to a relatively low speed counter. Your counter gives you your course measurement and your find measurement is obtained by capturing the amplitude of the two sine waves. Even with just an 8-bit resolution on this measurement you can extend the resolution of the timer considerably. Another approach is to modulate the transmitted signal and then phase lock another signal to the received signal and measure the phase offset between the two.

    But getting back to the OP's request. He talks about it being difficult to find info on interfacing "it" to a digital circuit. What is "it"? A generic range finder? A particular brand of range finder? A specific model range finder? I would expect that how to interface anything to it is going to be highly dependent on the range finder in question and what protocol(s) it supports.
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    Oops, I didn't catch that this is a resurrected thread that has been dead for over two years.

    @Milamberinx: It's one thing to resurrect a thread when you basically have the same question as the OP and are trying to move the thread to a more complete conclusion, but there isn't much point in churning up old threads just to add a comment, especially when the comment isn't related to the OPs quest. If you want a new discussion to start, it is better to start a new thread (then it is YOUR thread, instead of a hijacked thread belonging to someone else) and refer to the old one.
     
Loading...