Introduction: Convert a 5v PIR Motion Sensor to 3.3v for ESP8266
Do you have a PIR Motion Sensor that you would like to use with your 3.3 volt Arduino or an ESP8266 (NodeMCU), or maybe a Raspberry PI. Well the standard el-cheapo Chinese PIR Sensor accepts 5 volts in the VCC pin(actually 5v to 20v) and will not work at 3.3 volts. In this Instructable I'll show you how you can use a standard HC-SR501 PIR Infrared Motion Sensor with an ESP8266 or other 3.3 Volt micro-controller.
Check out my YouTube video also. Youtube Video
Step 1: Solder a Wire Onto the Voltage Regulators Middle Terminal
In my tests the HC-SR501 PIR Motion Infrared Sensor falsed when I attempted to use 3.3 volts at the VCC input pin. Luckily there is a simple solution to get the Motion Sensor to work with 3.3 volts boards like the ESP8266.
UPDATE!!! Thanks to Dosman71 - I originally said to solder to the middle terminal of the onboard regulator, This is WRONG!! The terminal you need to solder the wire to is the one on the RIGHT of the voltage regulator if the three pins are facing you. Ignore the Picture above and disregard what I said in the YouTube video
We need to simply solder a wire to the RIGHT terminal of the onboard voltage regulator. This regulator was designed to convert the high voltages coming from the Arduino (5 volts) or other devices(up to 20v) down to 3.3 volts logic; however, the ESP8266 works at 3.3volts and this regulator is not needed. So we need to bypass it!
The motion sensor internals actually work at 3.3 volts and the trigger pin (the middle terminal between the VCC and Ground) outputs 3.3 volts.
Step 2: Connect and Upload the Code
Next simply connect the other end of the wire you just soldered to the PIR sensors voltage regulator to the 3.3v power supply from your Arduino or ESP8266 (NodeMCU) and then connect the Ground and Trigger Pin and think of all the new projects you can do with your new sensor.
The Example code be found at Adafruit's website below
Now you can have your ESP8266 send you a text message over WIFI notifying you when someone is at your front door, or when the mailman opened the mailbox door, or when the UPS man left a package. Have fun!
russgalloway made it!