44
AeroBerry Autonomous Tracking Quadcopter CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager [email protected] Brendan Maher Electrical Engineer Deputy Manager [email protected] Eric Yu Electrical Engineer Treasurer [email protected]

AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager [email protected]

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

AeroBerry Autonomous Tracking Quadcopter

CE/EE 129 Final Report 2013

John Branscum Computer Engineer Team Manager [email protected] Brendan Maher Electrical Engineer Deputy Manager [email protected] Eric Yu Electrical Engineer Treasurer [email protected]

Page 2: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

TABLE OF CONTENTS INTRODUCTION 2

SYSTEM BLOCK DIAGRAM 2

RESEARCH-JUSTIFICATION OF MAJOR COMPONENTS 3

DESIGN DETAILS 12

Physical Structure 12

Computing 13

Communication 13

Camera System and Video Tracking 14

Autonomous Mode and Vehicle Tracking 17

Power 19

CHALLENGES AND LESSONS 20

BUDGET 22

CONCLUSION 22

ACKNOWLEDGEMENTS 23

REFERENCES 23

APPENDIX 25

System Block Diagram 25

AeroBerry Concept Drawings 26

Landing Gear Design 29

Exoskeleton Design 30

AeroBerry Component and Plat Placement 31

Video Tracking Software Flow Chart 32

Vehicle Tracking Software Flow Chart 33

Power Distribution Diagram 34

Power Budget 35

Schematics 35

Budget 36

Team Charter 39

Gantt Charts 43

1 | P a g e

Page 3: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

INTRODUCTION

Abstract:

The AeroBerry provides a compact aerial platform that can autonomously track and provide video of a moving target. Our project uses a Raspberry Pi for primary computing and a secondary flight control board to control motor speed. For tracking, we are using the IR camera from a Nintendo Wii Remote and placing an IR emitting beacon on the target. Video of the target is provided from an onboard GoPro video camera.

Motivation:

Current camera systems often use cable and pulley systems, and sometimes helicopters, to provide aerial footage during sporting events. These systems are limited in range by their setup and require significant time and personnel to operate. An autonomous aerial vehicle capable of identifying and tracking a target could provide aerial video footage of outdoor sporting events, including skiing, bicycling, and rock-climbing, that would otherwise require more resources to obtain.

Project Specifications:

The tracking platform, referred to as “AeroBerry,” will be able to identify a target and autonomously track the target from a predetermined distance.

By the end of the project duration, the AeroBerry will be able to identify a ground target and track the target from a distance of approximately 10 feet while keeping the object in the video frame. The target will be slow moving (moving less than 1 mph) with a tracking demonstration of about three minutes. Refer to Appendix I for Team Charter and distribution of tasks.

Figure 1: Project concept

2 | P a g e

Page 4: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

SYSTEM BLOCK DIAGRAM

The system block diagram (Appendix A) shows the components that make up the AeroBerry platform. The project mainly consists of two capable boards (AeroQuad 2.1 and Raspberry Pi) and a camera tracking system. A separate power distribution block diagram for the system can be found in Appendix F.

Figure 2: System Block Diagram

RESEARCH - JUSTIFICATION OF MAJOR COMPONENTS

Aerial Platform:

At the core of this project lies the aerial platform. The platform needs to be mobile but also stable enough to provide steady video footage. Because of the added components, primarily the camera system but also the additional boards and sensors, we needed a vehicle that could handle an added payload of at least 1.5 pounds (1 pound estimated for camera setup, 0.5 pounds for added boards and sensors).

Two of the most common remote control aerial platforms are planes and helicopters. Since the movement of the target will be unpredictable, a plane might struggle to keep up with the target

3 | P a g e

Page 5: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

during sharp turns or when the target is moving slowly. Adding the camera weight to the plane would also raise the speed at which the plane stalls, making it even harder for the plane to track the target. 1 A helicopter, on the other hand, can maneuver in close quarters and is capable of vertical takeoff and landing. A helicopter would also be capable of maintaining a stable hover when the target is moving slowly or not moving.

The third option, and the platform we ultimately chose, was a quadcopter. A quadcopter is similar to a helicopter because it provides the compact aerial maneuvering and stability which is required for our project. Quadcopters have four counter rotating propellers to cancel the torques of the rotating blades and keep the platform from yawing, or changing directions along the horizontal axis (Figure 3).

When deciding on the frame, we considered the affordable Parrot AR Drone2.0 and other pre-assembled commercial quadcopters before ultimately deciding to build our own quadcopter based on the AeroQuad Cyclone Frame. The main constraint with commercial products is the lift payload versus cost comparison. The AR Drone 2.0 has a lift capacity of about 0.55 pounds (or 250 grams) before it become too “sluggish” to fly. The adding weight also severely limits the battery life of the product.2 Increasing the payload corresponds to a sharp increase in the price of the platform. Pre-built quadcopters that are designed to a carry camera system, such as the Turbo Ace X830, provide a recommended payload of up to two pounds but they cost around $1,600 (X830 base model) for the platform alone, according to the Turbo Ace website. This option exceeds our budget and would not alone room for purchasing cameras, boards or sensors.

Though more expensive than the AR Drone (but less expensive than the X830), the AeroQuad Cyclone platform provides the size and lift capabilities that we will need to complete the project, while remaining in our budget. Since we added extra components and additional weight, we needed to use a platform that could handle a payload of 1.5 pounds and also provide housing for the added boards and camera system. The 10 inch propellers (10x5E, blade diameter and pitch) attached to the standard A2217-9 Brushless Outrunner Motors that accompany the Cyclone frame are capable of 1.85 pounds (29.62oz) of thrust per motor and are

1 “How to Make a Plane Fly Slow Without Stalling” 2 Refer to “Lift Payload” AR Drone Forum

Figure 3: Counter-rotating propellers

4 | P a g e

Page 6: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

designed for a quadcopter that weighs less than 4.4 pounds (2 kilograms). A comparison of the lift and power capabilities with various propellers can be seen in Table 1 below3:

Propeller: Volts (V): Amps (A): Thrust (g/oz): Power (W):

APC 10 X 5 E 12.31 V 14.20 A 29.62 oz 172.41 W

APC 10 X 7 E 10.83 V 12.04 A 24.67 oz 128.37 W

APC 10 X 7 E 11.06 V 9.31 A 16.61 oz 99.78 W

APC 11 X 5 E 10.78 V 13.86 A 27.92 oz 145.41 W

APC 11 X 7 E 12.12 V 17.91 A 31.41 oz 212.55 Table 1: Power, thrust propeller comparison

The Cyclone is usually sold as a kit, providing a guide when choosing components for a quadcopter. The Cyclone is easy to customize with readily available replacement parts. AeroQuad also has a complete online community. All of the flight software for the AeroQuad flight boards is open source with an active online forum to assist with problems during the construction and setup of the platform. This is especially helpful for our team since we are new to the world of remote control flight.

Flight Control Board (Low Level Computing):

While researching the frame for the AeroBerry, we also began to research a flight control board capable of controlling the multirotor aircraft. The AeroQuad Store (where we found the Cyclone frame) has two flight control boards with open source flight software: the AeroQuadv2.1 and the AeroQuad32. With complete access to the flight software, we can more easily set up the board to accept autonomous controls and customize the software to work with add-on sensors like range sensors and GPS.

The AeroQuadv2.1 flight control board is based on an Arduino Mega prototyping board using breakout boards to implement the accelerometer, gyroscope, magnetometer, and barometer. Though it has all of the necessities for our design, the AeroQuadv2.1 board is larger and more expensive than most flight control boards because the board is pieced together using other standalone sensor boards.

The AeroQuad32 is the newest flight control board available from the AeroQuad Store. By eliminating the Arduino Mega and integrating the necessary sensors on a single board, the AeroQuad32 is a cheaper and more compact option than the AeroQuadv2.1. Since the functionality of both boards is essentially the same, we originally chose the AeroQuad32 based on the size and cost factors of the board.

3 AeroQuad A2217-9 documents

5 | P a g e

Page 7: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

AeroQuad32 AeroQuadv2.1 Design Custom AeroQuad Board

(50x50mm) Arduino Mega w/ Shield (53.3x101.6mm)

CPU STM32, 168MHz ATmega2560, 16MHz Flight Sensors MPU6000 (gyro,accel)

MS5611 (barometer) HMC5883L (magnetometer)

ADXL345 (accelerometer) ITG-3200 (gyroscope) BMP085 (barometer) HMC5883L (magnetometer)

Communication UART I2C

UART I2C

Expansion 4 PWM servo outputs

3 PWM servo outputs, 5 analog inputs (for range sensors)

Battery Typically driven by 2S-3S. Can be driven from 4S battery but regulators will heat up

Driven by 2S-4S battery.

Cost $149.95 $199.95 Table 2: Flight board comparison

After receiving a defective AeroQuad32 board (due to faulty sensor soldering), we eventually switched to the AeroQuadv2.1 board because it is more proven, with numerous updates and improvements to the shield design over the last few years. Given the relatively short time span for the project, we did not want to risk receiving a faulty replacement board.

High Level Control Board:

For the primary computer, we need a portable computer with extensibility. Since we have a mobile platform, we needed to find a compromise between power consumption and processing power within the project budget. The Raspberry Pi is an inexpensive Linux computer contained entirely on a single board. It supports HDMI, ethernet, USB, and GPIO providing opportunity for expansion. Its popularity as a development platform stems from its easy adaptability and low price. It runs a variant of the Debian distribution, meaning that it can run most programs available for Linux, including optimized Python libraries. This ability to use USB peripherals along with extensive software libraries led us to choose the Raspberry Pi over a simpler microcontroller.

Tracking Cameras:

To provide video tracking of the target, the AeroBerry needs a camera that can identify a target from a distance of greater than 20 feet with a quick refresh rate to capture any movement of the target.

6 | P a g e

Page 8: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

At first, we considered using a thermal camera capable of detecting the body heat of the target. The Flir i3 Thermal Camera, as an example, has a 9 Hz refresh rate and can sense temperatures ranging from -20°C to 250°C with a sensitivity of less than 0.15°C. This would provide enough speed and accuracy for tracking the target and it would also leave the project open for varying future applications. Unfortunately, the thermal data would need to be processed to identify the target, using valuable processing resources from the flight boards, and the Flir i3 starts at $1,195 for the base model which would significantly increase the overall cost of the project beyond our budget.4

A second option would be to use visual tracking from a webcam. The webcam would be more affordable than the thermal camera, but it would still require significant processing resources beyond the capability of the Raspberry Pi (or most portable microcontrollers) in order to identify the target.

As an alternative, we found that an IR camera could accomplish a similar task if the target had a beacon emitting light in the infrared range. The Nintendo Wii Remote is a relatively inexpensive device that can easily be modified to accomplish a number of tasks, including infrared tracking. The Wii Remote has an integrated accelerometer and gyroscope, but more importantly, it has an integrated infrared camera (sensor) capable of detecting up to four separate infrared sources with a quick 100Hz sampling time. The camera needs a fast refresh rate to be able to quickly follow any movements of the target and calculate the exact location of the target and the Remote is designed to identify a light source even during fast paced gaming.

Additionally, the Wii Remote automatically calculates the “X” and “Y” position of the infrared target in the frame, greatly simplifying the tracking software and reducing image processing on the Raspberry Pi. This allows the Raspberry Pi to save most of its computational resources for autonomous controls. Since the Wii Remote can only see light in the infrared range, a compact GoPro HERO2 video camera will be mounted with the Wii Remote to capture video of the target. The HERO2 is lightweight at only 0.22 pounds (100 grams), but it is rugged and records quality video with 720p or 1080p resolution.

The infrared sensor can be removed from the Wii Remote controller and hardwired directly to a microcontroller which would cut excess weight and size. We have decided to leave the controller intact to reduce wires and simplify the process of recreating the tracking system in the future.

4 Refer to Flir product website

7 | P a g e

Page 9: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

Target Beacon:

Since the AeroBerry will be tracking with an infrared camera, we need to have an easy-to-see infrared beacon placed on the target. After finding tests of the Wii Remote’s response to infrared LEDs of different wavelengths, we concluded that the infrared sensor in the Wii Remote is capable of detecting light from 850nm to 950nm, but it has an optimal input wavelength of 940nm.5 At a distance of twenty feet, our minimum distance to identify the target, the Wii Remote recorded an intensity reading of 4 out of 5 for the 940nm wavelength LED. With the same setup, LEDs emitting 890nm and 950nm light only recorded an intensity of 3 out of 5 from the same distance, while LEDs emitting 850nm and 870nm light only recorded 2 out of 5. By using a 940nm light beacon on the target, we allow for the best beacon visibility by emitting light that matches the optimal wavelength of the Wii Remote.

LED WAVELENGTH (nm) LED SOURCE INTESITY (From Wii remote, low: 1 - high: 5)

850 2 870 2 890 3 940 4 950 3

Table 3: Wii Remote source wavelength comparison

Camera Mounting System:

With a moving quadcopter, a fixed camera would struggle to keep the target in frame. To give the camera more movement, we needed to decide on a servo mechanism that could move quickly in multiple directions. With a pan & tilt servo mechanism, the cameras can rotate 180° on the horizontal (pan) axis and up to 180° along the vertical (tilt) axis with a stationary mount. By adding the pan & tilt system, the servos can quickly and smoothly reposition the cameras to follow the target while the quadcopter rotates at a slower rate to keep the platform steady.

There are many companies that make pan & tilt systems for cameras but we primarily looked at the SPT100, SPT200 and the smaller SparkFun Pan Tilt Bracket. The

5 “Wii Remote IR Sensitivity”

Figure 4: SPT100 Pan & Tilt System

8 | P a g e

Page 10: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

