Now that I have a working MotionMote with an added BME280, I am proceeding with the design of my desired room environment sensor. The MotionMote is the base device, but with some mods.
The HC-SR501 sensor that Felix sells is barely adequate, its problems being its large size and susceptibility to noise triggering. In projects with an ESP8266 module, no amount of shielding of the sensor made it reliable. Felix's design seems to overcome the reliability problems by (a) keeping the connection to the sensor VERY short (plugging it directly into the module), and (b) only sensing the rising edge of the sensor output.
I am prototyping using a different PIR:
https://www.amazon.com/gp/product/B07XXNBNW4/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 about USD2.50 ea. This AM312 PIR uses about 10uA (according to my DMM), somewhat less than the SR501. It outputs a 2s pulse for a single detection, but is re-triggerable. My breadboard test indicated that it works reliably down to about 2v. Using this sensor required removing the 10K resistor pull down on the PIR output pin.
My prototype also has an Ambient Light Sensor: VEML7700 on a breakout board.
https://www.digikey.com/product-detail/en/adafruit-industries-llc/4162/1528-2891-ND/9997696. The sensor uses I2C interface, so it can just plug into the MotionMote instead of the OLED. I have modified the Adafruit_VEML7700 library to add some capabilities; I have requested that Adafruit pull my mods, hopefully they will be available from them someday. My fork is:
https://github.com/MojaveTom/Adafruit_VEML7700.
I am planning to sense the charge state of the battery. I am considering just checking the system voltage, however I notice that the MCP73831 Li-Ion Charger has a status output that would be nice to read. This would require adding a wire to the MotionMote to route the status output to one of the unused inputs. Since i have the I2C light sensor, I could use A0 which is available at the "LDR" header, or D6 the buzzer output which I am not using.
As another part of this project, I am designing a 3D printable box for the device. My wife does NOT like intrusive devices, and really dislikes LEDs that come on periodically, so no LED status light will be visible, and no buzzer.
Progress posts are coming.
Smiles, Tom