Forgot your password?
typodupeerror
Iphone Apple

iOS App Acoustically Measures Distances Up To 25 Meters 154

Posted by samzenpus
from the new-tool-for-the-box dept.
n01 writes "A recently published app for the iOS platform uses the propagation of sound waves to measure distances of up to 25 meters in a dual device mode. The technique works through repeatedly sending a chirp signal from the master device to which the other (reflector) device synchronizes itself and then replies in a similar fashion. A novel combination of techniques has been engineered to enhance the robustness in noisy environments, such as using an optimum-autocorrelation-signal and semi-automatic frequency calibration together with an averaging over multiple cycles."
This discussion has been archived. No new comments can be posted.

iOS App Acoustically Measures Distances Up To 25 Meters

Comments Filter:
  • Now you to can be a space marine up until the point the aliens get to you and all you got for xmas was a stinking ipod...

  • Nifty (Score:1, Insightful)

    by Anonymous Coward
    But still an advertisement.
  • Not impressive (Score:4, Interesting)

    by girlintraining (1395911) on Sunday November 13, 2011 @03:12PM (#38042828)
    That's not very impressive. Anyone who has two devices that are syncronized to a common timing source (which most cell phones are) can accomplish this. You just say "I started transmitting at x and you received it at y. x-y/speed of sound at sea level = your result. Now if it could be done with one device, and use doppler effect,etc., to map out the room and roughly what's inside it (like in Batman) then we'd be getting somewhere.
    • Re:Not impressive (Score:5, Informative)

      by grumbel (592662) <grumbel@gmx.de> on Sunday November 13, 2011 @03:19PM (#38042876) Homepage

      Yep, neat, but not exactly ground breaking. The OLPC had such an application for the last few years.

      • Re: (Score:2, Funny)

        by Anonymous Coward
        No no no no no. Apple first. Apple first. [rocks back and forth]
      • by Kazymyr (190114)

        I have used a program that did exactly that on my WinCE PDA, over 6-7 years ago.

      • You can buy devices that do it standalone, with only one device. Home Depot sells them. They shine a laser for aiming and generate repeated clicks. They then listen for the reflection and give you a distance measurement using that. Works reasonably well. Have to use it in a somewhat quiet indoor space, and if you aim it at something that absorbs sound it doesn't work, but for all that it lets you get a quick and pretty accurate distance measurement for cheap.

        There are more expensive ones that use laser puls

        • I had one of the standalone ones, it was basically useless for anything other than measuring your distance to a perpendicular, flat, hard surface that wasn't too far away. If you use one in a long narrow room the echoes interfere with the reflected signal, if you point it at a bookshelf or a framed picture without glass the signal gets attenuated too much, and forget about trying to measure the distance between a couple of curved columns. I bought one of the laser ones to replace it and yeah it was like 4

    • by Anonymous Coward

      I seriously doubt they are using their clock times for this. Yes, they are synchronized to a common timing source, but to measure distance, you require sub-millisecond accuracy. Clock drift means the cell phone clock probably isn't that accurate, if it was even that accurate at the moment it was synchronized, which is also unlikely.

      • Re:Not impressive (Score:4, Informative)

        by hedwards (940851) on Sunday November 13, 2011 @03:59PM (#38043122)

        GPS containing units had better be able to do that or they'd never get your location down to something reasonable.

        • Re: (Score:2, Insightful)

          by Anonymous Coward

          Yes, but for example the iPod touch (for which this software is supposed to work) is not a GPS enabled device. But there is no need for clock synchronization anyway, the way they use their two devices. Since the second device replies after a certain delay, the first device just has to take into account that the time difference between signal and reply is twice the travel time plus the delay (and then correct for the offset introduce by microphone and speakers not being at the same place... :) ).

    • Re:Not impressive (Score:5, Interesting)

      by Solandri (704621) on Sunday November 13, 2011 @03:51PM (#38043086)
      Fun story. While I was at MIT/Sea Grant working on robot submarines, we'd lay an array of underwater beacons for navigation. To conserve power, they'd listen for a certain sequence of sounds from the sub, then reply back with their unique ping. The sub could measure the time it took to receive each unique ping, and thus determine its position by using the ping times and knowledge of where the beacons were. Kind of an underwater GPS. The beacons could last a year or more when used like this, which was a big deal because it was really annoying to locate and retrieve one just to load it with a fresh battery.

      On one particular deployment, we left the beacons because we were planning to return a few months later. When we got back, the beacons weren't working. We retrieved them and all the batteries were dead. So we recharged the batteries and redeployed them. After our tests were over, we left the beacons again. When we returned a couple months later, they were all dead again.

      Eventually we figured it out. The dolphins in the area had figured out the sound sequence used to make the beacons respond (probably just listened in on our sub). They thought it was pretty cool to get an acoustic response every time they used that code, so they'd been merrily chirping away during those months, draining our batteries.
      • Re:Not impressive (Score:5, Interesting)

        by Hartree (191324) on Sunday November 13, 2011 @04:09PM (#38043170)

        Mark Tilden tells a similar story about a prototype floor cleaning robot.

        It took some effort to find out why it worked when he watched it, but when he came home after being away, it was always sitting still in the middle of the room without having cleaned most of the room.

        The culprit: His cat would repeatedly trigger its collision avoidance sensor to make it turn away. It was a fun cat toy.

        It's hard to design against active maliciousness. :)

      • Re:Not impressive (Score:4, Interesting)

        by Anonymous Coward on Sunday November 13, 2011 @04:30PM (#38043246)

        That sounds pretty awesome. Do you know if anyone from the biology department at MIT went back there to study that behavior? Since dolphins already use echolocation to navigate, I just wonder if they were doing more than amusing themselves, and actually managed to adapt to use the beacon system for their navigation. I'm not a biologist, and don't know much about dolphins, so I don't know if that's feasible or not, but it would be pretty amazing.

        • Re: (Score:2, Interesting)

          by DriedClexler (814907)

          They didn't, because the story is bullshit.

          • How do you know that? Serious question -- b/c the story is a good one and if it's BS I'd like to know.

            • Burden of proof. If this were real, we would have links now. In the absence of evidence, we side with "don't believe the dubious claim". That's why I'm not asking you how you know there's not a monster under my bed, because if the monster is BS, "I'd like to know".

              • Thanks. Here is just a request from one of the teaming masses - I'd have preferred if you had said "this story is probably BS." Saying it's BS makes it sound like you have some fact or evidence that falsifies the claim, like a snopes report or personal knowledge. I wouldn't compare his story to monsters under the bed, but I do agree it has some traits in common with an urban legend.

        • by tehcyder (746570)

          That sounds pretty awesome. Do you know if anyone from the biology department at MIT went back there to study that behavior? Since dolphins already use echolocation to navigate, I just wonder if they were doing more than amusing themselves, and actually managed to adapt to use the beacon system for their navigation. I'm not a biologist, and don't know much about dolphins, so I don't know if that's feasible or not, but it would be pretty amazing.

          Unfortunately, when they went back the dolphins had all been executed by Navy SEALS for reasons of national security.

      • Re: (Score:3, Funny)

        by Nerdfest (867930)
        Sometimes dolphins can be real assholes.
      • by fragfoo (2018548)

        I'm curious, how did you figured out it was the dolphins fault? You found interactions in sound recordings?

    • Re:Not impressive (Score:4, Informative)

      by Anonymous Coward on Sunday November 13, 2011 @04:19PM (#38043206)

      You just say "I started transmitting at x and you received it at y. x-y/speed of sound at sea level = your result.

      And then "your result" has at minimum a wavelength or two of precision, which sucks mightily at audio frequencies. This is why they use a nonperiodic (in this case chirped) waveform and correlation instead of "I started transmitting". You could have read this [wikimedia.org], at least, before making an ass of yourself.

      Not that it's so novel as they try to make it sound, either -- SONAR and RADAR guys did all that long ago, and you'd get the basics needed to implement it in your first semester of DSP in any EE program. In fact, if they're even doing "semiautomatic frequency calibration", they're obviously using linear chirps -- exponential chirps are relatively immune to Doppler or other frequency shifts, and since there's no analog design, are no harder to implement -- suggesting they haven't had (or slept through) any formal education in the field.

        It just bugs me when people who know even less run down every decent, if not outstanding, project like this with their own mix of even lamer approaches ("just as good!") and pie-in-the-sky fantasy ("then I'll get excited")

    • Check out these pix... incredibly impressive (or not?)

      Acoustic Location and Sound Mirrors: http://www.aqpl43.dsl.pipex.com/MUSEUM/COMMS/ear/ear.htm [pipex.com]

      bwahahaha

      today we can do it with iPads!

      • by sifi (170630)
        Thank-you for this - it made my day!

        Please can we ban radar and bring them back immediately.
    • by n01 (693310)
      Please watch the second video, it shows how the app can be used with just one iOS device and headphones.

      I agree that by having the clocks exactly synchronized this could be a lot easier. (But even 1 ms of deviation means an uncertainty of around 34cm.) The challenge was to do it without having the devices synced by an external source (it works on iPod touch devices and iPad as well) and without using a communication channel other than sound.
    • Seems impressive enough to me, maybe a bit useless though. Thinking of alternatives, it might be possible to do it with image recognition as well. Judge the distance by the size of the target iphone or whatever.
    • by milkmage (795746)

      well.. it's not doppler but Batman isn't real anyway:

      Single device (headphone) mode:

      This mode works on the iPhone 3GS (and newer), iPod touch 3rd Generation (and newer) and on all iPads. You either need one of those devices and headphones with a mic or headphones without a mic and a iOS device with a built-in mic (excluding the iPod touch 3rd Generation). The resolution in this mode is 1mm or 1/10 of an inch, depending on the unit system you have selected.

  • by Tyrannosaur (2485772) on Sunday November 13, 2011 @03:12PM (#38042838)
    I thought this was going to be a cool sonar thing- you'll need 2 iphones? get a tape measure...
    • by polymeris (902231)

      I thought so, too.
      The sonar thing sounds difficult. Less cool, but potentially easier: use the camera's autofocus. How accurate could that be?

      • by zevans (101778)

        The autofocus in {smartphone} doesn't measure distance. It does it heuristically using sharpness of image. When you touch an off-centre subject on the screen of an iPhone you are telling it "make this bit of the image sharper than any other part" and it figures out the "best" way to do that. It has no clue whether that's 1 foot away or whether it's the moon.

    • how is this news? what I don't get... there have been acoustic tape measure apps on AppStore for a couple years now (just search AppStore for tape measure).... and none of them require more than one phone. I have expect to see a slashdot summary soon announcing the new development of the combustion engine.
    • by n01 (693310) on Sunday November 13, 2011 @05:01PM (#38043394)
      You can also use the device in a single device mode (with headphones), as shown in the second video. I just thought that the dual device mode would be more interesting and therefore emphasized it in my submission.
    • by LWATCDR (28044)

      This could be really useful for navigation inside a building. You could position transponders like this in say a mall or warehouse store and integrate it into a app.
      Need to find the nearest restroom? Need to find Bed Bath and Beyond.
      Where can I buy spray paint? It would have to use sounds outside of human hearing to not drive people nuts but it could be very cool.

  • Star Trek? (Score:5, Funny)

    by Anonymous Coward on Sunday November 13, 2011 @03:15PM (#38042856)

    Weapons Officer: "Captain I can't get a fix on the enemies position."
    Science Officer: "We could try using an optimum-autocorrelation-signal and semi-automatic frequency calibration together with an averaging over multiple cycles."
    Captain: "Good idea."

    Me at home: "Who makes up this stuff."

    • by Skapare (16644)

      They didn't train the weapons officer to know to do this, yet he could just do it from those words?

    • by cgenman (325138)

      Weapons Officer: "Captain I can't get a fix on the enemies position."
      Science Officer: "We could try using an optimum-autocorrelation-signal and semi-automatic frequency calibration together with an averaging over multiple cycles."
      Weapons Officer: "You mean, use the auto-shootey?"
      Science Officer: "Use the auto-shootey."

  • by TheLink (130905) on Sunday November 13, 2011 @03:15PM (#38042860) Journal

    Some humans can learn echo location[1], but just wondering if we could have an app that sends clicks and chirps and processes the echos and creates a picture or 3D model.

    But it might need two or more "ears" to quickly build a 3D image of the environment.

    [1] http://www.youtube.com/watch?v=qLziFMF4DHA [youtube.com]
    http://www.youtube.com/watch?v=GYWpxmcHTOc [youtube.com]

    • by tokul (682258)

      if we could have an app that sends clicks and chirps and processes the echos and creates a picture or 3D model.

      I am not sound technician, but such app won't see the difference between open space and sound absorbing surface. Picasso might draw better 3d model than echo app given that different materials have different sound absorbing characteristics.

    • by Timmmm (636430)

      Yeah it's impossible with one microphone/speaker. Sorry batman.

      I suppose in theory (read: it will never work) you could do it if you have lots of phones in an area. And you beefed up the phone speakers a lot.

      • by cgenman (325138)

        The iPhone does have 3 speakers and 2 microphones. Most aren't particularly good ones, mind you, and individual addressability is a problem. It's really not practical. Add in a gps and camera, and it's not quite as bad as you make it out to be.

        Of course, using a camera properly would be cheating. But I'm a bit surprised nobody has done it on the iPhone.

        • by T-Bone-T (1048702)

          As an iPhone owner, I'm curious how you claim it has 3 speakers and two microphones. Did you mean 2 speakers and 1 microphone? I see an earpiece speaker and a bottom speaker with a microphone on the other side of the dock connector.

          • by ceoyoyo (59147)

            It's got an earpiece speaker, a bottom speaker (maybe the OP thought it was stereo, meaning two bottom speakers), the regular speaking mic and a noise cancellation mic. So two speakers and two microphones.

  • by QuasiSteve (2042606) on Sunday November 13, 2011 @03:18PM (#38042868)

    Because such an app already existed for PocketPC (That'd be Windows Mobile):
    http://nerdipedia.com/tiki-index.php?page=Sonar+CE [nerdipedia.com]

    Oh, and desktop PC:
    http://nerdipedia.com/tiki-index.php?page=Sonar&structure=index [nerdipedia.com]

    I hear there's a flashlight app for iDevices, too - Slashdot should really look into that. It's magical.

    • What I want to know is why do i need a 3rd party app to turn on the flash emitter? This is Doom 3 levels of stupidity regarding the utility of a light source.
      • What I want to know is why do i need a 3rd party app to turn on the flash emitter? This is Doom 3 levels of stupidity regarding the utility of a light source.

        You know, that's a good question. However, the answer has to be a bit three-fold.

        People have been using cellphones as makeshift flashlights pretty much since the first cellphones with a reasonably bright white screen came onto the market.. and why not, the screen was bright enough to navigate indoors, bright enough for the whole "finding the lock of y

        • by tomhudson (43916)
          Wouldn't it be smarter to, for the same $0.99, buy a combo laser pointer/led light keychain thingee, complete with batteries? You can also use it to tease the dogs and cats and enrage skunks (yes, skunks get REALLY mad when you try to tease them with a laser pointer, and will charge if you're not careful ... been there done that, left the vicinity asap while there was still a fence between us).
          • That depends on one's definition of 'smarter', of course.

            Is it a better light source and comes with additional perks (such as the laser pointer, maybe a UV-B emitter, too)? Yes.

            On the other hand.. it's an additional thing to carry. In combination with your keys, that might not seem so bad. On the other hand, the keys are prone to scratch them up. But there are models that have the emitters recessed within the body so that, even if aesthetically it ends up shredded, at least your beam would be fine.
            That d

            • by tomhudson (43916)
              Please re-read what I wrote. You don't need a battery charger - $0.99 includes the batteries - 3 coin cells.

              The emitters are recessed 1mm.

              Nobody's going to worry about keys scratching the aluminium surface of a 99-cent pointer.

              Now please consider a real-life scenario - you have the light on your key-chain, so you don't have to fumble around looking for both your keys AND your light. And if you drop it in the dark, you won't break anything.

              Winter is coming - it's a lot easier to drop a phone while we

              • Please re-read what I wrote. You don't need a battery charger - $0.99 includes the batteries - 3 coin cells.

                Which tend not to last very long. Yes, you can just buy new ones (or at $0.99 just buy a new keychain light). Not very environmentally awesome, but I realize some people find that rather shrugworthy anyway.

                Anyway, this is getting further and further from the discussion of why one needs flashlight apps on phones and the use of a phone as a flashlight in the first place.

                Best option? Get that $0.99 ke

      • Or you could use the built in camera app and turn on the flash...
      • by tlhIngan (30335)

        What I want to know is why do i need a 3rd party app to turn on the flash emitter? This is Doom 3 levels of stupidity regarding the utility of a light source.

        You can turn on the flash without a third party app.

        Camera App, click the thunderbolt and select "On". It defaults ot Auto, but you can have it forced on and off as well.

        Third party apps make it a little easier though - some do nothing but turn it on at launch and turn it iff when you hit the home button.

        It's for potentially improving photos, not as a

      • by Doc Ruby (173196)

        Is there an Android app (or, preferably, library) that can use the sonar to sense the size and rough shape of a whole room, making a 3D model? Maybe by correlating distance pings with the accelerometer (and GPS for added position context) while waving the device around.

  • Skynet: coming soon to an iPhone near you.

    • by Doc Ruby (173196)

      Can you believe that TCP/IP ping was named after the real world sonar ping that these apps are bringing to phones? Reality is so impressive when you use your brain.

  • by sugarmotor (621907) on Sunday November 13, 2011 @03:35PM (#38042992) Homepage

    This didn't seem to do that good of a job, but was 2 years ago.

      * Sonar Ruler, By Laan Labs: http://itunes.apple.com/app/sonar-ruler/id324621243?mt=8 [apple.com]
      * http://thenextweb.com/2009/08/20/amazing-iphone-app-lets-measure-distance-echoes-works/ [thenextweb.com]

    Happy measuring!

  • by pipedwho (1174327) on Sunday November 13, 2011 @04:04PM (#38043148)

    When I see the word 'novel' applied to techniques that have been used for decades, I smell 'patent lawyer'. And be extension: astroturf.

    Signal processing techniques applied to sonar (whether active, passive or beaconed) including signal correlation, spectral adaptation/equalisation, and filtering are standard fare in this field.

    Maybe by novel they mean "on an iPhone"?

    That being said, there is nothing that says this won't work - as it worked extremely well 20 years ago on dedicated systems with far less processing power. (Those systems, however, used multiple arrayed transducers and tailored beam patterns to significantly reduce the effective noise floor.)

  • Stand-alone (Score:4, Insightful)

    by soundguy (415780) on Sunday November 13, 2011 @04:14PM (#38043186) Homepage
    About 20 years ago, I had a hand-held device roughly the size of a smart phone but twice as thick that did distance measuring all by itself. It was infrared and as I recall, it was something like $25.00 from Rat Shack or Home Depot or some place like that. A 30 foot tape measure is about $8.00 and works a lot better.
    • Polaroid was selling ultrasonic sensors and an experimenters kit that could be used for this purpose thirty years ago. While there are definitely applications where this type of technology is useful, I agree that a tape measure works great for most purposes.
  • Or you can use a piece of string, as long as it's no shorter than 25m.
  • by Anonymous Coward

    ...seems a little expensive for a tape measure.

  • Gee! All you need is a 25 meter headphone cord for this to work.

    Everyone has that!

  • Frequency? (Score:4, Interesting)

    by wisebabo (638845) on Sunday November 13, 2011 @06:08PM (#38043744) Journal

    Is there any benefit to moving to ultrasonic frequencies? Other than making it inaudible (so you don't bother people but maybe dogs!), would this improve the resolution? Does the range decrease? Do consumer level devices cover such a broad spectrum?

    By the way, has anyone made an iOS or Android App that can record in the ultrasound (or infrasonic) ranges and change it so that we can listen in audible ranges? Might be neat to see/hear what the bats are doing!

    Also, how DO bats build up a good 3D map of their surroundings using just one "speaker" and two "microphones"? Do they send out beams or are their ears swiveling? And, with the limited amount of computing power on a smartphone, would it be able to duplicate it? A bat's brain doesn't seem particularly large and they are doing this FAST (on the fly, ha ha).

    • Re:Frequency? (Score:4, Insightful)

      by Anonymous Coward on Sunday November 13, 2011 @10:13PM (#38044984)

      Is there any benefit to moving to ultrasonic frequencies? Other than making it inaudible (so you don't bother people but maybe dogs!), would this improve the resolution? Does the range decrease? Do consumer level devices cover such a broad spectrum?

      As I mentioned in another comment, I've been experimenting with a similar application on iOS devices. Yes, consumer devices do cover ultrasonic frequencies, but barely. For average humans, ultrasound begins above 18 - 19 KHz, and devices with 48KHz range can produce up to 24KHz frequencies... in theory. The problem is that the commodity speakers/microphones in smart-phones are optimized for the human perceptual range, and since ultrasound is beyond that, the transducer dynamic range and/or the in-built signal processing conspire to significantly attenuate and distort ultrasonic signals. Using an iPad, in preliminary experiments, I could only get a range of ~5m using ultrasound, whereas these guys say they can go up to 25m.

      Moving to ultrasound also can affect resolution negatively. Since you're effectively using a much smaller bandwidth signal, your positioning accuracy reduces, on top of which, multipath problems get much worse. (Smaller bandwidth because by limiting the signal to ultrasound, you only get a bandwidth between ~18KHz and 24KHz for a 48KHz sampling frequency, and the iPad microphone strongly attenuates signals after the 20KHz range.)

      Also, how DO bats build up a good 3D map of their surroundings using just one "speaker" and two "microphones"? Do they send out beams or are their ears swiveling? And, with the limited amount of computing power on a smartphone, would it be able to duplicate it? A bat's brain doesn't seem particularly large and they are doing this FAST (on the fly, ha ha).

      Bat ears are highly specialized. This link gives a brief overview of how bats do echo-location:
      http://science.howstuffworks.com/environmental/life/zoology/mammals/bat2.htm

      I believe smartphones have, or will soon have, enough processing power to do the necessary signal processing if we can design the right algorithms. The problem is it would also need highly specialized audio transducers to get any useful signals, which may not necessarily fit into a smartphone form factor.

    • I (tried to) learn a lot from these postings (some of it was at the limit of my understanding though). I appreciate the information!

  • Can't a laser do this kind of job instead of sound?

  • At least say "I recently published an app for the iOS platform that" instead of "A recently published app for the iOS platform".

    Pretending it's something interesting you just stumbled across is being deceptive.

  • Is there an Android app (or, preferably, library) that can use the sonar to sense the size and rough shape of a whole room, making a 3D model? Maybe by correlating distance pings with the accelerometer (and GPS for added position context) while waving the device around..

What the world *really* needs is a good Automatic Bicycle Sharpener.

Working...