Shop OBEX P1 Docs P2 Docs Learn Events
Parallax PIR Sensor problems — Parallax Forums

Parallax PIR Sensor problems

Crono1124Crono1124 Posts: 2
edited 2010-05-13 07:06 in Accessories
Hello everybody,
···· I am using a Parallax PIR sensor with the 3 pin header. (Power, ground, and Output) but I am having some serious problems with the output of the sensor always remaining high.

In my circuit the sensor is receiving a regulated 5 volts. the output is going into a PICAXE microcontroller to detect wether or not to do other things. The problem that I am having is very unusual and i'm not sure how to fix. When the system is first powered on the sensor goes through its initial warming up phase and then the output cycles between 3.6 volts and·0 repeatedly. this jumpy output is causing my microcontroller to detect multiple high low logic and freak out. I have tried putting a 10kohm pull down resistor on the output to clamp the output to 0 volts ·with no sucess and i have also tried placing a smaller input resistance going into my microcontroller to help prevent any voltage spikes into my system.

now here is the very strange part..... The system works just fine when i attach a voltmeter DIRECTLY to the output and ground·pins on the sensor to measure the output voltage.... whenever the voltmeter is removed (me thinking oh its working like its supposed to) the PIR sensor goes back into its rapid high low output state....

If i measure the input voltage @ my microcontroller and not directly on the PIR module is when i see the high low voltage transisitions which leaves me to belive there is some sort of problem with the PIR not the rest of my setup.

To make the situation even worse when breadboarded with the sensor just activating a simple LED the system works as advertised no problems.

I have also checked to make sure that when my system is activated that the output voltage to the PIR sensor does not drop below 4.8 volts. but even if it did it would not explain why a voltmeter (with its supposed infinite resistance) when connected between the ground and output pin fixes the problem...

If anybody can assist me with removing the ghosts from another dimension from activating my PIR sensor it would be greatly appreciated...


Quick Edit: the motion sensor is covered with black tape during testing, I have also covered it with towels and ect to make sure i wasn't accidentaly moving during testing.


Post Edited (Crono1124) : 2/8/2010 12:01:05 PM GMT

