Skip navigation
Electronic Design

Commanding The iRobot Create

The iRobot Create hardware is impressive as it is simple (See Real Robots: iRobot Create). While it’s a great development platform, it’s not too intelligent on its own. But with the addition of the Command Module you can program it to do much more. Command Module’s 18.432 MHz ATMega168 is based on Atmel’s 8-bit RISC core. It has 16Kbytes of flash with about 2Kbytes used by the boot loader. The latter is compatible with Atmel’s STK500 version 1 protocol. It has 1Kbytes of RAM and 512 bytes of EEPROM. There are two 8-bit timers, one 16-bit timer, six PWM channels, an 8-channel 10-bit ADC, a serial port, a SPI interface and a 2-wire (I2C) interface. The Command Module comes with a disk that contains three major items: the WinAVR development suite, the Create runtime libraries and sample programs. WinAVR consists of completely open source tools including the GNU toolchain. Atmel also has another, closed source tool, called AVR Studio 4. It is a free download from Atmel’s website but you need to register first. It is used with most of Atmel’s products including the $20 Butterfly (See A Butterfly Or USB Arm: You Choose). AVR Studio can be used with the iRobot Create Command Module but most new Create developers are likely to WinAVR. Those familiar with AVR Studio may want to stick with its more comprehensive supports. This review focuses on the WinAVR package. Installation from the CD takes only a few minutes and you can start reading the WinAVR docs and iRobot Command Module Owner’s Manual right away. Read first even if you have used the GNU tools before. Given their nature, it is possible to use another IDE like Eclipse with CDT (C/C++ Development Tool). I have used Eclipse extensively but didn’t take the time to configure it for the Create platform. It looks slightly more involved than redirecting Eclipse to the GNU tools. The Windows-based WinAVR comes with the Programmers Notepad. This provides rather good editing capabilities although it relies on the GNU make support making it a bit more primitive than something like AVR Studio or Eclipse. Still, Programmers Notepad will likely be more than sufficient for those starting out with the Create Command Module. The Programmers Notepad only provides editing services. The GNU tools are setup to run under Cygwin, the usual Windows platform for GNU command line support. Luckily you do not have to install Cygwin as it is part of the one-step installation process, although you need to be wary if you have Cygwin already installed for other reasons. The tool suite includes the usual command line programs like gcc, make, and the debugger. The graphical version of GDB, Insight, is included as well. The avrdude program provides a way to download applications to the iRobot Create using the USB-based serial port. A graphical version of avrdude is included but it was a beta version. The tools also work with the simulavr simulator. The simulator can be rather handy because it actually runs faster on most PCs than the real microcontroller. Of course, it is not much of a challenge for a 2Ghz 64-bit Athlon or Pentium to run rings around an 18MHz 8-bit micro. The online documentation is terse in many places but sufficient for an experienced developer. It also includes the GNU documentation that tends to be rather extensive but generic. Luckily the sample applications and runtime library description has step-by-step instructions covering most of the basics. This includes the Command Module’s Open Interface examples that make use of the byteTX function. The ATMega168 calls the byteTX function to send character strings to the Create’s main processor. The latter handles all movement and built-in sensor support. Some of the examples can be rather sophisticated, like the one that searches for light in a dark room (or vice versa, as a challenge to the reader). They also cover microcontroller basics such as using the serial port and debouncing button inputs. Unfortunately, some of the examples require additional hardware that is not included in the kit, but that tends to be simple items like resistors that are readily available. Overall, the WinAVR environment is easy to use and you can always delve into its source code if you are looking for C coding examples. Still, the environment is not for the robotics novice. This platform assumes a basic level of expertise on both the hardware and software end. It is not a teaching tool at the same level as the Lego Mindstorms NXT. On the other hand, a programmer with basic C/C++ experience and a little hardware knowledge will not have much trouble picking up WinAVR and doing useful applications in a day or two. It is a good idea to get on iRobot’s forum site for the Create. The answer to many novices’ questions will already be answered. Overall, the WinAVR/Create combination hits the right spot. It provides a more advanced robotics development platform and the toolset is more than sufficient for an 8-bit micro with only 16Kbytes of memory. Related Links Atmel Cygwin iRobot

TAGS: Robotics
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.