Shop OBEX P1 Docs P2 Docs Learn Events
Two PIR Sensors To Track Motion (Video) — Parallax Forums

Two PIR Sensors To Track Motion (Video)

Martin_HMartin_H Posts: 4,051
edited 2012-01-23 12:44 in Robotics
I had an idea a few weeks back that two PIR sensors mounted left and right might be able to detect the presence of motion and the rough left or right direction of that motion. So I bought two of them and yesterday I hooked them up to the trusty CBA. When the robot is stationary it works like a champ. When the robot turns to follow the motion, its own motion can confuse the PIR sensors, but as you can see from the video it did eventually locate me.

[video=youtube_share;OpT7QkyculE]

I think an improvement I need to make is ignore the values of the PIR sensors while and just after the robot is moving. That should make it ignore its own motion and focus on motion of people.

Comments

  • TtailspinTtailspin Posts: 1,326
    edited 2012-01-21 09:39
    That is cool Martin_H

    Seems like you could just ignore the PIR's during wheel movement, and then read them when the Bot stops moving...

    Pretty cool either way.

    -Tommy
  • ercoerco Posts: 20,256
    edited 2012-01-21 12:38
    AFAIK, every time you move, you have to stop and let the PIR sensor normalize, just like when you first turn it on. It's essentially mapping the heat background first, then looking for changes.
  • lardomlardom Posts: 1,659
    edited 2012-01-22 08:11
    I want to get a robot to turn toward the direction of a sound. I want to place 4 mics in 4 directions and see what values I get. I'll start with any sound that meets a threshhold. If it works I will try to add Phil Pilgrim's Goertzel algorithm object. Below is an illustration of what I'm after.
    449 x 430 - 24K
  • Martin_HMartin_H Posts: 4,051
    edited 2012-01-22 17:00
    Lardom, that sounds like a fun project. It took me a few seconds to realize why you need more than two microphones, but I you need a way to determine if the object is in front or behind. You might be able to place the source fairly accurately if you can determine the relative amplitude in the different mics.
  • lardomlardom Posts: 1,659
    edited 2012-01-22 21:57
    Martin_H, yes it is mainly for fun. I'm tinkering with the idea of "Come here". Your video makes me wonder if I could get a robot to follow me. Another question is can I use ir to control the robot's distance from me?
    At any rate I tested a 'light to frequency converter' with a flashlight and decided that if I can get a similar level of sensitivity from an audio source then some interesting things could be done. Four electret mics are cheap and less complicated in my opinion than using a single microphone with a servo.
    If I discover anything of value I'll share it with the forum.
  • techberthtechberth Posts: 5
    edited 2012-01-23 12:44
    good share
Sign In or Register to comment.