Cheapest Ultrasonic Range Finder

A ping sensor would see them, no matter what color they are.

That's because black absorbs IR (and a whole host of other frequencies in the visible range - hence, black); a ping-style ultrasonic sensor likewise has issues with non-uniform surfaces, and more seriously with soft objects like pillows (or other sound-absorbing material).

There is no one "do it all" sensor for ranging, unfortunately (with the exception of possibly LIDAR coupled with extensive mapping and processing - not something that is cheap or even doable with only an Arduino). So you need to combine sensors and then integrate the data that they produce so your system can gain a better idea of what is "out there".

As far as "cheapest":

Maybe not for the time it would take you to modify, but one of the best ultrasonic sensors you can get for very low cost is the Polaroid ranging module. Acroname sells these as kits, and they aren't cheap - but the same type of sensor was used in the old Polaroid cameras, and they were a favorite of hobbyist robot builders in the 1980s. You can still pick up such cameras in thrift stores if you look carefully, for generally a few (USD) dollars. Look for "Sun 660" or "Spectra" (there are other models that used them).

As I said, though, you have to do a bit of work to hack them to work with the Arduino; you can find articles on the Seattle Robotics Society website that detail this process, but the process won't work for the Arduino. The author of those articles, though, recently wrote an article for Servo Magazine (I think it was the June issue?), detailing how he converted his original hack to work with the Arduino. The only other issue with these units is that they tend to use a lot of power when pinging; up around 1A of current or so. They are meant for distance and accuracy, though, like what you would see when taking a photo. They have a fairly narrow cone (about 15 degrees to either side), too.

:slight_smile:

The URM ultrasonic range finder by DFRobot is a nice one. Good distance (~10cm upto 3~4 meters).
You talk to it over serial, but it offers digital triggering and even interupt triggered response (it will pull a pin high when something comes in a pre-set range).
Also, it is able to control its own servo when used through its serial interface.

I love this module to bits, the one I purchased was around $15 USD, so it appears to be on the same price level as the ping sensor.. just has more fun stuff.

PS: it is also capable of making temperature measurements, though I haven't been able to find out what type of values this returns.

wait what? ultrasound has problems with color?

oh I see thats not sonic, its light, well thats on topic

Yes, I know that it is not the same, and thats why I wanted to warn him about changing to another way of detecting. :wink:

There are some on ebay too http://cgi.ebay.co.uk/Ultra-Sonic-range-measurement-module-Arduino-ARM-/280553476250?pt=LH_DefaultDomain_0&hash=item41524a509a#ht_2846wt_905

They are also $14.50

And some at $9.95 http://cgi.ebay.co.uk/Arduino-Ultrasonic-module-HC-SR04-distance-sensor-/280583315555?pt=BI_Security_Fire_Protection&hash=item415411a063#ht_2004wt_932

Even one at $7.99 http://cgi.ebay.co.uk/Arduino-Ultrasonic-module-HC-SR04-distance-Detector-/220692595900?pt=BI_Security_Fire_Protection&hash=item33624dc4bc#ht_3152wt_1148

I am using them on my wifitank, and it had problems seeing black things, and allowed the children (must be under aged people who enjoy destroying other peoples things) to drive it into things.

Oh I dunno, I was trying to drive it over your shoes backwards :wink:

Oh I dunno, I was trying to drive it over your shoes backwards

Yeah, they only had two when I ordered them so only got some in front of it, but it will have one of those in each corner, plus a ping sensor in front and back... So it is going to be pretty safe...

Worst case I had was one driving it into the cat's food, then made a mess on the floor with it...

But for now, the tank is offline... working on the pan/tilt stuff for the camera, and adding 4 white leds so it can see in the dark...

Yeah, they only had two when I ordered them so only got some in front of it, but it will have one of those in each corner, plus a ping sensor in front and back... So it is going to be pretty safe...

That's what I guessed...
That's why I was doing it backwards :sunglasses:

working on the pan/tilt stuff for the camera, and adding 4 white leds so it can see in the dark...

Cool, gonna need some bigger batteries at this rate!

Mowcius

gonna need some bigger batteries at this rate!

It can run 5 hours on one charge right now... Soooo, I think it will do for now... hehe..

Will get auto headlights, so it will turn on when it is dark enough so it wont waste power.

And only when there are someone controlling it.

thought about making your own? its a 6$ per pair part with some simple electronics

Could you give me a link i'd love to try it out myself but again will it work ass the ping itself i mean using only three wires or would need more?

a proven DIY setup is the Asuro Ultrasound ranger.
e.g. http://letsmakerobots.com/node/7186

not sure it is cheaper, but at least you can buy in increments
(i.e. resistor by resistor; do not ignore shipping costs ;D )

My ping sensors arrived from Hong Kong today :smiley:

The ones I got was the 4 pin version, so I had to alter my code a bit...

Here is a little test code I made, and it seems to work perfectly. :slight_smile:

double ping(int outPin, int inPin) //Get CM to obstacle in front of the sensor
{
  long duration;
  pinMode(outPin, OUTPUT);
  pinMode(inPin, INPUT);
  digitalWrite(outPin, LOW);
  delayMicroseconds(2);
  digitalWrite(outPin, HIGH);
  delayMicroseconds(15);
  digitalWrite(outPin, LOW);
  delayMicroseconds(20);
  duration = pulseIn(inPin, HIGH);
  return duration / 29.0 / 2.0;
}

void setup()
{                
  Serial.begin(9600);   
}

void loop()                     
{
  Serial.print(ping(2, 3)); Serial.println("cm");
  delay(500);
}

It is using the digital pin 2 to trigger the sensor, and read the echo on the digital pin 3

I just ordered a ultrasonic range finder, myself. So I can start my robot project.

thought about making your own? its a 6$ per pair part with some simple electronics

Everything I have seen about homebrewing your own "ping" style sensor tends to reccommend having both a frequency generator and an oscilloscope in order to properly "tune" the emitter (for the frequency of the transducer); the same for the receiver (for optimum accuracy and distance).

I am sure you could "eyeball" it with minimal test equipment, but I don't know how well it would work...

Is there another method?

:-?

getting it to resonate "right" is easy.
it is like worrying about the sound of a tuning fork, no matter how you hit it, it resonates at it's natural frequency.
"about 40 kHz" is all you need to know to work effectively with them.

I tried a long time to produce varying frequency chirps using piezo, to no avail. what you receive back is the resonance frequency with a varying amplitude.

that reduces the optimisation to easy testing like "from how far you still detect an echo".

If anybody else has better info, I'd love to hear it !

ps I do have an oscilloscope, and indeed that comes in handy.
the arduino itself is usable as a frequency generator. maybe even as a replacement scope. using the adc is a challenge, but there is another way :
detect whether the signal is above a threshold voltage using the comparator, and compile a few runs at varying threshold values.
Sampling this way can be done at about 2 Mhz in a 16 Mhz Arduino.
you have about 512bytes = 512 samples x 8 runs. Aiming at about 10 samples per wave the max frequency would be 200 khz.
This assumes that the arduino knows when to start measuring, but that is easy when it is generating the chirp itself...

I wonder if I'll get a cheap sensor in my city :confused:

Well, you can do it a lot cheaper if you are willing to design and build your own sensors.

I just picked up a few ultrasonic transducers from (http://www.goldmine-elec-products.com/prodinfo.asp?number=G951) and am in the process of building my own range finder.

Anyway, they are on sell right now for 49c a piece. Can't beat that :slight_smile:

Seriously? That's awesome!
But by the time you post it to me, it'll be more than $15 again :stuck_out_tongue:
but thanks for the link!

The deal lasts till the 5th.... you still get some time.

Oops... spoke too soon. Just checked the website again, it seems that the deal ended yesterday...

Holy crap :frowning:
Thanks though :smiley: