3D Robotics

ArduPilot Assembly Instructions

Welcome to ArduPilot! Here's how to compete your new board: You should have received the basic ArduPilot board with all surface-mount components already soldered and the essential firmware already loaded on the chips. All you've got to do now is to solder on some connectors and load the autopilot software. For this first part of that you'll need a strip of breakaway headers, and three female-to-female servo connectors. You'll also need an FTDI cable if you don't already have one. The first thing to do is to solder on the connectors. Many of the holes on the board are for optional upgrades, such as sensors and additional RC channels, but for the basic board you only need to solder on three breakaway connectors. From your strip, use a pair of pliers or a snipper to cut off two 3-pin segments and one eight-pin segment.

First, solder the two 3-pin headers and the one 8-pin header in the circled holes above. The long side of the headers should be on the side with the chips. The easiest way to do this is to place all the pins in the holes, then place a pad of paper on top of the pins. Holding the board and the pad, turn them over so the board is on top of the pad, with the pin nubs showing through the board. Then solder just on pin in each segment. Turn the board over again and make sure the connectors are straight (if they aren't remelt the solder joint on the one that's tilting and finger-push it upright...make sure you're not touching the pin you're heating!). If they're all straight, solder the rest of the pins.

Next, we'll solder on the RC inputs. You can either use three more 3-pin headers in the holes circled in red above (in which case, you'll need female-to-female cables to connect to your RC receiver), or make and use "pigtails" instead, which is one less connector to potentially fall off. If you want to make the pigtails, cut two 12" female-to-female connectors in half, and split the wires on each end down about a half of an inch. Strip the insulation of each about 1/8th of an inch in. Now we're going to solder them in in the three sets of holes marked in red above. Black goes on the outside. This is a bit of a fiddly soldering job and it's easier with a helping hand. If you'll be using the ArduPilot 2.0 or above code, you'll need to add a few more connectors for sensors and a calibration jumper. Solder a five-hole female machine pin header strip in the five holes marked in blue at the top in the picture above. Then solder a regular two-pin header in the holes marked in blue at the bottom. [Note: the board comes from the factory set up to get power from your RC system. If you want to power the board from a separate power source, you can do so--the board has a built-in power regulator that can take power from 5v-15v. Instructions to make that change are here.] Now the basic hardware is complete. It should look like the below (connectors just used in ArduPilot 2.0 and up are marked in blue):

If you are making an ArduPilot 2.0 or above, you must now connect the FMA sensor to the ArduPilot board. Instructions for doing that are here. Now it's time to connect everything, plugging your female-to-female cables (or pigtails) into your RC receiver. CTRL should go to channel 5 or 6 (whichever has a toggle switch; if you're using ArduPilot 1.0 the other channel, which should have a knob, will be used to control the FMA Co-Pilot). For ArduPilot 1.0: Input 1 should go to your receiver's Channel 3 (throttle) and Input 2 should go to Channel 4 (rudder). Then plug your ESC (motor speed controller) in the ArduPilot Out 1 and the rudder servo into ArduPilot Out 2. Here's a diagram that shows all the components and how they should be connected (Rx is your RC receiver and ESC is your electronic speed controller):

Here's what ArduPilot 1.0 looks like in real life:

ArduPilot 2.0 and above: Input 1 should go to your receiver's Channel 1 (aileron) and Input 2 should go to Channel 2 (elevator). If you've got a three-channel plane like an EasyStar, connect the rudder servo to Out 1. For a four-channel plane with ailerons, connect the aileron servo to Out 1 (the rudder, which ArduPilot doesn't use in this configuration, can remain connected to your RC receiver for manual use). The elevator servo should be connected to Out 2, as shown below. Throttle is connected directly to the RC receiver; it is not used by ArduPilot in this configuration. Here's a diagram that shows the whole setup:

Software Now it's time to load the software. Download and install the latest version of Arduino, if you don't already have it. First, it's best to run some test code to ensure your board is set up properly. Dowload "ArduPilotNE" from our Google Code repository. This code just flies the plane in the NorthEast direction, so you can test it in the air, but for now, let's just test it on the ground by walking around with the autopilot on and GPS locked and watching the rudder move, as shown in this video: To load this code, power on the board by plugging your ESC into a battery or using some other 5v power source (do not attempt to just power the board with the FTDI cable. We did not connect the power pins on the FTDI port to the processor to avoid power conflict when the board is powered by the Rx and you're using the FTDI as a serial monitor). The red power LED should go on. Now plug your FTDI cable into the board (with the black wire or, in the case of the Sparkfun board, the GND pin on the side marked "BLK") and plug it into your computer's USB port. Here's what the Sparkfun FTDI board looks like when it's plugged in properly:

Then in the Arduino software in the "Tools" menu make sure you've selected the right serial port (the FTDI cable will create a new one, which is probably port 5 or higher). Also ensure that the board selected is "Arduino Diecemila or Arduino Duemilanove w/ATmega168" if you have one of the older 168-based boards, or .Arduino Duemilanove w/ATmega328" if you have the newer 328-based boards. At this point unplug your GPS module if it was plugged in. The Arduino code will not load if the GPS module is attached, because they share the same serial port. Once you've uploaded the code, you can plug your GPS module back in. Please remember this in the future as you're uploading code: you must ALWAYS unplug the GPS first. Load the ArduPilot "sketchfile", ardupilot.pde, which will load the rest of files in tabs. Now press the "Upload to I/O board" icon (the little arrow point to the right). Nothing should happen for about 30 seconds, and then at the bottom the software should report that the sketch was successfully uploaded by reporting "Done uploading" and reporting the Sketch size. If not, check out the Arduino debugging tips here. [Note: if you're still having trouble, you can upload the code with AVR Studio using the AVRISP2 programmer. Just connect to the Atmega168 chip following these direction, and program it with the ardupilot.hex file that Arduino creates in your ArduPilot folder's Applet subfolder.] Now you can disconnect the FTDI cable, reconnnect the GPS module and do the ground test as shown above. For this one, use the ArduPilot 1.0 connections: connect the throttle channel (Rx channel 3) to ArduPilot's Input 1 and the rudder channel (channel 4 from the Rx) to ArduPilot's Input 2. The toggle channel (Rx channel 5) should go to the ArduPilot's CTRL input. The ESC should go to Out 1 (you can disconnect your motor from the ESC, since you'll be testing this on the ground) and the rudder servo should go to Out 2. If your rudder servo is reversed (it would turn the plane in the opposite direction from that required to go NorthEast), look in the first tab of the code and change the number to 0: #define reverse_yaw 1 // normal = 0 and reverse = 1 [NOTE: If for some reason you have run the ArduPilot 2.x code first--naughty! follow the instructions!--the NE mode code won't work. That's because the 2.x code programs the GPS module into binary mode, while the NE code requires NMEA mode. All is not lost, however. If you let the GPS sit without power for a week or so, the internal capacitor will run down and it will return to its default NMEA mode and you can use the NE code again.] If everything checks out, you can now run the full autopilot. Download the latest ArduPilot code (1.x or 2.x, depending on which hardware configuration you want to use), which can always be found on the ArduPilot home page. Repeat the loading process as above. Congratulations! You have a functioning autopilot. You can now plug the GPS module back in and test the basics by toggling your enable channel (5 or 6, whichever you've connected) and confirming that the "MUX" status LED turns on and off. If you're using ArduPilot 2.0 and above, you now you need to go through the initial setup process for the GPS and/or sensors (depending on which version of ArduPilot you're using). Instructions for that are here. For version 1.0, there is no setup process. When the autopilot is enabled, it should move the rudder servo a few degrees in one direction on its own (it is doesn't, you may have reversed your channels--make sure that throttle is in Output 1 and rudder is Output 2). Also, if you're outside or near a window, your EM406 GPS should get a lock after a minute or two. When the LED starts blinking on the GPS module, a blue LED ("Lock") should light up on the ArduPilot board to indicate sat lock. A table showing all correct LED displays in each ArduPilot mode is here. Next, you can learn about using Arduino to set up an autonomous flight here.
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • 3D Robotics
    Tom, my apologies--I had a mistake in the LED table. When you first get the board from the factory, the Mode LED is not one of those in the flashing sequence. It's off. I've updated that post accordingly.
  • i am having problems loading the software onto the ardupilot board... i am getting this error" avrdude: stk500_getsync(): not in sync: resp=0x00
    avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51 ". I am using the FTDI spark fun break out board. Do you have any idea what might be the problem..

    Thanks
  • Mac OSX ArduPilot Upload Instructions

    For those interested in using OS X to upload the ArduPilot 2.1 code to their board here are the instructions.
    I successfully uploaded both the NE and ArduPilot2.1 code using the method outlined below.
    (This procedure was carried out on an Intel Based OXS[10.5.6] MacBook Pro)

    1) Install Arduino. The latest version can be found here:
    http://arduino.cc/en/Main/Software

    2) Install the included USB drivers that come with the Arduino installer. The intel driver is called FTDIUSBSerialDriver_v2_2_9_Intel. Then restart your Mac.
    (If you want the latest FTDI drivers, they are here: http://www.ftdichip.com/Drivers/VCP.htm)

    3) Plug in your FTDI cable to the board and to the USB port.

    3) Open the ArduPilot_EasyStar_WP.pde file (the sketchbook file), this should launch Arduino and open all the other required source files.

    4) Select the serial port: Tools >> Serial Port >> /dev/tty.usbserial-A6007WIE

    From this point the instructions for programming are the same as Windows based computers.

    5) Select your board: Tools >> Board >> Arduino Duemilanove w/ ATmega328 (if you don't have the newer 328 board, select the 168 board instead)

    6) Powerup your board and make sure the GPS module is disconnected.

    7) Program the board: File >> Upload to I/O board, or just press the "Upload to I/O board" button which has the Arrow pointing to the right.

    When successful, you should get a message similar to the following:

    "Done uploading."
    "Binary sketch size: 10900 bytes (of a 30720 byte maximum)"

    That's it!

    (Chris, you may want to put this in a more appropriate thread)

    Matt
  • 3D Robotics
    Sid,

    Yes. Everything from 2.0 up does both stabilization and navigation. Please spend some time on the site and you'll find the answers you need.
  • 3D Robotics
    Matt,

    We delinked those 2.0 instructions when we upgraded to 2.1. The latest build instructions for the sensors are here. But the short form is that it doesn't really matter much what kind of connectors you use; you can use either the male or female connectors on the board as long as you use the opposite on the cable!
  • Hi,
    I'm just soldering some pins on the board. Your instruction says to solder "the one 8-pin header in the circled holes above", but on another thread that sets up the FMA connections the instruction is:

    "solder on one two-hole female machine pin header to the ArduPilot board in the VCC and GND holes, and another one in holes Analog 0 and 1, as shown in the diagram below"

    Does it matter whether I have male or female headers? I currently have a strip of 8 male headers soldered in.

    Thanks
    Matt
  • HI Chris,
    Is there any code already written for Ardupilot which supports a plane like Easy star w/o ailerons and does stabilization and navigation both...?
    Regards
    SID
  • HI Chris,
    After scanning through the codes I have below queries...

    #define distance_limit 4000 (is it in feet or meters ? What’s the Maximum limit? )

    * How do I set the waypoint arrived distanve range…?

    Can you explain the function of below variables ? and also the max and min. allowable values and it’s effects ?

    *. #define heading_max 30
    *. #define heading_min -30

    *. #define altitude_max 40
    *. #define altitude_min -45

    *. #define max16_yaw 2100 //Servo max position
    *. #define min16_yaw 1000 //Servo min position

    * if(get_gps_dist(lat, lon, wp_lat[0], wp_lon[0]) > distance_limit) //If the distance from home is greater than 2000 meters
    Regards
    SID
  • Thanks Chris...I thnik you are right, One should do that ... WIll go through the code in detail.. Thanks for your prompt reply..
    Regards
    SID
  • 3D Robotics
    Same deal. It's all there in the code, plainly marked. A good excuse to familiarize yourself with it!
This reply was deleted.