cancel
Showing results for 
Search instead for 
Did you mean: 

STHS34PF80 Sensor Detects False Presence After Inanimate Object Removal

mobaid
Associate III

Hello STM Community,

I am working with the STHS34PF80 presence detection sensor on an STM32WB55 development board, and I've encountered an unexpected issue with its detection behavior.

Problem Description:

When an object like plastic or paper passes in front of the sensor, it does not detect the object's presence, which I understand could be due to these materials not emitting enough infrared radiation. However, the problem occurs after the object is removed. Once the object is no longer in front of the sensor and there is no one around, the sensor unexpectedly detects a "presence."

Observations:

  • The sensor detects human presence accurately.
  • The false presence detection only happens after an object (plastic, paper, etc.) is moved away.
  • There are no obvious environmental changes (such as temperature shifts or airflow) when the false presence is detected.
  • The object itself does not seem to be detected at all while in front of the sensor.

Question:

Has anyone experienced similar behavior with the STHS34PF80 sensor or any other infrared-based presence sensors? Could this be due to residual heat effects, algorithm misinterpretation, or something else I'm overlooking? Any insights or suggestions to correct this false presence detection would be greatly appreciated!

Thank you for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @mobaid ,

Can you try to enable the bit SEL_ABS of register ALGO_CONFIG (28h) and let me know if this solves?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

8 REPLIES 8
Federica Bossi
ST Employee

Hi @mobaid ,

Can you try to enable the bit SEL_ABS of register ALGO_CONFIG (28h) and let me know if this solves?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Federica Bossi  ,
the issue is solved , thank you so much .

but ,what is the relation between presence flag stuck state when the sensor is exposed to cold object  and sellecting the absolute value in the presence detection algorithm ?

 

mobaid_0-1725948590722.png

 

Hello, according to this conversation, your problem was that 'A cold object inside of the FOV exits'. But I don't understand why ..

Moreover, why selecting absolute value of TPRESENCE would solve detection issues ?

LizzieP59_0-1726642821448.png

 

Hello Lizzie ,
Please refer to  UM3169

sensor limitation.PNG

regards ,
Mohamed Obaid

Hello Lizzie ,
What is the ACTUAL range and FOV angle of the sensor without any lens ?
for my tests , with presence threshold 100-150 , I found that the range is nearly 1 meter and the FOV less than 60' !

Regards ,
Mohamed Obaid

LizzieP59
Associate II

Hey @mobaid,

When I ran some detection tests without a lens, I found a FOV of about 97° (+/- 48.5°), but it wasn’t uniform at all. Also, I remember using a really low threshold (around 50 or 70), but after reading other threads, it seems like no one uses thresholds that low.

Depending on the distance, if the sensor picked me up at 1 meter, I could move back up to 5 meters before losing detection. But if I wasn’t detected initially, I’d have to get as close as 2 meters before being picked up. I even tried sitting in a chair, and at around 1.3 meters, I wasn’t detected at all.

Do you have any tips for setting the threshold correctly? I’ve got different lenses to improve FOV and range, but even when I adjust sensitivity (based on the lens transmittance), I still have to use a threshold of 70 to meet the lens specs.

Regards

Hello Lizzie ,

/*--------------------------------------------------------------------------------------------------------------------------------------*/
When I ran some detection tests without a lens, I found a FOV of about 97° (+/- 48.5°), but it wasn’t uniform at all. Also, I remember using a really low threshold (around 50 or 70), but after reading other threads, it seems like no one uses thresholds that low.

what is the firmware you're using to get this FOV ? InfraredPD library or one of these examples :

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/sths34pf80_STdC/examples
?
because my FOV is narrower .
and these are my sensor settings :
lpf_m: 04, lpf_p: 04, lpf_p_m: 02, lpf_a_t: 00

sths34pf80_gain_mode_get 7
sths34pf80_tobject_sensitivity_get 2000
sths34pf80_odr_get 7
sths34pf80_block_data_update_get 0
sths34pf80_one_shot_get 0
sths34pf80_presence_abs_value_get 1
sths34pf80_tobject_algo_compensation_get 0
sths34pf80_presence_hysteresis_get 25
sths34pf80_motion_hysteresis_get 25
sths34pf80_tambient_shock_threshold_get 10
sths34pf80_motion_threshold_get 100
sths34pf80_presence_threshold_get 100


/*--------------------------------------------------------------------------------------------------------------------------------------*/

Depending on the distance, if the sensor picked me up at 1 meter, I could move back up to 5 meters before losing detection. But if I wasn’t detected initially, I’d have to get as close as 2 meters before being picked up. I even tried sitting in a chair, and at around 1.3 meters, I wasn’t detected at all.


You're totally right , but even when I move back it loses the presence after nearly 3m .


/*--------------------------------------------------------------------------------------------------------------------------------------*/

Do you have any tips for setting the threshold correctly? I’ve got different lenses to improve FOV and range, but even when I adjust sensitivity (based on the lens transmittance), I still have to use a threshold of 70 to meet the lens specs.

 

for TMOS10-12030 lens , how did you set the sensitivity ? using sths34pf80_tobject_sensitivity_set ? and what is the value ?

Best Regards ,
Mohamed Obaid

LizzieP59
Associate II

Hello @mobaid 

I am using the evaluation kit from ST :

LizzieP59_0-1726824235846.png

It’s been super useful since it can trace TOBJECT, TPRESENCE, and other values in real-time. It really helps to understand why sometimes we get detected and sometimes not, like in this situation :

LizzieP59_4-1726824935969.png

Based on the configuration I’ve been using, here’s a capture of the registers:

LizzieP59_1-1726824469395.png

I’m not sure how to set the sensitivity using the InfraredPD library, but in my case, I’ve just adjusted the SENS_DATA register value. To calculate it, I looked up the lens transmittance in the lens datasheet. I found this: https://www.fresnelfactory.com/fresnel_list/en_poly_materialofFresnel.pdf , which shows transmittance based on the lens material.
Also, according to the https://www.st.com/content/ccc/resource/technical/document/application_note/group2/cb/74/5a/92/c0/de/4a/94/DM00914720/files/DM00914720.pdf/jcr:content/translations/en.DM00914720.pdf datasheet (p.14), , there’s a "tutorial" explaining how to compute the transmittance. You need to take several TOBJECT measurements with and without the lens, then apply the formula:

LizzieP59_2-1726824825370.png

Finally, the SENS_DATA value is calculated using this formula:

LizzieP59_3-1726824882205.png