2023-10-31 10:06 AM - edited 2023-10-31 10:08 AM
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
Solved! Go to Solution.
2023-11-08 05:59 AM
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
2023-11-03 02:18 PM
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
2023-11-06 12:22 AM
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.
2023-11-06 06:25 AM
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
2023-11-08 05:59 AM
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
2024-02-14 10:37 AM - edited 2024-02-14 11:02 PM
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
2- if the Presence (Orange plot) is less than Threshold-hysteresis and object don't move in the FOV, Presence decrease slowly to 0.
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 ?
thx for you prompt reply.
2024-02-15 04:29 PM
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.
2024-02-16 01:27 AM - edited 2024-02-16 08:56 AM
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
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
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 !!
2024-02-20 02:59 AM
2024-02-25 10:12 AM
@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.