SPT100 is a lightweight, inexpensive setup capable of handling up to a 10oz camera, while the SPT200 is a slightly larger and more expensive model capable of moving a 32oz camera. The servos do not come with either setup. The HS645MG servos are the specified servos to use with the SPT100 and are half the price of the HS985MG servos that are specified for the SPT200. The SparkFun bracket required smaller HS55 servos. A comparison of the three systems can be seen in the table below:

SPT100 SPT200 SparkFun Pan/Tilt Specified Servos (size) HS645MG (Standard) HS985MG (Standard) HS55 (Micro) Servo Speed (sec/60°) 0.20 0.13 0.14 Servo Torque (oz-in.) 133 172 18 Max Arm Payload (oz) 10 32 3 System Weight (oz) 5.4 9.9 2.5 Mount Upside-down Yes Yes Unknown System Cost (Bracket + Servos)

$83 $170 $26

Table 4: Pan & Tilt comparison

The SparkFun system is inexpensive, but it is not intended for heavier loads and it does not have enough torque to efficiently move the cameras. Both other systems provide the torque and suspended mounting option that is ideal for the aerial camera system. Given the lightweight characteristics of the Wii Remote (3oz with two AA batteries) and the GoPro (3.5 oz), we chose the SPT100 pan/tilt system to avoid adding the extra weight and cost that accompany the SPT200 system.

Battery:

To begin our search for a battery we first had to calculate the flight time we wanted to achieve and how much load current our system would draw. Our proposed system, without the new landing gear, has a max current draw of around 70.5A and a proposed average current draw around 60A. We then aimed for a flight time of around 7-10 minutes of with all the components functioning properly. The next step was to find a battery that would support the current draw.

9 | P a g e

Page 11: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

Table 4: Power budget

We selected lithium polymer (LiPo) batteries over batteries like lithium ion because most lithium ion batteries contain very low amperage not allowing the distribution of power needed to run ESCs and motors. Lithium polymer batteries provide high energy storage to weight ratios and exist in a variety of shapes and sizes.

Thus, we chose the Turnigy 5000 mAh 4S1P 20C lithium polymer batteries. Before selecting them, we originally considered a much larger 5 cell, 8000mAh battery. We switched and ordered a smaller, less powerful battery because we underestimated the size and weight of the original battery. The larger battery was not compatible with the electronic speed controllers (ESCs) and motors that came with the AeroQuad Cyclone kit, both of which support a 2-4 cell lithium polymer battery. We found a smaller, lighter, and more affordable battery in the Turnigy 5000mAh battery that can still handle our heavy payload. The battery was also lighter and smaller at a weight of 1.18 pounds (536 grams) with a package size of 148 x 49 x 33 mm.6

The capacity rating is important because it dictates how much current can be drawn from the battery depending on the load and the speed at which it can drain will give us an approximate flight time. To calculate the flight time in minutes, we first used the capacity rating as the reference (5000 mAh ), divided the rating by the current draw, and multiplied it by 60. A 10A load would take 30 minutes to discharge, and our proposed case (60A) would discharge in 5 minutes. Because the battery had limits in its capacity for the weight and size ratio, this current load and the resultant flight time will not meet our target flight time of around 7-10 minutes. Instead, our final system is capable of flying for 4.28 minutes. If we had originally used the 8000 mAh battery with a current load ranging from 60-70A, we would get an estimated flight time of 7 minutes.

6 “LiPo Batteries – Choosing and Maintaining"

Item Voltage CurrentATMega 2560 5-12V 50 mA per I/O pinRaspberryPi 5V 750 mAUSB Hub Rpi RpiServos 5V 350 mAUltrasonic Range Finder 5V 100 mATx/Rx Receiver 5V 80 mASparkFun 9DOF sensor stick 2.5V 6.5 mABMP085 Barometer 1.8V 1 mABrushless Motors (x4) 11.1V 18A for 60s (x4)Electronic Speed Control 14.8-16.8V 18A for Motor (30A max)

AeroBerry Power Budget

Total Average Current Draw = 70A

10 | P a g e

Page 12: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

In addition to the battery working with the speed controllers and motors, the 4 cell Turnigy 5000 mAh 4S1P 20C is also capable of discharging 100A. We calculated the 100A by taking the discharge rate (20C) and multiplying it by the battery capacity (5A). Since discharging 100A would drain the battery extremely fast, it has a safety that will prevent the battery from heating up to avoid a possible fire.

Regulators:

To supply different voltages to the motors, the flight boards, and the added components, we considered using a voltage regulator, along with supplying a lower voltage using a completely separate battery. We chose to use a voltage regulator with one battery to sync the entire system together and to save weight by not adding extra batteries.

The next step was to decide on a voltage regulator. We decided to use a switching converter, more specifically a buck converter (step-down voltage regulator), over a linear regulator because of the efficiency of the switching converter. This would conserve energy and promote a longer flight time. Linear regulators provide a constant voltage by varying the effective resistance where the power supplied is fed into it. The power dissipation of a linear regulator is directly proportional to the output current for a given input and output voltage. The efficiency of a linear regulator is typically around or below 50%, with much of the energy eventually lost as heat. For example, to quickly calculate the efficiency of linear regulator, if we expect a 5V

output voltage with an input of 9V, the efficiency would be 𝜂 = 5𝑉15𝑉

× 100% = 33% efficiency.7

With a high expected current load of around 2A, we would need a heat sink to dissipate the generated heat.

The buck converter works as a step-down DC to DC converter. It is a switched-mode power supply that uses two switches (a transistor and a diode), an inductor, and capacitor. To regulate the voltage (step-down), the buck converter implements a PWM controller that times the MOSFETS that act as the switches. When the switch is first closed, the inductor acts as a stabilizer by dropping its voltage to fight against the current increase from the voltage source. Over time, the inductor will stabilize by slowly allowing the increase in current and decrease its voltage drop. As this is happening, the inductor is slowly storing energy. Once the inductor is almost fully charged, the switch opens, allowing a voltage drop across the inductor, netting the net voltage seen by the load as lower than the voltage source. To control the timing of the MOSFET transistor switch, the PWM controller uses a periodic switching period. Because there is voltage variation, to maintain the average value of the desired voltage output, a filter is implemented in the form of a capacitor. This active operation of switching regulators

7 Refer to “Efficient Low Power Regulation”

11 | P a g e

Page 13: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

accomplishes a much higher efficiency rating, as high as 92%, when compared to the linear regulator.8

DESIGN DETAILS

Physical Structure:

The AeroBerry is quad-configured multi rotor aircraft built using the AeroQuad Cyclone frame. The fully customizable frame, complete with all the necessary mounting plates, is made from a lightweight aluminum and plastic combination with square tube aluminum arms. The power and processing components are grouped in the center of the frame in a cylindrical housing with the four equal spaced 12” arms pointing outward. There is an 18A brushless motor mounted at the end of each arm with a 10” propellers attached to each motor.

Figure 5: AeroQuad Cyclone setup (self created image)

