How to connect a SRF05 to a SPIDER controller

Hello everyone!

This is my very first tutorial on LMR. I have spent a lot of time trying to connect a SRF05 to a Red Back Spider robot controller but in vain. But finally with the help of Dan M and ignoblegnome I got it working. Trust me for a begginer like me using a SRF05 on an arduino was a major achievement.

Okay now coming back to the tutorial, here is how the Spider controller looks like:

 

And this is a SRF05:

is.jpg

 

There are two ways of connecting a SRF05 to a board but I will show you the simplest one.

Turning the sensor back you will see a total of 10 pin holes , 5 on either sides:

srf05a.jpg

 

Firstly I want you to solder 5 male headers to the bottom 5 holes of the SRF05 but be careful the solder of one pin should not touch another one!

SRF05_5pins.jpg

 

Now comes the "connecting the wires to the SRF05 and the Spider" part.

First connecting the wires to the SRF05, here goes:

DSCF0585.jpg

 

or as a schematic representation for any arduino including the Spider(dont look at this now it will only confuse you)

 

Now for the connecting the wires from the SRF05 to the Spider:

spider_SRF05_6.jpg

Now for the programing part using Arduino, you can just use the File>>Example>>Sensors>>Ping program where you have to just run the program without any changes if you have connected it to digitalpin 7 or if you have connected it to a different pin you can just change that 7 in the program to the pin which you have connected the yellow wire to.

Or you can use this program:

 

/*
Arduino example for SRF05
Using a single pin for both trigger and echo.
*/

int duration; // Stores duratiuon of pulse in
int distance; // Stores distance
int srfPin = 7; // Pin for SRF05

void setup()

 {
Serial.begin(9600);
}

void loop()

{
pinMode(srfPin, OUTPUT);
digitalWrite(srfPin, LOW); // Make sure pin is low before sending a short high to trigger ranging
delayMicroseconds(2);
digitalWrite(srfPin, HIGH); // Send a short 10 microsecond high burst on pin to start ranging
delayMicroseconds(10);
digitalWrite(srfPin, LOW); // Send pin low again before waiting for pulse back in
pinMode(srfPin, INPUT);
duration = pulseIn(srfPin, HIGH); // Reads echo pulse in from SRF05 in micro seconds
distance = duration/58; // Dividing this by 58 gives us a distance in cm
Serial.println(distance);
delay(50); // Wait before looping to do it again
}

 

Even after going through this tutorial many times if you still aren’t getting it then ask me or any other LMRer.

ALL THE BEST!!!
CHEERS!!!

DTB 

Nice work, DTB. I’m glad to

Nice work, DTB. I’m glad to see you sharing your knowledge.

Haha actually its your’s and

Haha actually its your’s and Dan’s knowledge that I am sharing :slight_smile:

Anyway Thanks :slight_smile:

Good one! Thanks for sharng.

Good one! Thanks for sharng. I believed such tutorial will helps.

Cool

Cool stuff.

Can’t wait to get my hand dirty on this dagu spider board.

I’ve ordered this dagu spider board and some motors and 2 sensors from robotgear. Used express option but it hasn’t show up my door for almost 5 days.

Australia Post said it was delivered 2 days ago, but it hasn’t. I hope someone didn’t steal it.

I’m now contacting robotgear about the issue.