Shop OBEX P1 Docs P2 Docs Learn Events
Motion Activated Servo — Parallax Forums

Motion Activated Servo

ERYERY Posts: 5
edited 2008-09-18 17:36 in Robotics
I am working on several projects right now, one of them I am thinking of using the PIR Sensor to activate a servo whenever it detects motion. A couple things I need to know before hand. What is the field of detection for the PIR Sensor, does it detect in a complete hemispherical area (for example if I placed it horizontally with the hemisphere of the fresnel lens facing straight up towards the sky, would it detect motion approaching for the sides?). Also what other components would I need for this to function (i.e. microcontroller, power supply, etc.). Thanks!

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-09-17 19:46
    ERY,

    The PIR has a pretty wide field of view. All you’ll need to do is write some code to check the state of an I/O pin and move the servo where you want based on that state (1 or 0). If it just needs to move to one position when something is detected and back when it is not that is pretty simple, however if you need it to stay in position for some time you will have to add the delay. Yes, you’ll need a microcontroller, power supply, servo and PIR sensor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-09-17 20:19
    While the PIR will signal when something is in a WIDE field of view, having recieved the PIR sensor signal you might then want to use a Ping sensor (in addition) to locate the item more closely. The Ping sensor also looks like "eyes", which can be quite handy.
  • ERYERY Posts: 5
    edited 2008-09-18 11:43
    I would just need the servo to move one position. About the power supply, I wanted to hook it up to a battery holder which uses 6 AA batteries. Would that be well suited for this application?
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-09-18 12:09
    *6* AA Batteries? x 1.5 volts == 9 volts? That's quite high. I'm pretty sure 9 volts will do bad things to your servo.

    4 Alkalines is more usual, sometimes 5 NiMh is used to get the same voltage. (Alkalines get 1.5 volts each, NiMh get 1.2 volts each. Pain in the butt, but there it is.)

    And usually 7.5 volts is the MOST a servo will take without damage.
  • ERYERY Posts: 5
    edited 2008-09-18 13:12
    Ok, I was unsure of the volt limits on these components. Thanks.
  • SRLMSRLM Posts: 5,045
    edited 2008-09-18 17:36
    You could use a simple 5v voltage regulator very easily to get the required voltage. Just keep in mind the 1.5 amp capacity.
Sign In or Register to comment.