Skip to main content
Visitor II
October 3, 2025
Question

STHS34PF80 – How to achieve 4 m detection range on Linux

  • October 3, 2025
  • 1 reply
  • 197 views

I am using the STHS34PF80 IR presence/motion sensor on a Linux platform . According to the datasheet, the sensor can detect human presence up to 4 m (for a 70×25 cm² object).Currently, my configuration is as follows:

echo 1 > /sys/bus/i2c/devices/3-005a/iio:device5/algo_reset
echo 4 > /sys/bus/i2c/devices/3-005a/iio:device5/sampling_frequency
echo 2 > /sys/bus/i2c/devices/3-005a/iio:device5/lpf
echo 3 > /sys/bus/i2c/devices/3-005a/iio:device5/sensitivity
echo 150 > /sys/bus/i2c/devices/3-005a/iio:device5/threshold
echo 50 > /sys/bus/i2c/devices/3-005a/iio:device5/hysteresis
echo 1 > /sys/bus/i2c/devices/3-005a/iio:device5/scan_elements/in_temp_y_en
echo 1 > /sys/bus/i2c/devices/3-005a/iio:device5/events/in_temp0_thresh_rising_en
echo 0 > /sys/bus/i2c/devices/3-005a/iio:device5/buffer0/enable
echo 256 > /sys/bus/i2c/devices/3-005a/iio:device5/buffer0/length
echo 1 > /sys/bus/i2c/devices/3-005a/iio:device5/buffer0/enable

However, in practice, I am only getting a detection range of about 2 ft (~0.6 m).

Could you please advise:

Which parameters should be adjusted to achieve detection up to 4 m?

Are there recommended values for threshold, hysteresis, LPF_P, LPF_P_M, or sensitivity to maximize range?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    October 9, 2025

    Hi @jeena ,

    You can try lowering the presence threshold.
    For tpresence, the driver provides the following properties: lpf, threshold, hysteresis, sensitivity, and algo_reset.
    By writing to these sysfs property files, you can modify the relevant parameters.