# Robotics/Sensors/Ranging Sensors
## Description

    Ranging sensors include sensors that require no physical contact with the object being detected. They allow a robot to see an obstacle without actually having to come into contact with it. This can prevent possible entanglement, allow for better obstacle avoidance (over touch-feedback methods), and possibly allow software to distinguish between obstacles of different shapes and sizes. There are several methods used to allow a sensor to detect obstacles from a distance. Below are a few common methods ranging in complexity and capability from very basic to very intricate. The following examples are only made to give a general understanding of many common types of ranging and proximity sensors as they commonly apply to robotics. Many variances can exist within each type.

## Sonic Sensors

    Sonic sensors use sound waves, usually ultrasonic, through a medium as their means of detection. The medium is typically the atmosphere or a body of water. A pulse of sound is emitted from some source. One or more receivers then pick up the sound wave after it has bounced off any obstacles. This echo is then interpreted in various ways to obtain information about an obstacle.

### Sonic Ranging

* Single Ultrasonic Range Finder
* Animation of basic SONAR operation
    Sonic ranging sensors, sometimes referred to as SONAR send out a pulse of sound and wait for the echo to return. The time it takes for the echo to return is used to determine the distance to the obstacle. They are popular in hobby and research robotics due to their simplicity and relatively low cost. These sensors are generally limited to about a 6m range. Divergence can be a problem because the sound wave spreads out rapidly as it moves away from the source. The sensor cannot determine where along this projected arc an obstacle was found. 'Ghost' echoes can cause problems as well when the sound wave bounces off multiple obstacles before returning.
* Sonic Ranging
** Pros
*** Cheap
*** Easy to Use
** Cons
*** Resolution rapidly decreases with distance
*** Ghost echoes can give false readings
*** Physical properties of objects can give very different responses

### Scanning Ranging

    Sonic scanning ranging sensors are often (and hereafter) referred to as SONAR or SONAR arrays. SONAR uses the same principle as sonic ranging but with more sophisticated detecting hardware. Typically a SONAR system will produce multiple pulses of sound and utilize multiple detectors (called an array) to calculate the distance and shape of objects with greater accuracy than one stationary sensor/emitter pair can achieve. However, SONAR performance can be poor in situations similar to those of other sonic ranging systems. Dense obstacle distribution or complex surfaces can produce overwhelming ghost echoes or poor echo returns.
* An IR proximity sensor with two emitters
* A Sharp GP2D120 infrared range sensor
* Animation of a two-emitter proximity sensor
* Animation of simple LIDAR
* Animation of an infrared range sensor

## Visible or Infrared Light-Base

    Another very popular method uses projected light waves, usually infrared, to detect obstacles. This system projects a pulse of light and looks for the reflection. Properties of the reflected light are analyzed to determine characteristics about the object detected. Light has the advantages of traveling extremely fast, allowing for fast sensor response time, high resolution, and less error to account for. Light from this type of sensor is often formed into a narrow beam or many times a laser is used. This provides good resolution over large distances.

### Basic Proximity

    The simplest light-based obstacle sensor projects a light and looks for a reflection of a certain strength. If the reflection is strong enough, it can be inferred that an obstacle lies within a certain range of the sensor. Multiple light sources can be pulsed on in sequence to give some resolution to the sensor as in the figures.

### Ranging Light-Based Sensors

    Light-based ranging sensors use multiple methods for detecting obstacles and determining range. The simplest method uses the intensity of the reflected light from an obstacle to estimate distance. However, this can be significantly affected by the color/reflectivity of the obstacle and external light sources. A more common method is to use a beam of light projected at an angle and a strip of detectors spaced away from the emitter as in the animation to the right. The pictured Sharp sensor uses this method. This method is less affected by the color/reflectivity of the object and ambient light.
    LIDAR, a more advanced method of range detection, uses a laser that is swept across the sensor's field of view. The reflected laser light is usually analyzed one of two ways. Units with longer ranges sometimes actually determine distance by measuring the time it takes for the laser pulse to return to the sensor. This requires extremely fast timing circuitry. Another method uses phase shift detection to determine range by analyzing the incoming light and comparing it to a reference signal.

## References

* ↑ http://acroname.com/robotics/parts/R287-SRF02.html
* ↑ http://parallax.com/Store/Sensors/ObjectDetection/tabid/176/CategoryID/51/List/0/Level/a/ProductID/92/Default.aspx?SortField=ProductName,ProductName
* ↑ http://www.societyofrobots.com/sensors_sonar.shtml