Let's Make Robots!

Picaxe 08M and SRF05


I am trying to connect the SRF05 to a picaxe 08M (starter kit). But it doesn't seem to work. I know how to connect the SRF05 to a picaxe 28x1.

Here is the program I used:

pulsout 4, 2
pulsin 3, 1, w0
pause 10
goto main


Thank you.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Download the according manual: http://www.rev-ed.co.uk/docs/srf005.pdf

Mode 2, single pin for PICAXE 08-M

This may or may not be an issue as well:

Change the pause 10 to a pause 200 (or so) and try again.

Not working. I can tell its pulsing out ( because the LED is flashing ), but w1 is 0.

In your code you are writing w0, so write "debug w0"

Check furthermore if the echo output goes to the right Picaxe input and the echo input goes to the right picaxe output. This is a comman mistake! (for Picaxe 28x)

For Picaxe 08-M connect it according to the manual page 3 and write:


symbol trig = 1 ‘ Define output pin for Trigger pulse

pulsout trig,2 ‘ produce 20uS trigger pulse (must be minimum of 10uS)
pulsin trig,1,range ‘ measures the range in 10uS steps
‘ now convert range to cm (divide by 5.8) or inches (divide by 14.8)
‘ as picaxe cannot use 5.8, multiply by 10 then divide by 62 instead
let range = range * 10 / 58 ‘ multiply by 10 then divide by 62
debug range ‘ display range via debug command
pause 50 ‘ short delay
goto main ‘ and around forever



That is exactly what I did.

your code is missing this:

symbol range = w1


Oh, I added symbol range = w1

There are only two possibilities: The SRF05 is damaged our you wired it wrong. I used the SRF05 several times with 08-M and it works :)


It worked people!!!

Apparently, I forget to connect Mode to ground :P



That is a good news. As I have said, read page 3 :) Mode (Low - Connect to ground)