Shop OBEX P1 Docs P2 Docs Learn Events
Detect Human Height, Ping))) sensor? — Parallax Forums

Detect Human Height, Ping))) sensor?

dujoducomdujoducom Posts: 11
edited 2008-11-07 20:25 in General Discussion
Hello all, this is my first post! I have experience with the basic stamp and I'm just getting my feet wet with the propeller. My background is more in software programming than hardware. (Just thought I would introduce myself)

Anyway- I'm working on a project right now that involves estimating human height (amongst other things) and having some issues. I ordered a Ping))) sensor with some reservations (the manual mentioned possible errors with soft material (hair) and·irregularly shaped objects (head, hair, shoulders)). It works great for measing things that are flat or reflective, but it can't measure from ceiling to carpet or if someone is standing underneath it (I have it ceiling mounted).

I'm using the sample code for the propeller that came with the Ping sensor. Firstly, is there anything I can do to increase the accuracy of this sensor for my purposes (measuring human height)? I've tried averaging over 20 samples or so and that doesn't effect it at all for these soft objects.

If not, can anyone recommend another sensor or type of sensor that can get the job done? Will·ultrasound sensors·in general simply not work? I was looking at this one:·http://www.trossenrobotics.com/maxbotix-lv-maxsonar-ez1.aspx

It specifically mentions that "The MaxSonar®-EZ1 or the LV-MaxSonar-EZ1 will detect a person (an acoustically soft target) to 8 to 10 feet or more." but I'm still a little skeptical.

Maybe an IR sensor would work better? http://www.trossenrobotics.com/sharp-ir-distance-sensor-gp2y0a02yk.aspx

Serial communication or analog pulse width would work, hopefully I can get it running with the propeller without example code.

