Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Barnabybear
#28630
Mikejstb wrote:I do not put the ESP into sleep mode - I could never figure out how to wake it up with the signal from the PIR. I power all my PIR sensors from wall wart power supplies .


Hi, I had a play with a PIR an managed to get it to power off and wake on a PIR activation - details here.
User avatar
By bradvoy
#34624 I have a PIR connected to an ESP8266, and I was getting a lot of false positives, i.e. the PIR being triggered when there wasn't any motion near it. It hadn't occurred to me that it might be due to RF interference until I came across this thread. After reading this, I put a couple of layers of aluminum foil inside my enclosure between the PIR and the ESP8266. Problem solved! I am no longer getting any false positives, but the PIR still triggers reliably when there really is motion in front of its sensor.
User avatar
By currynut
#55322 Hi guys, i am essentially having the same issue and am currently trying to work out the arduino code to turn the radio off, have the PIR trigger the radio to turn on, do processing and then turn off again. How did you go about turning of the radio but still keeping the cpu active? If the code is around i would love to see it for the below instructions.

1. turn the radio off
2. turn interrupt on for the PIR gpio
3. when the PIR interrupts:
a. turn PIR interrupt off
b. start a timer alarm to ignore any more PIR activity for n minutes
c. turn radio on - connect to AP
d. when the radio connects publish the mqtt message
e. when the mqtt message is sent
1) turn the radio off
2) turn the PIR interrupt back on
all with alarms to repeat the process over and over

Thanks
User avatar
By Endlesshunt
#57875 Hi Mikejstb

I'm having the same problem with my PIRs. Could you perhaps post a code sample of how you switch the radio off and back on? I'm having issues with reliable switching the radio back on.

Regards