Including the rotor sweep area the frame measures 29.33”x 29.33” and with the custom landing gear the arms rest at 13” tall with an overall height of 17”. The landing gear suspension (Appendix C) is made from 0.1875 inch acrylic brackets that are attached to each arm using zip-ties and rubberbands. An angled 0.25 inch wooden leg supports each arm with the shock absorber from a 1:10 scale remote control car completing the triangle between the arm and the leg to absorb most of the impact during hard landings. With all of the components mounted, the entire AeroBerry platform weighs approximately 5.1 pounds, which is slightly higher than the recommended weight for our motors. Even with the extra weight, the motors provide enough thrust for the platform to be aerial and mobile, yet stable enough to track a target. We

8 Schmitz, T. “Designing a Buck Converter”

12 | P a g e

Page 14: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

have also designed an acrylic exoskeleton (Appendix D) to protect the user from the propellers and provide mounting brackets for obstacle detection. Simplified concept drawings of the platform can be found in Appendices B-D and the component and plate layout can be found in Appendix E.

Computing:

The AeroBerry contains two main computers. The first board, the AeroQuadv2.1, is a microcontroller responsible for real-time sensor analysis, motor control, and receiving commands from a user controlled transmitter (see Communication). It is packaged on the Arduino Mega open source electronics prototyping platform. Through a series of breakout boards and shields, the ATmega is connected to a gyroscope, accelerometer, barometer, and magnetometer. The flight control software to read sensor data and send motor commands is written in C++ with the binaries flashed directly to the ATmega microchip, bypassing the standard Arduino interface. Lastly, the flight board receives commands from our RC 6-channel controller. Refer to the System Block Diagram in Appendix A for general interfacing of computing devices and sensors.

The other computer is the Raspberry Pi. This is a full-fledged computer, rather than a microcontroller and runs the Raspbian distribution of Linux. The Raspberry Pi runs a Python script that reads camera data from the Wii Remote, sends tracking commands to the servo system, and also sends flight commands to the flight board. The video tracking and autonomous vehicle tracking software flowcharts (Appendix F and Appendix G, respectively) are discussed in detail in the Camera System and Autonomous Mode sections.

Communication:

The AeroBerry is controlled with a Hobby King 6-channel remote control, designed for use with remote controlled planes and helicopters. It operates on the 2.4 GHz channel, shared with the 802.11 standard. We only use five of the channels for flight control, leaving one channel to initialize the tracking functions. Controllers in the United States operate in Mode 2, which is a particular mapping of the roll, pitch, and yaw controls to the control sticks. Throttle and yaw are mapped to up/down and left/right of the left stick, respectively. Pitch and roll are up/down and left/right of the right stick. A diagram of the transmitter controls can be seen in Figure 6 below:

13 | P a g e

Page 15: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

Figure 6: Transmitter controls

Communication between the two computers is handled with a UART signal, transmitted through the USB cable that also provides power to the flight board. We used the default PySerial library to establish the connection. We decided to route the flight signals through USB, rather than though GPIO pins, to make a more reliable connection with a clean cable. We originally encountered communication issues caused by buffer overflow errors on the flight control board when receiving commands from the Raspberry Pi. To work around this, we redesigned the flight control software to receive a single character over the serial connection rather than a string of individual motor commands. The flight control board can then translate the received character into a directional command, simulating a command normally sent from the transmitter.

Autonomous flight is achieved by superimposing control signals from the Raspberry Pi on top of the transmitter signals. Functionally, this allows the quadcopter to control its movement without the pilot ever totally relinquishing control. This is the primary safety feature of the system. If the script sending flight commands were to fail, the pilot would still be able to fly and safely land the quadcopter.

Camera System and Video Tracking:

The purpose of the camera system is to identify an infrared beacon on the target and then relay information to the Raspberry Pi to be processed. For the camera system, we are using an

14 | P a g e

Page 16: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

infrared sensor, a webcam, a pan/tilt mechanism, and two servos with a servo controller. With all of the components working together, the video camera will be able to hold the moving target in the center of its frame.

The first, and arguably the most important, part of the camera setup is the infrared sensor from a Nintendo Wii Remote. The remote’s infrared sensor it capable of detecting up to four separate infrared sources and assigning an “X” position, a “Y” position, and an intensity level for each source in the camera’s field of view. Because we have chosen to leave the controller intact, we will send these position values via Bluetooth to a Kinivo USB Bluetooth receiver (BTD-400) on the Raspberry Pi. Instead of pairing the Wii Remote with the Wii console, we can now pair it to the Bluetooth receiver on the Raspberry Pi. To pair and interface with the remote, we are using a python Wii Remote library called “CWiid.” CWiid allows us to read the information from the remote and use it in tracking software to identify and track the infrared light source on the target. The Wii Remote outputs a position value within its frame of view that is scale from 0 to 1028 along the horizontal and vertical axes. We therefore aimed to keep the light source at the location corresponding to 475-525 coordinates for both X and Y.9

For the infrared beacon we are placing on the target, we use a 20 watt infrared illuminating beacon that emits light at a 940nm wavelength. When combined with a simple acrylic filter on the Wii remote, the beacon is powerful enough to overcome most outdoor infrared reflections from the sun. For the acrylic filter, we have a 9/16 inch, semi-transparent “smoke” colored acrylic piece to cover the lens of the Wii remote. By attenuating incoming light, most of the reflections from foliage and bricks disappear before reaching the Wii remote’s lens. The light from the beacon is also attenuated, but the source is powerful enough to penetrate the filter and still reach the Wii remote’s infrared sensor.

Figure 7: Attenuation of light through acrylic lens cover

In order to follow the target without moving the entire AeroBerry platform, we have attached the SPT100 Pan & Tilt mechanism to the underside of the vehicle with the remote attached to

9 Refer to “Interfacing with a Wiimote” for CWiiD library

15 | P a g e

Page 17: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

the mechanism’s mounting arm. The mechanism works with any two standard sized Hitec servos. Our pan & tilt mechanism is controlled by two HS645MG Hitec servos which are each capable of a range of 180 degrees of rotation and can move at a rate of 300 degrees per second. Each servo is controlled by three wires: 5V, ground, and PWM. Sending various PWM values from 496µs to 2496µs will change the amount of rotation of the servo, which will in turn change the direction of the cameras mounted to the pan & tilt tray. Thus, the two servos can be controlled by any two PWM capable pins on a microcontroller. In the horizontal pan direction, the range of movement is only limited by the range of the pan servo, or 180 degrees. In the vertical tilt direction, however, the mounting plate is only capable of 135 degrees of movement before it comes in contact with the side of the tilt servo.

The Raspberry Pi only has one output pin capable of PWM output, but when used in conjunction with a Micro Maestro Servo Controller the two boards are capable of producing 6 PWM output channels. To control the servo controller, we use a python library to send serial commands from the Raspberry Pi to the Servo controller.10 The servo controller uses a USB interface to receive commands and effectively controls both servos to redirect the Wii Remote.

Since the Wii Remote can only detect light in the infrared range, we are using a compact GoPro HERO2 video camera to record video of our target. The GoPro is attached to the same mounting plate as the Wii Remote so that both cameras are always focused on the target.

