sparkfun / SparkFun_STHS34PF80_Arduino_Library

Communicates with the STHS34PF80 over I2C or SPI to measure the amount of IR radiation emitted from an object within its field of view.
https://docs.sparkfun.com/SparkFun_Qwiic_Human_Presence_Sensor-STHS34PF80/introduction/
Other
1 stars 2 forks source link

Human Presence range is showing with in the range of 10 centimeters. #6

Open Ravi0459 opened 9 months ago

Ravi0459 commented 9 months ago

I am using Sparkfun presence sensor STHS34PF80 sensor with ESP32 Dev module/Arduino uno. I have run the example code in /SparkFun_STHS34PF80_Arduino_Library/examples/Example3_EmbeddedFunctions. I have tried with default values of threshold and hysteresis and also tried it by varying the values. But Human presence is detecting with in 10 centimeters range.

marvinrobot42 commented 6 months ago

It looks like the PRESENCE_THS set function only takes the low byte of the 15 bit values being set. If I set the PRESENCE_THS to 300 and then read the PRESENCE_THS back the value is 44. 300 in hex is 0x012c and 44 is 0x02c. So the 01 of 0x012c was not read or stored by the STHS34PF80.

msalmankhan334 commented 2 weeks ago

Same issue with me also, the sensor detects presence and motion up to some centimeters, but in the datasheet of the sensor they claim about 3 meters without using the lens. What might be the issue for this? Tried all the examples but ended up with same result.

Microcontroller I am using is esp8266 and SparkFun_STHS34PF80.

Fantonrko commented 1 week ago

I have the same problem buy have a distance ~70-90cm, then the sensor does not respond. It's not entirely clear why. In any case, I’m trying to work on this and testing various operating modes, including at the lowest frequency

msalmankhan334 commented 1 week ago

I have been working on this sensor for the last eight months and have tried many different approaches. Most of the time, the presence status freezes and indicates presence, even when the field of view (FOV) of the sensor is empty.

I would say there is something wrong with the sensor from the factory.

marvinrobot42 commented 1 week ago

I checked my ENS160 sensor from Sparkfun and it detects motion and presence up to about 2 - 2.5 m in range. I am using my sths34pf80 Rust crate as the driver but there should not be much difference with the Arduino library.

Try changing the motion and presence threshold settings. The default is 200 (units?). Note that the arduino driver may still have a bug in reading the threshold values. Setting them works.

On Sat, Aug 31, 2024 at 3:59 PM Fantonrko @.***> wrote:

I have the same problem buy have a distance ~70-90cm, then the sensor does not respond. It's not entirely clear why. In any case, I’m trying to work on this and testing various operating modes, including at the lowest frequency

— Reply to this email directly, view it on GitHub https://github.com/sparkfun/SparkFun_STHS34PF80_Arduino_Library/issues/6#issuecomment-2323029817, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE74LHWZHUWZXMUDHXUM3WLZUIODTAVCNFSM6AAAAABAUKD5RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGAZDSOBRG4 . You are receiving this because you commented.Message ID: @.*** com>