Motion sensor interference.

Hi everybody,

i'm actually using a motion sensor with a GSM/GPRS shield (sim900) on an arduino mega.

Everything work, but when my GSM shield send or receive an SMS (or MMS), the motion sensor detect movement! (But there is no movement!)

It look like the motion sensor get interference from the gsm shield...

i have try to use different pin on my mega, and i have try to use an external 5v power supply for the motion sensor, but the problem always still there

Does anybody else had this problem? Anybody have idea to fix this?

i have try two different motion sensor with the same result, here is the model that i have try:

http://www.seeedstudio.com/depot/Electronic-brick-PIR-motion-sensordigital-p-475.html

(But there is no movement!)

Is there noise on the readings? Sometimes you have to put a threshold into the sensor to detect real movement and not noise.

Where is your code?
What are the raw values you are getting from your sensor?

Grumpy_Mike:
Is there noise on the readings? Sometimes you have to put a threshold into the sensor to detect real movement and not noise.

Where is your code?
What are the raw values you are getting from your sensor?

well, i have try to test it with a very simple code, and i got the same problem, here is my code:

int LisMouvement1 = 0;

void setup() {  
Serial.begin(57600);   
pinMode(2, INPUT);// Sensor connected to #2
}

void loop() {
LisMouvement1 = digitalRead(2); // Sensor connected to #2
if (LisMouvement1 == HIGH) {
  Serial.println("Mouvement!");
 delay(3000); 
}}

i just connect the GSM shield in my arduino mega with the sensor, then i manually turn the GSM shield on, and as soon as i send a sms text message (from my cell phone) to my GSM module i got a message "Mouvement!"

If i turn off the gsm module, or if i dont send/receive anything with the gsm module, i detect no false movement at all..(just REAL movement if i move in front of the sensor!)

As you can see in the code i just posted, there is no code to drive the gsm module but i got false movement detection when i receive a sms message, so i think its not related with my code..

For your question:
What are the raw values you are getting from your sensor? well, my sensor give 0 if no movement, 1 if movement is detected

is there noise on the readings? Hmm i read only 1 or 0.. i'm not very good with this, and i dont know how to see if i got noise...

Thanks for your reply :slight_smile:

You need to add lots of decoupling on the supply from your sensor. Make the sensor pulse as short as possible and only consider something as real if the sensor output has been on for a set time.

Basically your GSM module is interfering with your sensor module. You may not be able to fix this.

Grumpy_Mike:
Basically your GSM module is interfering with your sensor module. You may not be able to fix this.

Yes for sure the problem is HARDWARE... So there is not a lot of thing i can do to fix this..

Well, my sensor is actually setup at a distance of 1 feet of my gsm module.. i will try to increase this distance at 4-5 feet to see if the problem is solved...

But maybe someone can suggest me other motion sensor that i can use? (Something that are not affected by the gsm shield)

I have setup the motion sensor at 6 feet from the arduino board (with gsm module) and now everything work perfectly...

(i have try with different distance and i got interference at a distance of 0 to 2 feet, if the motion sensor is set at 3 feet or more, i got no interference at all)

But this setup is not very useful for me... I still need to find another motion sensor that are not affected by GSM module.. Someone have a suggestion?

I still need to find another motion sensor that are not affected by GSM module.. Someone have a suggestion?

You expect too much from advice. No one can tell you this. It is not a thing that can be known from the descriptions you have given or that vendors give.

All you can do is improve the RF noise immunity of the sensor like I said before.

I have same problem.How do you solve this.Clarify please

I see you are using Pin 2 for the motion sensor. I notice that the Arduino GSM Shield uses Pin 2 for RX. Could it be a simple case of a pin conflict?

[I see you are using Pin 2 for the motion sensor.

Who knows, he has hijacked an 18 month old thread. We have no idea what he has.

Well, first the device i have made is two camera with motion sensor, with a gsm module drived by an arduino mega. When one of the camera detect motion this device take picture and send it to my cell phone via text message.. for sure i can take picture remotly too by talking to this device via text-message. It work on a car battery with solar pannel...

I never found any solution to this issue because its an hardware intereference issue, so this can not be fixed programmatically.

So what i have do: i have setuped both camera/motion sensor at more than 2 feet from the arduino mega/gsm module and everything work perfectly. (I have used this device for more than 1 year now to watch my chalet with no problem at all)

Use a ferrite and capacitor (LOW PASS FILTER). This will solve your problem.