go_away

Author Topic: Connecting two SRF02 Sonar sensors on iRobot  (Read 736 times)

0 Members and 1 Guest are viewing this topic.

Offline John LeeTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Connecting two SRF02 Sonar sensors on iRobot
« on: February 29, 2012, 08:41:16 AM »
Im trying to get readings from two different sonar sensors (SRF02) mounted on an iRobot Create.

However I keep getting results of both sensors as 1 (basically there is a clash in readings). I used srf02.h to change the address of one sonar, but I end up moving both sonars to the new address. I cant separate them !

Is there something im missing ? If you want more information please let me know and I will update this ASAP.

Offline chuckdaball

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: Connecting two SRF02 Sonar sensors on iRobot
« Reply #1 on: February 29, 2012, 10:04:40 AM »
Sounds like you have both sonars connected when you change the address.  In order to change it, you can only have one sonar connected to the device at a time.  Just hook up one sonar, change the address, and repeat with the other(or leave it to the default).
« Last Edit: February 29, 2012, 10:11:25 AM by chuckdaball »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 109
Re: Connecting two SRF02 Sonar sensors on iRobot
« Reply #2 on: February 29, 2012, 04:55:06 PM »
And looking ahead: make sure that you don't try to read both sonars at the same time. Since they send pulses of sound then one sonar can receive an echo from the other. So you need to do them one after another - allowing a pause in between. How big a pause? Google for the speed of sound - and allow enough time for one sonar 'ping' to die away before activating the next one.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here

data_list