Shop OBEX P1 Docs P2 Docs Learn Events
PIR Sensor output remains always high — Parallax Forums

PIR Sensor output remains always high

bluewavesbluewaves Posts: 5
edited 2011-03-16 05:41 in Accessories
Hello to everyone,

we are using Parallax PIR Sensors in a project for modelling room occupancy. We use them connected to a TelosB wireless sensor module: the output pin of the PIR sensor is connected to the TelosB ADC port, from where we got the readings of the output.

The problem is that, after the initial warm-up during which the output varies from 0 to around 1,4V, we have got an "always-high" reading. We don't think it is a software problem, since the readings slightly vary around 1,4V. Obviously we are very careful in avoiding any movement during the warm up, and even if we put the sensor in an empty room the results don't change.

Does anyone have any suggestion of what it may be? I searched a lot on this forums and on the web too, but I couldn't find any solution that works.

Thank you! :smile:

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-11 10:43
    1.4V isn't acceptable.
    What's the PIR's output like when disconnected from this "TelosB"?
  • bluewavesbluewaves Posts: 5
    edited 2011-03-11 11:17
    PJ Allen wrote: »
    1.4V isn't acceptable.
    What's the PIR's output like when disconnected from this "TelosB"?

    well, it is about the same... adc readings are quite reliable, we got the same by using simply a voltmeter.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-11 18:10
    Well, an output HI should be approx. = to supply voltage.
    Similarly, an output LO should be approx = GND (0V).
    The spec'd supply range is 3 - 5VDC.
  • bluewavesbluewaves Posts: 5
    edited 2011-03-11 23:48
    Approximately equal to supply voltage? As far as I know, and as I have read in this forum, output voltage is about 0,6-0,7Vcc.
    Out supply voltage is 3V, so the output is fairly ok... If it wasn't always high :) About the LO, it is correct at 0V, but it stays there only during startup and calibration.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-12 06:11
    I don't know what "fairly ok" means.
    1.4V is unacceptable, unequivocally.

    With a 5.0V supply: output HI = 3.3V, output LO = 0.
    With a 3.3V supply: output HI = 2.9V, output LO = 0.
    With a 3.0V supply: output HI = 2.4V, output LO = 0.

    http://www.youtube.com/watch?v=XqWXlQya-fU
  • bluewavesbluewaves Posts: 5
    edited 2011-03-14 06:05
    Well, I'm really sorry but maybe there is something wrong with our sensors.

    I tried to check alimentation and output with a voltmeter instead of using the analog/digital converter.
    I see that the wireless module provides around 3V supply. With such a supply, our output reading is inequivocally:

    HI = 1,35V, LO = 0V. But, as I already said, the output is always high with exception of the calibration period.

    Please notice that, providing supply simply with two AA batteries, 3,2V, the output we get is 1,58 V.
    So I really don't know if the sensor we bought have something wrong, or... I don't know. There is nothing else involved here, just two batteries, a voltmeter and the PIR sensor.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-03-14 08:10
    For troubleshooting can you try some isolated tests using the sensor alone? Disconnect the sensor from your circuit and use a known stable power source directly. Monitor the voltage out of it. I'd try powering it at 5V and 3.3V to see how it reacts.

    Robert
  • bluewavesbluewaves Posts: 5
    edited 2011-03-14 10:32
    In my previous post you can find the test we made with the PIR sensor disconnected from the circuit, just connected to power.
    bluewaves wrote: »
    I tried to check alimentation and output with a voltmeter instead of using the analog/digital converter.
    I see that the wireless module provides around 3V supply. With such a supply, our output reading is HI = 1,35V, LO = 0V.
    Providing supply simply with two AA batteries, 3,2V, the output we get is 1,58 V.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-03-14 10:51
    So, is this the module you are using?

    http://www.willow.co.uk/html/telosb_mote_platform.html
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-03-14 10:56
    It isn't clear what pin you are connecting it to.

    - Is it an Analog pin or a Digital pin?
    - If the pin can do both then how do you have the pin configured?
    - Do you have the pin configured as an output by mistake?? That could always make it go high...
    - If the pin is configured as an input does it happen to have an internal pull-up resistor enabled?

    If the module works standalone then it is probably a configuration issue with your module/controller.

    Robert
  • vaclav_salvaclav_sal Posts: 451
    edited 2011-03-14 11:23
    Since the PIR output is specified as "motion detected" ( and unfortunately lacking any electrical output characteristic!) high ( what is the current limit??) it should remain at 0 V or very near zero when not connected to any other device after the required warm - up time.
    Does it?
  • PublisonPublison Posts: 12,366
    edited 2011-03-14 12:35
    There are output characteristics as defined in the Datasheet as PJ pointed out:

    http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/555-28027-PIRsensor-v1.4.pdf

    There is a jumper on the module. Do you have it in a position that you require?

    A test needs to be made with a separate 3.3 or 5 volt supply. I would start with the 5 Volt first.

    I have five of these PIR's in operation with none of the problems that you are experiencing.



    vaclav_sal wrote: »
    Since the PIR output is specified as "motion detected" ( and unfortunately lacking any electrical output characteristic!) high ( what is the current limit??) it should remain at 0 V or very near zero when not connected to any other device after the required warm - up time.
    Does it?
  • vaclav_salvaclav_sal Posts: 451
    edited 2011-03-14 15:37
    Call me picky, the answer is correct, the jumper defines high to low or high to low pulse back to high response, but it still does not say anything about the output drive requirement, albeit irrelevant in this case of not working at all.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-03-14 17:58
    vaclav_sal wrote: »
    Call me picky, the answer is correct, the jumper defines high to low or high to low pulse back to high response, but it still does not say anything about the output drive requirement, albeit irrelevant in this case of not working at all.

    The datasheet doesn't specifically state how much current the output pin can safely source or sink although that should probably be listed. It does mention that is should be wired ilke: "Connect to I/O pin set to INPUT mode (or transistor/MOSFET) ". Which doesn't add a lot more detail in regards to the exact amount of current it can handle. That is a question for Parallax if you really need to know.

    I don't think that is causing the issue that was oringally reported in this thread. It seems like it had something to do with the way the I/O pin is configured on the microcontroller.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-03-16 05:41
    At this point we may well never know.
    [Hey, maybe the "modelling room" group weren't removing
    the conductive foam that gets placed on new units?]

  • Hello
    I am trying to integrate a digital PIR sensor on a Tmote Sky. I've programmed
    the sensors on Tiny Os and i chose the expansion 7 for the digital PIR but i didn't get a signal
    of detection from the PIR.
    how do you programmed them ?
    I have no signal of detection.
    I've programmed led to blink but i got nothing.
    Thank you
  • What brand of PIR? The one's I have require a warm-up period, and you have to include that forty seconds or so in your code.
Sign In or Register to comment.