2025-10-03 2:43 AM - edited 2025-10-03 3:22 AM
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?