For the video tracking, the Wii Remote sends the beacon location to the Raspberry Pi. The Raspberry Pi runs a software loop to continuously check the location of the beacon and then update the servos in order to bring the target to the center of the frame. There is a PID control loop to quickly center the target using the pan servo and a separate PID control loop to update the tilt servo on the vertical axis. This ensures that the target is constantly centered in the Wii Remote’s frame of view (in turn, centered

10 Refer to Piiroinen, J. Wu, B. Device.py library

Figure 8: Video tracking software flowchart

16 | P a g e

Page 18: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

within the GoPro frame), even if the target is moving. A software loop of the tracking process can be seen in Figure 8.

The camera system is mounted upside down off the front of the Cyclone frame with the battery mounted off the opposite end to counter balance the weight of the camera system. This can be seen in the side views of the AeroBerry in Appendix B.

Autonomous Mode and Vehicle Tracking:

When the “Autonomous Mode” control on the radio transmitter is activated, the AeroBerry begins to hold a constant altitude using the flight control board sensors while the Raspberry Pi runs the vehicle tracking software to move the platform.

The altitude hold function uses a Maxbotix MB1240 Ultrasonic range sensor as the primary altitude sensor, with the barometer on the AeroQuadv2.1 as a backup sensor. The MB1240 ultrasonic sensor is mounted vertically and directed at the ground beneath the quadcopter. We chose the MB1240 for its 25 foot range and its ability to filter out acoustic noise from the propellers. Even with the long range, the sensor maintains a narrow beam to avoid interference from the circulated air underneath the aircraft (Figure 9).11 We implemented a PID control loop in the flight board software to monitor the range sensor and adjust the motor speeds to maintain a constant height. The sensor is capable of calculating the distance to the nearest object using a scaled pulse-width signal or with a scaled analog output. To minimize electrical noise during high current operations (driving motors), we set up a simple power supply filter to provide

constant input power to the sensor (Figure 9). The set altitude is determined as the height when Autonomous Mode it activated.

The vehicle tracking software on the Raspberry Pi builds off of the video tracking software. A complete tracking software flow chart can be seen in Figure 10. Since the servos are limited to 180° of rotation, the actual AeroBerry platform will need to be able to rotate to allow for a complete range of motion for the video tracking. The aircraft’s heading is adjusted by reading the servo positions. While reading the pan servo, the Raspberry Pi checks to see in the pan servo is within a small window corresponding to the middle range of the servo (1450-1550µs). If the servo is not within the window, the Raspberry pi sends a command to the flight board to slowly

11 “MaxSonar Operations on a Multi-Copter”

Figure 9: MB1240 power supply filter and beam pattern

17 | P a g e

Page 19: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

yaw the aircraft until the target and servo are back within the desired window. The adjustment is done with a constant if-else statement to maintain a steady platform during the correction.

Using the tilt servo for the forward and backward controls is more difficult than using the pan servo for the yaw correction. When reading the tilt servo, the Raspberry Pi can easily decide if the target is within the desired tilt window while the platform is steady. However, as the AeroBerry begins to move (either forward or backward) the platform will be moving an angle causing the tilt servo to change its value. To counter the angle of the aircraft, we have created a desired tilt window for three cases: when moving forward, when moving back, and when not sending directional commands. As an example, when the AeroBerry is moving forward, and at a slight angle, the window is shifted slightly closer to the horizon. Once the beacon enters the window, the Raspberry Pi will stop sending directional command which will shift the window back to the desired tracking angle. The switch of the window and the leveling of the AeroBerry occur at virtually the same time, providing a more reliable method to follow the target.

Figure 10: Autonomous vehicle tracking software flowchart

18 | P a g e

Page 20: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

The Raspberry Pi is constantly reading the Wii Remote information, updated the servos and then using the servo positions to send directional control to the flight control board to autonomously move the AeroBerry based on the movement of the infrared beacon.

Power:

The AeroBerry uses a lithium polymer battery as the main power source. The battery distributes DC power to all components on the AeroBerry and also feeds into a regulator to supply the correct voltages for the various components.

Figure 11: Power distribution diagram

We chose a lithium polymer battery containing 4 cells, with each cell containing 3.7V to 4.2V. This gives us a total voltage of 14.8V at the lowest usable level and 16.8V at the maximum charge. To make sure we did not go under the lowest preferred voltage, we added an external battery monitor to set off an alarm when one of the cells drops below the minimum voltage level. Within the power budget, there are applications that require 5V and current loads of up to 1.5-2A. In the beginning we made a linear voltage regulator to supply 5V and a max current load of 700mA. While using the linear regulator (LM7805) circuit, we ran into problems with overheating of the regulator (solved with a larger heat-sink) and a blown capacitor caused by spikes in the current load. With the struggling linear regulator, we also investigated a switching regulator and eventually decided on a buck converter to limit the voltage.

19 | P a g e

Page 21: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

A buck-boost converter is a type of DC-to-DC converter that has an output voltage that can be either greater or lesser than the input voltage. To design our switching regulator, we used the recommended online simulation tool from Texas Instrument, WEBENCH, to set the expected voltage range (14V to 16V) and output voltage and current (5V and 2A). We chose the LM2673-3A12 as our buck converter. The buck converter can take any input voltage ranging from 8V-40V and output 5V and provide supply current up to 3A. With no experience with circuit board layout, we ordered an evaluation kit that comes assembled with all the resistors, capacitors, inductors all together with the LM2673-3A converter (Appendix J).

To distribute the regulated voltage required for applications such as the Raspberry Pi, we made a custom USB power supply out of prototyping perfboard. Other than two USB ports, the custom board also has JST connectors and wires that power the receiver, the servos, and the ultrasonic range finder. Applications such as the GoPro and the Wii Remote are powered by their own individual batteries. We chose not to power these through the lithium polymer battery because the Wii Remote operates at 3V which would require another voltage step-down. Both device would also consume power and further reduce the overall flight time.

CHALLENGES AND SOLUTIONS

AeroQuad32 Defective board:

When deciding on a flight control board, the AeroQuad32 was the clear choice for our design. Once the board was configured, however, the board was unable to detect the gyroscope and accelerometer (both on a single chip, MPU6000). Fortunately, we could use the AeroQuad forum as a resource to help understand our problem. After running a test file for the board, we found that the chip for the gyroscope and accelerometer could not generate data. This could have been caused by faulty soldering from the factory or faulty internal ADCs. As a result, we quickly ordered the AeroQuadv2.1 as a replacement and were finally able to successfully configure the board and sensors. This was an instance where the newer product did not guarantee better performance than a proven product.

After contacting the AeroQuad Store, they agreed to replace the faulty board. However, while researching other parts of the project on the AeroQuad forum, we came across a number of similar posts about the MPU6000 gyroscope and accelerometer chip not reading data. When discussing the problem, we found that one of the pins, 𝑉𝑐𝑐 for the chip, was not soldiered properly. Once the pin was soldered the board began to read accurate data.

12 Texas Instrument “LM2673 Simple Switcher…”

