So I got this Panasonic PIR sensor(EKMC1601113) and I was super relieved at how easy it was to get working but now I want to be sure I'm doing it as well as possible. As a digital input it works perfectly and as analog it seems to go between 0 and 1000. That seems pretty close to both ends like I would imagine it should be but I still want to be sure I'm doing it right. I'm using a 100kohm resistor to pull down to ground and a 10kohm resistor to connect to the arduino inputs. I pretty much just guessed there, is there a more efficient way of deciding those values?
That appears to be a digital sensor - the output is either HIGH or LOW. That should be input to a digital pin.
As a digital input it works perfectly and as analog it seems to go between 0 and 1000.
I wouldn't expect anything but ~0 and ~1023.
but I still want to be sure I'm doing it right.
When connecting to a digital pin, yes. When connecting to an analog pin, no. It's like trying to determine the degree of pregnancy. You either are or you aren't. You can't be a little bit pregnant.
I'm using a 100kohm resistor to pull down to ground
A 20k would be better.
and a 10kohm resistor to connect to the arduino inputs.
I just figured hooking it up to the analog would tell me how high the high was and how low the low was so I could be sure it wasn't giving me a signal that could become confused.
The resistor to the digital pin was just because I was afraid to fry something and they showed it on the data sheet.
I'll use the 20k to ground if you say that's how it should be done. Thanks.