# NodeMCU PIR triggering on and off continuously

**URL:** https://forum.core-electronics.com.au/t/nodemcu-pir-triggering-on-and-off-continuously/5671
**Category:** Support
**Created:** [25 June 2019 01:14 UTC](https://forum.core-electronics.com.au/t/nodemcu-pir-triggering-on-and-off-continuously/5671 "2019-06-25T01:14:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Peter11405](https://avatars.discourse-cdn.com/v4/letter/p/f04885/32.png) [@Peter11405](https://forum.core-electronics.com.au/u/Peter11405)
#### Post date: [25 June 2019 01:14 UTC](https://forum.core-electronics.com.au/t/nodemcu-pir-triggering-on-and-off-continuously/5671/1 "2019-06-25T01:14:26Z")

</div>

Hi Team, not sure if you can help here but Im stuck.

I have a nodemcu esp8266 which I have tasmota installed. DHT11 working fine. However I put a PIR sensor on it. GPIO14 opted for switch 2 in settings and the console reads movement when I test it however the issue is that it is on—off----on---- off etc it does not reset. Can anyone suggest if this is a setting or something I have not picked up on. eg if I connect that to my hassio to turn a light on the light would never go off as the PIR is always triggering between on and off.

thanks in advance.

---

<div class="post-metadata">

### Author: ![Robin57159](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Robin57159](https://forum.core-electronics.com.au/u/Robin57159)
#### Post date: [25 June 2019 03:56 UTC](https://forum.core-electronics.com.au/t/nodemcu-pir-triggering-on-and-off-continuously/5671/2 "2019-06-25T03:56:28Z")

</div>

Without knowing the exact sensor you are using, guesses are the best I can do. Please post a link to the sense you are using.

In the meantime, here are some things you can try.

Move the sensor as far away from the controller. Some sensor / board combinations don’t play well together.

Make sure the sense pin isn’t floating. Attach a pullup / pulldown resistor to the sense wire.

Some PIRs have pots on them to allow adjustment of sensitivity and on time. Others have fixed resistors that can be replaced with pots to allow adjustment. Refer to the documentation for your sensor to find out.

Hope this helps.

---

<div class="post-metadata">

### Author: ![Peter11405](https://avatars.discourse-cdn.com/v4/letter/p/f04885/32.png) [@Peter11405](https://forum.core-electronics.com.au/u/Peter11405)
#### Post date: [25 June 2019 03:57 UTC](https://forum.core-electronics.com.au/t/nodemcu-pir-triggering-on-and-off-continuously/5671/3 "2019-06-25T03:57:42Z")

</div>

Hey and thanks.

Solved… put the sensor on 5v as oppossed to 3v and bingo…

---

<div class="post-metadata">

### Author: ![Robin57159](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Robin57159](https://forum.core-electronics.com.au/u/Robin57159)
#### Post date: [25 June 2019 04:01 UTC](https://forum.core-electronics.com.au/t/nodemcu-pir-triggering-on-and-off-continuously/5671/4 "2019-06-25T04:01:30Z")

</div>

Stupid computer thingies. Should just have to shove them into a box and shake well… 😉
