Slashdot Mirror


iOS App Acoustically Measures Distances Up To 25 Meters

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."

41 of 154 comments (clear)

  1. XO (OLPC) by itamblyn · · Score: 5, Informative
  2. Not impressive by girlintraining · · Score: 4, Interesting

    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.

    --
    #fuckbeta #iamslashdot #dicemustdie
    1. Re:Not impressive by grumbel · · Score: 4, Informative

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

    2. Re:Not impressive by Anonymous Coward · · Score: 2, Funny

      No no no no no. Apple first. Apple first. [rocks back and forth]

    3. Re:Not impressive by Solandri · · Score: 5, Interesting

      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.

    4. Re:Not impressive by hedwards · · Score: 3, Informative

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

    5. Re:Not impressive by Hartree · · Score: 5, Interesting

      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. :)

    6. Re:Not impressive by Anonymous Coward · · Score: 2, Insightful

      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... :) ).

    7. Re:Not impressive by Anonymous Coward · · Score: 4, Informative

      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, 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")

    8. Re:Not impressive by Anonymous Coward · · Score: 4, Interesting

      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.

    9. Re:Not impressive by poena.dare · · Score: 2

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

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

      bwahahaha

      today we can do it with iPads!

    10. Re:Not impressive by Nerdfest · · Score: 2, Funny

      Sometimes dolphins can be real assholes.

    11. Re:Not impressive by n01 · · Score: 2

      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.

    12. Re:Not impressive by fragfoo · · Score: 2

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

      --
      Sig? Heil
    13. Re:Not impressive by Kazymyr · · Score: 2

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

      --
      I hadn't known there were so many idiots in the world until I started using the Internet -Stanislaw Lem
  3. wait, dual-device mode? by Tyrannosaur · · Score: 4, Insightful

    I thought this was going to be a cool sonar thing- you'll need 2 iphones? get a tape measure...

    1. Re:wait, dual-device mode? by catmistake · · Score: 2

      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.

    2. Re:wait, dual-device mode? by n01 · · Score: 5, Informative

      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.

  4. Star Trek? by Anonymous Coward · · Score: 5, Funny

    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."

    1. Re:Star Trek? by cgenman · · Score: 2

      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."

  5. How about an echolocation app :) by TheLink · · Score: 4, Interesting

    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
    http://www.youtube.com/watch?v=GYWpxmcHTOc

    --
    1. Re:How about an echolocation app :) by tokul · · Score: 2

      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.

  6. This is news because it's on iOS, right? by QuasiSteve · · Score: 5, Funny

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

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

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

    1. Re:This is news because it's on iOS, right? by spire3661 · · Score: 2

      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.

      --
      Good-bye
    2. Re:This is news because it's on iOS, right? by wahaa · · Score: 2
    3. Re:This is news because it's on iOS, right? by QuasiSteve · · Score: 2

      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 your door" (because I guess some people don't just learn where it is after living somewhere for ages), etc.
      So whenever you needed a 'flashlight' in those times, just press any random button on your phone and you have your light - so you didn't need an app and you had a button to turn it on.. even though it was a side-effect.

      Then came the phones that had a small light bulb or LED that acted as a camera flash - they would often be used for illumination as well to aid in focusing. This means that on those phones, you would have a rather brighter light source than the screen if you could just get that light to turn on. Thankfully, for most phones, that just meant pressing the camera button. Yes, the camera 'app' would launch, but at least there was your light.
      On most Windows Mobile devices there were APIs to turn on the emitter or your app could just fake being the camera app without actually doing anything with the camera - and your app could be bound to a button and on the light would go.. another press and you could turn it off again. But you didn't really need this app.

      Then come the newer generation of phones, however. I'm going to assume it at least still has a dedicated camera button - but if it's an Android, that might mean you can't just press it.. you have to long press it. Next, the emitter isn't just always on anymore.. half-press starts illumination, until focus is acquired or couldn't be acquired, and it turns off again.
      So at this point, your makeshift flashlight-by-using-camera function has already been crippled. If you want a more continuous light source (aside from the screen, and the trend is dark backgrounds and displays become ever darker in the blacks, so that may not be a good option anymore) you'll have to grab one of the apps. If you're lucky, you can at least bind that to a button. In Windows Mobile that was something that was built-in.. bind any button to any app. On Android, at least? Not so much. You'll need another set of apps to do that.

      Now fast forward again and we're doing away with not just as many physical buttons as possible, but even the virtual buttons.. and remapping them is a no-no. Device makers are saying that buttons is far too confusing, too much freedom, too much power. Less buttons is more. So now you can't even bind an app to a button anymore, and for your makeshift flashlight to work, you'll have to just start up the flashlight app.
      Thankfully, you can at least still put that on the 'home' screen. Not that doing so is very useful when your device is locked.. you'll first have to slide a button to unlock it, or input a code/pattern/phrase/mugshot/fingerprint... at least until somebody makes a custom lock screen that has a flashlight option - if custom lock screens remain allowed, that is.

      But that's only part of your question... why do we need apps: because built-in functionality no longer caters to the need.
      The other part should be obvious.. why DOESN'T the built-in functionality cater to that need?
      Well, again, manufacturers are doing away with the buttons.. which means that whatever thing is going to turn on the emitter is going to be an 'app' anyway. A button would be infinitely more useful.. a button that would work even if the device were locked would be grand. But alas, it's a button and manufacturers are convinced buttons are evil.

      So why doesn't a 'flashlight' app at least ship with most devices? That's one I don't have any plausible answer to. I

  7. 2009 : Sonar Ruler by sugarmotor · · Score: 5, Insightful

    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
      * http://thenextweb.com/2009/08/20/amazing-iphone-app-lets-measure-distance-echoes-works/

    Happy measuring!

    --
    http://stephan.sugarmotor.org
  8. Re:Just use a damn tape measure! by hdd · · Score: 2

    "Please note that while the resolution of the measurements may be as low as 1mm, the precision usually is not. While I have taken great care to make the app as reliable as possible, there are simply too many factors affecting the measurement process and the precision. That is why I want to be clear about one thing: there is absolutely no warranty that the measurements taken with Acoustic Ruler Pro are correct"

    Another good example of incorrect usage of the word precision. In this case, the method is actually quite precious, as in measurements are very repeatable. What the author meant is that the accuracy is not very good. I tried out the app just now, at the range of 22 inch (width of my monitor), it under estimates the distance by 1 inch; and for something half an inch apart, it over estimates by over an inch. It is possible to measure the non-linearity using a control setup, but the result would be largely useless, as measurement of different items requires placing the item near the source and receiver, and this will likely change the acoustic behavior of the environment and affect measurement accuracy.

    --
    This Sig is removed due to factual inaccuracy
  9. "Novel"? Really? by pipedwho · · Score: 3

    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.)

    1. Re:"Novel"? Really? by pipedwho · · Score: 4, Informative

      Keep in mind that all that 'specialised equipment' evolved out of a need to improve the simpler predecessor systems.

      Sonar and sonic range finding systems use all that 'extra equipment' to achieve ranges far in excess of 25m and in mediums much more variable than air. The impulse response of miniature consumer grade condenser microphones and speakers are more than adequate for air use within an octave of the audible spectrum. The speakers in the iPhone are primarily limited by their output power, and the fairly omnidirectional nature of the microphones may lack overall sensitivity, but both are simple parameters that really only end up reducing total available range and accuracy (as compared to specialised custom hardware using the same algorithmic solutions).

      Applying the same design principles that would normally be applied to a specialised system design to an iPhone implementation, would be very unlikely to provide anything unknown to someone in the industry. This is very similar to early stage engineering "proofs of concept" that are used to test various parameters within a system design, without the interactive complexity of implementing the entire system.

      There is nothing within this extremely simple setup that hasn't been done as part of a larger system design. A single (consumer grade) speaker + microphone used in transmissive, active echo, or for passive echolocation is not unusual. Considering the iPhone has excessive processing capability to implement all the standard approaches (correlation, convolution, deconvolution, filtering, impulse response measurement, etc), there is no real need to be 'clever' as such.

      'Back in the day', when trying to do this with a 10MIPS DSP in real time with moving objects, it was much more important to come up with better algorithms and shortcuts. Of course, this could otherwise have easily been done with standard theoretical methods and a modern processor a hundred times more powerful.

      I see patents pop up all the time that describe things that are far from novel. Most of those patents are usually 'invented' by people with no real experience in the given fields. ie. Ideas that seem like earth shattering discoveries to the uninitiated, but are really just standard techniques used by properly skilled engineers.

      I'm not saying that this iPhone app is bad/good, just that it is VERY unlikely to contain any actual improvements to the current state of the art (or the state of the art 20 years ago for that matter). I say this, because there is no real need to do anything new to achieve the results that they are claiming.

      BTW, in the past I've worked on sonar/radar systems for air, ocean and rock. The biggest problem in 'noisy' environments is a lack of output level. Multipath isn't a major problem for a point to point (ie. line of sight, shortest path) ranging device - unless you're talking about wave guide shapes/sizes over long distances.

  10. Stand-alone by soundguy · · Score: 3, Insightful

    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.

    --
    Nothing worthwhile ever happens before noon
  11. Re:Just use a damn tape measure! by DrgnDancer · · Score: 4, Insightful

    One suspects that the primary use case for this application is not, "Hey, we need to measure this, let's go get two iPhones!" It's "Hey we need to measure this and happen to have two iPhones, but no tape measure." Most people carry their phones around with them all the time, but unless they're contractors don't carry tape measures. The point of near ubiquitous mobile computers is that you can use them for lots of things. This is a cute and clever thing that you can now use them for.

    --
    I don't need a million points of light, just two points of multi-mode fiber and a 10 Gig-E router.
  12. Re:Nifty by bonch · · Score: 5, Insightful

    So Slashdot can't report on anything, ever, if it's for sale somewhere. Got it.

  13. Frequency? by wisebabo · · Score: 3, Interesting

    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).

    1. Re:Frequency? by Anonymous Coward · · Score: 4, Insightful

      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.

  14. Re:Just use a damn tape measure! by artor3 · · Score: 2, Interesting

    No, the primary use case is "oh, this is nifty, let me play with it". The accuracy is nowhere near good enough for any measurement that actually matters.

  15. Re:Just use a damn tape measure! by Ol+Olsoc · · Score: 2

    Tape measure? Where do I get that app?

    --
    The shepherds did so well protecting the flock that the sheep no longer believed that wolves existed.
  16. Re:Just use a damn tape measure! by BitZtream · · Score: 3, Insightful

    You could measure room wall lengths close enough for basic estimates on how much paint to buy or fence length estimates and such where you don't need cut to fit accuracy.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  17. Re:Nifty by zevans · · Score: 3, Funny

    I strongly prefer empirical methods in this case.

    --
    "... and more and more now there are all kinds of electronic goodies available" -- Pink Floyd 1972
  18. Re:Just use a damn tape measure! by GrumpySteen · · Score: 2

    You can get enough accuracy for buying paint and fence length by counting your steps.

    You have to walk from one end of the measurement to the other whether you're counting steps or just putting the phones in place, but you don't have to walk back to the starting point to pick up a phone, however, so the entire process is easier and faster if you just count steps.

  19. Re:Just use a damn tape measure! by GrumpySteen · · Score: 2

    The prostitute that laughed at you and said "that's not even four inches" doesn't count.