Skip to main content
Visitor II
October 31, 2023
Solved

Negative sign for TMOTION and TPRESENCE on STHS34PF80

  • October 31, 2023
  • 5 replies
  • 3440 views

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

    This topic has been closed for replies.
    Best answer by Federica Bossi

    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

    5 replies

    ST Employee
    November 3, 2023

    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

    Technical Moderator
    November 6, 2023

    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.

     

    jkuttehAuthor
    Visitor II
    November 6, 2023

    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

    Technical Moderator
    November 8, 2023

    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

    Visitor II
    February 14, 2024

    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.

     

    Graduate
    February 16, 2024

    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.

    Visitor II
    February 16, 2024

    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 !! 

     

    Visitor II
    February 20, 2024

    @Federica Bossi @Joe WILLIAMS

    Still no reply ?

     

    Visitor II
    March 23, 2024

    Hello, 

    @Federica Bossi still no reply!