Things You'll Need
Instructions
Build the Prototyping Environment
Solder the supplied connection pins to the SRF005 ultrasonic range sensor. The connection pins are a five pin jumper and fit into the five holes in the sensor's circuit board. This allows you to breadboard the sensor without making any further permanent connections.
Build the standard PICAXE upload circuit on your breadboard. Consult your PICAXE documentation for details of how to do this. Ensure that you add the smoothing capacitor for the most reliable operation.
Connect the range sensor via jumper leads to your PICAXE 08 series micro-controller. There are four connections on the range sensor: positive and negative power, echo output and trigger input. Connect the echo output to a PICAXE input pin and the trigger input to a PICAXE output pin.
Testing Operation
Program the PICAXE BASIC software with the sample code from the SRF005 datasheet. Upload this code to the PICAXE microprocessor on your breadboard using the data connection cable.
Connect a power supply to your circuit and test the operation of your sensor. You should be able to check the values of the variables by looking at the debug mode of the BASIC software.
Modify the code to suit your application. The range sensor is very accurate and can detect the width of a broom handle at a distance of three meters, so basic motion sensing is not a problem. Experiment with code and look for support in the PICAXE online forums to fine tune the operation of your circuit to your exact needs.