Let's Make Robots!

"Dave" - the Differentially Driven Two Wheeled Robot

Navigate Around Obstacles, Remote Controlled via Nunchuck

I have attached some images of my first robot. It is built around a pololu round chassis, tamiya twin motor gearbox, and tamiya off road wheels along with a ball caster (also made by tamiya). There is a second deck made from some blue HIPS, and it runs off of 4 AAs and a 9v battery. The "brains" are simply an atmega8 and an L293d along with supporting circuitry. I aim to make this into a sumo and line following robot, however I wanted baseline electronics, chassis and control code to start with. The control software is written in C along with avr studio and winavr, at the moment it has two modes - autonomous with input via two NO switches, and an I2C interface with a nunchuck for wired remote control. I had originally used a Bit bashed SPI interface with a Dualshock controller, however the extra buttons, code space and I/O pins required for this made switching to the Nunchuck an easy decision. The control algorithms and software structure for this project are very simple at the moment:

 [semi-pseudo code]

Print Select Mode to LCD

If Right Switch && Left Switch are pressed

Wait 2 Seconds

If Right Switch && Left Switch are still pressed

Enter into Mode1

Else enter  Mode2


Mode1: (remote control)

Initiate I2C interface with nunchuck

Read relevant analog and button data

Process button data and output to forward, backward and turning motors

Go to Mode 1


Mode2: (autonomous)

Go forward

If left switch is pressed && right switch isn't

Turn right

If right switch is pressed && left isnt

Turn left

if right switch && left switch are pressed


Go to Mode2


I have attached some pictures of the current robot, and I hope to update when I have the line following and edge detection worked out..








Comment viewing options

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


It was originally going to be 'mega 168 controller, however [what I believe to be] static electricity from my dogs' noses caused the IC to unexpectedly fail..

It is programmed in the C language using AVR studio, winavr and AVRdude for the programming.

So much better than the basic stamp etc. :)



Okay sure.

I could post some video now of the nunchuck and autonomous control, except it would be rather boring to watch.