pir, why is it not working
![hmlittle59](https://forums.parallax.com/uploads/userpics/199/nCR6ABWFQF1HY.jpg)
Hello everyone,
This is my first time using the PIR and its not working. I bought 2 units and neither is working, so it must be me. I'm using the demo code and the cable from my LCD. My LCD is coming off pin 15 and I change the demo to that Pin.
1) The Program just Triggers and Clears, Triggers and Clears, Triggers and Clears...etc
2) The PIR is sitting on my desk behind a built up wall...nothing moving in front of it
3) I've left the room and came back and its count is still high.
4) I change the DIR Bits. on Pin 15
please help
hmlittle59
This is my first time using the PIR and its not working. I bought 2 units and neither is working, so it must be me. I'm using the demo code and the cable from my LCD. My LCD is coming off pin 15 and I change the demo to that Pin.
1) The Program just Triggers and Clears, Triggers and Clears, Triggers and Clears...etc
2) The PIR is sitting on my desk behind a built up wall...nothing moving in front of it
3) I've left the room and came back and its count is still high.
4) I change the DIR Bits. on Pin 15
please help
hmlittle59
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
This PIR is running me in circles, I have 2 units and I can not get either of them working.
1) I've put both in a Cardboard lid with 4 in. sides, pointing to the ceiling...constant trip/clear
2) I've flipped the lid over to the flat side, PIR is flat, point to the ceiling....constant trip/clear
3) I've even put it in a water pitcher with and w/o a lid and still the same results.
4) I've tried hanging it over the desk to the floor and still the same.
How should this be hooked up straight from the box.
hmlittle59
What is the brand and model number of the PIR sensor?
Provide a schematic drawing of how it is hooked up.
Provide the Stamp Basic code that is used to read the sensor.
If the sensor is moving or vibrating, that can cause the sensor to trip.
If the sensor is near a strong heat source, like a wall heater or baseboard heater, that can trip the sensor.
Let us know!
1) The cable came off my LCD to the PIR...back to LCD(still works)...back to PIR
2) Its the Demo Program from Parallax(change to pin 15) same as LCD
3) Pin 15 set to INPUT
4) Boe-Bot Board
5) #555-28027...From Mousers.com
6) on flat table pointing straight up
7) I have an LED on the board, like the demo code
PIR PIN 15 ' I/O Pin For PIR Sensor
LED PIN 9 ' I/O Pin For LED
'
[noparse][[/noparse] Variables ]
counter VAR Byte ' Trip Counter
'
[noparse][[/noparse] Initialization ]
DEBUG CLS ' Clear DEBUG Screen
FOR counter = 40 TO 0 ' Wait 40 Seconds For PIR Warm-Up
DEBUG HOME, "WARMING UP:", DEC2 counter
PAUSE 1000 ' Display Counter Every Second
NEXT
counter = 0 ' Clear Counter Variable
DEBUG HOME, "WAITING... " ' Display Waiting Message
'
[noparse][[/noparse] Program Code ]
Main:
DO
IF PIR = 1 THEN ' Motion Detected?
counter = counter + 1 ' Update Trip Counter
HIGH LED ' Light LED
DEBUG HOME, "TRIPPED...", DEC3 counter
DO : LOOP UNTIL PIR = 0 ' Wait For PIR To Clear
DEBUG HOME, "CLEARED...", DEC3 counter
LOW LED ' Turn Off LED
ENDIF
LOOP
thanks
hmlittle59
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
Both Positions... with the Main Demo Program. On my desk pointing straight up
1) Low Position--Constant...Triggering/Clearing. No amount of movement/sitting still makes a difference...Built up wall or not
2) High Position--Constant...Triggering/Clearing. Waiving hand over top of unit cause the LED to stay on...Built up wall or not
Out of the box how should this unit be mounted and tested???
thanks for any help
hmlittle59
http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/PIRSensor-V1.2.pdf
I've printed out and read that info, thats were I got the software from.
Under what condition should the counter(s) in the demo software be incrementing?
thanks
hmlittle59
What is above this PIR which faces upwards (NOT a normal position)? If it's normal fluorescent lights, that should pose no particular problem. If there are incandescent lights, HID lights or heat recovery fluorescents above, that may be the problem.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Flat ceiling above, ceiling fan off to the side. Lights are off. still triggering and clearing.
In the 'High' position and my hand waving over top does it stay green...Appears to be the trigger position.
In the 'Low' position and my hand waving over top...Constant Trigger/Clear.
thanks
hmlittle59
This is just an educated guess. It's probably the ceiling fan that's killing you. Whether this is a single stage PIR (I/R only) or dual stage (I/R and movement) the ceiling fan could trigger both since it provides both motion and a temperature differential from the circulated air. Additionally, the motor may provide some minimal I/R as well as it heats up.
I'd turn the lights back ON, and turn the ceiling fan OFF, and give it another shot. If it still doesn't work, turn the lights back OFF and please describe what lind of lights are there.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Fans been turned off the whole time(days), its now mounted back in the card board lid pointing down 3ft off the floor. still the same in high/low position.
I'm about to give up and go and watch "Grass Grow"...Oh its almost winter, no luck there either.
I've done Electronic/Programming and some common since. This baffles me to no end....
thanks
hmlittle59
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Could you please post the resolution to this problem? I just purchased 20 of these sensors and the first 8 have shown this exact behavior (haven't gotten top the last 12 yet). I am very reticent to say that it is anything but my own fault, but units for a previous order work and these do not. The behavior is identical to what has been described above and I know it is not normal because I have used these before. Is there any chance there was a bad batch?
Incidentally, these are already installed into demo units that are shipping today. Do you have any thoughts for quick fixes? It would seem as though I am in a real pickle here. Thanks
tim