Autonomous Mobile Camera Platform
Critical Design
Prepared by:
Team Helitronics
www.helitronics.net
Team Members
Anthony, Calce 647-866-8979 calce@yorku.ca
Watters, Kyle 289-221-4413 kyle13@yorku.ca
Klein, Gordon 905-392-7527 frosty55@yorku.ca
Wu, Vincent 416-949-1330 vincewu@yorku.ca
Faculty Advisor
Minas Spetsakis
Office: CSE 3049
Ext. 77886
minas@cse.yorku.ca
PEO Advisor
Robert Scaini
Peyvand Melati
March 10, 2010
Faculty of Science and Engineering
York University
ENG4000
Abstract
The purpose of this paper is to describe the critical design for the Helitronics Autonomous Helicopter project. The project involves developing an autonomous mobile camera platform based on the design of an RC helicopter. This paper will outline the project goals, team responsibilities, deliverables and budget, as well as the finalized design.
The hardware components for the helicopter have been selected and reviewed, and the design of the hardware and software components has been finalized. The helicopter will use an Arduino microcontroller to control its servos and read accelerometer and gyroscope sensor information to stabilize the flight of the helicopter. A BeagleBoard development platform will be used to perform high level movements, eliminate drift, and execute intelligent tasks based on optical flow information obtained by processing images from a USB web camera. A Windows base station will communicate with the BeagleBoard and report statistics and flight status about the helicopter and accept high level commands. A GPS will no longer be used for controlling flight since the project demo will take place indoors where the GPS does not work well.
The end deliverable of this project will be a helicopter which can maintain stabilized flight and perform simple tasks autonomously. The software will be architected in such a way that new additions to the intelligence of the helicopter will be easy to develop and deploy. The helicopter will be a flexible, extendable mobile camera platform which performs simple flight operations in a controlled environment.
Table of Contents
1. Introduction 1
1.1. What We Plan to Do 1
1.2. Obstacles 2
1.3. Document Purpose 2
1.4. Document Scope 3
2. Technical Specifications 4
2.1. Changes in Design 4
2.2. Hardware Design 5
2.3. Software Design 7
2.4. Component Description 9
2.5. Constraints 12
2.6. Testing 13
3. Progress to Date 16
4. Obstacles and Risk Management 17
4.1. Limited Budget 17
4.2. Limited Sensor Precision 18
5. Team Member Roles 19
6. Faculty Advisor 20
7. Equipment and Budget 21
8. Deliverables 21
9. References 22
Appendix A 23
A-1 Gantt Diagram 23
A-2 Budget Expenditure 24
List of Figures
Figure 1: Optical flow corresponding to different types of axes drift
5
Figure 2: Hardware model of the system 6
Figure 3: E-Flite Blade 400 10
Figure 4: BeagleBoard 10
Figure 5: Arduino Pro Mini 11
Figure 6: 6DOF Razor 11
Figure 7: LS20031 GPS 12
Figure 8: 2MP UBB Camera 12
Figure 9: Wireless Adapter 12
Figure 10: Tethering System — no tilt (left), max tilt (right) 17
1.Introduction
The luxury of having computer aided devices have provided many benefits to people operating machines such as cars and planes. Computers have been used to ease the difficulty of operating machines by automating certain tasks and reducing the amount of continuous interaction between human and machine.
With the growing power of modern day computers, it is possible to develop systems that can perform intelligent computations while still being lightweight. This project intends to use computer systems to develop an autonomously controlled computer guided helicopter. The purpose of the helicopter is to provide a mobile imaging platform where sophisticated image processing can occur.
The autonomous capabilities of an aerial device would allow it to be used in dangerous environments where having a human operator onboard would be too great a risk. Autonomous vehicles can also operate with less human interaction, reducing the amount of human interaction to control the vehicles.
1.1.What We Plan to Do
The objective of this project is the successful design and construction of an autonomous helicopter capable of full flight functionality assisted by GPS, onboard image processing and positional sensors such as gyroscopes and accelerometers. Using the power of the OMAP-3 processor, onboard image processing will open the doors to many complex image processing techniques that can be accomplished onboard instead of transmitted to a base station. This project will require a helicopter chassis, motors, and servos, as well as a platform based on the OMAP 3 assisted by a camera system, GPS antenna, and various other sensors such as accelerometers, and gyroscopes. The end result of the project will be to demonstrate the capabilities of an autonomous vehicle with digital processing power to complete objectives such as search, surveillance, inspection, mapping, and aerial cinematography.
1.2.Obstacles
The RC helicopter will need to be carefully selected to compensate for the additional weight being mounted on it to achieve its goals. For autonomous flight the BeagleBoard will need to be able to communicate with the gyroscopes and servos to safely maintain stability and control of the helicopter. Simultaneously, the software will also need to communicate with the GPS and the camera to process information of position and vision to search or avoid objects. All of these tasks involve interfacing the hardware of the RC helicopter with the software on the BeagleBoard.
1.3.Document Purpose
The purpose of this document is to demonstrate the project requirements and our proposed solutions to those requirements. The feasibility of the project depends on the cost and compatibility of the components being used. This document will show the selection of hardware and software that we have decided to use to remain within budget while still satisfying the project goals.
1.4.Document Scope
This document will provide an overview of the technical specifications, purposes of the selected components and the system which has currently been implemented.
2.Technical Specifications 2.1.Changes in Design
A few changes were made to the design since the last report. The helicopter which was purchased is the E-Flite Blade 400. The helicopter which we originally planned to purchase, the KDS450, was inadequate for our needs because replacement parts were very difficult to find.
The GPS portion of the project has been removed. The demo for the project will take place indoors which will make GPS positioning unreliable. The GPS only provides a very high level overview of the position of the helicopter and was originally included so that a base station can track and control the helicopter during a long (multiple kilometers) flight. This requirement is of low priority for the project demo so it has been removed.
Servo control is now done entirely on the Arduino microcontroller, which uses interrupt scheduling to synchronize the servo and sensor signals. If a servo interrupt occurs while a sensor interrupt is executing, the servo interrupt will take priority and essentially interrupt the current interrupt. This is necessary due to the extremely time sensitive nature of the servo PWM signals.
The Arduino can detect acceleration in any direction, but it has a difficult time detecting orientation and velocity accurately. The design has changed to use the camera more heavily for determining velocity, or drift, in the X, Y, Z and yaw axes. The camera –which was originally going to point forward on the helicopter – will now point toward the ground. This allows the optical flow algorithms to more easily detect drifting in all axes. X and Y drift can be detected as a linear optical flow direction, while drift in the Z-axis can be detected as optical flow inward or outward. Examples of optical flow are shown below:
Figure 1: Optical flow corresponding to different types of axes drift
2.2.Hardware Design 2.2.1.Block Diagram of the Current System
The system is an autonomous RC helicopter which is capable of maintaining stable flight, perform onboard image processing, and accept commands to perform basic objectives. Below is the block diagram of the major components in the system:
Figure 2: Hardware model of the system
2.2.2.Data Flow Through System
In the block diagram described above, the Arduino is responsible for outputting PWM signals to control the servos which fly the helicopter. The Arduino reads sensory data in on its analog pins, allowing it to detect three degrees of acceleration and rotation. Using this information it adjusts the servos. The Arduino and Beagleboard stay in communication through RS232 serial, and the BeagleBoard gives high level commands to the Arduino to correct for drift and to move the helicopter intelligently according to the information it is receiving from the camera, which is connected via USB. The BeagleBoard communicates wirelessly via 802.11g wireless Ethernet with a base station, relaying statistical information and receiving very high level guidance commands.
The entire system is powered either by a 12V tether connected to a standard ATX power supply, or using the onboard 11.1V lithium polymer battery.
2.3.Software Design
The software for the Arduino will control the helicopter. The Arduino will implement a software PID controller which will move the swash plate and tail rotor. These commands will effectively move the servos to different positions. This will allow the Arduino to manipulate the helicopter until it is approximately stable (no acceleration in the X, Y or Z directions except for gravity).
The Arduino can achieve approximately stable flight, but it cannot account for drifting (velocity with no acceleration) or intelligent flight. These tasks will be designated to the BeagleBoard, which will use optical flow algorithms to decide how to command the Arduino to move the helicopter.
The operating system running on the BeagleBoard is a modified version of Angstrom Linux – an ultra lightweight Linux variant designed to run on embedded systems. The software will be written in C and interface directly with the hardware on the BeagleBoard.
2.3.1.Network Communication
The BeagleBoard will communicate through TCP/IP with a base station which it will connect to wirelessly via 802.11g wireless Ethernet. The BeagleBoard will relay status information about the helicopter to the base station and take high level commands from the base station. Since this method of communication is wireless, any communication from the BeagleBoard to the base station must satisfy the following requirements:
-
Delivery of the information must not be time sensitive.
-
Temporary or permanent loss of connection must not result in catastrophic failure. The BeagleBoard will instruct the helicopter to perform an emergency landing at the nearest, safest location.
If the wireless communication follows those two rules, it can easily be extended to perform TCP/IP communication through a cellular internet connection instead of wireless Ethernet. This makes the helicopter more versatile as it can be used with an almost infinite range.
2.3.2.Flight Stability and Movement
The Arduino will use a PID controller feedback mechanism to control the orientation of the swash plate and position of the tail rotor on the helicopter. These controls will map to movement of the servos on the helicopter. The use of a PID controller minimizes over damping and oscillation to ensure that the helicopter remains stable and in control while it is in the air. This part of the code is extremely time sensitive, which is why it will be performed on the Arduino microcontroller which executes programs in real-time.
2.3.3.Image Processing
The BeagleBoard will be able to read image data from a USB camera and process it to determine optical flow in the image. The optical flow method used for this project is based on Lucas-Kanade optical flow, which uses Shi-Tomasi corner detection for finding features. All code for these algorithms have been written using OpenCV, in C on the BeagleBoard.
This implementation of optical flow has a number of assumptions which must be met to ensure its accuracy:
-
Amount of motion is small (frame-per-frame changes are slight)
-
The pixel intensity is constant (soft, diffuse lighting without harsh shadows)
-
Local flow is constant (the camera is pointed at a flat, even surface)
Since the helicopter will be operating in a controlled environment, and the helicopter’s motion will be slow and smooth, using a standard web camera running at 30 FPS, pointed directly at a smooth, level ground surface in soft ambient lighting satisfies all three of these assumptions.
The steps takes in the calculation of the optical flow field are:
-
Obtain 2 temporally separated frames
-
Find features (corners) in the first frame using the Shi-Tomasi corner detection algorithm and save their locations.
-
Use the Lucas-Kanade optical flow algorithm to calculate the flow field from the first frame to the last frame. Save the result as a list of 2D flow vectors.
2.3.4.Mission Execution
Finally, the base station software must be capable of monitoring the helicopter’s flight and transmitting high level commands to the BeagleBoard. This part of the software can take advantage of the high level of abstraction of the helicopter’s motion that the Arduino and BeagleBoard provide. If GPS navigation is enabled on the helicopter, the base station can use this information to plot the position of the helicopter in space and time. The base station performs only high level commands to track and monitor the helicopter.
2.4.Component Description
The specifications of each hardware component will be addressed below.
2.4.1.EFLH1400 Blade 400 3D Helicopter
The Blade 400 is a new style helicopter which includes CCPM control with push-pull elevator and direct-to-swash aileron/pitch linkages. The swash plate servos are external, which makes the maintenance simple and easy. Small gears drive the tail gear directly to reduce the exhaustion of power. At the same time, players can adjust the position of the battery back and forth to change the center of mass of the helicopter.
Main rotor diameter
|
718mm
|
|
Tail rotor diameter
|
135mm
|
Length
|
650mm
|
Height
|
230mm
|
Motor size
|
420H brushless
|
Motor power
|
3800kV
|
Gross weight
|
665g
|
Battery
|
11.1V, 1800mAh, 20C Li-Po
|
Figure 3: E-Flite Blade 400
| 2.4.2.Beagle Board with OMAP3 Processor
The Beagle Board is an incredibly powerful single-board computer developed by Texas Instruments, featuring their OMAP3530 system on a chip. The board is supported by a large community and is designed with open-source development in mind.
Power supply
|
5V
|
|
Power consumption
|
2W
|
Memory
|
256MB
|
Processor
|
OMAP3530
|
Computational power
|
1200 Dhrystone MIPS @ 600MHz
|
On-board DSP
|
3200 Dhrystone MIPS @ 400MHz
|
Weight
|
37g
|
Input and outputs
|
Sound I/O, RS232, JTAG, HDMI, OTG, USB, GPIOs, SD card
|
Operating system
|
Angstrom Linux
|
Figure 4: BeagleBoard
| 2.4.3.Arduino Pro Mini Microcontroller
The Arduino Pro Mini is a versatile microcontroller board based on the Atmega328 processor. It allows for real-time control of the servos.
Microcontroller
|
ATmega328
|
|
Operating voltage
|
5V
|
Input voltage
|
5-12 V
|
On-board DSP
|
3200 Dhrystone MIPS @ 400MHz
|
Digital I/O pins
|
14
|
PWM output pins
|
6
|
Analog input pins
|
6
|
DC current per I/O pin
|
40mA
|
Flash memory
|
16 KB (2 KB used by boot loader)
|
SRAM
|
1 KB
|
EEPROM
|
512 Bytes
|
Clock speed
|
16MHz
|
Figure 5: Arduino Pro Mini
| 2.4.4.IMU 6DOF Razor
The 6DOF Razor makes use of ST's LPR530AL (pitch and roll) and LY530ALH (yaw) gyros, as well as the ADXL335 triple-axis accelerometer to give six degrees of measurement on a single, flat board.
Power supply
|
2.7-3.6VDC
|
|
Operating temperature
|
-40°C – 85°C
|
ADXL335
|
|
Sensitivity
|
300mV/g
|
Range
|
±3g
|
Alignment error
|
±0.1°
|
Sensitivity change vs. temperature (from 25°C)
|
0.01 %/°C
|
LPR530AL/LY530ALH
|
|
Sensitivity (1x / 4x)
|
0.83 mV/°/s or 3.33 mV/°/s
|
Sensitivity change vs. temperature (from 25°C)
|
0.03 %/°C
|
Range (1x / 4x)
|
±300°/s or ±1200°/s
|
Figure 6: 6DOF Razor
| 2.4.5.32 Channel LS20031 5Hz GPS Receiver
The LS20031 GPS receiver is a complete 5Hz GPS smart antenna receiver that includes an embedded antenna and GPS receiver circuits.
Operating temperature
|
-30°C – 85°C
|
|
Max operating altitude
|
18,000m
|
Max vehicle dynamics
|
515m/s
|
Circular error probability
|
3m
|
Weight
|
14g
|
Hot start
|
2 seconds
|
Figure 7: LS20031 GPS
| 2.4.6.Logitech 2.0MP USB Camera
This Logitech camera is capable of high quality two megapixel pictures.
|
|
|
|
|
|
|
Sensor
|
2MP
|
Image Technology
|
Carl Zeiss optics; auto focus
|
|
|
|
|
Figure 8: 2MP UBB Camera
| 2.4.7.MvixNubbin 802.11 N USB Adapter
Mvix Nubbin is a mini-size USB2.0 Wireless-N adapter that can connect a notebook, or desktop PC to a wireless-N network through USB.
|
|
|
|
|
Standard
|
IEEE 802.11 b/g/n
|
Data Rate
|
Up to 150Mbps
|
Security
|
WEB 64/128, WPA, WPA2
|
Weight
|
42g
|
|
|
|
|
Figure 9: Wireless Adapter
|
The helicopter is constrained by several physical, legal and financial factors:
2.5.1.Legal Constraints -
FCC regulations require that an unmanned aircraft must remain within view of the person controlling the vehicle
-
The helicopter cannot fly in restricted airspace
-
The helicopter cannot be used for illegal purposes (i.e. illegal espionage)
2.5.2.Environmental Constraints -
The helicopter cannot stand up to adverse weather conditions in the same way that a full size manned aircraft could.
-
The helicopter cannot fly in unreasonably harsh precipitation or temperatures
-
If use of the GPS is required, the helicopter cannot be flown indoors.
-
To maintain a communication link, the helicopter must be flown within the range of the wireless network it is connected to.
2.5.3.Financial Constraints -
The helicopter cannot take advantage of cutting edge sensor technology which is too expensive to implement due to our budget constraints.
-
This project has not allocated budget for destroying the helicopter or components on it during testing.
2.6.Testing
The purpose of a project test plan is to define clear test responsibilities, areas of testing, test metrics, and outline the test strategies. The testing methods will include unit testing, integration testing, and system testing.
2.6.1.Test Strategy
Unit test cases will be provided for each module individually for cases which are derived from pre-conditions. Integration tests will be developed to cover the basic functionality which is used in a test iteration to verify that the system is ready to proceed to system test. System tests are considered critical to successfully demonstrate the project goals.
During the testing phase of the project, the helicopter will be mounted to a platform with a ball bearing, allowing it to pitch and roll to a certain degree. This will prevent any unnecessary risks associated with a free-flying helicopter in a constrained environment.
2.6.2.Modular Test Flight
The objective of functional testing is to verify the main scenarios of the modules that are utilized.
Arduino Pro Mini
|
Controls servos accordingly (being able to yaw, roll, pitch, and throttle adjustment)
|
Beagle Board
|
Compute optical flow to detect movement providing information on elevation, drift.
|
Helicopter
|
Successfully lift 1.5lbs.
| 2.6.3.Integration Test
The objective of integration testing is to verify the main scenarios of the modules that rely on different devices.
Arduino Pro Mini
|
Acquire IMU 6DOF Acc/Gyro data every 2Mhz for an axis
|
Arduino Pro Mini
|
|
IMU 6DOF Acc/Gyro
|
Provide Arduino Pro Mini with data every 2Mhz for an axis
|
Beagle Board
|
Provide Arduino Pro Mini with drift and movement data.
|
Voltage Regulator
|
Provide specific power to all components (3.3V IMU6DOF, 5V Arduino, and 12V Helicopter).
|
Base Station
|
Communicate with beagle board to acquire data.
| 2.6.4.Performance Testing
The objective of the performance test is to verify the responsiveness of the modules.
Arduino Pro Mini
|
Controls servo with response time of less then 25ms.
|
Arduino Pro Mini
|
Multi-task with delay less then 10ms between tasks. (Arduino has to collect data from beagle board and sensors to stabilize).
|
Beagle Board
|
Compute drift motion and provide the Arduino with information in less then 25ms.
|
Helicopter
|
Able to follow an object with less then 2sec delay.
|
Base Station
|
Acquire up to date data in less then 1sec
| 2.6.5.Safety Test
The objective of safety testing is to protect users if an emergency situation arises, the device can be stopped.
Base station
|
Kill switch to toggle throttle line on/off
| 2.6.6.Fault Injection Testing
The objective of fault injection testing is to verify the system can handle unpredictable and unavoidable environmental variables.
Arduino Pro Mini
|
During the take-off phase, the helicopter will produce vibration causing the sensors to produce misleading data.
|
Helicopter
|
Able to sustain unpredictable force and stabilize.
| 2.6.7.System Functional Test
Helicopter
|
Stable flight
|
Helicopter
|
Able to follow a pre programmed target
|
Helicopter
|
Able to land effectively
| 3.Progress to Date
A Gantt chart is provided in the appendix to illustrate tasks which have been and have yet to be completed. The following is a descriptive list of everything which has been completed at this time:
-
All the measurement devices have been purchased and simple testing has been preformed.
-
Angstrom Linux installed and running on BeagleBoard.
-
Custom wrapper for V4L2 written to control the camera.
-
Code for network communication from BeagleBoard to computer written.
-
Basic image processing preformed on the BeagleBoard.
-
Constructed a voltage regulating circuit to take the onboard power of the helicopter (12V) and output the required power of the sensors (3.3V) and the power required for the microcontroller and BeagleBoard(5V).
-
Sensors and Arduino can communicate with each other.
-
Arduino can communicate with the BeagleBoard.
-
Servo control has been completed.
-
Optical flow code has been written.
-
BeagleBoard and base station communication nearly done.
4.Obstacles and Risk Management
In the development of the current system, a few problems arose which could prove to be detrimental to the project is not taken seriously.
4.1.Limited Budget
The realization of a limited budget does not allow the team room for any kind of malfunctions or breakdowns in the purchased components. Circuitry will need to be wired very carefully to prevent short circuits and current overloads. A special tethering system, as shown below, has been designed to work with the helicopter to prevent any kind of crash during testing of flight and stability algorithms. The helicopter is our mission critical piece of equipment and if it breaks in any way, the project will fail. This system has been fully tested and has proved to be fully functional.
Figure 10: Tethering System — no tilt (left), max tilt (right)
4.2.Limited Sensor Precision
The limited precision of the sensors which were purchased may cause our flight algorithms to fail. Expensive sensors may be available through a master student who has taken an interest in our project.
5.Team Member Roles
Kyle Watters
-
Developing Linux OS for BeagleBoard
-
Development of image processing algorithm
-
BeagleBoard Sensors Interfacing
-
TCP/IP and socket programming
-
Preliminary design report.
Anthony Calce
-
Team Leader
-
Robotics specialist.
-
Recorder of team minutes.
-
Software & hardware design.
-
Design specifications report.
Vincent Wu
-
RC Helicopter specialist
-
Procurement of high quality RC helicopter parts
-
Software & hardware design
-
Critical design report.
Gordon Klein
-
SparkFun Sensors specialist
-
Sensors and electronics procurement
-
Interfacing gyroscopes / accelerometers with serial port
-
Development of autonomous flight algorithms
-
Final design report.
6.Faculty Advisor
Our team advisor is Minas Spetsakis. Below is his contact information:
Minas Spetsakis
Office: CSE 3049
Ext. 77886
minas@cse.yorku.ca
7.Equipment and Budget
Due to the fact that the software which is being developed is designed for Linux in C, and since this is an open source platform, there will be very few software expenses. The majority of the budget has been spent on hardware components, including the helicopter, microcontrollers, and sensors. Refer to Appendix A for the complete budget.
8.Deliverables
The objective of this project is to develop and design a helicopter which can perform autonomous image processing tasks using onboard computers and microcontrollers. The construction of the helicopter will allow it rudimentary stable flight control at low altitudes in a controlled environment. The helicopter will be able to perform onboard image processing while in the air, demonstrating the image processing power of the BeagleBoard. The helicopter will also accept high level flight commands from a base station and carry them out.
The development of the helicopter will be conducive to future development of more powerful intelligence and the execution of more complicated tasks for the helicopter.
9.References
[1] Lucas-Kanade optical Flow Method
Appendix A Gantt Diagram
Budget Expenditure
Component
|
Proposed Expenditure
|
Current Expenditure
|
Difference
|
Electrical
|
Beagleboard µC
|
$150
|
$158.21
|
$8.21
|
Arduino µC
|
-
|
$20.10
|
$20.10
|
LAN USB Adapter
|
$50
|
-
|
-
|
USB Hub
|
$5
|
In-Kind
|
-
|
Voltage Regulators
|
-
|
In-Kind
|
-
|
SD Card
|
-
|
In-Kind
|
-
|
Multiplexers
|
-
|
$10.88
|
$10.88
|
Helicopter
|
Blade 400 3D
|
$470
|
$489.99
|
$19.99
|
Replacement Blade
|
$15
|
$13.99
|
($1.01)
|
Tail Rotor Shaft
|
$15
|
$5.49
|
($9.51)
|
Sensors
|
2.0MP Camera
|
$100
|
-
|
-
|
IMU 6DOF Acc/Gyro
|
$90
|
$95.43
|
$5.43
|
GPS Controller
|
$90
|
$63.60
|
($26.40)
|
IR Sensors x 3
|
-
|
In-Kind
|
In-Kind
|
Other
|
Webhosting
|
$8
|
$8
|
-
|
Presentation Materials
|
$100
|
-
|
-
|
Programming Cable
|
-
|
$26.66
|
$26.66
|
Pins
|
-
|
In-Kind
|
-
|
PSU
|
-
|
In-Kind
|
-
|
Shipping
|
-
|
$43.81
|
$43.81
|
Taxes
|
$30
|
$86.64
|
$56.64
|
Total
|
$1123
|
$1018.80
|
$145.80
|
$145.80 Over Proposed Expenditure Available Funds: $1400 Buffer Fund Left: $131.20
|
Share with your friends: |