cancel
Showing results for 
Search instead for 
Did you mean: 

Negative sign for TMOTION and TPRESENCE on STHS34PF80

jkutteh
Associate II

I am using the STHS34PF80 sensor to detect motion and presence. When I read the raw value of TMOTION and TPRESENCE I get both positive and negative numbers. What does the negative sign indicate here? 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @jkutteh ,

There are two conditions for a positive sign:
1. An hot object that was outside the FOV, enters.
2. A cold object that was inside the FOV, exits.

Conversely, to have a negative sign:
1. An hot object that was already inside the FOV, exits
2. A cold object that was outside the FOV, enters

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

10 REPLIES 10
Joe WILLIAMS
ST Employee

Hi Jkutteh

Your case is being reviewed within our online support system at this time.  We appreciate your inquiry.

Kind Regards

Joe WILLIAMS

STMicro Support

Federica Bossi
ST Employee

Hi @jkutteh ,

As described in paragraph 6 of the datasheet and in sections 7.1 and 7.2 of application note, there are some subtractions during the chain and thus, at the end, you can have some negative values.

If my reply answered your question, please click on Accept as Solution at the bottom of this post. This will help other users with the same issue to find the answer faster.

 

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.

I see that TPRESENCE = LPF_P_M - LPF_P and that is compared to the threshold. I am wondering what does the negative value mean? Does the sign of the number indicate direction of presence?

negative numbers = presence leaving field of view?

positive numbers = presence entering field of view?

Thanks

Hi @jkutteh ,

There are two conditions for a positive sign:
1. An hot object that was outside the FOV, enters.
2. A cold object that was inside the FOV, exits.

Conversely, to have a negative sign:
1. An hot object that was already inside the FOV, exits
2. A cold object that was outside the FOV, enters

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.
SLERO.1
Associate II

hi,

I have also saw that we can get negative value for Motion an Presence .

Lets talk about Presence value:

with Threshold=4000

1- if the Presence (Orange plot) is more than Threshold and object don't move in the FOV, Presence stay stable. this is Ok

SLERO1_0-1707931843785.png

2- if the Presence (Orange plot) is less than Threshold-hysteresis and object don't move in the FOV, Presence decrease slowly to 0.

SLERO1_1-1707932232836.png

     Why ?

   if the object is remove then placed at same position, Presence can not get the same value as before.

   The max Value 2,3,4 is always lower than before 1 (see below)

   Presence can not be anymore higher than the threshold and this until that Presence value go to 0 after a negative value.

so object can not be detected (presence value will be always below threshold) 

   Why ?

SLERO1_2-1707932600224.png

thx for you prompt reply.

 

jmeck
Associate II

Per AN5867, section 7.1 Presence Detection.  As described and illustrated in Figure 4, as long as PRES_FLAG is true (TPRESENCE exceeds PRESENCE_THS), the output value of the LPF_P filter is fixed.  This will affect the value of TPRESENCE once the Presence threshold has been exceeded I think.

May be but if TPRESENCE is lower than PRESENCE_THS-Hyst, TPRESENCE decrease and decrease to reach 0 even if you are just below the sensor.

 

See below the plot simulation in office

1- Just reseting the sensor and I'm waiting (not in sensor area)

2- Enter in office below the sensor 

3- Sat on my chair below the sensor

4- Get up below the sensor

its working well until !

5- I leave until the TPRESENCE is lower than PRESENCE_THS-Hyst 

    And I go slowly the under the sensor without ever exceeding the threshold

6- I'm just under the sensor

7- I sit

SLERO1_0-1708073763071.png

After that I go outside sensor area 

8- I wait that TPRESENCE reach 0

9- Enter below the sensor

10- sit , as you can see, the TPRESENCE gone below the Thresh

11- TPRESENCE decrease slowly to 0

SLERO1_2-1708075187125.png

So after that, it's impossible to set the light On.

So I'm waiting explanations and solution from ST @Federica Bossi @Joe WILLIAMS to solve or help about this problem.

May be need to set some others register to avoid this !! 

 

@Federica Bossi @Joe WILLIAMS

Still no reply ?

 

@SLERO.1  @Federica Bossi I too am watching for ST support response to explain the results you are seeing.  I suspect the results are being impacted by the setting of the digital filters (Presence and Presence/Motion) but it is unclear how to adjust the coefficients to correct the results that you are observing.