20 | P a g e

Page 22: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

Outdoor Infrared Tracking:

There are many potential problems when trying to follow a single infrared source outdoors. Because the sun emits light in the infrared range, it is easy to pick up interference from reflections. When tracking an object in indirect sunlight, the Wii Remote can consistently follow the target but if parts of the background have direct sunlight then the Wii Remote can become distracted. To counter this problem, we decided to use a more powerful infrared illuminator as the beacon. Even with other infrared sources, the Wii Remote should be able to track the target as long as the beacon produces a light that is close to the brightest infrared object in its field of view. By matching the wavelength of the illuminator with the ideal wavelength of the IR sensor in the Wii Remote, we have increased the odds that the beacon will be the brightest light source.

When combined with the acrylic filter, the beacon is usually the brightest infrared source and allows for outdoor tracking even with infrared reflections. Since it is a simple lens cover, the Wii Remote is still unable to distinguish the beacon from other powerful sources, the sun for example. For this reason, the tracking works best when the target is at, or below, the horizon.

Flight Training:

Flying a remote controlled aircraft is a skill that requires many hours of flight time practice. Since none of the team had any experience going into the project, we have spent hours becoming familiar with remote control aircrafts (with John as our primary pilot). In this case, the best way to understand and adjust to the flight controls was through practice and much patience.

Hard landings:

The AeroBerry is built from an aluminum frame with emphasis on the material’s weight over its strength. After our first few flight tests it because obvious that our aluminum landing gear needed to be redesigned to absorb more of the impact with the ground during landing. During our first hard landing, the legs on the AeroBerry were heavily damaged and the plates holding the arms were bent. With the custom redesigned landing gear of Figure 12 and the RC Car shock absorbers, we have greatly reduced impact to the frame during hard landings.

Figure 12: Landing gear design with RC shock

21 | P a g e

Page 23: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

Missing Motor Mounts:

Upon receiving the AeroQuad Cyclone frame, we found that we did not receive the motor mounts with the rest of the frame. By comparing the packing slip with the received shipment we quickly found the mistake and contacted the supplier who promptly sent the missing parts. By immediately verifying the contents of the package we avoided an unforeseen delay.

BUDGET

Our preliminary budget and our actual purchase record can be found in Appendix G. Our preliminary budget had the costs of the entire project under $1,500. With the additions of the acrylic exoskeleton, obstacle detection sensors, and the GPS, all of which were not included in our original design, the actual cost of the project was $1,998.60. The main purchases that put us over budget were due to damaged parts during flight crashes. Without the extra components, and without the original AeroQuad32 board, the cost could be cut down to $1,600, which is much closer to our original estimate (though still over budget).

CONCLUSION

Milestones:

Despite facing a few challenges along the way, we were able to meet our minimum specification for the project. We accomplished our first major milestone after setting up the Wii Remote to communicate via Bluetooth to the Raspberry Pi. The entire camera setup could be controlled from the Raspberry Pi and could accurately track an IR source.

We reached our next major accomplishment after finalizing the power design. With a completed power distribution harness and voltage regulator, we powered the AeroQuadv2.1 flight control board, Raspberry Pi, ESCs, motors, and camera servos from the AeroBerry battery, allowing the AeroBerry to run the tracking software remotely. With the mobile platform, we then accomplished outdoor infrared tracking using the acrylic filter to block infrared reflections.

After configuring our new flight control board, the AeroQuadv2.1, we began our first flight tests. The AeroBerry achieved stable flight from a user controlled transmitter. For the autonomous tests, the AeroBerry maintained a constant altitude and used the servo control loops to correct the yaw of the quadcopter to always face the target. When the target moved

22 | P a g e

Page 24: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

away from the platform, the AeroBerry would maintain video of the target as the aerial platform moved towards the target. Autonomous flight tests have recorded up to three minutes of aerial video while effectively tracking the moving target.

Moving Forward:

Beyond an aerial video and photography platform, future applications for the AeroBerry, and similar autonomous systems, could include assisting search and rescue missions and studying migration patterns of animals. Areas of our project focused on adding safety features, like the exoskeleton, to shield the user from the propellers as well as adding a GPS with waypoint navigation could provide an accurate data path to better observe the movement and location of the target. While we did not have the time to complete these features, they could be implemented in the future to improve the overall functionality of the platform. For now, the AeroBerry simply provides a base platform for many future tracking applications.

ACKNOWLEDGEMENTS

We would like to thank mentors John Vesecky and Paul Naud for their continued guidance and contributions throughout the AeroBerry project.

We also thank Geoff Budd and Sean Noble for their assistance and Baskin Engineering Lab Support (BELS) for providing lab space and supplies.

REFERENCES

AeroQuad A2217-9 Specifications. 04 May 2013. <http://www.aeroquadstore.com/BP_A2217_9_-

Brushless_Outrunner_Motor_p/motor-a2217-9.htm>

Gross, B. “MaxSonar Operation on a Multi-Copter.” MaxBotix: High Performance Ultrasonic

Rangefinders. 14 Feb. 2013. Web. 20 Apr. 2013.

<http://www.maxbotix.com/articles/067.htm>

“How to Make Plane Fly Slow Without Stalling.” 08 Oct. 2012. RC Groups Forum. 3 Mar. 2013.

<http://www.rcgroups.com/forums/showthread.php?t=1748047>

23 | P a g e

Page 25: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

“Interfacing with a Wiimote” Physical Computing with Raspberry Pi. Web. 20 Mar. 2013

<http://www.cl.cam.ac.uk/~db434/raspi/wiimote/>

“Lift Payload” 04 Oct. 2010. AR.Drone Forum 01 Mar. 2013.

<http://forum.parrot.com/ardrone/en/-viewtopic.php?id=260)>.

“LiPo Batteries – Choosing and Maintaining.” 16 Aug. 2012. AeroQuad Forum. 10 Mar. 2013.

<http://aeroquad.com/showthread.php?6182-Lipo-Batteries-Choosing-and-Maintaining>

“LM2673 Simple Switcher 3A Step-Down Voltage Regulator with Adjustable Current Limit.”

Texas Instruments. April 2013. Web. 19 April 2013. <http://www.ti.com/lit/ds/symlink/-

lm2673.pdf>

Piiroinen, J. and Wu, B. (2010). Device.py (Version 3)[Computer program]

<http://quickanddirty.googlecode.com/svn-

history/r421/trunk/jpiimaestro/driver/Device.py>

Schmitz, T. “Designing a Buck Converter.” ECN. 08 Dec. 2009. Web. 15 Apr. 2013.

<http://www.ecnmag.com/articles/2009/12/designing-buck-converter>

V. H. Steven. “Efficient Low Power Regulation.” 21 Oct. 2011. Stack Exchange. 02 June 2013.

<http://electronics.stackexchange.com/questions/21131/efficient-low-power-regulation-i-

e-9-5-volts>

“Wii Remote IR Sensitivity.” WiiCane. 6 Mar. 2009. 10 Dec. 2012.

