Search
Product Info
PIR Motion Sensor
sku: SEN-08630
Description: This is a simple to use motion sensor. Power it up and wait 1-2 seconds for the sensor to get a snapshot of the still room. If anything moves after that period, the 'alarm' pin will go low.Red wire is power (5 to 12V). Brown wire is GND. Black wire is open collector Alarm.
This unit works great from 5 to 12V (datasheet shows 12V). You can also install a jumper wire past the 5V regulator on board to make this unit work at 3.3V. Sensor uses 1.6mA@3.3V.
The alarm pin is an open collector meaning you will need a pull up resistor on the alarm pin. The open drain setup allows multiple motion sensors to be connected on a single input pin. If any of the motion sensors go off, the input pin will be pulled low.
The connector is slightly odd but has a 0.1" pitch female connector making it compatible with jumper wires and 0.1" male headers.
Documents: Datasheet
Pricing
Comments
17 comments
Feeds
Currency
Display prices in
Feedback
If you would like to tell us more, you can fill out our form if you need some psycho-suggestive questions. Go to the form.





















used with atmega128
excellent quality..
@cloverstreet: I've seen it detect motion reliably up to ~20ft away. There is no need to reset the alarm, it doesn't latch. The alarm pin is debounced (deflapped?) internally, and seems to cycle off on the order of a second or so.
Also, a slight warning about the datasheet (at least for my unit): If you're not paying attention, and use the three silver pin latches to orient the connector it'll be backwards. As the description says, red is power, brown is ground, and black is alarm.
I'm using this to make a key switched 12VDC alarm with an output whooper being fired by this sensor. I'm a parts guy, not an electronics guru. Based on your comments, I'll need a latching relay to keep my whooper going because the sensor will reset after a second or two. Is that right?
Does anyone know how to adjust the debounce time for this?
The sensor will *momentarily* pull the input to ground when it thinks "something moved". Your software will have to determine what that means.
What I do is, use Arduino's millisec() function to run a software timer that essentially tells me how much time has passed since someone walked by the sensor. In loop() put this code up near the top:
if (digitalRead (SENSOR) == LOW) {
timer= millisec();
}
Then when you wanna ask "has someone walked by the sensor in the last 25 seconds?" (for example) you would execute:
if (millis() - timer < 25000L) {
Serial.print ("Room is occupied");
}
eg. "less than 25000 milliseconds since I saw an event". That's the basic idea anyhoo.
http://www.sparkfun.com/datasheets/Sensors/Proximity/SE-10.pdf
It has tree pins as the image says, I put 12 v in the red pin, put the middle to ground and it is supossed I have to get a voltage in the alarm pin.
I close the circuit with a resistor in the alarm pin and then the resistor to ground but when I measure voltage in the last pin or in the resitor 0 V is obtained, also covering the sensor.
is the motion sensor broken?
could anybody help me? Thank you in advance.
Miguel
This is normal : you're supposed to use a "pull-up" resistor, meaning that it should be connected to the positive +5v and not to the ground as you did.
When the alarm is OFF, the sensor's Alarm pin will behave as an open circuit (i.e it will behave as if it's not there) and so your microcontroller analog input pin will end up connected to +5v through the resistor. If you read the analog value of your analog pin at that time, it will probably show up as 1023 if you've got a 10bit analog-to-digital sampler for instance.
When the alarm goes ON, the sensor will "pull the pin to the ground", meaning that inside itself it will connect the alarm pin to the ground. This is where the resistor part comes in : current will always flow through the path of least resistance, so instead of going to the +5v as before (because the resistor is in the way), the microcontroller pin also ends up being connected to the ground.
On your analog-to-digital conversion, you will then see a low value and you can test against that in your code to make the alarm ring (or something).
Eventually, I used the "5V" pin solely for pull-up (i.e. resistor between "5V" of arduino and alarm pin (black) of motion sensor).
To power the motion sensor, I tried using a 9V battery which works perfectly. I also tested using the "Vin" pin on arduino and can report stable output, although the detection is somewhat slower than using a pure 9V power supply. The "Vin" pin gives me 4.16V so I am not sure what is happening here.
So the final pinout is:
- "Vin" on arduino to Vin for sensor
- "Gnd" to "Gnd"
- Resistor between "5V" of arduino and alarm pin of sensor
- Wire from alarm pin to input pin on arduino
Hope this helps anyone trying to use this sensor with the arduino board.
Note that the AL pin will go low several times during "initialization". After a few second, it will stop ging low and stay high. If you are going to use this on an interrupt, for example, you will need to wait maybe 10 seconds before initializing it.
When something does move, the sensor will go low for as long the object is moving and then go high again.
A 10K pullup will work fine.