Shop OBEX P1 Docs P2 Docs Learn Events
PIR motion detector interfaced to BS2 — Parallax Forums

PIR motion detector interfaced to BS2

CogburnCogburn Posts: 62
edited 2005-01-16 19:17 in BASIC Stamp
I am wanting to hack a motion detector circuit like those sold for outdoor lighting and interface with Basic Stamp 2.· I am basically looking for info on whether or not the PIR puts out a TTL signal when motion is detected and where I should look for this signal in the circuit.· Also some of those PIR devices are hooked to 110 volts but I am wanting to use 9 volts or less.· Has this been done and if so, does anyone know of a link to this kind of information?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Showing up to school doesn't·mean you are a student any more than crawling up in an oven means that·you are a biscuit.

Comments

  • JonathanJonathan Posts: 1,023
    edited 2004-12-17 16:08
    Cogburn,

    This is usually pretty easy to do. I have hacked a couple of PIR units. Unfortunalty, the ones I got were surplus and have no identifiers on them, so I can't direct you to the same ones. However, I think any of them will work.

    Firstly, even if you can't trace back the circuit, you can always get a 120V relay and connect it to the output of the PIR, and use that to let the Stamp know when the unit has triggered. This is simple and will work.

    If you want to avoid the relay, follow the circuit back from the 120V output. It should go back to some kind of transistor. Find the base of the transistor and measure the voltage when the unit is tripped. Note that as long as the voltage is below about 12V you can use this provided you have an appropriate resistor protecting the Stamp pin. If the voltage is higher than that, you can either use a voltage divider or a regulator to bring it down to what the Stamp can handle.

    HTH,

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-12-17 17:24
    If I might suggest another possibility...If you're switching lower voltages, and low current, you could use a PIR Motion Sensor like we use in the Security Alarm industry.· For new designs I have purchased some of these on eBay for $10-$15.· They're basically the same setup, except they don't latch their output, it switches as motion is detected, but you could let the BS2 handle that.· Most require 12VDC to run.



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

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • tmatma Posts: 27
    edited 2005-01-15 17:25
    I hacked a suplus lawn light control that operates at 12V DC. Its output is 12V DC when an object is detected 0V otherwise.
    The unit has two controls, light level, and hold time.
    Try looking at outdoor lawn or garden lighting in your local hardware store for this type of controller.
    The one I found was marketed by Merlin.
    tma
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-15 20:10
    A friend of mine uses this PIR sensor with BASIC Stamp micros -- it runs on 5 volts and provides a TTL output:

    http://store.yahoo.com/webtronics/movdetas.html

    k76_1_100.jpg


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • MikeSMikeS Posts: 131
    edited 2005-01-16 03:38
    cogburn,
    HVW technologies sells a PIR like the one Jon showed. I used it in an application where it would trigger a wildlife camera for taking pictures of critters at night. Worked great.
    Can be found here[noparse]:http:[/noparse]//www.hvwtech.com/pages/products1a.asp?CatID=10&SubCatID=47
    about $11.00

    Mike S

    btw-I agree with your observation of students.
  • CogburnCogburn Posts: 62
    edited 2005-01-16 13:50
    Hey thanks much guys.· I will order a couple of these things.· I can think of a lot of uses for them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Showing up to school doesn't·mean you are a student any more than crawling up in an oven means that·you are a biscuit.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-01-16 18:29
    Jon & Mike have proven once again, that someone asking a question can help more than one person...I wasn't aware of these motion sensors...Units this small could really come in handy!



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

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • tmatma Posts: 27
    edited 2005-01-16 18:39
    The detector mentioned by MikeS

    http://www.hvwtech.com/pages/products1a.asp?CatID=10&SubCatID=47

    looks like the way to go for new designs but you will also need a controller chip.
    The site also provides free downloads of App Notes and controller data sheet.

    I like playing with old stuff so I will contine with hackinf the lawn controllers I got for 50c each

    tma
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-16 19:17
    It's a self-contained device that provides a TTL output (high when active). The manual shows how to connect it to a microcontroller -- the BASIC Stamp being an EXCELLENT choice of microcontroller for a variety of applications.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
Sign In or Register to comment.