Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
STHS34PF80 infrared presence and motion sensor breakout board

Test Infrared Presence Detection: Stationary Occupants, Placement and Control Delays

A motion-controlled light can switch off while someone is sitting quietly at a desk. Detecting movement and deciding whether a space remains occupied are related but different tasks. A presence sensor adds another source of evidence, yet its installation and control rules still need testing.

The STHS34PF80 infrared presence and motion detector board offers an interesting option in PMD Way's motion sensor collection. It can support experiments with stationary as well as moving targets. This guide develops an occupancy test and a practical control strategy without treating a catalogue detection distance as a guarantee for every room.

Separate motion, presence and occupancy

Motion describes a changing observation. Presence indicates that a target remains detectable. Occupancy is an application decision: should the system consider the room or desk in use? Your software may combine sensor evidence with timing, a manual control or another input before making that decision.

ST explains in its introduction to the STHS34PF80 that the device uses thermal transistors and can detect stationary objects, unlike conventional PIR detection that relies on change. It is still not a camera or a people-identification system. A presence indication does not tell you who is there or how many people are present.

Start with one defined area, such as a seated workspace. Write down the expected activities: entering, sitting still, typing, turning away and leaving. This is more useful than asking whether the sensor can detect a person somewhere in an entire room.

Understand the field of view and target size

The STHS34PF80 datasheet specifies an 80° field of view and describes reach up to 4 m without a lens for objects measuring 70 × 25 cm². That qualified example is not a promise that every small exposed hand will be detected at the same distance.

Sketch the sensor's intended view before mounting it. Include the desk, chair, doorway, walls and nearby equipment. A target partly hidden behind a monitor presents a different observation from an unobstructed person standing directly in front of the sensor.

Choose a mounting point that observes the area of interest while limiting unrelated activity. If the doorway dominates the view, people passing outside may affect a desk experiment. If the sensor points towards a changing heat source, the software may need to distinguish that disturbance from the intended target.

Mark several test positions on the floor and record sensor height and angle. Those simple measurements make it possible to repeat the evaluation after an enclosure or bracket change.

Treat the cover as an optical component

A window that looks transparent in visible light may transmit the sensor's infrared wavelengths poorly. Do not select a clear plastic cover solely by appearance. ST's AN5983 hardware implementation guide discusses cover and lens integration, optical properties and thermal layout.

Evaluate the bare board first, then repeat the same tests with the exact cover material, thickness and spacing intended for the finished product. Keep a record of the material supplier and part number rather than writing only “plastic window”. A replacement sheet may behave differently.

Keep unnecessary heat sources away from the sensing area and consider heat conducted through the board or enclosure. A regulator or processor that changes temperature during operation can make an open-bench success misleading. Test while the rest of the device is doing its normal work.

Verify the electrical interface and initial readings

The sensor chip's operating supply is 1.7–3.6 V according to the datasheet. The store lists a broader supply range for the breakout board, which depends on its supporting circuitry. Confirm the actual board's permitted input and I2C signal levels before connection; a supply regulator alone does not establish 5 V-tolerant bus pins.

Start with a minimal logger that checks device identity and initialisation. Record sample timestamps, available raw or processed measurements, presence and motion flags, configuration and errors. Confirm that the logger is receiving new samples rather than repeatedly displaying the last value.

ST's AN5867 usage guide describes the embedded algorithms, thresholds, filtering and status handling. Use its configuration sequence or a reviewed driver for this device. Do not transplant register settings from an unrelated PIR module.

When changing a parameter, record the old and new values and follow the documented restart or algorithm-reset requirements. Otherwise, a comparison can include both the configuration change and an uncontrolled transition in the sensor's processing state.

Run a stationary-occupant test matrix

  1. Observe the empty area long enough to see normal background changes.
  2. Enter along a marked path and record when motion and presence become active.
  3. Sit in the intended position, first moving normally and then remaining comfortably still.
  4. Repeat with different body orientations and partial obstruction by normal furniture.
  5. Leave the area and record when each indication clears.
  6. Repeat the sequence at the other marked positions.

Keep ground-truth notes alongside the electronic log: when the person entered, sat down and left. Measure missed detections, unintended detections, entry delay and clearing delay separately. One combined success percentage can hide a light that turns on promptly but stays on long after departure.

Repeat with ordinary room changes, such as ventilation operating or sunlight reaching a nearby surface. Use the actual enclosure throughout the final tests. The goal is to learn which conditions your installation handles, not to tune it until one demonstration passes.

Choose thresholds and delays from the evidence

Review empty and occupied traces before adjusting sensitivity. If their ranges overlap, lowering a threshold may improve detection while creating more false indications. Repositioning the sensor or changing the optical arrangement may solve the problem more effectively.

Keep sensor processing separate from the application's occupancy timer. For a desk-light prototype, an illustrative rule could turn on after valid presence and turn off only after sustained absence, with a manual override available. Choose the actual intervals from measured delays and the user's tolerance for interruption.

Use hysteresis or persistence where supported to prevent rapid switching near a boundary. Then test the complete rule with a person sitting still; a pleasing empty-room trace does not prove that an occupied desk will remain lit.

Define startup and failure behaviour

A missing reading is not proof of an empty room. If communication fails, mark the occupancy state uncertain and apply a deliberate fallback suitable for the controlled device. For a convenience light, maintaining illumination temporarily and allowing manual control may be preferable to an unexpected blackout.

Test power cycling while the area is occupied as well as empty. Include a disconnected sensor and a stalled logging task. Save the final configuration, placement drawing and acceptance results together. That evidence makes presence sensing a usable component of a control system while keeping its limits visible.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat