Shop OBEX P1 Docs P2 Docs Learn Events
PIR Sensor not going to ground — Parallax Forums

PIR Sensor not going to ground

CatspawCatspaw Posts: 49
edited 2015-01-31 15:39 in Accessories
Well, I know there are threads with PIR in the title, but, search wouldn't find them. So, I will just post.

I recently got a PIR 28027 Rev. B. It operates with no load. However as soon as I hook it up to a 74LS14 Inverter, it won't go to 0V. So the output of the inverter stays low.

The chip is good and it doesn't matter which input I put it on, the same thing happens.

It goes high when motion is detected. When it turns off, it drops to about 1.2V. In my usage, this isn't enough to set the output of the inverter high.

If I disconnect it from the inverter, it goes on down to 0V. The documentation is useless. It doesn't specify whether it's supposed to have a pull down (I would assume not.) I'm powering it with +5V. The test circuit is the PIR and the 74LS14, no other loads of any kind.

Now, before, I was using a 74LS00 NAND, with one gate rigged as an inverter and it worked fine. For the halibut, I put a 1K pull down on the LS14 and it pulled the signal down to about 1V. I also tried another LS14 chip and it did the same thing.

Any ideas (like I'm missing some fundamental rule on using the LS14?)

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-30 19:20
    Just to make sure, you're using the a common ground connection between the sensor and the 75LS14 right?

    Can you take (and post) a photo of your setup?
  • CatspawCatspaw Posts: 49
    edited 2015-01-30 19:50
    Yes, common ground tests good. +5V tests good. I suppose I could post a photo. But, I doubt if you could see a wiring mistake. Even though I've isolated it, there's other wiring and components still present around it. Besides it's the PIR and the LS14. There's only one connection after power and ground to verify. Output of the PIR to the input pin of the 'LS14. Not much to mis-wire there. I disconnect, PIR goes low. I test the input of the inverter, it goes high and low appropriately. Re-connect, the PIR won't go low (enough). There's nothing else to test. I guess I'll try the NAND gate again to verify I haven't damaged the PIR (I always wear a ground strap when handling it.) If the NAND gate works, then I'm stumped. If it doesn't then I assume I've damaged the PIR.
  • SapphireSapphire Posts: 496
    edited 2015-01-30 19:59
    What's the voltage on the input to the 'LS14 when it's open?
  • CatspawCatspaw Posts: 49
    edited 2015-01-30 20:23
    It's 1.4V (which is what it was in my initial post ... not 1.2V)

    [why do I get the feeling I'm going to feel stupid real soon?]
  • SapphireSapphire Posts: 496
    edited 2015-01-30 20:37
    Then I think the PIR can't sink much current. Can you try an 'HC04 or put a pull-down resistor on the 'LS14 input? Try it without the PIR first to see how small you have to go with the pull-down to get the output to go high. Then attach the PIR and make sure it can drive the input up enough for the output to go low.
  • DomanikDomanik Posts: 233
    edited 2015-01-31 08:17
    If the output of the PIR is blown (on the low driver side) it won't have enough current to pull down. But there may be enough micro-amp leakage to let it drift down. You can test this by disconnecting the 74LS part, then pulling the PIR output to +5V with a 10K - 30K resistor. The PIR will need to source at least 500ua to pull down to zero volts. If the PIR can't do that it's bad. Seems like 74LS parts need a few milliamps of H or L input current, otherwise an open input drifts to the middle (1.4V). Since it goes to 1.2V there seems to be a little low current getting through.

    A "fix" might be to use a 2K to 5K pull-down on the output-- or return for another unit.
  • CatspawCatspaw Posts: 49
    edited 2015-01-31 09:22
    Well, after doing some tests with various resistors on the input of the LS14 and on the output of the PIR, it would seem I've gotten a little education. I will still investigate all the suggestions here. Bottom line is that either the PIR is blown (but still able to operate only without sink capability) or it simply has little power to pull down. Either way, I switched to a CD4011, and it works just fine.

    It looks like I need to do some studying of all this to educate myself on what is truly required to operate these chips. I was under the mistaken impression that a TTL input was a TTL input. ... or mistaken about how the PIR would/should have no problem with a standard TTL input. or maybe I'm still in the stone age and should think latest technology (the chips I'm using are literally 30+ years old ... I know 'cause that's how long they've been in my kit since school .... and please don't go there .... whatever you're thinking.)

    So thanks to all who responded. Just talking to others helps break out of that box you get into when you stare at a problem too long. I'm smarter for it.

    [ this explains it .... I went to school, worked at it, changed careers, and 20 some years later I am returning to electronics. So I've forgotten everything I knew about it and am relearning it.... of course, then, I'll have to start learning all the new stuff that's been developed since then ... sheesh ..]
  • SapphireSapphire Posts: 496
    edited 2015-01-31 13:41
    TTL chips are still good and useful today. But the spec on a 'LS TTL input for a low signal is IIL = -0.4 mA, so whatever you are connecting to it has to sink 400 uA current to make the input low. Why the PIR can't do that I don't know, but switching to the 4011 or 'HC series will work because they require much lower sink current on their inputs. Something on the order of 1 uA.
  • DomanikDomanik Posts: 233
    edited 2015-01-31 14:44
    Sapphire wrote: »
    TTL chips are still good and useful today. But the spec on a 'LS TTL input for a low signal is IIL = -0.4 mA, so whatever you are connecting to it has to sink 400 uA current to make the input low. Why the PIR can't do that I don't know, but switching to the 4011 or 'HC series will work because they require much lower sink current on their inputs. Something on the order of 1 uA.
    Good info Sapphire, thanks. It seems to me the only reasonable explanation for the problem is the low drive transistor is toasted. To salvage the PIR with the blown out low drive, a pull down of 10k is needed to help drive the input of the CMOS. 10K will be easy for the PIR's remaining high drive transistor to pull to a high as needed. When it releases, the resistor will take over and pull to a solid low logic level.

    I'm thinking when the DVM was connected between ground and the output it acted as a 10meg or 100meg pull down resistor. A scope probe would do the same thing. This gave the appearance the PIR worked and the 74LS was the problem. Bottom line is the circuit needs a pull down to be reliable.
  • SapphireSapphire Posts: 496
    edited 2015-01-31 15:39
    Domanik,

    I think you're right about the low drive transistor being toast. If the output pin touched +5V even briefly while the PIR was not detecting, the short circuit current through the output would probably blow that transistor. At least there's a work around with the pull-down resistor.
Sign In or Register to comment.