Author Topic: MotionMote room environment sensor  (Read 1018 times)

MojaveTom

  • NewMember
  • *
  • Posts: 24
  • Country: us
MotionMote room environment sensor
« on: May 31, 2020, 03:17:51 PM »
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

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MotionMote room environment sensor
« Reply #1 on: June 02, 2020, 08:32:59 AM »
Interesting read Tom!

I am experimenting with some new revisions of MotionMote, I made some boards and testing them but haven't had time to circle around and make a production run. But the main idea is that I want to move away from cheap chinese hit-or-miss sensors. Yes the HCSR501 satisfies our cheap addiction to communist china, it has worked decently, but its requiring modification to make it lower power, it's bulky, and I need to step up the threshold for those high end clients that need rock solid performance and reliability, super low power, compact size and stealth etc. So the Panasonic PIRs are the way to go. They are not cheap, but they perform. I believe such an essential security task as detecting motion, deserves $20 per PIR sensor, even a several sensor investment makes me personally much more confident than relying on cheap no name communist parts.

Why would you want an ambient light reader on a wireless motion mote that could be tucked away in low light corners.

MojaveTom

  • NewMember
  • *
  • Posts: 24
  • Country: us
Re: MotionMote room environment sensor
« Reply #2 on: June 02, 2020, 02:09:33 PM »
My interest in ambient light sensors is because I'm intending to replace my Aeotec 6 Zwave sensors with MotionMotes.  I installed some light sensors in ESP8266 nodes that I put in the window behind the shades so I would know when to open the shades.  However, I discovered the most useful measure of when to open the shades was the temperature behind the shade.  So, bottom line, I don't really need a light sensor.  Your question inspires me to revisit the decision to include a light sensor.  For rough ideas about the light level in a room, the LDR header you include in the R3 MotionMote is just fine, and the Light Dependent Resistor is much cheaper than the VEML7700, probably lower energy too since it is only energized when sampling.

Much of my fun is making things work and exploring different ways of doing things.  I am also a bit of a data junkie.

Regarding the PIR.  The Panasonic sensor is spec'd to be better than the others; I had trouble finding a source and bought a few, then left them in my California home while there for a quick maintenance visit in early Feb.  I don't have extensive experience with the AM312, but so far, it has proved to be reliable.  Jumpering the PIR power to 3V3 and removing the voltage regulator on the AM312 would probably lower it's power requirements.  I don't feel the need for "rock solid performance and reliability, super low power, etc".  Lots of less expensive sensors will probably give me the picture I need for intrusion in an unoccupied home.

Some suggestions for a new version of a MotionMote:
You have mentioned making the BME280 pads larger, sounds great.
How about an option to make the status signal from the MCP73831 available instead of the buzzer or LED.  Stealthy sensors probably don't want/need flashing LEDs or buzzers.  Battery status would be very useful for knowing when to recharge a battery.
The R3 default push button configuration doesn't seem very useful.
A jumper option for the pull-down resistor on the PIR output would be nicer than removing it entirely; easier to revert.

Tom

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MotionMote room environment sensor
« Reply #3 on: June 03, 2020, 11:30:26 AM »
Yes the LDR is simple and works pretty well.
RE future Motion mote suggestions:
The BME280 will have larger pads.
The charger does not tell you the status of the battery, it can only tell you when the battery is done charging.
The R3 was a "multifunction" board, you could use it in different ways, it included a button for that reason.
If I go with Panasonics, there will be a pull resistor, maybe I can add a solder jumper if there is room.

MojaveTom

  • NewMember
  • *
  • Posts: 24
  • Country: us
Re: MotionMote room environment sensor
« Reply #4 on: June 03, 2020, 06:45:47 PM »
I see that the Panasonic EKMB1207111 says it is "open collector", but the diagram isn't what I used to call open collector.  For a transistor open collector, you usually need a pull UP resistor, since when the transistor is "on", it pulls the output to (usually) ground.  I see that a pull resistor is necessary for the Panasonic detector.  IF there is room on the board, jumpers to either pull up, pull down, or leave open would be most flexible.

For the AM312 detector on a breadboard, with the output connected to a scope, the output rises to about the supply voltage and drops to ground -- no pull resistor.  In practice on the MotionMote, it works fine with the pull down resistor removed.