I have a PIR EKMC1606112 that I am trying to read using an ESP8266-12e. I have the PIR powered using a 5v regulator so I'm sure it is getting enough voltage. My problem is that when I have the sensor out from the PIR to pin D7 it always reads HIGH. I think it is because the PIR is out putting 4.5-5v @100uA but the ESP likes an input of 3.3v. So I think I need to use some resistors to create a voltage divider. My problem is I'm not sure what size I should use. 1/4watt should work but what resistance. One at X from output to D7 and two at X from output to GND. Am I correct in this assumption and is this the right configuration? What size should I use? 33, 100k, 220k???
\$\begingroup\$ That sensor is rated to run off anything from 3V to 6V, so why not use the same 3.3V as the ESP and avoid those issues? Are you waiting the 30sec the sensor requires before it gives a stable output? \$\endgroup\$– brhansApr 30, 2021 at 0:36
I only get HIGH from life. ;) but the PIR goes high with IR activity and needs a pull-down resistor for say 50uA or 3.3V/50u = 67k nearest value to indicate absence.
If you were powering from 5V your ESP might latchup and might get very hot. You better check that 5V is not being used.
\$\begingroup\$ I put a 2.2k pull down resistor on the pin and get a low reading without the sensor. I am powering the ESP with 3.3V. I will try powering the PIR with 3.3V and a 67k pull down resister and see what happens. Thanks. I will let everyone know after a while. \$\endgroup\$ Apr 30, 2021 at 14:13
\$\begingroup\$ Fortunately the sensor open drain FET is high in resistance and didn’t latch up the ESP \$\endgroup\$ Apr 30, 2021 at 14:21
1\$\begingroup\$ Using an 8k pull down resistor and powering the PIR with 3.3V I got this to work. Thanks everyone for their help. \$\endgroup\$ May 2, 2021 at 3:23
\$\begingroup\$ I think they want you to use a bigger R so there is no self heating. \$\endgroup\$ May 2, 2021 at 4:14