I'd like to know if anyone has had success detecting a warm-bodied mammal (ie. Human) using standard off the shelf, inexpensive sensors?

Ideally, I'd like to use an inexpensive sensor or combination of sensors to detect a person within a room and localize that person. I would like the robot to enter a room, detect if a human(s) is/are present and then move to the detected human. The accuracy does not need to be 100%, as cost is more of a factor. I'd like the computational requirements of such a sensor to be such that it can run on an Arduino, although if it's impossible, I'd be willing to utilize something with more horespower, such as a Raspberry Pi or a BeagleBone Black. I have a few thoughts; however, none of them are ideal:

  1. PIR Sensor - Can detect movement within a large field of vision (ie. usually 120 degrees or more). Might be the closest thing to a "human" detector that I'm aware of; however, it requires movement and localizing/triangulating where a person is would be very difficult (impossible?) with such a large field of vision.
  2. Ultrasound - Can detect objects with good precision. Has a much narrower field of view; however, is unable to differentiate between a static non-living object and a human.
  3. IR detectors - (ie. Sharp range sensors) Can again detect objects with great precision, very narrow field of view; however, it is again unable to differentiate objects.
  4. Webcam + OpenCV - Possibly use face detection to detect human(s) in a room. This may be the best option; however, OpenCV is computationally expensive and would require much more than an arduino to run. Even on a Raspberry Pi, it can be slow.
  5. Kinect - Using the feature detection capabilities of Kinect, it would be relatively easy to identify humans in an area; however, the Kinect is too expensive and I would not consider it a "cheap" solution.

