AeroQuad Tutorial v6
AeroQuad Tutorial v6
TABLE OF CONTENTS
Table of Contents ______________________________________________ i 1. Introduction _________________________________________________1
1.1 A warm welcome 1.2 Safety warning 1.3 Reference to forum and to keep updated
1. INTRODUCTION
1.1 A WARM WELCOME
Welcome to AeroQuad! This particular tutorial will focus on providing all the necessary information for a start from scratch build of an Arduino based quadcopter, referred to as an AeroQuad. It will be based on the recommended parts list already available on the AeroQuad website here http://aeroquad.info/bin/view/Main/PartsList_v2. However, since there are differences in views on how to deal with the frame part of the build (buying vs. building), building a frame will not be covered in this tutorial. A few suggestions of what a frame should have will be made.
2. SHOPPING LIST
2.1 RECOMMENDED PARTS
Priority 1 - recommended Arduino board (x1) 5 DOF IMU (x1) IXZ500 dual axis gyro (x1) AeroQuad shield (x1) Motors (x4, plus spares) ESCs (x4) Battery (x1) Counter rotating propellers (2 pairs, plus spares) Radio system (x1) Miscellaneous Battery charger Power supply Battery monitor/buzzer
Priority 3
PRIORITY 1 these parts comprise the command center of the quadcopter and are the Arduino
(Duemilanove in this case), the gyro and accelerometer sensor boards, the AeroQuad shield, the female headers, the breakout pins. The Arduino is the computer controller which will do all the calculations for stability and control. A USB A to B cable is necessary when uploading the code to the Arduino from the PC. The gyros are for sensing rotational motion around the three axes (x y z) and the accelerometers are for sensing linear acceleration about those same axes. The 5DOF IMU has a dual axis gyro and a triple axis accelerometer. The IXZ500 board has a dual axis gyro of which only one will be used to add the sixth degree of freedom to the IMU. The AeroQuad shield is a small green circuit board to which the sensors are soldered to and which then connects directly on top of the Arduino through pins. It eliminates the need to have a breadboard and lots of loose wiring. Arduino Duemilanove with ATmega328 Price: $30 Where: AeroQuad shop 5 DOF IMU Price: $75 Where: AeroQuad shop
IXZ500 Dual Axis Gyro Price: $40 Where: AeroQuad shop AeroQuad Shield v1.6.1 (or v1.7 now) Price: $25 Where: AeroQuad shop Stackable Female Headers (Duemilanove pack) Price: $5 Where: AeroQuad shop
PRIORITY 2 these components include the motors, motor electronic speed controllers (ESCs), the
main battery, the counter rotating propellers, the radio system and other, miscellaneous things. The ESCs control the brushless motors. The 10amp ESCs are recommended for lighter quads (under 1kg) and the higher amperage ones (18 or 25) are for heavier quads. The female-female servo extension cables are used to connect the radio receiver channels to the shield. The 3mm male/female bullet connectors are used to connect the ESCs to motors and also to the main power distribution line. Finally, the 18 gauge (no thicker than 16 as that will add unnecessary weight) wire is used to make the main power line, splitting the batterys output in a parallel fashion for the four motors/ESCs. Hextronik DT750 motor (heavy duty) Price: $9 ($36 for 4) Where: HobbyKing Hacker Style 20-22L motor (medium-heavy duty) Price: $14 ($56 for 4) Where: HobbyKing
Turnigy 2217 20turn 860kv motor (heavy duty) Price: $14 ($56 for 4) Where: HobbyKing Hextronik 24gram 1300kv motor (for quads under 1kg) Price: $8 Where: HobbyKing
Turnigy Plush 10 amp ESC Price: $8.50 ($34 for 4) Where: HobbyKing
Turnigy Plush 18 amp ESC Price: $11 ($44 for 4) Where: HobbyKing
Turnigy Plush 25 amp ESC Price: $12 ($48 for 4) Where: HobbyKing
4 EPP1045 Counter Rotating Prop pairs Price: $4.50 ($9 for two pairs) Where: QuadroUFO.com OR APC1047 Counter Rotating Prop pairs Price: $8.50 ($17 for two pairs) Where: AeroQuad shop
Zippy Flightmax 4400mAh 11.1v 15C lithium polymer battery pack Price: $26 Where: HobbyKing
Servo Extension Cables (female to female) Price: $8 (for 6) Where: AeroQuad shop
Spektrum DX7 radio with AR6200 receiver (or the AR7000 shown) Price: minimum new $280 w/AR6200 (eBay) Where: online, local hobby shop
5 3mm Bullet Connectors (for motors & ESCs) Price: $4.50 ($9 for 2 packs, 20 pairs total) Where: eBay (seller: rctimer) 18 gauge wire (2-3 ft) Price: ~$6 Where: RadioShack, local hobby shop, online
PRIORITY 3 These items include a good battery charger with a power supply and a battery voltage monitor or buzzer. They are not necessary for the flight of the quad, but obviously are needed for charging the battery and making sure that the battery is not discharged below recommended levels. Many different choices are available in this priority and the known and tested ones are shown. The HobbyKing battery monitor requires some minor soldering while the one on eBay comes ready to use. Turnigy Accucel-6 50W 5A Balancer/Charger Price: $25 Where: HobbyKing
6 Lipo Battery Low Voltage Buzzer Alarm Price: $4 Where: eBay (seller: goodlucksell) OR Hobby King Battery Monitor 3S Price: $4 Where: HobbyKing
0.032 rosin core solder Price: <$10 Where: RadioShack, online, other 0.062 rosin core solder Price: <$10 Where: RadioShack, online, other
3. THE BUILD
After obtaining all the necessary and recommended components, it is now time to start the build. This part of the tutorial covers the installation of the software, establishment of an Arduino to PC link, soldering tasks for the sensors and connectors, putting everything together, testing the radio and calibrating the ESCs, connecting and testing everything, and finally making the maiden flight.
3.1 DOWNLOADS
http://arduino.cc/en/Main/Software Download the Arduino IDE for your operating system. The latest version right now (March 12, 2010) is the 0018 version. An older, tested and stable version is the 0015 version and is available in the same link under Previous IDE Versions. The Arduino IDE is an environment for developing and editing code, including the AeroQuad code. The IDE package should come with the necessary USB drivers. Install it. http://code.google.com/p/aeroquad/downloads/list Download the AeroQuad code. The AeroQuad code is the code which controls the quadrotor. It is uploaded into the Arduino through the Arduino IDE. Currently (March 12, 2010), the latest code available is the AeroQuad_v1.6 which is an upgraded version of the older v1.5/v1.4 code and has some fixes. Unzip it into a folder. (Later, when opening the AeroQuad code in the Arduino IDE, the file from the unzipped AeroQuad folder which needs to be opened is the AeroQuad.pde file.) http://code.google.com/p/aeroquad/downloads/list Download the AeroQuad Configurator_V2.1 (now available for both Windows and Mac OS). The Configurator is a very useful tool when configuring and troubleshooting the quad. It has displays and commands for motors commands, sensor outputs, PID settings, transmitter/ESC calibration, and much more. Install the Configurator.
8 2. Connect the Arduino to the PC through the USB A to B cable. The USB provides power to the Arduino automatically and thus an external power is not required, but can be connected anyway. 3. Select the correct Arduino board through Tools>Board>Arduino Duemilanove w/ATmega328
4. Select the correct USB serial port through Tools>Serial Port. If uploading fails, then the wrong serial port (USB) is selected. Select another one if this message pops up during uploads.
5. Upload the Blink sketch (code) to the Arduino. Upon a successful upload, the message below should show Done Uploading. 6. This Blink tutorial sketch makes the LED next to digital pin 13 on the Arduino blink on and off in a loop, one second at a time by default. Congratulations, youve uploaded your first sketch to the Arduino. When satisfied with the LED, it is now time to upload the AeroQuad code in a similar manner. 1. Open the AeroQuad code through File>Sketchbook>Open. 2. Find the AeroQuad folder and select the AeroQuad.pde file. This will open the complete AeroQuad code with all the tabs. 3. Hit upload to upload it to the Arduino. 4. After a successful upload, the Arduino may be disconnected from the computer.
A note on electrostatic discharge (ESD) It is important to take some care when working with the electronics (sensors and the Arduino) in order to prevent them from being damaged by ESD. Here are some recommendations: Ground yourself before touching the electronics. This can be done by touching a metal appliance which is plugged into an electrical socket. Work in an environment where there is less chance of ESD developing, such as on a concrete floor of a garage Avoid carpets and plastic tables When not in use, store the electronics in an ESD plastic bag.
10 Breakout pins to the sensor boards 1. Break off a chunk of the breakout pins, two pieces of nine pins and one piece of four pins. 2. Insert the breakout pins to the hole slots of their respective sensor boards. Insert them from the bottom of the sensor boards (side with no circuitry) using the short end of the pins, like below. Also make sure not to break the pins individually but rather in groups, two of 9 and one of 4.
11
3. Fix the pins to the sensor board so the pins are vertical to the board or have someone help. 4. Heat the 15 watt iron for at least 5 minutes 5. Solder the pins to the breakout board. Making sure that the pins and the board do not move, apply heat for about 1 second to both the round metal pad on the sensor board and the pin sticking out of it (simulateneously), then immediately apply the solder either onto the pad very close to the iron or onto the tip of the iron. Make sure not to touch the adjacent pads as that will short them and render the board useless. Also, after soldering the first pin, double check that the pins are vertical and flush with the board. If not, heat that first pin and carefully attempt to straighten out the pins. 6. Repeat this for all of the 22 pins (13 on the 5DOF IMU board and 9 on the IXZ500 board)
12
Stackable female headers (Duemilanove pack) to the shield This step involves soldering the stackable headers (the ones bought separately from the shield) to the shield. This will allow the shield to be mated with the Arduino through the pins easily. There are a total of five pieces which need to be soldered, four on top and one from the bottom. Two are 6-pin, two are 8pin, and one is a special piece having 2 rows of 3 pins. 1. Start with the 6 or 8 pin pieces, soldering them with the same care as the sensor boards. Insert the 6 and 8 pin pieces from the top of the shield so as to have the black plastic headers on top and the pins sticking out from the bottom. They must be inserted into the outermost pins (see picture) in order to then fit the Arduino properly. 2. Solder the 6 and 8 pin pieces from the bottom, making sure they are all sticking out vertically 3. Insert the 2x3 piece from the bottom so as to have the metal pins coming out from the top side and the black headers being on the bottom side. 4. Solder the 2x3 piece to the shield
13
14 Motor and receiver pins to the shield These breakout pins are soldered to the shield in order to allow for connections from the motor ESCs and the receiver channels to the shield.
15 LED, resistor, and diode to the shield These are simple to install and solder. First insert the LED, making sure that the polarity is respected. One side of the LED is flat and the spot on the shield for the LED has a round mark with one side being flat. The LEDs flat side should face the words shield v1.6.1. The diode should be inserted in the similar manner, having one flat size. Finally, the resistor has no polarity and may simply be inserted. Solder the three components from the bottom and trim off the extra wires.
16 Capacitors to the shield Insert the capacitors from the top and solder them from the bottom. The capacitors have a polarity which must be followed. Both the shield and the capacitors are clearly marked for polarity.
Sensors to the shield The final step is to solder the sensors (which already have the breakout pins soldered to them) to the shield. There are two options for this step. One is to solder the sensors directly to the shield through the breakout pins that they already now have. With this option, the sensors are permanently soldered to the shield. The second option is to first solder stackable female headers (the short-pinned ones) to the shield and then connecting the sensors to the shield through them. The second option thus allows the sensors to be removed if necessary to be used on another shield or another project.
17 OPTION 1
18
OPTION 2
19
20
An important thing to remember when making the power line is to consider the frame and its dimensions in order to make the power line fit into the frame without any problems, such as interfering with other components.
21 Arduino power source Although using the main battery for providing power to the Arduino is fine, it is recommended to use a separate battery, such as a small capacity 7.4v Lipo, to do so. This will ensure a clean power source for the Arduino and also reduce the heat generated by its onboard voltage regulator. A good such battery is the Rhino 610mAh or 460mAh 7.4v Lipo from HobbyKing, each costing around $4.
It is also highly recommended to solder a female JST connector directly into the Arduino power-in jack (or rather in the back of it). This will eliminate the need for using a 2.1mm center positive plug and will allow for a direct connection to a battery such as above.
22
23
The first image above shows the plus (+) configuration in which the motor ESCs are connected normally: the right motor ESC is connected to the Right motor pins on the shield, left motor ESC to the Left motor pins, and so on. The second image (on the right) shows the X configuration in which each of the four sides (front, rear, right, and left) have two motors and must be connected as depicted. Arduino orientation The correct way to secure the Arduino (which also has the shield and the sensors on top of it) is to have the USB connector side of it representing the rear side of the quad.
24
25 Finally, repeat the above steps, but this time check the responses of the actual motors and crosscheck them with the responses of the motors in the Configurator. The virtual motors in the Configurator and the actual motors should have the same (correct) responses. Note: If the automatic ESC calibration was used (Calibrate ESCs button in the Configurator), then when armed (throttle stick to the lower right), the motors would spin at a low rate indicating that they are armed. Also, when zeroing all the sensors out through the transmitter (left stick to the lower left and right stick to the lower right), the motors should spin up at a low rate three times and then stop.
26
4. LINKS TO PARTS
Arduino Duemilanove http://carancho.com/AeroQuad/store/ (AeroQuad shop) 5 DOF IMU http://carancho.com/AeroQuad/store/ (AeroQuad shop) IXZ500 Dual Axis Gyro http://carancho.com/AeroQuad/store/ (AeroQuad shop) AeroQuad shield v1.6.1 http://carancho.com/AeroQuad/store/ (AeroQuad shop) Stackable female headers http://carancho.com/AeroQuad/store/ (AeroQuad shop) Breakout pins http://carancho.com/AeroQuad/store/ (AeroQuad shop) Hextronik DT750 motors http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=6247 (HobbyKing) Hacker Style 20-22L motors http://hobbyking.com/hobbyking/store/uh_viewItem.asp?idproduct=4700 (HobbyKing) Hextronik 24gram 1300kv motors http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=2069 (HobbyKing) Turnigy 2217 20turn 860kv motors http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=5691 (HobbyKing) Turnigy Plush 10 amp ESCs http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=4204 (HobbyKing) Turnigy Plush 18 amp ESCs http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=4312 (HobbyKing) Turnigy Plush 25 amp ESCs http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=2163 (HobbyKing) Zippy Flightmax 4400mAh 11.1v 15C battery http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=6504 (HobbyKing) EPP1045 counter-rotating propellers set www.quadroUFO.com (QuadroUFO) APC1047 counter-rotating propellers set http://carancho.com/AeroQuad/store/ (AeroQuad shop) Female-female servo extension cables http://carancho.com/AeroQuad/store/ (AeroQuad shop) Spektrum DX7 Mode 2 radio with AR6200 receiver eBay (seller: gotheli) or local hobby shop or http://www.toddsmodels.com/default.asp (Todds Models) 3mm bullet connectors eBay (seller: rctimer) 18 and 16 gage wire RadioShack, other Turnigy Accucel-6 balancer/charger http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=7028 (HobbyKing) 12v 5A power supply http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idProduct=6256 (HobbyKing) Battery voltage alarm eBay (seller: goodlucksell) http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=7223 (HobbyKing)
27 15 watt soldering iron RadioShack, other 30 watt soldering iron RadioShack, other 0.032 solder RadioShack, other 0.062 solder RadioShack, other 610mAh Arduino battery http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=7305 (HobbyKing) JST male/female connectors w/cables http://www.dealextreme.com/details.dx/sku.15234 (DealExtreme) Square carbon fiber 10x10x750mm tubes http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=9012 (HobbyKing) 4mm bullet connectors w/ protector http://hobbycity.com/hobbycity/store/uh_viewItem.asp?idproduct=9283 (HobbyKing)
In this revision: removed the TowerPro 2410-09 motors (no longer recommend them as I believe they have been a source of instability in the past) added the Hextronik DT750 motors (very smooth and powerful heavy duty motors, personally tested) added the Hextronik 24gram 1300kv motors (tiny and smooth motors, personally tested to work very well with 8 inch EPP0845 props on a less than 900 grams quad) added the Turnigy 2217 20turn 860kv motors (heavy duty motors, tested by multiple users with positive feedback) added two more ESCs, the Turnigy Plush 10 amp and the Turnigy Plush 25 amp ones for a larger variety