Main Site Documentation

PIR Interrupt fires exact opposite


#1

Netduino Plus 2
Netmf 4.3
VS 2013

I have a PIR motion detection sensor attached to my board and it fires continuously.

I started waving my hand in front of it and I noticed that it stopped firing.

So the interrupt fires when there is no motion and does not fire when there is motion.

I have tried this on analog and digital ports. I have reversed the gnd and 3.3 vlts pins, but still the same thing happens.

Any idea what is happening?

Thanks,
Terrence


pirInterupt = new InterruptPort(Pins.GPIO_PIN_D8, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeHigh);
pirInterupt.OnInterrupt += pirInterupt_OnInterrupt;

static void pirInterupt_OnInterrupt(uint data1, uint data2, DateTime time)
{
	Program.flag = true;
	Debug.Print(data1.ToString() + " " + data2.ToString());
}


#2

That’s a strange PIR, usually it fires then needs “cooldown” to fire again.


#3

@ andre.m -

I like it over there, but it seems the volume of traffic is pretty low over there compared to this forum. (I have posted the question over there as well). I posted the message 2 hours ago and over there 0 views, and 0 replies. Over here 2 replies and 23 views.

I will attempt to measure that. The pir is working fine on an Intel Edison board. I wonder if my use of the interrupt is incorrect.

The PIR is D-SUN, dsn-fir800


#4

@ Darko -

Well yes, there is a timeout duration on the PIR. I guess what I meant by continuously firing was that just sitting there without any human movement the interrupt would fire every few seconds or so.


#5

Higher quantity doesn’t necessarily mean higher quality. While I’m sure there might be some folks here who own Netduino boards as well, most of us are here because we’re working with GHI’s offerings. Given that, you’re not as likely to get good advice on Netduino-specific issues here.


#6

@ terrence - Have you try using InterruptPort with pulldown resistor mode enabled?


#7

@ Architect -

I got it working. I had my pin placement wrong.

Thank you all for chiming in with your advice.

Terrence


#8

@ devhammer -

I understand qty vs qual. The question was more about PIR and netfm interrupts. Netduino was my 3rd priority. You guys over here have seen a lot of combat that I would like to tap into regardless of the board I am trying to program.

Thanks for your thoughts.

Terrence.


#9

@ andre.m -
I am reading up on the implications of the glitch filter and the resister and interrupt modes. I am new at this stuff.

Thanks for your help.

Terrence.


#10

Definitely a lot of good experience here. Architect, in particular (among many, of course) has been a great help to me since I got into microcontrollers. Glad you were able to find the assistance you needed.


#11

Once I finished going over the distance module I was hoping to start a detailed analysis of the PIR module as really this should be easy stuff, but for whatever reason its not and I’m very interested in finding that reason.


#12

@ Duke Nukem -
I look forward to your findings.

Adjusting the sensitivity control just a little to the more sensitive side causes it to fire continuously. I wonder if my led notification is setting it off, causing the never ending firing.