Let's Make Robots!

Ping))) or SRF05?

Krumlink's picture

I would like to get some sonar sensors, but I cannot decide if I should get the parallax PING))) or the SRF05?

 

Which one to pick?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hi..does anyone knows the resolution for the ping)))?..i'm looking for high resolution ultrasonic sensor. maybe someone can suggest me..
ndupont's picture
SRF05 PIN 15 ' use any pin for both trigger and echo
 
Range VAR Word ' define the 16 bit range variable
SRF05 = 0 ' start with pin low
PULSOUT SRF05, 5 ' issue 10uS trigger pulse (5 x 2uS)
PULSIN SRF05, 1, Range ' measure echo time
Range = Range/29 ' convert to cm (divide by 74 for inches)
 
 
 
Which... excepted the PAUSE 5 ... is exactly the same !
 
hope it helps 
 
ndupont's picture

what I use in all my programs:

ping PIN 15  

 (...)

Ping_Out:                               ' PING)))

  LOW Ping                              ' Force PING))) Line Low

  PAUSE 5

  PULSOUT Ping, 5                       ' Activate PING))) Pulse

  PULSIN  Ping, 1, distance             ' Receive Return Pulse

  distance = distance ** 2257           ' Calculate Distance in cm

  IF distance=0 THEN GOTO ping_out     'useful when running on low batteries

  RETURN 

MaltiK's picture
Sorry to bump this old thing but I was wondering what is the difference in code between the two?

 

TigPT's picture

what about LV-EZ2 ? no one that know this type of sensores can compare them!?

Thanks

OddBot's picture
I've bought a similar model, They are much smaller and have good output options. You can use the pulse width output if you run out of analog inputs or even serial. Since I haven't used any of the others I can't compare them beyond what the datasheet says.
TheCowGod's picture

Never used those Maxbotics sensors, but you linked to the datasheet in your earlier comment, and it's pretty well-written, so you can compare them yourself pretty easily.

Dan

Krumlink's picture
I will go for the SRF05, since it appears much better. Yes the PING))) is available at my local radiocrap store :p
TheCowGod's picture

They're really pretty similar. The SRF is a little better, but not by a huge amount. Here's a good informational page about the SRF05, and here's the product page for the PING))) which has a link to a useful PDF document.

The biggest difference is that the SRF05 has a range of 4 meters, whereas the PING's range is only 3 meters. Aside from that, the only other real difference is that the PING only has 3 pins so you have to use the same pin for input and output, whereas the SRF has 4 pins so it can operate in either mode -- either using the same pin for input and output like the PING, or using separate pins for input and output. The advantage of using separate pins is that it's a little faster -- when you're operating the SRF using a single data pin, it waits an extra 700 usec (0.7 ms) before sending its return pulse, to give your microcontroller time to switch the pin from output mode to input mode. So if you're using separate pins, you can get your results 0.7 ms faster. The PING has a similar delay -- it waits 750 usec before returning its echo pulse. And on the PING you obviously can't avoid the delay because it doesn't have the option of using separate pins.

Really, though, those 0.7 ms are pretty insignificant in the grand scheme of things. You shouldn't activate the sensor more often than once every 50 ms anyway, to avoid reading echoes from previous pulses, so the extra delay only makes it 1.4% slower at most.

So really, the range is the only difference I'd really worry about. In the US, the PING is available at your local Radio Shack, whereas the SRF has to be mail-ordered, so I'd probably go with the PING unless it's important in my project to be able to detect things between 3-4 meters away. But on the other hand, if you're not in a hurry (or if you're in a foreign country and have to mail-order it either way), you may as well go with the SRF, because it costs about the same and IS slightly more capable, and there's nothing the PING can do that the SRF can't.

Dan

TigPT's picture

thanks for the comparation.. so whats about that 2 and LV-EZ2?

Thanks dud