False pulses from X-Band motion detector (part #32213) - any ideas?
rowens
Posts: 1
Hello. Some time back, I bought this motion detector module to use as a trigger for some security cameras. I'm having problems with it and I'm not sure whether I'm doing something wrong or if perhaps my module is defective in some way. Any advice would be greatly appreciated.
Problem: I get very frequent random pulses from the sensor and it seems to only detect extreme movement (e.g. I move my hand towards the sensor very rapidly or I move a metal object very rapidly in front of it - walking at a normal pace in front of it doesn't seem to generate any more pulses than the frequent random ones I get from it).
Setup: I'm using the sensor with an Arduino Diecimila microcontroller. I am providing 5V Vcc and ground off of the regulated power pins on the Arduino. I have the sensor's OUT pin connected to digital pin 2 on the Arduino. I've tried having the EN pin floating as well as tied to Vcc. Arduino source code will be included below.
I've tried various physical locations within my house and the behavior is essentially the same. I usually test with the sensitivity adjustment turned all the way counterclockwise, but that doesn't seem to make much difference. If I put a metal object directly in front of the sensor, that seems to quiet it down somewhat, but that's kind of hit-and-miss - sometimes it makes it quiet, sometimes it doesn't. Additionally, I've experimented with tapping the test point (TP) connection and monitoring the output of it on a scope. The pulses off the TP connection match what I'm getting from the OUT pin (frequency wise - of course amplitude is different).
Any suggestions/ideas/input would be appreciated. I'm about to give up on this sensor.
Ryan
Arduino source code follows (apologies for the somewhat convoluted output logic - this is after many iterations of trying various different things):
Problem: I get very frequent random pulses from the sensor and it seems to only detect extreme movement (e.g. I move my hand towards the sensor very rapidly or I move a metal object very rapidly in front of it - walking at a normal pace in front of it doesn't seem to generate any more pulses than the frequent random ones I get from it).
Setup: I'm using the sensor with an Arduino Diecimila microcontroller. I am providing 5V Vcc and ground off of the regulated power pins on the Arduino. I have the sensor's OUT pin connected to digital pin 2 on the Arduino. I've tried having the EN pin floating as well as tied to Vcc. Arduino source code will be included below.
I've tried various physical locations within my house and the behavior is essentially the same. I usually test with the sensitivity adjustment turned all the way counterclockwise, but that doesn't seem to make much difference. If I put a metal object directly in front of the sensor, that seems to quiet it down somewhat, but that's kind of hit-and-miss - sometimes it makes it quiet, sometimes it doesn't. Additionally, I've experimented with tapping the test point (TP) connection and monitoring the output of it on a scope. The pulses off the TP connection match what I'm getting from the OUT pin (frequency wise - of course amplitude is different).
Any suggestions/ideas/input would be appreciated. I'm about to give up on this sensor.
Ryan
Arduino source code follows (apologies for the somewhat convoluted output logic - this is after many iterations of trying various different things):
int xPin = 2; void setup() { Serial.begin(57600); Serial.println("Pulse test"); pinMode(xPin, INPUT); pinMode(13, OUTPUT); attachInterrupt(0, intHandler, RISING); } volatile int pulseCount = 0; void intHandler() { pulseCount++; } void loop() { if (pulseCount > 2) { digitalWrite(13, HIGH); if (pulseCount > 3) { Serial.print("MOTION! "); Serial.println(pulseCount); } digitalWrite(13, LOW); } if (pulseCount > 0 && pulseCount <= 3) { Serial.println(pulseCount); } pulseCount = 0; delay(250); }