Happy2013
Posts: 25
Joined: Mon Feb 11, 2013 2:26 pm

Re: Help with setting up PIR sensors

Sat Feb 16, 2013 8:20 pm

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

Happy2013
Posts: 25
Joined: Mon Feb 11, 2013 2:26 pm

Re: Help with setting up PIR sensors

Sat Feb 16, 2013 8:31 pm

Image

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

User avatar
joan
Posts: 15082
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Help with setting up PIR sensors

Sat Feb 16, 2013 8:39 pm

Recheck that the gpio numbers you are using actually map to the pins. There are different numbering schemes.

Happy2013
Posts: 25
Joined: Mon Feb 11, 2013 2:26 pm

Re: Help with setting up PIR sensors

Sat Feb 16, 2013 8:59 pm

Pins are correct im using pin 11 (#17) for LED and 15 (#22) for PIR input

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: Help with setting up PIR sensors

Sat Feb 16, 2013 10:15 pm

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.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

Happy2013
Posts: 25
Joined: Mon Feb 11, 2013 2:26 pm

Re: Help with setting up PIR sensors

Sun Feb 17, 2013 12:42 am

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.

User avatar
joan
Posts: 15082
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Help with setting up PIR sensors

Sun Feb 17, 2013 9:27 am

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/

Happy2013
Posts: 25
Joined: Mon Feb 11, 2013 2:26 pm

Re: Help with setting up PIR sensors

Sun Feb 17, 2013 9:39 pm

So from your information above, I am guessing that the pin that doesn't have the black circle around is GND?

Thanks

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: Help with setting up PIR sensors

Sun Feb 17, 2013 9:44 pm

Yes the pin without the black circle around it is the GND pin.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

Happy2013
Posts: 25
Joined: Mon Feb 11, 2013 2:26 pm

Re: Help with setting up PIR sensors

Wed Feb 20, 2013 7:27 pm

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.

User avatar
joan
Posts: 15082
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Help with setting up PIR sensors

Wed Feb 20, 2013 8:07 pm

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?

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: Help with setting up PIR sensors

Wed Feb 20, 2013 8:11 pm

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.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

GrahamBowman
Posts: 6
Joined: Thu Sep 22, 2011 3:20 pm

Re: Help with setting up PIR sensors

Sun Jun 01, 2014 11:40 am

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

Return to “Automation, sensing and robotics”