New Brain Design

The Idea…

So all of that AVR overview was to get us here, the design of a new robot brain. I compete in Mini Sumo at different robotic competitions. What I like is that it involves mechanical, electrical, and software engineering. The competition is autonomous, so none of this radio control stuff. The robot has to compete on its own. It comes down to whether I made a good design, or do I need to go back to the drawing board (or in this case computer programs).

Mini Sumo robot controller circuit board

This is the first robot controller I designed

So let’s get into the design process. My original brain board used an Atmel ATmega48 microcontroller. The mega48 had more than enough program memory to handle mini sumo. Since I used the DIP (dual inline package) version, I ran out of I/O pins for a couple extra features I wanted. The original plan was to have 4 IR LEDs, on individual I/O pins, and 4 IR detectors. I changed the plan to use 1 output each for 2 LEDs. After a few more changes, I came up with the circuit board you see on the right. The board is blue because I liked the color of the Arduino, so I made mine the same. Though the boards are the same color, I did not design my board to be compatible with the Arduino or its programming tools. This time I think I will make the board compatible with Arduino. Not physically as I need it to fit the size requirements on mini sumo, but in function. I will use a mega328, which the Arduino boot loader can be programmed into the chip. Then the Arduino programming tools can be used.

Now that I picked a microcontroller (the mega328), I can work out some other details. Originally I used the 16 bit Timer 1 for creating the 38kHz frequency use for the IR LEDs. This left me with Timer 0 for driving the servos. After looking over the internet for code to drive servos, it became clear that everyone was using Timer 1. Now I had to write my code for driving the servos as I could not use anything from the internet. Where is this leading? Well this time around I will use Timer 1 for the servos. So what about the IR LEDs? Here is where I have a few choices. I could use a 74xx04 logic chip to create an adjustable oscillator centered around 38kHz, a 555 Timer chip – again to create a 38kHz frequency signal, or maybe another microcontroller. I really like the idea of adding another micro. In this case I am looking at using a ATtiny24. It will have enough I/O and timers to deal with IR object detection.

Arduino Uno board

The Arduino Uno

What about USB? The Arduino only has a USB port for downloading the program into the micro. The board has a USB to serial port chip. Do I want to add this to my design? If I don’t, I would need an external USB to serial port converter to download programs using the boot loader. Should I put on a RS-232 transceiver chip (like a MAX3232E) to interface with a standard serial port?

Other Design Decisions

We have been dealing with some of the higher level design decisions. There are many smaller decisions to be made. Should I include a motor driver chip on the board? If so which one? The IR LEDs for the obstacle avoidance detectors need to be shielded from leaking IR light into the sensors. Is heat shrink ok, or should I use the plastic shrouds that Parallax (makers of the Basic Stamp) sells? How about having some prototyping area, or headers for plugging in a daughter board. These are just some of the decisions I have to make. The biggest decision I need to make now is to use surface mount components or go with through hole parts. This really depends on if I want to sell it as a kit. As a kit through hole components work better as more people could build it. If I go surface mount, then it might be left to me to install the parts and sell it as a partially completed product. Or what if I just designed both version, posted all the information here, and let you figure out which one you want to build, if any.

Well, that is all for now. Until next time here are a couple pictures of my Mini Sumo robots.

This is a modified Parallax Sumobot

My very modified Parallax Sumobot

Mini Sumo robot with Tony's brain board on top

My brain board on Parallax Mini Sumo chassis