loading

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

https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/using-a-pir

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!

<p>You don't need to solder anything. The free PIN from Jumper serv 3.3 V :)</p>
<p>Actually the jumper pin on the HC-SR501 is used to determine whether or not the sensor will reset after an initial detection. I don't believe it affects the voltage in anyway.</p>
<p>lol AndreasO1 is correct. The jumpers serve to either pull pin 1 of the BISS001 chip high or low. You don't need to solder anything. One of the jumper pins is directly connected to Vout of the regulator.</p><p>Google &quot;hc-sr501 schematic&quot; and look at the jumper pins.... :)</p><p>In fact you can connect power directly to the correct jumper pins.<br></p>
<p>Hello,</p><p>I think you made a mistake : the voltage regulator on <br>the board is a HT7133 so pin 2 is &quot;power input&quot;. You have to solder your<br> wire on pin 3, which is &quot;power output&quot;. </p><p>So why does your <br>solution works ? It's because by injecting the 3.3V directly to the <br>regulator you are bypassing the polarity protection diode and it's <br>voltage drop.</p>
<p>However the way he did it does bypass the diode and pass thru the regulator which in return will clean up any voltage ripples depending on the voltage source. So either will work. It just depends on how you intend to power the sensor. ;) Good catch though as it is important to read the datasheets.</p>
<p>LOL....I was just about to say the exact same thing until I saw your post.</p>
<p>You are absolutely right! Thanks for pointing out my mistake.</p>
<p>Nifty, but what about current ? </p><p>I read standard 5v PIR Motion Sensor require about 50mA of current to operate, which is way more than esp8266 GPIO pin can source.</p>
<p>you are feeding the PIR from a 3V3 source, not from a GPIO pin</p>
<p>can you please provide me the code for pir sensor + esp8266 which is to be uploaded...??</p>
<p>I am not quite sure I get which pin to attach what to, as &quot;right&quot; depends on the direction I am looking at it.</p><p>Do I understand correctly, that I need to connect a 3.3V out pin of the esp to the pin (which I still need to find out is &quot;right&quot;)?</p>
<p>Hi!</p><p>Would it work if I just short circuit Vin &amp; Vout on the regulator and feed 3.3V on the sensor vcc pin (where I normally would feed 5V)?</p>
<p>Here's one extra step I had to take for my PIR sensor that doesn't have a jumper. I had to dab a little glob of solder to bridge those top two pins (the L pad to the middle pad). Note: during a failed attempt following another example for running this sensor at 3.3v, I ripped off the lower H pad -- ignore that snafu in the attached pic.</p><p>I've only been running this on 3.3v for a half hour or so, but it seems to be just as sensitive as it was running at 5v, and still shows the same ~3.3v on the OUT pin as before when triggered. No problems so far. Much appreciated!</p>

About This Instructable

11,467views

31favorites

License:

Bio: EZtech electronics
More by OUTATIME88:NodeMCU Motion Activated Security System National Data Buoy Center Weather Display ESP8266 uploads GPS position to Adafruit IO 
Add instructable to: