21

I've been eyeing using an Ultrasonic distance sensor for an upcoming project; either the Parallax Ping or the OSEPP Ultrasonic sensor (I think they are identical other than branding).

Ex: https://www.parallax.com/product/28015

My concern is, this will be used at home where I have pets. I don't wish to injure nor annoy my pets.

Will the ultrasonic sensor cause problems for the pets? Should I instead use something different such as an infrared sensor?

(I'm mainly concerned about cats and dogs, although would be curious about other types of pets such as birds, etc...)

SnakeDoc
  • 377
  • 2
  • 9
  • 2
    This doesn't answer the question, but I've stopped using ultrasound and am mainly using [IR distance sensors](https://www.pololu.com/category/79/sharp-distance-sensors) (as you mention) due to ease of use and other factors. – Wesley Lee Nov 14 '16 at 20:29
  • Infrared will "annoy" some reptiles:) – Eugene Sh. Nov 14 '16 at 20:30
  • @EugeneSh. -- How? I'm genuinely curious. – Wesley Lee Nov 14 '16 at 20:31
  • 1
    @WesleyLee Well, maybe not really annoy.. but some snakes are seeing some of IR. – Eugene Sh. Nov 14 '16 at 20:32
  • 12
    Ask your pets: try the sensor with them present some distance away from it and observe any reaction. If they show no reaction but avoid the area, I'd say that it was bothering them. If someone subsequently posts here asking how to silence ultrasonic sensors then remember that - on the Internet - nobody knows you're a dog. – Andrew Morton Nov 14 '16 at 20:50
  • 1
    Depending on the range you need, the HC-SR04 sensors available from Amazon et al are MUCH cheaper. I've used a number of parts from Elegoo, which have sell 5-packs of sensors for less than USD10 as of this comment. – Wexxor Nov 14 '16 at 21:58
  • @Wexxor, Dang... I haven't looked at prices for way too long... $3.80 for two (and free shipping)... < $1 each on eBay. – Makyen Nov 15 '16 at 06:33
  • I know this is an ooooold question, but someone is poking around here today, and here is something: the same sensor is on ebay for less than $2. https://www.ebay.com/sch/i.html?_from=R40&_nkw=ultrasonic+distance+sensor&_sacat=0&_sop=15 – AnalogKid Mar 31 '22 at 02:45

7 Answers7

8

That part appears to use a frequency of ~40 KHz, fairly normal from what I've read for ultrasonic detectors or that sort. According to this chart on Wikipedia, that falls within the hearing range of quite a few animals, including cats and dogs. Does that mean using that part will be painful? Bothersome? Just slightly annoying? I dunno. :)

Curt Nichols
  • 211
  • 1
  • 3
  • 1
    I don't think the intensity is high enough to cause any harm or pain. Around 150mW max? Pulsed? I would say negligible. – Eugene Sh. Nov 14 '16 at 20:38
  • When I was a young lad I went to a trade show where ultrasonic welders were on display. The sound was absolutely deafening- very unpleasant. The grups heard nothing. – Spehro Pefhany Nov 14 '16 at 20:40
  • 2
    @SpehroPefhany Well, bats have a very special relationship with the ultrasound. – Eugene Sh. Nov 14 '16 at 20:53
  • @EugeneSh. What are you implying? ;-) – Spehro Pefhany Nov 14 '16 at 20:56
  • @SpehroPefhany Only that it is rather uncommon to have a pet bat. Having a pet bat and some ultrasonic sensors around is even less common. – Eugene Sh. Nov 14 '16 at 20:58
  • 1
    @EugeneSh. Ah, I thought you were implying that since I could hear 'ultrasound' I was a nocturnal insectivore, which would not be entirely true. – Spehro Pefhany Nov 14 '16 at 21:06
  • 1
    @SpehroPefhany Oh.. now I see that I've just replied the wrong guy. Anyway, are you the Batman? – Eugene Sh. Nov 14 '16 at 21:07
  • 1
    32 KHz is fairly common, too. According to Wikipedia, cats can hear to 64 KHz, so doing your own animal testing is warranted. – Wexxor Nov 14 '16 at 21:56
  • I would think that for normal animals, this is no big deal. For bats, where ultrasound is everything, it would be very disturbing. – Scott Seidman Nov 14 '16 at 21:58
  • 2
    @EugeneSh. About the power rating, 150mW of acoustic energy is really loud! (though I've forgotten the actual conversion to dBSPL) The reason that sounds odd to us is because we're used to maybe 1% efficient transducers that would require about 15 watts input to produce that output at a humanly useful frequency. However, efficiency goes up dramatically for higher frequencies and again if it's actually designed for "one-note" operation. So...how loud is that again? – AaronD Nov 14 '16 at 22:56
  • @AaronD Really? I suppose you are right as you sound confident, while I am not :) – Eugene Sh. Nov 14 '16 at 22:57
  • 4
    @EugeneSh. A bit of googling turned this up: http://www.sengpielaudio.com/calculator-efficiency.htm So 1W acoustically (or from a 100% efficient transducer) is 112dB SPL at 1 meter away. 150mW would thus be 104dB at that distance. – AaronD Nov 14 '16 at 23:01
  • 1
    Yeah, pretty loud. By [this chart](http://www.audioholics.com/frequent-questions/relationship-between-watts-and-dbs) it's about accelerating motorcycle from 5 meters.. It would cause some discomfort to me... – Eugene Sh. Nov 14 '16 at 23:04
  • @AaronD I am open to re-evaluating answers for acceptance, if you write something up. I'm looking for more than what the current answers provided - and you seem to be on the right track. – SnakeDoc Nov 14 '16 at 23:41
8

You're concerned about it being too loud for things that can hear it. Well, at 5V/35mA, the sensor that you mentioned consumes an average of 175mW while operating. Not all of that gets converted to sound, of course, but we can get a rough idea of what we're working with by assuming that it does.

According to this site, 1W of purely acoustic power is 112dB at one meter away from a point source. That is, 1W spread over the surface of a 1m radius sphere would measure 112dB at that surface. Considering that we only have 175mW instead of 1W, that's \$112dB+10dB*log(0.175) = 104.5dB\$, still on the surface of a 1m sphere.

Now we have two conflicting modifiers:

  1. There are other functions besides the transducer, which itself is less than 100% efficient, so we actually have less than 175mW of acoustic energy to convert to dB.
  2. It's actually a spherical section (cone with a round base), not a complete sphere, so the same power is spread over a smaller area and is therefore more intense at the same distance. (in RF, this is called "antenna gain")

The relative strength of those modifiers is up to you to figure out, with a few guidelines:

  • "One-note" or resonant design goes a long way towards ideal efficiency.
  • A large transducer compared to the wavelength being produced increases both efficiency and directionality.
    • This is why subwoofers need ridiculous amounts of power and can be heard everywhere while tweeters are pretty much the opposite. What you've got is practically a "supertweeter".
  • For a point source (expanding sphere or spherical section), you lose 6dB for each doubling of distance, simply because the area that it's spread over increases at that rate.
    • For completeness, a line source (expanding cylinder or cylindrical section like a highway or line-array speaker set) loses 3dB because the area increases more slowly, and a plane source (large surface like a wall, ceiling, or floor) doesn't lose any because the area stays constant. But at some distance relative to size, all finite-sized sources in open space eventually reduce to point sources and so they all ultimately revert to the 6dB rule.
AaronD
  • 5,596
  • 10
  • 36
4

I knew a bat researcher. When our facility installed occupancy sensing light switches, the bats went absolutely bonkers, and they had to remove all the sensors in that hallway.

That said, this is ultrasound, and not many animals hear into the ultrasound.

Scott Seidman
  • 29,274
  • 4
  • 44
  • 109
1

https://www.ncbi.nlm.nih.gov/pubmed/4066516

That says cats can hear up to 85 kHz

Kot789
  • 11
  • 1
1

I'd say, do not use it for anything where usage is continuous. Even a quiet barely-heard noise can be disruptive to sleep patterns. (I should know, I have been left with mild tinnitus by a recent ear infection. I'm told I'll either recover or get used to it, and it could of course have been very much worse)

If usage is for brief periods, then if the pets don't react to it by showing fright or leaving the area, it's "just a noise" (if that). If they aren't clearly distressed, just let them go elsewhere while you use the gadget.

nigel222
  • 641
  • 5
  • 10
1

I've been using the HC-SR04 sensor to turn on a water supply so my cat can drink from the mains water (he'll only drink running water...). It uses 40khz pulses and doesn't appear to bother him. He'll happily go over to it, trigger it and drink without any signs of distress, his ears don't turn any differently when near it.

YMDW
  • 113
  • 2
1

I realize this is a rather old question, but in reading the answers, I see two aspects that are omitted:

  1. Depending upon pressure and humidity, the sound will be attenuated by air. Typically, a 40 kHz TOF sensor will experience about 1 dB of atmospheric loss per meter.

  2. Also, the sensors burst only a few cycles of the sound with a duty factor on the order of 10% or even lower. Taken collectively, the max sound pressure level that is likely for a nearby pet is closer to 85 dB worst case.

I'd also like to point out that the Naval service of the world have done many studies over the past century to ascertain possible disruptions to aquatic life by their sensors. While this is in water and is aquatic life, the studies provide very valuable insight.

Charles
  • 121
  • 2