Proximity sensors designed for human detection are pivotal components in modern automation, security, and interactive systems. Unlike simple object detectors, human proximity sensors must reliably distinguish the presence of a person, often requiring sensitivity to specific biological characteristics like body heat or capacitive influence. This guide outlines the fundamental principles and a practical approach to constructing a basic yet effective human proximity sensor, focusing on the widely used Passive Infrared (PIR) and capacitive sensing methods.
The core principle behind a PIR sensor is the detection of infrared radiation emitted by warm bodies. Humans, with a typical skin temperature, emit infrared waves in the range of 9-10 micrometers. A PIR sensor module contains a pyroelectric sensing element that generates a small electrical signal when exposed to changes in infrared radiation. The key to detecting movement is the use of a multi-faceted Fresnel lens, which focuses the infrared signals from different zones onto the sensor. When a warm body moves across these zones, it creates a fluctuating signal that the sensor interprets as motion. To build one, you start with a standard PIR sensor module (e.g., HC-SR501). This module typically includes the pyroelectric sensor, the Fresnel lens, and supporting circuitry for signal amplification and filtering. Your task involves integrating this module with a microcontroller like an Arduino or Raspberry Pi. Connect the VCC and GND pins to a stable 5V power supply, and the output pin to a digital input pin on the microcontroller. The module often has adjustable potentiometers for setting the detection delay time and sensitivity. Enclosure design is critical; the sensor should be mounted to cover the desired field of view without obstructions, and protected from direct sunlight or heat sources like radiators to prevent false triggers.
For non-motion-based detection, such as sensing a stationary person nearby, capacitive sensing is a powerful technique. It works by measuring changes in capacitance. The human body has dielectric properties and can act as one plate of a capacitor. You can create a sensing electrode—a simple conductive plate or even a piece of foil. This electrode is connected to a capacitance sensing circuit. One common method is to use a microcontroller with built-in capacitive touch functionality, such as the ESP32 or certain ARM Cortex chips. The electrode is connected to a dedicated touch-sensitive GPIO pin. The microcontroller continuously measures the capacitance of this pin relative to ground. When a person approaches the electrode, their body adds parasitic capacitance to the system, causing a measurable change in the reading. In code, you establish a baseline capacitance value when no one is present. You then monitor for significant deviations from this baseline. Thresholds must be carefully calibrated to account for environmental humidity and other interfering objects. Shielding is essential to improve stability; the back of the electrode should be grounded to direct the sensing field outward. For more robust applications, dedicated capacitive proximity ICs like the FDC1004 or AT42QT1010 offer higher resolution and better noise immunity. These chips handle the complex measurements via I2C or SPI, providing a digital value proportional to proximity.

Regardless of the chosen technology, signal processing is paramount. Raw sensor outputs are noisy. Implementing software filters, such as moving averages or debouncing algorithms, is necessary to distinguish a genuine human presence from environmental noise. For a PIR sensor, this might mean requiring multiple positive readings within a short timeframe. For capacitive sensors, it involves ignoring slow drifts and focusing on rapid changes indicative of approach. Power management is another consideration, especially for battery-operated devices. PIR sensors can be configured in interrupt mode, waking the microcontroller only upon detection. Combining sensing modalities, such as using a PIR to trigger a more precise capacitive check, can create a highly reliable and energy-efficient system.

Finally, thorough testing in the intended environment is non-negotiable. Evaluate the sensor's range, angular coverage, and response to different scenarios—like a person walking versus crouching. Document the calibration values and thresholds. Remember, while building a functional prototype is achievable with off-the-shelf modules, designing an industrial-grade human proximity sensor for safety-critical applications involves rigorous compliance with standards (e.g., IEC 60947-5-2), extensive environmental testing, and fail-safe circuit design. This guide provides the foundational knowledge to embark on that development journey, bridging the gap between theoretical principle and practical implementation in the field of electrical engineering.