I appreciate any insights, and thanks for reading!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-24 16:47
    None of these things work very well. People in general and heads in particular (partly because of their shape and the presence of varying amounts of hair or some kind of covering) are terrible reflectors of sound or IR or visible light. The bit about detecting a person at 8 to 10 feet probably works because you have the whole front surface of a person reflecting the sound. Turn them at an angle or sideways and I'm sure the range will be much worse.

    I think that, to get any kind of accurate height estimate, you'll need some kind of side mounted sensor, even a mirror, so you can pass a moving narrow light beam (like IR) through the space occupied by the head and detect the height where the head stops and open space begins.
  • SRLMSRLM Posts: 5,045
    edited 2008-09-24 16:54
    Perhaps you could have an IR beam start at the top of the area, and make it's way down. When it's broken, then you know that is the top of the person.
  • DufferDuffer Posts: 374
    edited 2008-09-24 17:41
    Instead of trying to find a sensor that relies on detecting reflected energy (ultrasound, visible or infrared light, etc.),·take advantage of the fact that a human body will block most of the above energy sources and produce a "shadow" opposite the energy transmitter. If you have a sensor, or array of sensors, to detect the edge of this "shadow", you may be able to do what you want.

    Duffer
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-09-24 19:24
    dujoducom said...(trimmed)
    It specifically mentions that "The MaxSonar®-EZ1 or the LV-MaxSonar-EZ1 will detect a person (an acoustically soft target) to 8 to 10 feet or more." but I'm still a little skeptical.
    Bear in mind that detecting a person using sonar and measuring the distance with any accuracy are two different things.· The PING))) can detect a person too, but the readings will be erratic at best.· I would imaging they'd be much the same using this EZ-1 unit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • ZootZoot Posts: 2,227
    edited 2008-09-24 19:52
    Are the people just walking by, or do they know they are being measured? If the latter, you could have them wear a mortar-board, which would give you nice flat level target right at the top of their skull. Whether you were using sonar or IR, you could paint/coat the top of the mortarboard to give you more consistent readings if you needed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • dujoducomdujoducom Posts: 11
    edited 2008-09-25 00:27
    Hey, thanks for all the great replies, these are things I never thought of (especially being a software guy). I was hoping for it to be totally passive, they will know that they are being measured (so we could ask them to stand still or something along those lines) but as far as wearing some sort of headgear to aid the reflection... I'd like to stay away from that. I kind MIKE, SRLM & Duffer are on to something with the "detect what isn't there" model. I'll have to ponder that. Thanks a lot for confirming my suspicions about the ultrasound (or as duffer put it- "reflected energy") just not working for this application! I'll let you know what I come up with.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-09-25 14:19
    Well, this might be farfetched but I've never heard of anyone doing it before, so it might be fun to try.

    Consider that all primates like to look at themselves in a mirror. At each entrance, you set up a camera that faces the person as he/she walks in. They instantly see themselves on a large TV screen (which happens to be where the camera is positioned) and for a second or two they will gaze toward the camera. From right beside the camera an invisible infrared beam shines into their eyes, which reflects off their retinae. (Yes, like the red eye effect you see in some photographs.) Using the right filtration, you could isolate these reflections and measure their height. I'm sure you can find a formula that relates eye position to actual height of a person. In fact, I think the eyes are pretty much in the center of the head on most people. Most people will produce two such dots so you'll get some idea of how tilted they are. If you need to get them to look away so the next person coming up gets measured without interference from the first, use two TVs and switch their pictures so each moving primate stays interested in only his/her own visage.

    Well, it's just a thought.

    Mark
  • LeonLeon Posts: 7,620
    edited 2008-09-25 14:39
    Put a vertical line of IR sensors on one wall, with an IR emitter connected to a stepper motor or servo motor on the other wall so that the beam can be swept up and down. Constrain people to a fixed route with barriers or marks on the floor. When the beam is interrupted you sweep it up until it is detected again. Some simple calculations will give the height of the person quite accurately. It could be built into the barriers, of course, to make a self-contained unit. The persons being measured don't even have to stop for the measurement.

    It could be done purely in software with two video cameras (a group at MIT has done a lot of work in this area) but it isn't easy.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 9/25/2008 2:51:39 PM GMT
  • dujoducomdujoducom Posts: 11
    edited 2008-09-25 18:32
    I actually was able to find an old ultrasonic sensor that does the job! We had a polaroid ultrasonic ranging module lying around, I don't think they make them anymore but my colleague was able to find a link to an identical piece of hardware: http://www.acroname.com/robotics/parts/R14-SONAR1.html

    He thinks it works because of the high output of the device, but it goes right through your hair and apparently bounces off your head from what I can tell. I have to say it is pretty dang accurate. I'm not sure if it will be as good at pinpointing small objects as the Ping))) but at least it works for my needs (so far).

    Thanks for all the suggestions!
  • SRLMSRLM Posts: 5,045
    edited 2008-09-25 20:08
    Ah. So your sonar would work for Marge from the Simpsons...
  • dujoducomdujoducom Posts: 11
    edited 2008-09-25 22:02
    hehe, not sure about that one SRLM, I'll have to do some more testing. There will probably be a software override anyway, so if in some instaces it doesn't work it won't be a huge deal.
  • denodeno Posts: 242
    edited 2008-09-28 11:57
    I am using the ultrasonic sensor for Robo Caddy from www.senscomp.com....They have several units available, one will reach out 40 feet.· Unlike the PING))), the Senscomp transducers can be heard.· At a close distance, 2 to 3 feet, you can hear the 'clicking', which doesn't bother me, as I know they are working.

    Also, the transducer, that you found at Acroname is the same transducer from Senscomp. The Senscomp transducer I am using, I ordered from the same, but they are alittle pricy at about $80 each, but they work for my application...golfing is not a cheap sport.

    If you use that sensor, you will have to devote 2 I/O's to run it, unlike the PING))).· PULSOUT a trigger to the device, then the VERY next line of code, PULSIN to measure the pulse.· The time between the exacution of those two commands with the BS2 doesn't seem to matter very much in the accuracy of distance measurement.· Pretty close to the inch with a tape measure....

    Having said the above, the Senscomp transducer does have an internal trigger, but the stamp won't know when to start measuring the pulse....

    Deno
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2008-09-29 09:04
    Seems to me that if you have the ultrasonic device pointing down toward the floor from atop the head, you might get consistent measurements. After all the floor is a nice big reflective target. One could set something up that is similar to the mechanical device that one uses in a doctor's office.

    But then one might ask, "Why bother with the electronics?"

    It really is difficult to replace a tape measurer with an electronic tape measurer. The ultrasonic device is much handier to open doors, automate production lines, and auto-focus camera lenses.

    Of course it is still fun to use on a roving BOEbot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It's sunny and warm here. It is always sunny and warm here.... (unless a typhoon blows through).

    Tropically, G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
  • rjo_rjo_ Posts: 1,825
    edited 2008-10-02 04:01
    You did say an estimate... This would work.

    A scanning mirror... up and down. an IR LED set to a convenient frequency pointed into a projection lens(a lens from an old projector[noparse]:)[/noparse] ... and a bunch of IR Sensors on the opposite wall... all hooked up to one or more Propellers (depending upon how accurate and how fast you want to be)
  • Bob GrossBob Gross Posts: 1
    edited 2008-11-07 01:40
    The MaxSonar EZ0,2,3,4 products were developed and came out as a direct result of this use (i.e. measuring the height of a person). All of our sensors will work for this, and work quite well. The sensors were mounted at about 7.5 feet looking down. The person had to stand in a certain location just underneath the sensor. They used the PW output and some simple math.

    At the time we designed for a company, this line of kiosk type vending devices, that measured the height of a person (and weight and other things which MaxBotix had no part of). The company found them to be reliable, and could detect and measure the height of a child or an adult with ease. We developed the EZ2, EZ3 and EZ4 for this user as they were doing this in the presence of nearby clutter. All detected a person's (child to adult) head from above. Even so, I would recommend the EZ1 as best all around, but if you have clutter, select one with a narrower beam.

    Bob Gross
    CEO MaxBotix Inc.
  • skylightskylight Posts: 1,915
    edited 2008-11-07 20:25
    Passes straight through hair and bounces of the head smhair.gif you sure that its ultrasonic and not a microwave magnatron!! after all you want to measure height not cook someones brains tongue.gif
Sign In or Register to comment.