<http://wiicanetouchgraphic.blogspot.com/2009/03/wii-remote-ir-sensitivity.html>

24 | P a g e

Page 26: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

APPENDIX

A. SYSTEM BLOCK DIAGRAM

25 | P a g e

Page 27: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

B. AEROBERRY CONCEPT DRAWINGS

AEROBERRY ¾ VIEW

26 | P a g e

Page 28: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

AEROBERRY TOP VIEW

27 | P a g e

Page 29: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

AEROBERRY LEFT SIDE

AEROBERRY RIGHT SIDE

28 | P a g e

Page 30: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

C. LANDING GEAR DESIGN

29 | P a g e

Page 31: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

D. EXOSKELETION DESIGN (NOT CURRENTLY IN USE)

30 | P a g e

Page 32: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

E. AEROBERRY COMPONENT AND PLATE PLACEMENT

(Back View)

31 | P a g e

Page 33: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

F. VIDEO TRACKING SOFTWARE FLOW CHART

32 | P a g e

Page 34: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

G. VEHICLE TRACKING SOFTWARE FLOWCHART

33 | P a g e

Page 35: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

H. POWER DISTRIBUTION DIAGRAM

34 | P a g e

Page 36: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

I. POWER BUDGET

J. SCHEMATICS

LM2673 5V/3A EVAL. KIT

MB1240 POWER SUPPLY FILTER

Item Voltage CurrentATMega 2560 5-12V 50 mA per I/O pinRaspberryPi 5V 750 mAUSB Hub Rpi RpiServos 5V 350 mAUltrasonic Range Finder 5V 100 mATx/Rx Receiver 5V 80 mASparkFun 9DOF sensor stick 2.5V 6.5 mABMP085 Barometer 1.8V 1 mABrushless Motors (x4) 11.1V 18A for 60s (x4)Electronic Speed Control 14.8-16.8V 18A for Motor (30A max)

AeroBerry Power Budget

Total Average Current Draw = 70A

35 | P a g e

Page 37: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

K. BUDGET

AeroBerry Preliminary BudgetUnit Price Quantity Estimated

AeroQuad PlatformCyclone ARF Kit 534.95 1

AeroQuad v2.1 Flight Control Board Kit 1Cyclone Frame 1A2217-9 Brushless Motors 4Electronic Speed Controllers (30 Amp) 412x3.8 Propellers 312x3.8 Pusher Propellers 3Power Harness 1

RC Transmitter/Reciever 50.00 1Section Total 584.95

ProcessingRaspberry Pi 35.00 1USB Hub 10.00 1

Section Total 45.00Camera System

Wii Remote 30.00 1Webcam 20.00 1SPT100 Pan/Tilt System 19.99 1Hitec Servos (HS985MG) 31.00 2IR Leds 1.00 20

Section Total 120.99Power

Battery 80.00 3Charger 50.00 1

Section Total 290.00Extra

Supplies/Replacement Parts 200.00 -Shipping 100.00 -Tax 150.00 -

Section Total 450.00

Estimated Total: 1490.94

36 | P a g e

Page 38: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

AeroBerry Purchase Record

Unit price Quantity Subtotal Tax Total Shipping

AeroQuad Platform

Cyclone ARF Kit 17.93

Aeroquad 32 Flight Control Board 149.95 1 149.95 14.62 164.57

Cyclone Frame 149.95 1 149.95 14.62 164.57

A2217-9 Brushless Motors 24.95 4 99.80 9.73 109.53

HobbyWing FlyFun ESC 30A 22.95 4 91.80 8.95 100.75

12x3.8 Propellers 4.50 4 18.00 1.76 19.76

12x3.8 Pusher Propellers 6.50 4 26.00 2.54 28.54

AeroQuad Replacement Set #1 3.49

AeroQuad Cyclone Arm Plates 17.95 1 17.95 1.75 19.70

12" Square Tube Arms 3.50 1 3.50 0.34 3.84

AeroQuad ESC Plate 8.95 1 8.95 0.87 9.82

AeroQuad Replacement Set #2 6.95

HobbyWing FlyFun ESC 30A 22.95 4 91.80 8.95 100.75

AeroQuad Replacement Set #3 32.86

AeroQuad v2.1 Flight Control Board Kit 199.95 1 199.95 19.50 219.45

Replacement Props (Red + Blue) 17.12

10x4.5 Red Props Standard R 2 pc 3.14 1 3.14 0.00 3.14

10x4.5 Blue Props Standard R 2 pc 3.14 1 3.14 0.00 3.14

Shock Absorbers 6.04 2 12.08 0.00 12.08 0.00

Altitude Sensor (MB1240) 34.95 1 34.95 0.00 34.95 0.00

RC Transmitter/Reciever 25.84 1 25.84 0.00 25.84 0.00

Section Total

1020.42

Processing

Raspberry Pi 35.00 1 35.00 3.06 38.06 8.16

Kinivo Bluetooth 15.99 1 15.99 0.00 15.99 0.00

Section Total

54.05

Camera System

SPT100 Pan/Tilt System 19.99 1 19.99 0.00 19.99 0.00

Hitec Servos (HS985MG) 29.42 2 58.84 5.08 63.92 0.00

IR Beacon 940nm 79.95 1 79.95 0.00 79.95 10.51

IR Leds 25 pack 8.00 2 16.00 0.00 16.00 3.82

Section Total

179.86

Power

Turnigy 5000mAh 4s 20C LiPo pack 29.95 2 59.90 0.00 59.90 29.69

Replacement Turnigy Battery 29.99 1 29.99 0.00 29.99 0.00

37 | P a g e

Page 39: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

iCharger 106B-plus 250W 6s balancer/charger 79.99 1 79.99 0.00 79.99 40.86

LiPo Safe Jumbo Pack 2.73 1 2.73 0.00 2.73 0.00

LM2673-5.0EVAL/NOPB Step-Down Regulator 25.00 2 50.00 0.00 50.00 0.00

Gold Plated 3.5mm Bullet Connector M+F (10 sets) 4.00 5 20.00 0.00 20.00 0.00

Bullet Connectors 4mm 3.40 1 3.40 0.00 3.40 0.00

Thick Wires 35.64 1 35.64 3.19 38.64 0.00

Section Total

284.65

Extras

Supplies/Replacement Parts (LOCAL) - 0.00

ACE Hardware Parts (screws and bolts) 3.56 1 3.56 0.31 3.87

Haltead Parts (USB ports and screws) 10.76 1 10.76 0.93 11.69

Extra Header Pins 3.99 1 3.99 0.35 4.34

Crimp Connectors 4.95

1x8 Pin 10-pack 0.99 1 0.99 0.00 0.99

1x4 Pin 10-pack 0.59 1 0.59 0.00 0.59

1x1-Pin 10-pack 0.59 1 0.59 0.00 0.59

Female Crimp Pins for 0.1" 100-pack 5.95 1 5.95 0.00 5.95

Materials for Exoskeleton and Landing Gear 0.00

Velcro 3.19 1 3.19 0 3.19

Range sensors (MB1260) 47.95 4 191.80 0 191.8

Acrylic 60.27 1 60.27 0 60.27

Section Total 283.28

Shipping Total 176.34

Sections Total 1822.26

Shipping Total 176.34

Grand Total: 1998.60

38 | P a g e

Page 40: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

L. TEAM CHARTER

AeroBerry: Wiimote Tracker EE/CE 129 - Winter 2013

TEAM CHARTER Revision Two, 2/13/2013

Team Members: John Branscum - Project Manager

[email protected] [email protected] 650-489-5687

Eric Yu - Treasurer

[email protected] 510-338-8021

Brendan Maher - Deputy Leader

[email protected] 408-726-4477

Project Overview: The AeroBerry project will combine the mobility of an AeroQuad drone, the processing power of a Raspberry Pi, and the image sensing of a Wii Remote. All of these individual fields are well explored, but the combined capability offers exciting emergent possibilities. At the core of the project is the AeroBerry platform. By creating a stable hardware platform with extensibility, we hope to introduce the standard for future flying-computer projects, both University-affiliated and private.

Design Specifications: We intend to build a flying platform that carries onboard processing capable of directing its own flight. This platform, referred to as “AeroBerry,” will be able to identify a target from at least 10 feet away and then autonomously track the target from a predetermined distance. This platform would leave many possibilities for future add-ons, including manual override flight control from a computer with an active display. The display could include video or images from the AeroBerry as well as flight information (GPS location, altitude, object tracking time). Minimum Specifications: Winter 2013 Deliverables:

Hardware

39 | P a g e

Page 41: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

Before the end of the week of March 18th, the AeroQuad will be fully functional and capable of stationary flight. The AeroQuad will be controlled by an R/C transmitter and receiver.

Software Before the end of the week of March 18th, the Raspberry Pi will be shown to successfully connect to:an IR camera, a webcam, and a laptop via a wireless network. This will be demonstrated by displaying images from the Wii camera and the webcam on a laptop. This demonstrates the following connections:

1. IR camera-Raspberry Pi 2. Camera-Raspberry Pi 3. Raspberry Pi-network

Spring 2013 Deliverables:

Hardware-Software Integration By the end of the week of June 4th, the AeroQuad will be combined with the Raspberry Pi and Camera. They will work together to identify a ground target and track the target from a distance of 10 feet and keep object in video frame. The target will be slow moving (moving less than 1 mph). The flight demonstration will last for longer than three minutes.

Demonstration Conditions:

All flight tests will take place in an open, outdoor area with no interfering obstacles (includes trees, goal posts, uninvolved bystanders). The tests and demonstrations will be conducted in clear weather conditions, with no rain concerns and with wind speeds under 5 miles per hour. The testing temperature will be between 40 and 85 degrees Fahrenheit.

Division of Labor: John Branscum– Head Software Engineer: John will serve as the Project Manager. He will be responsible for managing and organizing team meetings, approving key decisions, and ensuring the group is functioning efficiently. John’s responsibilities include Raspberry Pi programming and other extensions of the AeroBerry platform. He will be working closely with Brendan to interface the Raspberry Pi with the AeroQuad microcontroller, and any other digital components with the Raspberry Pi. He will also work with Patrick to ensure the Raspberry Pi and Android app are compatible.

Software: · Software design for Raspberry Pi-AeroQuad interface · Software design for WiiRemote tracking · Software design for autonomy · Wireless network interface with Raspberry Pi

Brendan Maher- Hardware and Tracking System: Brendan will serve as the deputy leader for the group and can mediate if any conflicts arise. He will primarily be responsible for developing and implementing the camera tracking system

40 | P a g e

Page 42: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

and the portable tracking beacon for the AeroBerry. The camera system needs to be designed to send information to the Raspberry Pi where it will be processed.

Tracking System: · Develop camera tracking system · Communicate with the Raspberry Pi · Create tracking beacon

Eric Yu- Construction and Power Distribution: Eric will serve as the team’s Treasurer. He will be responsible for managing the team budget and maintaining an accurate and current purchase record. Eric’s main responsibility will be constructing the AeroBerry that fit the needs of this project, and the power distribution throughout the AeroBerry. He will be responsible in designing a power system that will power the variety of power usage such as the AeroBerry and its components (motors), the camera, and the Raspberry Pi module.

Construction and Power: · Constructing and configuring the AeroBerry Frame and its components · Design a power distribution system that will power the AeroBerry

Code of Conduct: Meetings:

Meetings will be held at least once a week. Agenda for the meeting will be drafted by the Project Manager with inputs from the team and will be emailed to all members. During the meeting, each member is expected to update the team on their progress and communicate any problems encountered. Those who will not be able to attend the meeting will have to notify the group at least 24 hours ahead of time via email.

Time Commitment:

Each team member is required to work at least 25 hours per week with at least 6 of these hours spent in lab. If a member does not have an assigned task they can work on, he must find ways to help out other members of the team. If a deadline cannot be met, members must inform the team ahead of time and propose a new deadline which will be decided by the team.

Budget:

The Treasurer will be responsible for running the team budget. Purchases in excess of 25 dollars must be discussed by the entire team and require consent from all members. Any purchases using the team budget must be reported to the Treasurer. All receipts, including digital receipts, should be included in a team folder.

Documentation:

Team members are expected to keep an engineering notebook and to maintain excellent documentation of their work. A team binder will be made available in the lab at all times that contains schematics, design drawings, application notes, data sheets, and the likes. All members will be responsible for maintaining this binder.

41 | P a g e

Page 43: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

All flight tests will be recorded by video. All videos should be labeled and accompanied by detailed comments about the test, including date, flight conditions, and flight results.

Decision Making and Conflict Resolution:

Any critical changes on the project must be decided by the team. The decision must be unanimous to take effect. Any dispute will be handled as a group.

Termination Process:

A team member consistently missing meetings, not meeting the minimum work contribution (working on project 25hrs/wk), or in constant disputes with other team members will be subject for termination. A team meeting will be called and the individual(s) involved will present their case to the team. The team will present resolutions and notify the professors. The team member will then be given a chance to redeem themselves by actively contributing in the project process, excellent work ethic, and meeting the minimum time commitment as stated above. After a week, the team will decide if the offending member(s) has met the expected minimum requirements. If not, a voting process will take place to decide termination. A unanimous vote of remaining members (2 of 2) will result in termination pending approval from the Instructors.

Revisions to Charter:

The terms and conditions of the charter are subject to revision by unanimous vote by the group members.

Agreement: By signing below, each team member agrees to the revised terms and conditions presented above. _______________ _______________ John Branscum Date _______________ _______________ Brendan Maher Date _______________ _______________ Eric Yu Date

42 | P a g e

Page 44: AeroBerry - University of California, Santa Cruzpnaud/reports/201-report-b.pdf · CE/EE 129 Final Report 2013 John Branscum Computer Engineer Team Manager johnlbranscum@gmail.com

M. GHANT CHARTS WINTER 2013

SPRING 2013

43 | P a g e