Go Down

Topic: Motion PIR Sensor // weird stuff ... (Read 478 times) previous topic - next topic

Dermiste

Nov 06, 2010, 03:54 pm Last Edit: Nov 06, 2010, 04:22 pm by Dermiste Reason: 1
Hi there!

I've just bought a new PIR Sentor, and I'm trying to make it work, just changing the state of a LED depending on the sensor value.

The sensor is this one you can find on "cool components" website.

First of all, I've been trying many different codes.

And at the end, I just get some weird stuff, the led is kind of blinking, even if there is nothing detectable. And I'm extremely sure there is nothing to detect.

Should I use the digital values ? Or the analog values ?

Also, I tried to change the wires ... the black (alarm, weird again, why not ground?) on the ground, and the brown(ground) on the INPUT pin 2.

And from this, I don't even get anything more. 0 informations.

Do you think it's possible I just broke my component?

A little help and explanations would be great :) I'm kind of a noob with arduino ...

Thank you a lot :)


Edit: Maybe nothing is broken, but maybe I'm magnetic, without event touching the wires, I my fingers are close enough I trigger the system ... and led blinks very fast !

Anyone ?

Dermiste

one more weird stuff :D

When my Mac is plugged for power, I get 4 cyclic values in the analogRead, when the mac is unplugged ... I get some workable values.

Do someone now the value of the digital "HIGH"?

robtillaart

Do you have the datasheet of the PIR sensor? It will contain all information needed how to connect to it.

Quote
Do someone now the value of the digital "HIGH"?

Try Serial.println(HIGH, DEC);
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Andy Brown

Show us your circuit please, and a direct web link to the sensor on the vendor's site wouldn't hurt either.

PS, from wiring.h:

Code: [Select]

#define HIGH 0x1
#define LOW  0x0
Home of the Nokia QVGA TFT LCD hacks: http://andybrown.me.uk

Go Up