# Motion detector

A motion detector is an electrical device that utilizes a sensor to detect nearby motion (motion detection). Such a device is often integrated as a component of a system that automatically performs a task or alerts a user of motion in an area. They form a vital component of security, automated lighting control, home control, energy efficiency, and other useful systems. It can be achieved by either mechanical or electronic methods. When it is done by natural organisms, it is called motion perception.

## Overview

An active electronic motion detector contains an optical, microwave, or acoustic sensor, as well as a transmitter. However, a passive contains only a sensor and only senses a signature from the moving object via emission or reflection. Changes in the optical, microwave or acoustic field in the device's proximity are interpreted by the electronics based on one of several technologies. Most low-cost motion detectors can detect motion at distances of about 4.6 metres (15 ft). Specialized systems are more expensive but have either increased sensitivity or much longer ranges. Tomographic motion detection systems can cover much larger areas because the radio waves it senses are at frequencies which penetrate most walls and obstructions, and are detected in multiple locations.
Motion detectors have found wide use in commercial applications. One common application is activating automatic door openers in businesses and public buildings. Motion sensors are also widely used in lieu of a true occupancy sensor in activating street lights or indoor lights in walkways, such as lobbies and staircases. In such smart lighting systems, energy is conserved by only powering the lights for the duration of a timer, after which the person has presumably left the area. A motion detector may be among the sensors of a burglar alarm that is used to alert the home owner or security service when it detects the motion of a possible intruder. Such a detector may also trigger a security camera to record the possible intrusion.
Motion controllers are also used for video game consoles as game controllers. A camera can also allow the body's movements to be used for control, such as in the Kinect system.

## Sensor technology

Motion can be detected by monitoring changes in:
* Infrared light (passive and active sensors)
* Visible light (video and camera systems)
* Radio frequency energy (radar, microwave and tomographic motion detection)
* Sound (microphones, other acoustic sensors)
* Kinetic energy (triboelectric, seismic, and inertia-switch sensors)
* Magnetism (magnetic sensors, magnetometers)
* Wi-Fi Signals (WiFi Sensing)
Several types of motion detection are in wide use:

### Passive infrared (PIR)

Passive infrared (PIR) sensors are sensitive to a person's skin temperature through emitted black-body radiation at mid-infrared wavelengths, in contrast to background objects at room temperature. No energy is emitted from the sensor, thus the name passive infrared. This distinguishes it from the electric eye for instance (not usually considered a motion detector), in which the crossing of a person or vehicle interrupts a visible or infrared beam. These devices can detect objects, people, or animals by picking up one's infrared radiation.

### Mechanical

The most basic forms of mechanical motion detection utilize a switch or trigger. For example, the keys of a typewriter use a mechanical method of detecting motion, where each key is a switch that is either off or on, and each letter that appears is a result of the key's motion.

### Microwave

These detect motion through the principle of Doppler radar, and are similar to a radar speed gun. A continuous wave of microwave radiation is emitted, and phase shifts in the reflected microwaves due to motion of an object toward (or away from) the receiver result in a heterodyne signal at a low audio frequency.

### Ultrasonic

An ultrasonic transducer emits an ultrasonic wave (sound at a frequency higher than a human ear can hear) and receives reflections from nearby objects. Exactly as in Doppler radar, heterodyne detection of the received field indicates motion. The detected doppler shift is also at low audio frequencies (for walking speeds) since the ultrasonic wavelength of around a centimeter is similar to the wavelengths used in microwave motion detectors. One potential drawback of ultrasonic sensors is that the sensor can be sensitive to motion in areas where coverage is undesired, for instance, due to reflections of sound waves around corners. Such extended coverage may be desirable for lighting control, where the goal is the detection of any occupancy in an area, but for opening an automatic door, for example, a sensor selective to traffic in the path toward the door is superior.

### Tomographic motion detector

These systems sense disturbances to radio waves as they pass from node to node of a mesh network. They have the ability to detect over large areas completely because they can sense through walls and other obstructions. RF tomographic motion detection systems may use dedicated hardware, other wireless-capable devices or a combination of the two. Other wireless capable devices can act as nodes on the mesh after receiving a software update.

### Video camera software

With the proliferation of low-cost digital cameras able to shoot video, it is possible to use the output of such a camera to detect motion in its field of view using software. This solution is particularly attractive when the intent is to record video triggered by motion detection, as no hardware beyond the camera and computer is needed. Since the observed field may be normally illuminated, this may be considered another passive technology. However, it can also be used together with near-infrared illumination to detect motion in the dark, that is, with the illumination at a wavelength undetectable by a human eye.
More complex algorithms are necessary to detect motion when the camera itself is panning, or when a specific object's motion must be detected in a field containing other, irrelevant movement—for example, a painting surrounded by visitors in an art gallery. With a panning camera, models based on optical flow are used to distinguish between apparent background motion caused by the camera's movement and that of independently moving objects.

### Gesture detector

Photodetectors and infrared lighting elements can support digital screens to detect hand motions and gestures with the aid of machine learning algorithms.

## Dual-technology motion detectors

Many modern motion detectors use combinations of different technologies. While combining multiple sensing technologies into one detector can help reduce false triggering, it does so at the expense of reduced detection probabilities and increased vulnerability. For example, many dual-tech sensors combine both a PIR sensor and a microwave sensor into one unit. For motion to be detected, both sensors must trip together. This lowers the probability of a false alarm since heat and light changes may trip the (passive infrared) PIR but not the microwave, or moving tree branches may trigger the microwave but not the PIR. If an intruder is able to fool either the PIR or microwave, however, the sensor will not detect it.
Often, PIR technology is paired with another model to maximize accuracy and reduce energy use. PIR draws less energy than emissive microwave detection, and so many sensors are calibrated so that when the PIR sensor is tripped, it activates a microwave sensor. If the latter also picks up an intruder, then the alarm is sounded.