Friday, October 19, 2012

Overview: Onboard Logic

From the outset, the roverbot project was planned to be more than just an elaborate radio-controlled car.  The plan is for it to be able to navigate autonomously between GPS waypoints while detecting, avoiding, and navigating around obstacles in its path.  To do so, it will need some amount of onboard logic to do the "heavy lifting" tasks involved in performing that navigation.

To that end, the roverbot carries an Arduino Mega 2560 microcontroller board, interfaced to a variety of sensors and modules.  At the heart of the Mega board is an Atmel ATMega 2560 processor, with 256 KB of flash memory for storing program code, 8 KB of SRAM, and 4 KB of non-volatile EEPROM storage space.  It runs at a clock speed of 16 MHz, and features 54 general-purpose I/O lines, 16 analog input lines, and 4 dedicated hardware serial ports.  This may not sound like much as compared to the computer you're reading this on, but it's not too shabby, either.  In addition, the Arduino line has a huge user support base, with tons of resources and libraries available.

Arduino Mega 2560 (Photo from Arduino website)

Since I started the roverbot project, there has been a very interesting development in the world of embedded computing: the Raspberry Pi.  This is a small single-board computer, selling for approximately $35, which comprises a complete Linux system.  Created for teaching programming in schools, it's got a great feature set and is catching on like wildfire.  It features some general-purpose I/O lines, although not nearly as many as the Arduino Mega does, and they're only digital I/O, without support for reading analog values directly.  All of this can be worked around however, and there are a good number of interface boards available to enhance the capabilities of the Pi.

Raspberry Pi (Photo from Wikipedia article)

At the moment, the Arduino Mega board is more than powerful enough for what I'm asking it to do.  With a retail price between that of an Arduino Uno and an Arduino Mega 2560, the Raspberry Pi is powerful and affordable.  Probably the biggest barrier keeping me from switching the roverbot's brains to a Pi is that I am not (yet) fluent in Linux or Python.  For simplicity's sake, I'm sticking with the Arduino for the time being, but the Raspberry Pi is certainly an attractive option, which I may have to look into at a later date.

Next up, I'll take a look at some of the sensors I'll be using on the roverbot.

No comments:

Post a Comment