In this guide you will learn how to setup and program your Arbotix-M Robocontroller. This guide will also work for the orginal ArbotiX Robocontroller.
Because this is a Quick-Start guide, we will leave out many of the details and intricacies of the ArbotiX-M Robocontroller. To learn more, check out the ArbotiX-M Documentation or keep a look out for this symbol
which will take you to a page with more information on the topic.
The main parts of setting up the ArbotiX-M are as follows:
- Install the Arduino IDE
- Install the FTDI drivers
- Install the ArbotiX-M Hardware and Library Files
- Connect your ArbotiX-M Robocontroller
- Program the ArbotiX-M Robocontroller
Step 1 : Download and Install the Arduino IDE
The Arduino IDE (Integrated Developer Environment) is an application that you can use to program and interact with Arduino based microcontrollers like the ArbotiX-M. You can find the Arduino IDE here. Users can download the compressed Arduino IDE and decompress it to a location of their choice. Windows users can also use the Windows Installer to automate this process. The ArbotiX-M libraries have been thoroughly tested with Arduino 1.0.1 but should work with the most recent release (1.0.5 as of this writing). The current library does not support older versions of Arduino (beta 18-23) or Arduino 1.5 beta.
Once you have installed the Arduino IDE, open the program. This will generate an 'Arduino' User Folder that you will use in Step 3.
Step 2 : Install the FTDI drivers
Now you will need to install FTDI drivers. These drives will allow your FTDI-USB cable or UartSBee to function properly. Some modern Operating Systems either have these drivers or can automatically find them. If you don't have the drivers or you are unsure, you can find the FTDI drivers here, and a guide to installing them here.
Note: Windows users can download the the drivers and install them through the windows hardware wizard, or click on the 'setup executable' link automate the process.
Step 3: Install the ArbotiX-M Hardware and Library Files
For the Arduino IDE to support the ArbotiX-M, we'll need to add files into the Arduino user folder. Click here to download the needed ArbotiX-M Library and Hardware Files
In this .zip file, there will be 3 folders
- hardware-this folder contains all of the hardware definitions that will allow the Arduino IDE to build programs for the ATMega644p on the ArbotiX-M. This folder also contains definitions for the AVRSTK500 serial programmer.
- libraries-this folder contains libraries that will help you use the ArbotiX-M to its full potential. Many of these libraries will be required to compile the programs for InterbotiX robots. Click here for more information on the individual ArbotiX-M Libraries.
- ArbotiX Sketches-this folder contains test code and sample code for various ArbotiX-M projects and InterbotiX robots.
To install the ArbotiX-M files you will move these 3 folders into your 'Arduino' user folder. This is NOT the folder where the Arduino IDE itself is located. The location of this folder will be different based on your operating system.
Where '~' represents the path to your user account.
If you're having trouble finding your 'Arduino' folder, open the Arduino IDE and open the 'Preferences' panel (File->Preferences). Here you will find a file path under 'Sketchbook location:'. This is the path to your 'Arduino' folder.
When you are done, your file path should look like this
If you aleady have a library or hardware folder, simply copy the contents of the ArbotiX-M Libary/Hardware folder into the library/hardware folder in your 'Arduino' folder.Your folder structure should look like the one shown above, along with your pre-installed files.
Now open the Arduino IDE. You should see the following options
'Sketch->Import Library->'you should see
Commanderamong other libraries
'Tools->Board->'you should see
ArbotiX w/ RX Shieldat the top of the list
'Tools->Programmer->'you should see
AVR ISP mkII(Serial)
If all of these are available, then your Arduino IDE is setup and ready to program the ArbotiX-M!
Step 4 : Connecting The Arbotix Robocontroller to your Computer
- In this example we will power the ArbotiX-M from the FTDI port. Move the power jumper so that it connects the middle pin and the 'USB' pin ('FTDI' for the original ArbotiX).
Power Jumper for ArbotiX-M Power Jumper for ArbotiX
- The orientation of the FTDI cable is very important - it is possible to plug in the cable backwards and you will not be able to program your board. The top FTDI pin with the mark 'BLK' will always connect to the black FTDI cable. This pin is a ground or 'GND' pin. The bottom pin with the mark 'GRN' will always connect to the Green FTDI cable.Click here to learn more about powering the ArbotiX-M
- If you are using the UartSBee, the 'BLK' and 'GRN' marking are on the underside of the board.
- If you are using a UartSBee, make sure that the switch is set to '5v' so that the unit is running at 5v like the ArbotiX-M
- Click here to learn about more options to program the ArbotiX-M
|ArbotiX-M to UartSBee Connection||ArbotiX to UartSBee Connection|
|ArbotiX-M to FTDI-USB Connection||ArbotiX to FTDI-USB Connection|
You cannot program the ArbotiX while an XBee is plugged into the ArbotiX or the UartSBee. You must unplug any XBees from the ArbotiX-M or UartSBee while programming. This is because the XBee and the FTDI cable are connected to the same serial port. If you wish to program the board while an XBee is plugges in, you must use ISP programming.
Step 5: Program the ArbotiX-M Robocontroller to Blink
Now that your ArbotiX-M is hooked up to your computer, you will need to pick the
ArbotiX board from the boards menu. Select the proper board:
Tools->Board ->ArbotiXNow pick the serial port. Go to
Tools ->Serial Portand pick the serial port for the FTDI device.
- If you have multiple serial ports and you are not sure which one is the ArbotiX-M, unplug the FTDI device from the computer, and watch which one dissapears (you will need to refresh the serial port menu by closing/openign the menu)
- Mac and Linux users may have 2 ports - one marked 'cu.' and one marked 'tty.' Either will work.
Once you have set the board and serial port, you can open the 'ArbotixBlink' sketch.
File -> Sketchbook -> ArbotiX Sketches -> Test Sketchs -> ArbotiXBlinkClick on the 'Verify Button (the green check in the upper left). This will attempt to compile the sketch. If all of the software is installed properly you will see a 'Done Compiling' below.
Click on the 'Upload' button (the green arrow button next to the verify button). This will compile the sketch, and then load it onto the ArbotiX-M. If the hardware is connected properly you will see the green user light flicker while the Arduino IDE displays an 'Uploading' message. When the Arduino IDE displays 'Done Uploading' the user LED should blink on and off in a 1 second interval.
Congratulations, you just programmed your ArbotiX-M Board!
Move the power jumper towards 'VIN'. This allow you to power the ArbotiX-M from the external power supply.
|Power Jumper for ArbotiX-M||Power Jumper for ArbotiX|
Next, connect your servo to the ArbotiX-M Robocontroller with a 3-pin DYNAMIXEL cable. All three DYNAMIXEL ports on the ArbotiX-M are identical, so you can plug the servo into any of them. Note: This example assumes that you are using a new AX-12A or AX-18A. All new AX servos are set to ID #1, which this example will target. This example is not intended for MX servos or servos set to IDs other than '1'.
Now you will need to connect an external power supply to the ArbotiX-M board. In this example we'll be using a 12v Switched Mode Power Supply connected to the Arbotix's power terminals through a Barrel Jack Pigtail.
|Single Servo Setup for ArbotiX-M||Single Servo Setup for ArbotiX|
Step 6: Program the ArbotiX-M Robocontroller to Control a DYNAMIXEL Servo
Now load the following sketch onto the ArbotiX-M Robocontroller
File -> Sketchbook -> ArbotiX Sketches -> Test Sketchs -> AXSimpleTest
The servo should now begin to rotate counter clockwise, then clockwise. It will repeat this behavior until you power off the ArbotiX-M or re-program it.