# STHS34PF80 - Clarify what is presenceVal cm^-1

**URL:** <https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763>\
**Category:** Components & Accessories\
**Created:** [January 10, 2026, 12:09am UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763 "2026-01-10T00:09:11Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rs1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rs1](https://community.sparkfun.com/u/rs1)\
**Post date:** [January 10, 2026, 12:09am UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/1 "2026-01-10T00:09:11Z")

</div>

STHS34PF80 board - I’m experiment with mainly detecting a presence,  
human or other, e.g. animals – not moving.

ARDUINO – One of the return value from Example1\_BasicReadings.ino is presenceVal cm^-1 (Serial.print(presenceVal)😉

My question:

What does values of presenceVal represent?

(I check the library and source code, but still I’m not sure or clear the what it is)

Thanks

---

<div class="post-metadata">

**Author:** ![YellowDog](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/yellowdog/32/1782_2.png) [@YellowDog](https://community.sparkfun.com/u/YellowDog)\
**Post date:** [January 10, 2026, 1:10pm UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/2 "2026-01-10T13:10:52Z")

</div>

I do not have one of these to check with but I would imagine this value quantifies how much of a presence is detected in front of the sensor?

---

<div class="post-metadata">

**Author:** ![rs1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rs1](https://community.sparkfun.com/u/rs1)\
**Post date:** [January 10, 2026, 4:21pm UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/3 "2026-01-10T16:21:19Z")

</div>

Good guess, though from testing, I may sit, not moving and the values are changing from ~500 to 1500. I was thinking that presense will be represented by 0 or 1 (too simple..), but must be other reason(s) for presence range.

---

<div class="post-metadata">

**Author:** ![rs1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rs1](https://community.sparkfun.com/u/rs1)\
**Post date:** [January 17, 2026, 3:50pm UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/4 "2026-01-17T15:50:22Z")

</div>

I hoped somebody from SparkFun will responed. Oh well.

---

<div class="post-metadata">

**Author:** ![brow](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/brow/32/6116_2.png) [@brow](https://community.sparkfun.com/u/brow)\
**Post date:** [January 19, 2026, 4:11pm UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/5 "2026-01-19T16:11:15Z")

</div>

I confess that everything I know about this sensor, its very existence included, was learned this morning after reading this thread. But it does need to be said that this is a sensor that can be used in detecting presence & movement but it is not a person counting machine. I’m reminded of the need for passenger occupancy determination for automotive airbag deployment, I think they’re usually weight/load sensing in the seats, and there must be some reasons they didn’t use these…

But it looks to me like cm^-1 is the primary sensor output and you use those values to calibrate to your expected presence types & environment. I believe the non-zero ones you see are what we call noise and, while I can’t say what an expected range for this sensor and your ambient presence should be, it’s normal for there to be some and maybe a lot. It’s pretty much the same as that sound when turning up the stereo real loud with the track paused or what you hear between AM radio stations. However, in checking the hookup guide, we find this clip which seems to suggest a swing of a few thousand is expected and idling at -500 to 1500 might be normal.

![example-basic](https://canada1.discourse-cdn.com/sparkfun/original/2X/3/339b2736e356b49b0e59425d5cf0bcf5cdfe1218.gif)  
From [Basic Example - Hookup Guide - SparkFun Human Presence and Motion Sensor - STHS34PF80](https://docs.sparkfun.com/SparkFun_Qwiic_Human_Presence_Sensor-STHS34PF80/example_basic/#serial-monitor)

---

<div class="post-metadata">

**Author:** ![rs1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rs1](https://community.sparkfun.com/u/rs1)\
**Post date:** [January 19, 2026, 5:02pm UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/6 "2026-01-19T17:02:51Z")

</div>

> [@rs1](#):
>
> What does values of presenceVal represent?

Thanks. I have no problems with the hookup and usage. I was just trying to understand what does presenceVal represent. In the sample code the device returns 0 or 1 when a presence is detected, if 1, it check/print the value of presenceVal – and I was not clear what it means.

I understand that you were trying speculate, which is fine.

I’ll do more testing to get a better understanding.

Thanks

---

<div class="post-metadata">

**Author:** ![rs1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rs1](https://community.sparkfun.com/u/rs1)\
**Post date:** [January 19, 2026, 5:21pm UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/7 "2026-01-19T17:21:45Z")

</div>

To add an example: The device detect presence, and the presenceVal is e.g. 800 or 1200, what does it mean from practical or usage prespective.

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [January 20, 2026, 12:09am UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/8 "2026-01-20T00:09:59Z")

</div>

cm^-1 is wavenumber; [SparkFun\_STHS34PF80\_Arduino\_Library/examples/Example1\_BasicReadings/Example1\_BasicReadings.ino at main · sparkfun/SparkFun\_STHS34PF80\_Arduino\_Library · GitHub](https://github.com/sparkfun/SparkFun_STHS34PF80_Arduino_Library/blob/main/examples/Example1_BasicReadings/Example1_BasicReadings.ino) has a blurb stating “Prints raw IR presence (cm^-1), if motion was detected, and temperature in degrees C.”

and[the src file](https://github.com/sparkfun/SparkFun_STHS34PF80_Arduino_Library/blob/main/src/sths34pf80_class.cpp)(s) have

“/// @brief This function returns the raw output value that represents  
/// the amount of infrared radiation emitted from the objects inside  
/// the field of view. It is composed of TOBJECT\_H and TOBJECT\_L (0x27  
/// and 0x26). The value is expressed as 2’s complement  
/// @param val Raw value from the TObject registers  
/// @return Error code (0 no error)  
int32\_t STHS34PF80::getTObjectRawValue(int16\_t \*val)  
{  
return sths34pf80\_tobject\_raw\_get(&sensor, val);  
}”

at line **372**.

Perusing the rest of that file with searching in-page for ‘presence’ will show you the other functions/pointers that together create the processing pipeline…it’s a bit convoluted but there are thresholds, hysteresis, ‘shock’ (quick change), etc that are combined into a scaled arbitrary variable that is then calculated/output

---

<div class="post-metadata">

**Author:** ![rs1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rs1](https://community.sparkfun.com/u/rs1)\
**Post date:** [January 20, 2026, 6:44am UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/9 "2026-01-20T06:44:06Z")

</div>

Thanks. I think “..he amount of infrared radiation emitted from the objects inside  
/// the field of view..” is good info.

---

<div class="post-metadata">

**Author:** ![brow](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/brow/32/6116_2.png) [@brow](https://community.sparkfun.com/u/brow)\
**Post date:** [January 20, 2026, 7:26pm UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/10 "2026-01-20T19:26:44Z")

</div>

If you didn’t know, these detect infrared light which corresponds to heat. You can perform a similar detection when sunlight instantly warms your skin. Snakes are known to use direct thermal sensing to strike prey at night. But, compared to visible light, it’s pretty low resolution and the range isn’t very long. That’s actually what makes it well suited for presence detection: there’s something warm and big and close that wasn’t there before.

Similar sensors are tuned for IR flame/combustion detection in fire alert systems in places like warehouses and libraries where usual detectors that need to wait for smoke and environmental heat isn’t fast enough and suitable sightlines exist. I’d imagine they also see use in places where fire risk exists but heat and smoke is expected under normal operation like commercial bakeries, fume hoods, and machine shops. Orbital rocket launches are impossible to hide because the plume of fire to get there is so unavoidably big and hot.

> **[Infrared sensing in snakes](https://en.wikipedia.org/wiki/Infrared_sensing_in_snakes)**
>
> The ability to sense infrared thermal radiation evolved independently in three different groups of snakes, consisting of the families of Boidae (boas), Pythonidae (pythons), and the subfamily Crotalinae (pit vipers). What is commonly called a pit organ allows these animals to essentially "see" radiant heat at wavelengths between 5 and 30 μm. The more advanced infrared sense of pit vipers allows these animals to strike prey accurately even in the absence of light, and detect warm objects from s Th...

---

<div class="post-metadata">

**Author:** ![rs1](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@rs1](https://community.sparkfun.com/u/rs1)\
**Post date:** [January 21, 2026, 3:17pm UTC](https://community.sparkfun.com/t/sths34pf80-clarify-what-is-presenceval-cm-1/67763/11 "2026-01-21T15:17:40Z")

</div>

Of course it is IR sensore; I used few in past . The original question was related to the returned value of presensceVal.

I think the answer by TS-Russel made sense in this context.