Comments

  • dandreaedandreae Posts: 1,375
    edited 2010-02-08 17:57
    Are you using a common ground between the PIR and PIC?· Does the output pin of the PIR jump around when not connected to the PIC?

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
  • Crono1124Crono1124 Posts: 2
    edited 2010-02-08 22:15
    Yes there is a common ground established between everything.


    ·If the output is connected to an LED it works fine. If the output is not connected to anything it works fine. When its connected to the PIC is where the problems come in. Only solution i have that has worked so far is to apply a voltmeter and that seems to stabalize the output for whatever reason. Different PIC's yeilded the same result also so i can't understand what the problem may be.

    I do know the PIC has an internal input resistance but to my understanding that shouldn't cause too much of a problem as far as the behaviour of an attached sensor.

    The pinout on the PIC is configured to input only and it is not able to be configured as an output so there isn't a reason why the PIC would be able to drive the voltage high especially not to the exact output voltage of the PIR sensor. (again to the best of my knowledge.)

    The PIC in use is a PICAXE 18X chip. the system i am using utilizes a 120-12VAC transformer, a full wave rectifier, a 5 volt linear regulator which then drives a 5.8Ghz Transmitter based on the output signal from the PIC via·a Transistor which is activated through the PIR sensor

    so PIC input is PIR sensor. Pic Output 5volt TTL logic to Transistor Base. Transistor then provides power to transmitter via a Collector Emitter Induced Current.
  • THTH Posts: 7
    edited 2010-04-05 13:42
    I bought two sensors to find out the reliability of Parallax sensors. Both sensors are doing exactly the same behavior as Anonymous is saying. I covered the sensors entirely with ceramic cup and they are still giving me unstable voltage.
    For an occasion, there is no output when a ceramic cup covered the sensor.
    ·
    For more accurate testing, I removed the plastic lens and covered a tiny window visible on metal part that is soldered on a board. It is still doing the same problem, which is giving me unstable output voltage.·
    ·
    [font=ï¼*ï¼³ 明朝]So it is more or less firmware problem in the sensors.[/font]
  • THTH Posts: 7
    edited 2010-04-05 14:23
    In order to remove noise issue, I simply connected 4.5V battery to the sensor and measured the output using a voltmeter in the environment conditioned above.
    Both Parallax RIP sensors do have the same problem.
    [font=
  • Mike GreenMike Green Posts: 23,101
    edited 2010-04-05 14:48
    What is the jumper setting on your PIR sensor? Read the documentation. In one setting, the output goes high and stays high when the sensor detects movement. In the other setting, the output goes high, then low when the sensor detects movement. This pulse repeats as long as movement is detected.

    If the sensor works when just connected to an LED or voltmeter, but not when it's connected to a PIC/PICAXE, the problem is in the PIC/PICAXE. The output of the PIR sensor is just an ordinary digital output and it shouldn't make any difference what it's connected to as long as the output current limit (<20mA) is respected.
  • THTH Posts: 7
    edited 2010-04-05 15:49
    Hi Mark:

    I have tested two jumper settings.
    I also connected 2N2222 transistor and 1K resistors to the output pin.
    2N2222 works fine as the voltage f the base goes higher.

    The collector is connected to +4.5VDC (DC battery) with 10K resistor load and measured voltage reading on the load resistor.

    Everything works just as I expected except Parallax sensors are very unstable.

    As I wrote previously that for an occasion, there is no output voltage when two sensors are completely covered with ceramic cups. So it is definitely the firmware issue in the IC Chip.

    Both units give me erroneous voltage reading, even with two sensors are completed covered with ceramic cups.

    I just got new one yesterday and this one has the identical problem.

    Thanks,
    TH
  • THTH Posts: 7
    edited 2010-04-05 21:51
    Hello Everyone:
    I fixed the jumpy output issue written by Crono1124. In order to have correct response, the power supply must be very stable with no noise.
    I tested two sensors and worked correctly.

    I had the same problem as Crono1124. I had a dual power DC battery supply to drive several functions such as LED, FAN and other mechanism. Somehow by connecting all of these functions with multiple power supplies did cause to have noise, which affected the sensors. Now I provided a single and independent power source for the sensor only and worked ok. Noise is major killer for these sensors.

    I hope this helps.
    Best,
    TH
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-04-05 22:46
    TH,

    I'm glad you got your issue resolved. As a note there is no firmware in these sensors. The entire circuit is like a slowly balancing analog comparator. Slow changes cause the sensor to slowly recalibrate to maintain a kind of equilibrium. However such changes (including noise) will cause the sensor to trigger. And if the trigger happens to activate a fan, relay or some other noise producing device running on the same power supply you can even have a scenario where oscillation will prevent the sensor from ever settling. Often the noise problems can be solved with a couple of capacitors near the sensor across the supply lines.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • LuckyLucky Posts: 98
    edited 2010-04-06 05:49
    I have had past experience with these sensors(I've used about three of them), and one thing I noted was that the output is noisy if there was alot of movement in front of the sensor during warm-up time. Since I couldn't use a microcontroller for those projects, I used a comparator with a potentiometer and RC time constant connected at its input pins. This way when power was applied to the circuit, the PIR sensor was delayed turning on till I could get out of the way.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "The man who smiles when things go wrong has thought of someone to blame it on."


    -Lucky[size=-1][/size]
  • igneousgreenigneousgreen Posts: 5
    edited 2010-04-29 08:30
    I'm getting this "always HIGH" problem from my new PIR also, luckily I haven't caught it smoking yet. I'm using a BOE bot kit BS2 Rev G and BOE Rev C. I've tried both Demo codes, simple and advanced. I've tried delaying the code to get out of the room before powering the sensor. I'm willing to try anything at this point. I've been changing set ups all day with no other results. What size capacitors should I try and where exactly?

    Thanks for any help.
  • THTH Posts: 7
    edited 2010-04-30 21:00
    To igneousgreen:

    Test your PIR sensor with 4.5 V DC batteries first. This will remove noise and voltage instability issues. The output voltage should be around 3.3 VDC.
    You can cover the PIR sensor with a cup to make the output voltage to 0V.
    If it works then you have noise or voltage instability or both.

    TH
  • igneousgreenigneousgreen Posts: 5
    edited 2010-05-12 21:14
    Thanks for your further replies, I will try this test and get back with a response.
  • igneousgreenigneousgreen Posts: 5
    edited 2010-05-12 22:38
    Okay, I'm always 3.3 volts with a thick ceramic cup over the PIR using 3 1.5volt AA batteries as power source.
  • igneousgreenigneousgreen Posts: 5
    edited 2010-05-12 22:49
    Okay. After Several minutes of warm up time, I've got it working with a solid dc source. On both jumper settings. What do you reccommend for stabilization on a BOE bot? I realize the code will be a tricky thing to set up with warm up time, and feather sensitivity, but I think with this ability to test these things.. I should be able to figure it out if I can get a good hardware set up.

    Thanks again for all the feed back. and Patience. :0)
  • igneousgreenigneousgreen Posts: 5
    edited 2010-05-13 07:06
    I put the PIR module back on the BOE bot and it worked. .. .. eh, thanks again for all your help, I have no idea what was happening before. All is well here.
Sign In or Register to comment.