Pages: [1]   Go Down
Author Topic: PIR Sensor Trouble  (Read 387 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I bought this PIR sensor (http://www.sparkfun.com/products/8630) recently with the intention of making a little Arduino burglar alarm.
For whatever reason it wouldn't work so I went to a lecturer and between the two of us, we got it to work using an analog pin instead of digital and having a battery connected as well as USB.

When I reassembled it when I got home it won't work again. I know I'm close, missing a resistor or something like that, but I can't for the life of me figure it out.

Picture of wiring: http://imgur.com/xqzLx

The three wires on the right were just left there from an earlier attempt.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 31543
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you post a schematic? Pictures are hard to see what you have done.

Quote
and having a battery connected as well as USB.
You should not have to do this, the sensor will work off 5V.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8103
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is that black thing plugged in next to the PIR connector?

As near as I can tell:

 The Black wire is Power and goes to Arduino +5.
 The Brown (center) wire is Ground and goes to Arduino Ground.
 The Red wire is the signal.  It connects to an Arduino digital input pin.  It needs a pull-up resistor but you can use the internal one like this:
Code:
const int PIRpin = 3;  // Or whatever pin you have it connected to
void setup() {
    pinMode(PIRpin, INPUT);
    digitalWrite(PIRpin, HIGH);  // Enable the internal pull-up resistor
}
[/code
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: