Author Topic: SRF05 weak range  (Read 895 times)

0 Members and 1 Guest are viewing this topic.

Offline VOneTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
SRF05 weak range
« on: September 24, 2012, 06:42:30 PM »
Hello Society of Robots,

I have an old SRF05 sonar range finder that should have a range of 1cm to 400cms.  It is working perfectly for distances of 4cm to 60cm, but gets nothing over 60cms - I am wondering if I have broken my sensor, or if someone else has seen this problem and perhaps found a solution? 

I have hooked it up to my axon, and I used the webbot library to configure it (which is a different set up than my old tutorial on the SRF05 running in 04 mode).

I am using the SRF05 in 05 mode with the single pin for trigger and echo.  I am using F6 for my pins.  And my code looks like this:

DISTANCE_TYPE cm = myDistance.getDistance();
rprintf("Sonar: %ucms /r/n", cm);

Anything over 60cms will instantly show 512cms ... so the output goes like this:

Sonar: 50cms
Sonar: 52cms
Sonar: 55cms
Sonar: 60cms
Sonar: 512cms
Sonar: 512cms
Sonar: 512cms
Sonar: 512cms

I can bring an object (I use a large flat book) closer and I get correct values once it is closer than 60cms (sometimes 65cms).

If this normal?  I was hoping to get at least 200cms out of it ...  Should I just get a SRF08 and use the SRF05 as the rear mounted sonar?  My voltmeter shows 5.02 volts right at the connections, so it is getting enough power.

Thanks for any help you can offer.  Searching google for "weak range srf05" has produced nothing.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: SRF05 weak range
« Reply #1 on: September 27, 2012, 08:33:14 PM »

I am wondering if I have broken my sensor, or if someone else has seen this problem and perhaps found a solution? 

At least it worked around 4 years ago, but only you can tell how it has been treated since then.

US sensors are piezos (only cut for a higher frequency than your run-of-the-mill buzzer) and the natural enemies of piezos are DC voltages, high temperatures and physical shocks, which all can depolarize them, or even cause breaks in the crystal in case of  DC, if the voltage is high enough. A partially depolarised TX will send out a weaker ping and a RX will receive less from a given amount of reflected signal.

Partial depolarizing will cause a response as you experience, as the max range depends on the signal being sent is powerfull enough to reach an object that reflects a sufficient amount to be picked up by the receiver and without known good parts, it's hard to tell if it's the TX, the RX or both that is weakened.

While I cannot be 100% sure if that is the cause in your case, your measurements support it - and if it is, there's no way to "recharge" them, but in case it's just stiffness or accumulated dust and grime, try running it for a day or two, by just letting the controller ping it continually, as fast as possible - if you measure the return signal at start and after an hour or two and it hasn't improved the received signal strength a bit, it 's probably a waste of time to continue though.

I have no experience with the Devantech US units, so I cannot say if it may be a software issue, or if it's even possible that it can be.

Searching google for "weak range srf05" has produced nothing.
Maybe try other search terms - strictly speaking, "weak" when talking distance is nonsense - "weak output" or "short range" might yield a better result.

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,166
  • Helpful? 111
Re: SRF05 weak range
« Reply #2 on: September 28, 2012, 08:28:44 PM »
Checked with my own SRF-05 and WebbotLib and getting precise ranges over 60cm.
Are you sure there isn't other stuff to upset it ie-
1. You aren't using any other ultra sound device whereby the srf05 can receive ghost echoes
2. What other devices are you using
3. WebbotLib uses the system clock to measure the echo pulse - so calling it in a place where interrupts are turned off (such as an interrupt service routine) is bad - as the clock is also turned off.

Have you tried just creating a new project using only the SRF05 and the example code generated by Project Designer to dump the values across the uart to your PC. Works for me.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline VOneTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: SRF05 weak range
« Reply #3 on: October 01, 2012, 10:53:56 AM »
Thanks Soeren and Webbot.

I am pretty confident in my code, and I also tried the raw generated code from the Project Designer (which is really, really amazing btw) and got the same results both times.

I think Soeren is right, and the sensor is old or damaged.  My wife says that my robot has collected more dust than the Roomba, which is quite the burn  ::).  But, now Vone is running around, and even with 70cm accuracy it is doing pretty good.   I will order another one to get the extra distance, and put this one on the back as a backup back-up sensor.

Thanks for reading and pointing me in the right direction!


Get Your Ad Here