Shop OBEX P1 Docs P2 Docs Learn Events
2 PIR Motion Sensors on same pin — Parallax Forums

2 PIR Motion Sensors on same pin

Bobb FwedBobb Fwed Posts: 1,119
edited 2008-05-31 07:58 in BASIC Stamp
Any foreseeable problem with attaching two PIR outputs onto the same I/O pin? Will the activation of one feed voltage back into the other? For long term use, can this be bad?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-29 16:03
    If you connect two PIR sensors to the same I/O pin, you will destroy one or both of the PIR sensors. This is true for any logic output. Logic output circuitry essentially connects the output pin to either ground (logic low) or Vdd (logic high) through a small transistor. If that output pin is connected to another output pin that's in the opposite state, you have a short circuit from Vdd to ground via one small transistor on each output pin. That will destroy either the transistor or its wiring on the chip ... and very quickly. Some chips are built more robustly than others. For example, the Propeller's output circuitry is built to be tolerant of this sort of abuse, but the Stamps and things like the PIR sensor are less tolerant.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2008-05-29 16:12
    So a couple diodes will fix the problem right?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-29 16:44
    That depends on what you do with the diodes. The best thing to do would be to use an OR gate or some combination of gates that ends up as an OR gate so that if either PIR sensor output goes to logic high, the result (to the I/O pin) will go to logic high.

    If you use two diodes as an OR gate, make sure to have a pulldown resistor on the I/O pin.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2008-05-29 17:10
    Attached is my wiring. Seems it should work fine.
    800 x 600 - 34K
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-29 17:16
    Seems like it should work fine. That indeed is a pretty standard diode OR gate.
  • denodeno Posts: 242
    edited 2008-05-29 23:55
    Just a word to the wise on the PIR sensors from Parallax.· They are not all created equal.· I bought 3 of them, and all 3 had different responses to heat.· One of them would never settle down, and would trigger· inside a tupperware in a 50 degree garage with no heat source around.· The other 2 would detect a human, but at different distances, and one of those 2 took about 20 minutes to settle down and detect properly.

    Deno
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2008-05-30 06:38
    I have bought many and have tested about 20. They have all seemed to react about the same. My application is more close quarters, but it seems to take 15-30 seconds for most of them to "settle" and then it works great! They did recently come out with PIR V1.2 ... maybe you had bad experiences with an older version.
  • denodeno Posts: 242
    edited 2008-05-30 22:17
    Thanks for the update on the new version type.· Do you know when this happened?· When did you purchase your PIR's?

    Deno
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2008-05-31 07:58
    In the few couple months I believe they changed it.
Sign In or Register to comment.