cancel
Showing results for 
Search instead for 
Did you mean: 

STHS34PF80 stuck in presence state

SLin.11
Associate III

Hi All,

I use STHS34PF80 for presence detection with embedded algorithm however it easily get stuck in presence status and cannot release from the status.

Use case:

People sit in from of the sensor around 30 cm, with lens on STHs34PF80.

When people enter the FOV it's triggered as presence status.

When people sit still for a while (e.g. 30 min), the TPresence keeps glowing.

When people leave, TPresence drops however it cannot across threshold.

TPresence will keep fall very slowly until it across the threshold however sometime it will never across below the threshold.

ibs09ps-annotate.png

Red line: presence flag

Orange line: TPresence value

my settings:

lpf_m: DIV_200

lpf_p: DIV_200

lpf_p_m: DIV_9

lpf_a_t: DIV_50

ODR: 4Hz

change lpf_p to DIV_50 doesn't help

 

Any idea why TPresence keeps rising when people sit still and fall very slowly after people leave ?

And how to solve the issue ?

 

 

 

 

 

 

 

7 REPLIES 7
SLin.11
Associate III

enable the bit SEL_ABS of register ALGO_CONFIG (28h) doesn't help

Hi @SLin.11 ,

To enhance the performance, you can take the following actions:

  1. Enable compensation to try to eliminate drifts due to variations in ambient temperature. They are probably already doing this, but it is always good to remind them.
  2. Tune the presence threshold (PRESENCE_THS) according to the application. Based on the graph from their example, in their case, they could safely set it to 1000 LSB. Of course, if the distance at which they need to detect presence increases, the threshold will need to decrease.
  3. Minimize the HYST_PRES parameter as much as possible (even down to 1 LSB), so that it is easier to exit the presence state. I would not recommend setting it to 0 LSB, as I am not sure what might happen in that case.

You could use our InfraredAL software library, which can be found in the X-CUBE-MEMS package. 

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.

What's the possible cause of the rising TPresence value after presence is triggered ?

Due to the keeping rising TPresence, finetune the PRESENCE_THS and HYST_PRES doesn't help since if you use high threshold it will be difficult (or takes time, latency) to trigger presence status.

And if you use low threshold you will get stuck in presence state since raising TPresence value will never across threshold even people leave.

I want to know what's the cause of the rising TPresence value and how to avoid that.

(I changed ODR, lp filter however it seems doesn't help)

It's difficult for us to use InfraredAL software library since we use non ST MCU as host.

 

 

QuocAnhLee
Associate

Hi all,

I also had the same problem and had the same question. Hope some can help me

Thank all

Federica Bossi
ST Employee

The increase in Tpresence can be attributed to two factors:

  1. Tambient drops rapidly, and the compensation algorithm is unable to adjust to the change.
  2. There is an object within the Field of View (FoV) that is heating up, which is not the target object and was already present.

However, it is important to fine-tune the PRESENCE_THS parameter. If it is set too low, the Tpresence value may rise and not return to the absence state.

You also need absolutely decrease the HYST_PRES parameter: it facilitates the transition to the absence state and has no relevance to the presence latency.

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.
QuocAnhLee
Associate

Thanks for your help


This means that the presence algorithm will only be correct when the PRESENCE_THS value is set to high and the person is close to the sensor. The further away the person is (low PRESENCE_THS), the less accurate the result will be.

Can you give me the PRESENCE_THS value and the distance at which the presence algorithm works correctly? Because for me it is only accurate between 1m and 1.5m, in an empty room with only me. I am testing with UNICO-GUI software and STEVAL-MKI231KA

The environment is stable, no ambient temperature chage

There is no heating up object within FoV

however TPresence is still raising.

Is there other possible cause ? or does the sensor take human body as "heating object" also ?