SparkFun Human Presence Sensor Breakout
The device is easy to interface and writing an Arduino program (I used an ESP-01) is straight forward with the provided library. However, the sensor readings fluctuate a LOT and setting a single threshold for detecting when a human is present or not is a nightmare.
My system consists of an ESP-01, an AK9753, a LiPo battery and a MCP1700-3302E (a 3.7V to 3.3V Low Dropout Positive Voltage Regulator). The software uses the AK9753 library and a MQTT library. The idea is for when someone enters the room, the ESP-01 sends an MQTT message to a broker to turn the lights on. Again, with the reading fluctuations, it is practically impossible to set a threshold for "human present".
In my program, I included a piece of code to constantly (every minute) send the current readings to the broker so I can monitor an empty room, average the readings over time and choose a threshold. But the readings vary from -3500 all the way to -1000 for no apparent reason in 1-2 hours -- again, that is for an empty room, without any heat source or possible interferences. Since a human at about 0.5 to 1m distance causes an increase in the readings of about 1000 (e.g. if the empty room causes a reading of -3200, the same room now with a human standing 0.5m away would lead to approximately a -2200 reading), so, setting the threshold to, say, -2500, only works while the fluctuations don't randomly hit -2500. After that, the light starts to turn on/off without anybody in the room.