rob_pi
Posts: 8
Joined: Mon May 21, 2012 9:01 pm

PIR Movement Sensor Wireup - Is this OK?

Mon May 21, 2012 9:12 pm

I have bought a PIR Sensor from Rapid, and have managed to get it up and working using the GPIO pins on the board (Hurrah!).

The one thing I have now noticed is that in the documentation wiring diagram it says "lout Max 100 micro Amps":

Image

I have it wired up to the Pi like this:

Image

Now using my dodgy electronics knowledge, if I'm using a 150ohm resistor, and it's running at somwhere near 3.3v, does that mean that I'm pushing ~22 mA through the PIR sensor? It's working now, but I don't want it to quietly fry when I've been using it for a while..

Can anyone offer any advice?

The PIR Sensor documentation is here: http://www.rapidonline.com/pdf/61-1504.pdf
And I've a write up on my blog of what I've done here: http://www.sennir.co.uk/Journal/Raspber ... ent_sensor

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: PIR Movement Sensor Wireup - Is this OK?

Mon May 21, 2012 9:42 pm

I think you've answered the question yourself - the PIR is rated for 100uA so you should use an appropriate resistor R = V / I = 3.3 / 0.0001 = 33k = use 39k just to keep it on the safe side (as 5% tolerance will push it over the limit). You're probably getting away with it as the current draw on the IO is low.

User avatar
Burngate
Posts: 5109
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
Contact: Website

Re: PIR Movement Sensor Wireup - Is this OK?

Tue May 22, 2012 4:00 pm

Further to that, if the GPIO is taking negligible current, then the sensor output is only driving current through that 10k resistor - 330uA, which is too much. I'd make that 100k.
Really, the 150R is only protection for when you short the o/p so you could put it up to 10k with no problem - assuming the GPIO doesn't take any current. And that will depend on pull-up or pull-down resistors in the SoC

rob_pi
Posts: 8
Joined: Mon May 21, 2012 9:01 pm

Re: PIR Movement Sensor Wireup - Is this OK?

Tue May 22, 2012 7:44 pm

Thanks for the replies: I really do need to find out what I'm doing with this stuff, Apologies for being a numpty!

If I'm reading your replies right, I should replace the 10k resistor with a 100k one; and the 150R with a 39k one?

This is so that when the sensor is activated, and drives the out pin high (3.3v), the current will flow through the two resistors (100k + 39k) to gnd; and the current will be I = V/R = 3.3/139000 = 24uA.

This means that the voltage as measured at the GPIO pin will be V = IR = 24uA * 100k = 2.4v

If the above is accurate, what effect will the GPIO connection have on calculations? I've not set any pull up/down registers in the SoC.

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: Google [Bot] and 29 guests