My final year project at Aber Uni was to research and build a small autonomous robot. I chose to physically design it around the Braitenburg robots, but added with a simple pre-programmed obstacle avoidance intelligence.
The final choice for the ‘brain’ of the robot was the Robostix microcontroller board from www.Gumstix.com. This choice meant I had to learn C and research how to use the various functions of the central chip (e.g. timers, interrupts etc). It also meant having to build my own programming cable/dongle from parts, which also allowed me to work and test the program outside of the university lab.
The hardest part was to get the Sharp IR GP2D02 sensor to talk properly with the Robostix chip, as it involved creating a custom clock pulse as well as a separate control pulse line.
The demonstration goal for the robot was for it to get from one side of a room to the other 'as the crow flies', regardless of any obstacles in the way. This was done using infra-red sensors coupled with a couple of push switches - given more time these would have been expanded to bumpers with a greater number of more sensitive buttons behind them. The aim was to also include a couple of ultrasonic sensors, however there was not enough time to add this input to the programming.
The program was set up so the main chip could wait for one of the sensors to 'push' a command through stating it had detected something. This was the most energy efficient route, and gave a faster response when using multiple inputs when compared to a more basic polling technique.
The obstacle avoidance was a simple recursive loop using the front-facing and the relevant front-corner infra-red sensors to determine where the obstacle was. I also coded in a get-out and reset command if the sensors sent the robot in a 360o turn.
If I had to do this again I would try to implement two or more of the following: