I've a pretty simple set up which consists of a PIR sensor and ESP8266. This PIR sensor outputs a HIGH value when presence is detected. This HIGH value lasts for 8 seconds.

I want this trigger to wake up a ESP8266 chip from a deep sleep. To do so, I must send a LOW to the RST Pin.

So with a NPN transistor, I switch it LOW once PIR outputs HIGH.

This works. However, as the HIGH lasts for 8 seconds, the RST remains in LOW and the ESP does not boot until it's back to HIGH.

So question is: Is there any way to convert this long output to become a fast "trigger"?

I attach an screenshot of the schematics in case it helps. enter image description here (credit of the picture: https://github.com/rgrokett/ESP8266_PIRv2/blob/master/ESP8266_PIRv2.pdf)

  • \$\begingroup\$ you might consider using ESPNOW so that you can fire off a message 200ms from power-on, instead of seconds with wifi, which is likely why you want to sleep in the first place. \$\endgroup\$ – dandavis Jun 21 '18 at 5:37

I think will create enough of a blip to reset the ESP:


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ This also makes use of a capacitor to do so, as Turbo J suggested in an other answer. How does it differ with his? What is R2 resistance used for? \$\endgroup\$ – Reinherd Jun 20 '18 at 20:48
  • \$\begingroup\$ It acts as a pulldown and adjustment option together with C1. Turbos version is connected to the collector of a transistor switch. As he said, slight risk of burning the clamping diode with that setup... \$\endgroup\$ – Dejvid_no1 Jun 20 '18 at 20:58

Kind of a hack: Use a capacitor between transistor collector and RST pin. Try using 100nF as a starting value - might need to go higher.

Note that this assumes there is a clamping diode between RST and VCC on the ESP8266, as the capacitor would raise RST above VCC when the transistor turns off. Better don't use a large capacity value here - these diodes don't like too much current.


Mainly you will find a rotary potentiometer in the side of your PIR Sensor PCB. Try decreasing its value and you will find the time has been decreased.

Also refer to This Video, I think it will help

  • \$\begingroup\$ I'm using one without rotary potentiometer. MH SR505 \$\endgroup\$ – Reinherd Jun 20 '18 at 20:13
  • 1
    \$\begingroup\$ MH SR505 does have a built in delay of 8 Seconds, this means that once the output signal is high it takes 8 seconds to go back low again so you have to try another solution or a different PIR Sensor. \$\endgroup\$ – Ahmed M.Zahran Jun 20 '18 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.