October 20, 2013

Stanford UAV Club Quad Copter 101

Written by Trent Lukaczyk, Stanford Aeronautics and Astronautics

This guide points you to the resources you need to build a quadcopter from basic components. It's based on the 3D- Quad-C frame. This frame is sturdy, using square aluminum tubes to hold four 850kV brushless motors that spin 10"x4.7" APC Props. It's a versatile frame, assembled mostly with screws and nuts, and has a lot of space for adding new components to fit your particular mission.

3DR ArduCopter Quad-C

Quad copters work by independently controlling the power given to four motors and their propellers. For example, to pitch the quad copter forward (the blue arms in the above picture), the thrust of the rear propellers must increase, and the thrust of the fore propellers must decrease. This control is managed by an on-board computer. For this project we'll use a popular based board called "ArduPilot".

There are a few advantages of the multi-rotor approach to flight, compared to . First, quad copters are dead simple, because they don't need complicated collective assemblies to control the rotor's thrust direction. Second, they have less spinning kinetic energy, which makes them safer and more robust to crashes. These are two very important things for a useful unmanned aerial system!

1 October 20, 2013

What You Need

1. Order a Frame Kit from 3DRobotics. See the link below. You can omit the Ardupilot APM, GPS Radio, and Telemetry Kit, if you will borrow these components from the club, or if you have them already. https://store.3drobotics.com/products/3dr-arducopter-quad-c-frame-kit-1 With this kit, you will get: a. Frame arms and plates, and a bunch of screws b. Four motors c. Four speed controllers (ESCs) d. Four propellers e. Power distribution board, which organizes the connections to the speed controllers f. APM Power Module, which monitors your battery usage g. Servo wires It will ship in 1-3 days from San Diego, so expect about 5 days between clicking pay, and the kit showing up at your door.

2. Decide on Batteries This quad frame needs a three-cell (3S) lithium battery. Each cell of a lithium battery provides 3.7 volts, so together a 3S pumps 11.1V. The energy capacity of the battery is indicated in milli- amp-hours (mAh). This parameter indicates how much current (in milli-amps) the battery can produce for an hour at its nominal voltage.

This quad frame draws approximately 10-15 Amps (not milliAmps) while flying, at the battery's nominal voltage. You can use this to estimate how long your quad might fly for a given battery.

The club has several 2200 mAh batteries (milli-amp-hours, a measure of energy capacity) that you can borrow. These can give you about 10 minutes of flight time with the 3DR quad kit, before you add peripherals like a camera.

If you are looking for more flight time, or to add a bunch of extra equipment, you might consider buying a larger battery. But remember that bigger batteries are heavier too! Two options available on amazon are - a. 4000 mAh battery (~15 mins unloaded flight) http://www.amazon.com/Venom-4000mAh-Battery-Universal- System/dp/B000W7WWFW/ref=sr_1_1?ie=UTF8&qid=1382281135&sr=8- 1&keywords=venom+lipo+3s b. 5000 mAh battery (~20 mins unloaded flight) http://www.amazon.com/Venom-5000mAh-Battery-Universal- System/dp/B0042JD6S8/ref=sr_1_1?ie=UTF8&qid=1382282643&sr=8- 1&keywords=venom+lipo+3s+5000

2 October 20, 2013

3. When you get your kit. You'll potentially need a few more things.

First, check that both the ESCs and motors came pre-assembled with bullet connectors. If either component's three-phase wires do not have connectors, you will need to buy 4mm bullet connectors (four sets of three). You can get these at the "local" hobby shop - AeroMicro (http://stores.aeromicro.com/-strse-3704/4mm-Bullet-Connector-Set/Detail.bok)

Second, you'll need to find Threadlocking compound (aka LockTite) for attaching the motors to the frame. Ace Hardware on Alma Street is a nearby store that will have this.

Third, the power module you will get with your frame kit will likely have XT60 connectors. The hardware that the UAV Club provides uses Deans connectors. So you'll need to make a decision - Either borrow one of the club's power boards, or replace/re-solder the connectors on the one you get with your kit. You can also buy Deans connectors from AeroMicro. (http://stores.aeromicro.com/-strse-1057/Deans-Male-and-Femal/Detail.bok)

4. Acquire Electronics. Ask one of the club leaders for these parts to give your quad some guts: a. ArduPilot APM b. GPS Radio c. Telemetry Kit (USB ground radio + 6pin flight radio) d. Power Module e. Radio Transmitter (the radio controller) f. Radio Receiver g. Cables

3 October 20, 2013

Build Your Frame

3DRobotics provides a good assembly guide for this frame - http://3drobotics.com/wp-content/uploads/2013/08/Quad-C-DIY-Assembly-Instructions-WEB.pdf

At this point, you'll need to download, study and follow this guide, until you have an assembled frame, with all its flight electronics.

This guide assumes some familiarity with RC electronics. If at any point you get stuck, you can always ask the club for help!

Some helpful hints -  You'll need to solder components in this kit. There are a couple good guides for this, and members of the UAV club can help train you too. o Soldering Comic: https://dlnmh9ip6v2uc.cloudfront.net/learn/materials/42/FullSolderComic_EN.pdf o YouTube Video: youtu.be/3LJIQeKuLLU o Email Stanford Club: [email protected]  As mentioned in "What You Need", you might need to solder bullet connectors to your ESCs or motors, and replace the connectors on your Power Module  Make sure to check the direction that each motor spins before you secure any hardware to the frame. SAFETY WARNING: Do NOT do this with propellers attached... o A good way to check which way the props are going is to hook one ESC and Motor assembly to your radio receiver and a battery pack. Then you can use your radio transmitter's throttle to turn the motors.  Remember to use locktite on the motor screws in the frame, and in the collet, but not in the propeller cap.  The props have hints for figuring out which way they spin. The side with embossed printing on it ("APC 10x4.7") should face up. This printing also indicates the leading edge of the prop, which tells you which direction it turns.

4 October 20, 2013

Setup the AutoPilot

Now you're ready to program the ArduPilot!

You will do this through Mission Planner, a free and open source software that programs your Arduino, and plans autonomous missions. Unfortunately this is only a Windows program for now. There are alternative software available, for which you can find links on the ArduPilot website.

At this point, you'll need to study and use the ArduPilot website to setup your APM http://copter.ardupilot.com/wiki/introduction/

The basic steps for this are

1. Install the software 2. Flash the ArduPilot firmware 3. Calibrate the Compass, , and Radio 4. Configure the Power Module 5. Setup Flight modes 6. Practice Arming/Disarming 7. Run an Initial Control Gain (Roll/Pitch) Tuning

Some Helpful Hints -

1. At some point, you should expect to have read all of the "Instructions" part of the arducopter website. But to begin, you should be able to focus on the "First Time Setup" and "First Flight" sections. 2. You may need to download drivers before your computer recognizes the ArduPilot over USB Cable, and over the USB Radio 3. If you're a first-time quad pilot, be sure to check the page on "Tips for New Pilots". 4. SAFETY TIP: Beware of the props any time the battery is connected. 5. There are really helpful YouTube videos of people explaining how to do these steps, many of which are included on the arducopter website. 6. Your primary goal for tuning the control gains is to get your Quad Copter to respond to controller stick inputs quickly, but without overshooting and oscillation. The initial gains for the control software are already in a good ballpark for this frame. You should only need to adjust the proportional (P) gains for the pitch and roll rates.

5 October 20, 2013

First Flight

Are you ready to try to fly this thing? Below are some tips to go with the ArduCopter guide.

For your first flights, find a grassy field with no one around. You will want to start flying using "Stabilize mode". In this mode the ArduPilot tries to maintain a level orientation, but does not try to maintain position. You will need to manually control the thrust and pitch/yaw to keep your quad in one place.

Remember, a quad copter is a basically a flying lawn mower. Be safe!

Try momentarily lifting the quad copter off the ground. Watch out for the quad (excessively) tilting over during lift off, or responses to your stick input that you don't expect.

Slowly work your way up to hovering in Stabilize mode. This will take some practice. It's important to be able to fly in this mode. Stabilize is your go-to mode when things go wrong.

You can set your mode switches to toggle between "Stabilize" and "Position" mode. In Position mode, the ArduPilot uses the GPS radio and a built in Barometer to hold X-Y-Z position. Inputs from the control sticks will move the set points for the hold location. Be ready to flip back to stabilize mode if you see something unexpected happen.

For more information, YouTube has a vast knowledge of quadcopter flight tips.

An Autonomous Mission

Once you are able to fly the quad copter manually, it's easy to program an autonomous mission with the Mission Planner

Use the ArduCopter guide's videos to learn how to program waypoints http://copter.ardupilot.com/wiki/planning-a-mission-with-waypoints-and-events/

You'll need to set your mode switches to toggle between "Stabilize" mode and "Autopilot" mode.

Start off with a simple mission -  Five way points in a circle over Lake Lag  About 20m in diameter, Centered 20m or so in front of you (your home position)  15m above the ground  With a Horizontal Speed at 100cm/s (can be set in the PID configuration tab)

After you've uploaded the mission to the ArduCopter, execute it by lifting of manually, and then toggling your mode to Auto. Keep a close eye on your quad, and flip back to stabilize at the sign of any trouble!

After you feel confident flying this mission, add take-off and land segments to the mission. If all goes well, your quad will fly take-off to touch-down without any input from you!

6