I’ve been watching my smarthome system on local Blynk server for two months now.
In all of my rooms installed D1 mini with PIR sensors HC-SR501, relays and photoresistors (separate power 5volt, minus wire connected across resistor, data wire connect to A0 ), that turn light when I need it. It’s very strange , but sometimes pir detectors turn lights with no reason. At first I thought it was interference from 220v power wires. Then I reversed pins connection of sensors on D1 mini- and unexpectedly turn ONs of light stopped for a while. A week after the pins shift, the situation repeats, but in other rooms.
That is, false triggering of sensors migrates from one room to another. The sensitivity of Pirs here, too, nothing to do with, cause in different rooms Pirs set up to different sensitivity.
Still there is such a moment - the humidity readings of DHT11 module sometimes sink by several dozen units. Also without a reason- I see it on my history graph widget.
I can’t find it yet (will post it when I find it), but I watched a video on someone testing differing types of PIR sensors and he found one that worked very well.
As for the DHT11… it is almost junk. Mine also has jumps and dives in both temp and humidity for no apparent reason… but after all it’s sensitivity range is a whopping ±2 deg.
It`ll be great to see a model of work one)
I suspect that false positives are directly related to voltage jumps in 220volts, so the dht11 freaking work depends on it too.
And of course RF frequensy forced it to work.
I can’t find the video I was thinking of… however there are many references to the RF interference issues of these cheap PIR sensors. Keep them further away from the ESP seems to be one solution.
@Pacer, just my 2 cents:
both HC-SR501 and dht11 are junk sensors (this reflects also on they price). they are ok for playing around, but for production version not recommended.
also, if you read the docs of these pir sensors, they are sensible to several factors, like: wind, strong light, heat sources, etc. than the esp and mains noise also adds problems.
the pir motion sensors are 2 category: for lights activation (all cheap ones, they usually work directly from mains) - expect lots of false triggers from these. the second category is the motion sensors used in alarm systems: they provide much lower false triggers, digital signal processing, much better immunity for harsh / noisy environment, and usually work with 12v dc. they can not turn on / off mains directly, just sending a low current signal. if reduced false trigger is important, for a good price / quality ratio you can check the paradox dg75 series or dg85 for outdoor use. they are quite relaible.
regarding the dht11, they are junk by default, do not use them. i recommend at least dht22, or even better bme280 (temp, hum, pressure) or ds18b20 (temp only, but high precision and waterproof).
@Pacer I’ve tried numerous PIR sensors with a few different ESP8266 and Arduino varieties with very little success. Most common PIR sensors, especially ones from China, tend to be very unreliable. I’ve tried at least a dozen different techniques to reduce false positives, but in the end, I’ve given up.
Thanks for help. When I last looked towards the microwave radar they were huge and cost much more than 1.5 bucks. Will try to understand its datasheet.
I was thinking of some form of physical shielding, along the lines of directional RF antennas and such, using grounded shields, etc, then I saw in that link that someone else had already tested somthing like that to some positive extent.
But honestly, it sounds simpler to simply extend the range between the sensor and the ESP… perhaps also use shielded wire as used in RF equipment and microphones, etc.