system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do motion sensors work?
gpt
The general function behind most, whether it uses infrared, ultrasound, or even a webcam, is a game of "spot the difference." When calibrated in a still room, the sensor knows that the general "image" it is "seeing" is a scene without any movement. When something changes, usually within a set tolerance level, (many are designed not to trigger the alarm when a pet or anything smaller than an average adult human wanders through the area) the sensor sees that there's a significant difference in the "image" and hits the panic button. This can range from ultra-sophisticated 3D imaging using a complex network of sensors down to a beam of light going from full to dim/off. Even a tripwire rigged to a mousetrap does this on a mechanical level, though something like this is much easier to circumvent.