Page 2 of 2

Re: Help with setting up PIR sensors

Posted: Sat Feb 16, 2013 8:20 pm
by Happy2013
Image

Sensor connection, top left is being used for power, bottom left is connected for input to pin 15 and the other one is used for ground

Re: Help with setting up PIR sensors

Posted: Sat Feb 16, 2013 8:31 pm
by Happy2013
Image

This how its wired up power bottom left, top left input and top right ground

Re: Help with setting up PIR sensors

Posted: Sat Feb 16, 2013 8:39 pm
by joan
Recheck that the gpio numbers you are using actually map to the pins. There are different numbering schemes.

Re: Help with setting up PIR sensors

Posted: Sat Feb 16, 2013 8:59 pm
by Happy2013
Pins are correct im using pin 11 (#17) for LED and 15 (#22) for PIR input

Re: Help with setting up PIR sensors

Posted: Sat Feb 16, 2013 10:15 pm
by techpaul
Happy2013 wrote:Sensor connection, top left is being used for power, bottom left is connected for input to pin 15 and the other one is used for ground
From the datasheet
  • The pin that connects to the case is GND
  • The next insulated pin (black circle around it at point passing through the case) CLOSEST to GND pin is output.
  • The next is Vdd
On your picture
  • Top is GND
  • Bottom left is Output
  • Bottom right is Vdd
You would find it easier to mount things on bread board if the sensor bridged the central divide. That way it woul leave plenty of locations to connect wires to pins. Align it with Vdd pin on on side of divide and the other pins on the other side of the divide. That way you have plenty of breadborad sockets going out each side to connect other wires/resiistors to pins.

I would also connect a voltage meter (or digital multimeter on voltage setting) across the output resistor to monitor what is happening when triggered or not to PROVE that the sensor is working and then when that is working see if the software is really working.

I suspect wiring problems and possibly also software problems.

Re: Help with setting up PIR sensors

Posted: Sun Feb 17, 2013 12:42 am
by Happy2013
Thanks for the help, I appreciate it alot. Ill give this ago tomorrow, am I right in thinking on the vdd side I dont have to connect wire in any particular slot as I align it with the vdd pin.

Re: Help with setting up PIR sensors

Posted: Sun Feb 17, 2013 9:27 am
by joan
Happy2013 wrote:Thanks for the help, I appreciate it alot. Ill give this ago tomorrow, am I right in thinking on the vdd side I dont have to connect wire in any particular slot as I align it with the vdd pin.
Some useful tips here: http://www.instructables.com/id/How-to- ... readboard/

Re: Help with setting up PIR sensors

Posted: Sun Feb 17, 2013 9:39 pm
by Happy2013
So from your information above, I am guessing that the pin that doesn't have the black circle around is GND?

Thanks

Re: Help with setting up PIR sensors

Posted: Sun Feb 17, 2013 9:44 pm
by techpaul
Yes the pin without the black circle around it is the GND pin.

Re: Help with setting up PIR sensors

Posted: Wed Feb 20, 2013 7:27 pm
by Happy2013
Ok ive give this another shot today, now when everythibg is linked up I get a false reading from my program continously for some reason even when im jumping around like an idiot trying to trigger the sensor. Ive fiddled around with pins to see if that was tge issue with no success, whats even stranger is that when I remove py output wire my python code starts giving me readings, even though this pin is disconnected and is what my python code uses to return true or false.

Re: Help with setting up PIR sensors

Posted: Wed Feb 20, 2013 8:07 pm
by joan
Happy2013 wrote:Ok ive give this another shot today, now when everythibg is linked up I get a false reading from my program continously for some reason even when im jumping around like an idiot trying to trigger the sensor. Ive fiddled around with pins to see if that was tge issue with no success, whats even stranger is that when I remove py output wire my python code starts giving me readings, even though this pin is disconnected and is what my python code uses to return true or false.
Can you switch a LED on and off using Python?

Re: Help with setting up PIR sensors

Posted: Wed Feb 20, 2013 8:11 pm
by techpaul
Can I make a suggestion

Use a meter, if there are two of you one triggers motion, other watches the meter.

Measure continuously the output from the PIR

Note what the voltage is with the PIR disconnected from the Pi but powered from 3V3, when not triggered and when triggered.

When you can get 0V when not triggered and 3V when triggered then connect it to the Pi, check the volatages again.

Prove which part is working before adding it to the next bit split the project into small pieces and prove each piece works first.

Re: Help with setting up PIR sensors

Posted: Sun Jun 01, 2014 11:40 am
by GrahamBowman
I know this is an old post but just wanted to add a thanks to the contributors. It took a lot of searching to find this and the product manual wasn't much use to me. Just in case anyone else is stuck on this, I have made a quick diagram which should make things more clear.

Image