Perhaps someone is aware of a inexpensive "heat-detector" tuned to body heat and/or has had success with some combination of (#1-4) above and would like to share their results?

  • $\begingroup$ Is it restricted to humans or should it recognize Mr. Ed too? $\endgroup$
    – ott--
    Commented Jun 5, 2013 at 19:30
  • $\begingroup$ Any warm-bodied mammal. It will be used indoors, so Mr. Ed shouldn't be there; however, if he were, he would be detected. =) $\endgroup$
    – Yahma
    Commented Jun 5, 2013 at 21:54
  • $\begingroup$ I have been led to understand (when I was seeking something similar) that the Kinect is actually not that expensive; however it does suffer from requiring a minimum distance to operate properly. Still for your requirement it might work and I am sure there is lots of code out there for it. $\endgroup$
    – Galahad II
    Commented Feb 12, 2015 at 20:50
  • $\begingroup$ What solution did you go with? Did you happen to find anything with a longer range? $\endgroup$
    – Crashalot
    Commented Oct 11, 2016 at 5:53
  • $\begingroup$ Actually i have a question. Can we detect human pulse rate using IR sensor in analog pins of Audrino? if so then how? please help me out $\endgroup$
    – sapana
    Commented Apr 25, 2017 at 16:00

6 Answers 6


A combination of a passive infrared detector (PIR) and sonar range finder (SRF) should do the trick.

What has worked well for me previously (not finding humans but very similar) was to have two PIRs on the left and right sides pointed so they have a little bit of overlap in the middle.
You can then figure out if the human is to the left, right or in front (when both are on). You basically then stack this on top of the SRF which will tell you range etc. It is a bit dirty and you have to make some assumptions, but it works well for it's simplicity.

The pseudo code for the 2 PIRs could be something as dead simple as:

amount = 60; //degrees
while (notCloseEnough)
  if (bothActive)
    if (leftActive)  
    amount = amount - 5;

    if (amount <= 0)
      amount = 60;


The idea is that you turn a lot to one side (60 degrees) if you see something in that area. If they are not in front of you after the turn, turn a little bit less to the side which you are seeing them. Keep repeating and narrowing the amount of turn until they are in front of you, then forward. Remember that you do not turn as much (reset the angle) once they are in front because the will not move 'out of scope' as quick.

I was genuinely amazed by how good this algorithm actually works (we used it for automated chase toys and had to slow/dumb it down because it would beat/catch a human controlled robot too easily).

Both sensors are available from Pololu (no affiliation):

Passive Infrared Detector
Sonar Range Finder

  • $\begingroup$ Can you post some pseudo code or further details of how using a PIR sensor & sonar would be able to detect and localize a person? $\endgroup$
    – Yahma
    Commented Jun 6, 2013 at 4:32
  • $\begingroup$ What would the range on this solution be? Could it be adapted to track people up to 300 feet away? And made to accommodate a field of view of 180 degrees with no moving parts? Thanks for this suggestion! $\endgroup$
    – Crashalot
    Commented Oct 11, 2016 at 5:52
  • $\begingroup$ The PIR data sheet doesn't list a range (pololu.com/file/0J250/SE-10.pdf), but based on the sensor size, it seems like the range would be limited, and certainly not something that can detect human movement 100-300 feet away? $\endgroup$
    – Crashalot
    Commented Oct 11, 2016 at 5:59
  • $\begingroup$ This worked well for small distances, maybe 2 - 3 meters (6 - 9 feet). I would also think that this algorithm would not scale well to bigger distances, e.g. as it really hinges on the fact that even a big 'error' or fluctuation can be corrected before the robot or the subject gets too separated. $\endgroup$
    – profMamba
    Commented Oct 11, 2016 at 21:26

A more recent sensor type that can be used are MEMS based temperature arrays by Omron (D6T range) or Excelitas (DigiPile). These, as opposed to PIR elements, measure absolute temperatures and thereby allow to distinguish between background and foreground temperatures and detect movement and static presences of temperature sources.

  • $\begingroup$ Do you know if these sensors could track people up to 300 feet away? $\endgroup$
    – Crashalot
    Commented Oct 11, 2016 at 5:51
  • $\begingroup$ I don't think that would work. I'd say maximum 5-10m. The resolution is quite low, so a person at this distance is just a small dot within one pixel. $\endgroup$
    – kjyv
    Commented Oct 12, 2016 at 10:18
  • $\begingroup$ Thanks for the reply! Beyond high-resolution computer vision, is there anything that would work for 300 feet? Since CV is so computationally expensive, could you reduce computational costs by coupling CV with other sensors like PIR (or thermal) to track people 100-300 feet away? $\endgroup$
    – Crashalot
    Commented Oct 12, 2016 at 19:25

A non-bare-metal solution that will probably become increasingly popular over the next few years would be to offload your heavy data processing task (e.g recognizing a human in an image) to a Cloud service. That's assuming your device is connected to the internet. Here is an example with the Raspberry Pi and the Google Cloud Vision API : https://www.dexterindustries.com/howto/use-google-cloud-vision-on-the-raspberry-pi/. Note that it requires a subscription to google cloud past a trial period, but some other cloud vision APIs (Amazon, Microsoft Azure, ... ?) may even offer their services for free if you submit less than N requests per month to their servers.

Yet another solution for heavy data processing on small platforms would be to offload the work to a thumbdrive-like device on your robot with a dedicated processor unit for running already-trained machine learning models (e.g Movidius Neural Compute Stick with the Raspberry PI: https://medium.com/deep-learning-turkey/a-brief-guide-to-intel-movidius-neural-compute-stick-with-raspberry-pi-3-f60bf7683d40 ). This works offline too. They're still a bit expensive for hobby projects but I expect their cost will go down like everything.


a capacitive sensor could work, it's really cheap to make, just aluminum foil and a few resistors, it can detect flesh but i'm not sure if iy doesn't detect anything but flesh, you can use 3 to triangulate

  • $\begingroup$ Huh? What would be the range on this? Millimeters? $\endgroup$
    – RoboKaren
    Commented Jun 25, 2014 at 14:13

I can't say whether this is easiest, but conceivably you could use the Eulerian Video Magnification library to detect the pulse of a person.

In that case, you would be looking for a fluctuation in the video that matched the expected range of human pulses. You would also need a clear image of a body part that exhibited the visible pulse.

There has also been some work (example 1, example 2) exploring hardware-based face detection. Digital cameras from a few years ago had this capability, which was essentially a highly optimized neural network designed to say "does this square contain a face or not"... then you just iterate over a set of predefined squares in the captured image.

  • $\begingroup$ Aww, you suggested the same thing I did while I was writing mine! Did you see the movie Screamers (1995) too? =P $\endgroup$
    – jzx
    Commented Feb 14, 2014 at 15:31
  • $\begingroup$ I've seen the trailer, but never the movie... good to know that I might be on to something. But what is Yahma up to? :) $\endgroup$
    – Ian
    Commented Feb 14, 2014 at 16:48

I tried using PIR but it has problems with handling and delays. It is not an efficient choice for human detection to be honest. You can use Capacitive Sensing Technique as it is the cheapest and easiest way for human detection(A smart choice) and it is less complex too. You can make a sensor for yourself at very low cost and it is good for small projects. I have used one in my "Human Detection Robot" Project. You can watch my video at: Capacitive-Based Human Detection


Your Answer

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

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