2

I am working on a human following robot project and I am trying to achieve this with 1 Ultrasonic sensor that makes sure the robot won't crash into something and 3 PIR sensors that will detect human movement.

The robot has an Ultrasonic Sensor and a PIR sensor attached to the front and a PIR sensor attached to the right side and another PIR sensor attached to the left side.

If the front PIR reads HIGH, then the robot will move forward. If the left or right PIR reads HIGH, then the robot will start turning in a 360 degree motion to the left/right side and will keep on doing so until the front PIR reads HIGH, and the robot moves forward again.

I am currently working with this build and I am having issues with the sensors. Sometimes they read HIGH when they shouldn't and sometimes they read LOW when they should be reading HIGH.

So my question is, what can I do to help the PIR sensors with getting the correct reading and is it possible to do so while the robot is turning?

Also, how will calibration work here? Am I able to let the robot turn slowly in 360 degree motion so the 3 PIR sensors will be calibrated with the rooms surrounding or is this a dumb question? If so I'm sorry, I am pretty new to PIR sensors.


UPDATE:

Thanks for the help everyone. I have now replaced the side PIR sensors with Ultrasonic sensors. I have kept the front PIR sensor though. It is working a lot better than with the side PIR sensors and I thank you all for your input.

2
  • I don't think its fundamentally possible for a PIR sensor to tell the difference between the an object moving while the sensor sits still and a still object while the sensor moves.
    – BrettAM
    Apr 10, 2015 at 4:01
  • Same, I think that if you move a PIR sensor around, it's likely to detect 'movement'. I should do it with some distance sensors and then just track whatever is closest to you. So if you stand near the robot, it'll move towards you (and brake when he is close) So he will keep following you. (If you also implement these sensors at the 'sides'). Detecting movement, while moving yourself isn't really going to work. You could let the robot sit until he sees movement and then use range-sensors to track the moving object.
    – Paul
    Apr 10, 2015 at 7:04

2 Answers 2

1

Basically you have a robot and sensors that can detect movement. There is one caveat though. For the PIR sensors to (non false-positive) detect motion, they have to be stationary (as far as I know).

So with only these PIR sensors it's unlikely that you can track something well. Tracking something would be done best by using a range/proximity sensor.


The image below, seems to be a cute robot, with eyes. You could take 3 sensors and place them under an angle (one forward, one forward/left and one forward/right) [picture 2]. Or just have one that rotates (will be more difficult) [picture 1].

You would want the robot to start following anything that comes close (or when one of the sensors sees a difference in distance. And then the robot will try to keep that distance, brake when he gets closer, drive when he gets further.

If that's working, you can implement the sensors at the side, that if suddenly he loses track of the object/person, he'll adjust his alignment so that the middle sensor sees it again. This could also be done by simpler sensors [picture 3]

When the robot gets to close, and the other object doesn't try to run for quite a time, you can make him check for another target. (With a PIR or by rotating and stopping rotating to check range/pir)

I believe this solution is more applicable as with only PIR sensors, as it's usefull to know the range when you're following something. You don't want to bash into it.

Cute robot

3-directional ping

proximity sensor

2
  • Thanks for your answer Fuaze. I will go ahead and use Ultrasonic sensors instead of the PIR sensors then. I just wish I had done more research on PIR sensors before hand ^^.
    – Imayan
    Apr 11, 2015 at 14:35
  • No point, those PIR sensors can be used to detect the initial movement around the robot anyway, to decrease the amount of ultrasonic sensors needed. And to give a view all around the robot. And bet you can find another great use of the PIR sensors in another project! You already know how they work, which is great for further usage.
    – Paul
    Apr 14, 2015 at 16:37
0

Try using heat detectors(technically speaking, Infrared sensors) (along with >1 Ultrasonic sensors and PIR motion sensors for greater accuracy) with 1 ultrasonic sensor. Comment if you want more help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.