Home Contents Start Prev 1 2 Next

Using the SRF05 ultrasonic Sensor

This is used in mode 2, where one digital pin is used for transmit and receive. It is simple to convert the delayed echo time to distance and this was done to make telemetry readings clearer. The IR pinger was replaced on the robot with the SRF05 (also mounting it further back from the front of the machine) and some simple tests undertaken.

Static testing proves the ultrasonic sensor to be considerably better than its IR counterpart. Distance can be measured accurately, the beam-spread is wider and even narrow items (eg a pen) can be detected without too much difficulty. From limited tests, it also appears to be less affected by the material the soundwaves are being reflected from. Time will tell how accurate it really is in the presence of motor and servo noise, but results look really encouraging.

Integration Testing

Once all the boards had been tested in isolation, they were all plugged together into the arduino stack and everything wired together. I had peppered the motor shield with female header blocks to give a lot of interface points, which frees the pluggable interface from becoming overcrowded with wires.

arduinostack

Making all the modules worked together was not quite so straightforward. It appears that the Motor Shield I am using uses pins 9 and 10 which are also used by the Servo library. They fight over an AVR timer so it is not possible to use speed control while using the servo. This is not a train-smash as speed control is not high on my hit-list. I could rewire the motor board to use different PWM pins but provided the motor direction can be controlled, I'm not too bothered.

Locomation, servo control and Ultrasonic detection were all integrated and the arduino was programmed accordingly. Flipping the program/wireless switch and I should be able to monitor exactly what the sandbot is doing as it moves around the room. And it works :-). The development-test cycle is much faster with the wireless telemetry. The completed robot with its new brain and sensor are shown below

sandbotarduino

I can conclude that the brain transplant has been sucessfull as it has the same or better functionality as the previous version, but with the addition of remote telemetry and and improved distance sensor. I will experiment with some of the other sensors for a while before moving onto the area of localization and planning. The modularity and availability of pluggable sheilds make the development process much faster although it comes at a cost. Firstly, the abstraction from the hardware layer means you are not fully in control of the underlying processor. Secondly, the arduino route is more costly than raw PICs, but this is th price to pay for the modularity and large array of compatible hardware.

Now there is a wireless link, I may experiment with moving the cognitive functions completely off the robot and into the PC. Sensors could collect data and send it to the computer which would crunch the numbers and send locomation commands back to the robot. However, that is a job for another day!

Here are some videos of the robot naviagting using its new hardware.

Navigation
Telemetry

Home Contents Start Prev 1 2 Next