Electrical – Waking ESP8266 from Deep Sleep Using a Motion Detector

arduinoesp8266pirswitching

I'm building a project using Adafruit Feather HUZZAH ESP8266 and PIR Motion Sensor. I have everything working, but I'm trying to reduce power consumption as I'm running it off of a 3.7v/600mA battery. The suggestion I found online is to put the ESP8266 into deep sleep mode. This works fine, but I would like to wake it up when motion is detected by the motion detector.

The motion detector is powered independently from the battery and when motion is detected, it produces a HIGH voltage (~3.7V). The way to wake ESP8266 up is via the CHPD pin #3. However, when the ESP8266 is asleep it produces a HIGH voltage on that pin and you need to pull it to ground to wake it up. I'm trying to find a trick to translate the HIGH signal coming off of the motion sensor into a LOW voltage for the CHPD pin.

Thank you,

Best Answer

You can simply use an N-MOSFET like suggested in the comment. Connect the MOSFET drain to the wake-up pin of the MCU and the source to the ground. Finally connect the gate of the MOSFET to the motion sensor output signal. Just make sure the MOSFET you chose has a low enough Vth (Vgs voltage at witch the transistor starts to turn on) to make sure it will pull the CHPD low when the motion sensor drive its gate.