Transcript Slide 1

Quad-Copter
Group 3
Fall 2010
David Malgoza
Engers F Davance Mercedes
Stephen Smith
Joshua West
Project Description
Design a flying robot
 Robot must be able to:

◦
◦
◦
◦
◦
Avoid Obstacles
Navigate to GPS location
Communicate Wirelessly
Wireless Manual Control
Stream Wireless Video
Project Motivation
The Big Question, WHY?
 Wanted to design an aerial vehicle for
surveillance purposes
 Wanted to do a project with fair amount
of hardware and software
 Most of all wanted to do something cool
and fun!
Project Overview
To do this we must:
 Design and code a control system for the
Quad-Copter (move up, avoid this, etc…)
 Design and code a sensor fusion algorithm for
keeping the copter stable
 Design and code a wireless communication
system (send commands)
 Design and build a power distribution system
 Design and build a chassis
Goals/Objectives
FLY
 The Quad-copter must be able to remain
stable and balance itself.
 The copter must be able to move
forward, rotate left and right, rise and
descend
 The copter must be able to signal when
power is running low (audible)

Specifications/Requirements






Lift at least 2 kg of mass
Navigation accuracy within 3m
The Quad-Copter must communicate wirelessly at
least 100m
The Quad-Copter must flight for a minimum of 5
minutes
The Quad-Copter must be able to detect objects
from at least 18 inches away
The Quad-Copter must have video capabilities at
100m
Quad-Copter Concept
Frame
Frame
Goals:
 Create a lightweight chassis for the Quad-Copter
 The chassis must support all batteries, external sensors,
motors, and the main board
 Cost Effective
Requirements:
 Create a chassis with a mass of 800g or less
 The area the Quad-Copter cannot exceed a radius of
18in.
 Must be able to support at least a 1.2kg load
Materials Comparison


There were 2 lightweight materials we considered for
the chassis: Aluminum and Carbon Fiber
Both have capabilities of being entirely used as a chassis
and meet the maximum mass requirements
Carbon Fiber
Aluminum
Advantages
Excellent Strength Easily
and Stiffness.
Replaceable.
Durable.
Less Costly.
Disadvantages
Can chip or
shatter.
More costly.
Can easily bend
or dent.
Design of Frame





2 aluminum square plates will be used as the main
structural support
4 rods will be screwed to the top square plate at and
secured at the corners
Below the 2 plates, a lower plate will be placed 1.5in
below to support all batteries, as well as secure the
range finder sensors and video system
Landing gear will be shaped as standard helicopter legs.
A layer of foam will be used for padding the landing gear
Diagram of Frame
Motors/ESC
Motors
Goals:
 To use lightweight motors for flight
 The motors must be cost effective
Requirements:
 Use motors with a total mass of 300g
 Each motor must be able to go above 2700 rpm
 Each motor is to be controlled via PWM signal from the
processor
Brushless Motor
1.
2.
Advantages
1. Less friction on the rotor
2. Typically faster RPM.
3. PWM or I2C controlled by an electronic speed
control (ESC) module.
Disadvantages
1. Require more power.
2. Sensorless motors are the standard
3. Typically more expensive
TowerPro 2410-09Y BLDC
• Minimum required voltage: 10.5V
• Continuous Current: 8.4A
• Maximum Burst Current: 13.8A
• Mass: 55g
• Speed/Voltage Constant: 840 rpm/V
• Sensorless ESC required for operation.
Sensorless ESC
The ESC translates a PWM signal from the
microprocessor into a three-phase signal, otherwise
known as an inverter.
 Based on a duty cycle between 10% and 20%, the ESC
will have operation.
 Based on the requirements given by the manufacturer,
the PWM frequency will be 50Hz.

Power Supply System
Power
Goals and Objectives:
• The ability to efficiently and safely deliver power to all
of the components of the quadcopter.
Requirements:
•The total mass of the batteries should be no more than
500g
• A total of 3 low-power regulators are to be used.
• Must be able to sustain flight for more
than 5
minutes
Batteries
Type
Advantages
Disadvantages
NiCd
Easier and faster to
recharge.
Inexpensive
Standard sizes below
10.5V.
Reverse current issues.
Lower expected battery
life.
Lower charge capacity.
NiMH
Easily rechargeable.
Reliable.
Inexpensive.
Standard sizes below
10.5V.
Longer charge time.
Lower charge capacity.
LiPo
3-cell standard voltage:
11.1V.
Typically higher charge
capacity.
Easy to damage from
overcharging.
Longer charge time.
Expensive.
LiPo Battery
Specifications on the EM-35
 Rated at 11.1V
 Charge Capacity: 2200mAH
 Continuous Discharge: 35C, which delivers 77A,
typically.
 Mass: 195g
Power Distribution
Digital
Compass
6V – 4 AA
LM7805
LD1117V33
GPS
Main
Processor
Wireless
Processor
Transceiver
11.1V LiPo
LM317
Ultrasonic
Ultrasonic
Gyroscope
Accel.
Motor
Motor
11.1V LiPo
Motor
Motor
LM7805
5V LDO regulator, rated at 1A maximum.
 The LM7805 regulator is used for the GPS, the main
processor, and the digital compass module.
 300mA required for all components.

LD1117V33
3.3V LDO regulator, with 500mA maximum.
 Will be used for powering the transceiver and the
wireless system, and most of the analog components.

LM317
The regulator has a maximum current rating of 1A.
 TO-220 packaging is preferred if the application of a
heat sink is later required.
 This will be used as a 3-V regulator for the gyroscope.

Logic Converter


Allows for step-up and step-down in voltage when data
travels between a lower referenced voltage signal to a
higher referenced voltage signal.
This will be used to communicate the GPS and the
wireless communication system with the main
processor
Source: http://www.sparkfun.com/commerce/product_info.php?products_id=8745
Sensors
Sensor Subsystems/Functions

Flight stability sensors
◦ Monitor, correct tilt

Proximity sensors
◦ Detect obstacles, ground at low altitude

High altitude sensor
◦ When higher than proximity sensor range

Direction/Yaw sensor
◦ Maintain stable heading, establish flight path

Navigation/Location sensor
◦ Monitor position, establish flight path
*Minimize cost and weight for all choices
Flight Stability Sensors

Goals/Objectives
◦ A sensor system is needed
to detect/correct the roll
and pitch of the quad-copter,
to maintain a steady hover.

Specifications/Requirements
◦ Operational range 3.0 – 3.3 V supply
◦ Weigh less than 25 grams
◦ Operate at a minimum rate of 10 Hz
Flight Stability Sensors

Options (one or more)
◦ Infrared horizon sensing
 Expensive, unpractical, interesting
◦ Magnetometer (3-axis)
 Better for heading than tilt, little expensive
Accelerometer
 Measures g-force, magnitude and direction
Gyroscope
 Measure angular rotation about axes
Flight Stability Sensors

IMU (Inertial Measurement Unit)
◦ Combination of accelerometer and gyroscope
◦ ADXL335 - triple axis accelerometer (X,Y, Z)
 Analog Devices
◦ IDG500 – dual axis gyroscope (X and Y)
 InvenSense
◦ 5 DoF (Degrees of Freedom) IMU
◦ Sensor fusion algorithm
 Combines sensor outputs into weighted average
 More accurate than 1 type of sensor
IMU Hardware

ADXL335 - triple axis accelerometer
◦
◦
◦
◦

+/- 3 g range – adequate
50 Hz bandwidth – adequate, adjustable
1.8 – 3.6 V supply
Analog output
IDG500 – dual axis gyroscope
◦
◦
◦
◦
Measures +/- 500 º/s angular rate
2 mV/deg/s sensitivity
2.7 – 3.3 V supply
Analog output
ADXL335 – PCB Layout





Surface mount soldered to main PCB
3.3 V supply filtered by .1µf cap
.1µf caps at C2, C3, C4 that filter > 50Hz
X,Y, Z outputs to MCU A/D converters
S1 self test switch
IDG500 – Board Layout




Soldered to main PCB
3.0V supply
X & Y gyro outputs with low pass filter, to A/D
C5-C6 for internal regulation
IMU – Algorithm Overview

Accelerometer vector R projected onto the xz and
yz planes forms angles Axz and Ayz (yellow), which
represent current tilt

Gyro yields instantaneous
velocity and direction of
the same angles at
regular interval T

Results merged into an
improved estimated
angular state

The algorithm’s output
is the input to the linear
control system
IMU – code progress

IMU simulation in C
◦ Calculates improved angular estimation from
simulated 12-bit A/D outputs
◦ Lacks port definitions, timing constraints
Proximity Sensors

Goals/Objectives
 Reliably detect different shapes, surfaces
 Under various light and noise conditions
 One facing down, one facing forward

Specifications/Requirements
 Detect the ground at 1-15 feet
 Obstacles 30˚ arc forward 1- 8 feet
 6 inches resolution
Proximity Sensors

Options
◦ Infrared proximity sensor
 Cheap, ineffective in sunlight
◦ Laser range finder
 Too expensive
Ultrasonic range finder
 Affordable
 Reliable
 Good range
Ultrasonic range finder

Maxbotix LV-EZ2
◦
◦
◦
◦
$27.95 each
1 inch resolution
Max range 20 feet
Detection area depends
on voltage, target shape
 person ≈ 8 ft.
 wall ≈ 20 ft.
 wire ≈ 2-3 ft.
Ultrasonic – Board Layout

3 header pins on PCB
◦ 3.3 V supply
◦ Output to A/D
◦ Analog ground

Low pass filter
◦ Reduce noise
◦ 100 uf cap, 100Ω res.

6 – 12 inches wire
◦ front sensor must have
clear field i.e. no
interference from propeller
High altitude Measurement

Goals/Objectives
◦ Measure higher altitudes, beyond the range of the
ultrasonic sensor
◦ Ensure that the copter stays under control
 Quad-copter could fly beyond radio control range
 AI protocol to limit altitude
◦ Overridden by ultrasonic when applicable

Requirements/Specifications
◦ Measure Altitude from 15 – 200 ft.
◦ 10 ft. or better resolution/accuracy
High altitude Measurement

Options:
◦ GPS vertical component
 unreliable
Barometric altimeter
 Determines altitude from air pressure
 More effective at higher altitudes
 Won’t recognize uneven ground
HDPM01 – Hoperf Electronic
 dual function altimeter/compass
module with breakout board
 Cost efficient solution
$19.90 vs. $45.00 (separate)
Direction sensor (Compass)

Goals/Objectives
◦ Establish an external reference to direction
◦ For maintaining a stable heading, turning, and
establishing a flight path in autonomous mode
◦ The module should not suffer from excessive
magnetic interference (compass)
◦ The module should be separate so that it can be
placed away from interfering fields and metals
(compass)

Specifications/Requirements
◦ Accurate to within 3 degrees
HDPM01 – Board layout

6 header pins from PCB
◦ Supply at 5 V
◦ Digital ground
◦ Master clock
◦ I2C serial data line
◦ I2C serial clock line
◦ XCLR – A/D reset
◦ Pull-up resistors
 High to transfer
Navigation/Location sensor (GPS)

Goals/Objectives
◦ Needed for autonomous flight mode
◦ The system should establish an external reference to
position (latitude and longitude)
◦ The system should have a serial output compatible
with the MCU, UART preferred.
◦ Should be compact, requiring minimal external
support (internal antenna)

Requirements/Specifications:
◦ The system should be accurate to within 3 meters
(latitude and longitude).
◦ The update rate should be at least 1Hz.
Navigation/Location sensor (GPS)

Options
◦ No practical alternative to GPS module
 With a GPS system, the quad-copter can
autonomously move toward a given coordinate
 And, return to point of origin
MediaTek MT3329 GPS 10Hz
 $39.95 for module + adapter (special offer)
 Integrated patch antenna (6 grams total)
 1-10 Hz update rate
 UART interface
MT3329 GPS Module

MediaTek chip
◦ Sensitivity: Up to -165 dBm
tracking
◦ Position Accuracy: < 3m
◦ Coding/Library support
available from DIYdrones

Adapter board (wired to main PCB)
◦ Facilitates testing, easily switched from prototype
board to final board
◦ Backup battery
◦ LED: blinks when searching, lit when locked
MT3329 – Board Layout
Main PCB will have an EM406 connector (6 pins)
 Rx and Tx to MCU
 5.0 V supply, 3.0 V enable, digital ground
 20 cm EM406 compatible connector cable
 Module can be attached to the frame (tape/Velcro)

Microcontroller
Goals/Objectives
Able to produce PWM signal
 Send/Receive UART signals
 Hardware ADCs not just comparators
 I2C capability

Specifications/Requirements



16-bit timers with 4 output compare
registers
2 UART ports
8 ADC ports (minimum 10-bit accuracy)
ATmega2560 Specs
0 – 16Mhz @ 4.5 – 5.5 volts
 256 KB Flash memory
 4 KB RAM
 4 16-bit timers
 16 10-bit ADC
 4 UART
 TWI (I2C)

Microcontroller Information
The main MCU will be programmed
through the SPI pins using the AVRISPMKII.
 AVRStudio 4.18 is the IDE that will be
used for development
 The main MCU will be responsible for the
obtaining sensor data, updating the
control system, and talking to the wireless
communication unit

Code
Code: Linear Control System
struct PID_Status {
desired_value;
Kp_Gain;
Ki_Gain;
Kd_Gain;
max_error;
max_summation_error;
}
Init_PID(struct PID_Status *PID_S, Kp_Gain, Ki_gain,
Kd_gain);
updatePID(struct PID_Status *PID_S);
Code: Motor Control
A PWM signal will be produced by the
MCU to control the motors
 Once the PWM signal is setup, they run
independent of the MCU
 Functions:

◦
◦
◦
◦
PWM_Setup( );
updateMotor(uint8_t motor, uint16_t speed);
startMotors( );
stopMotors( );
Code: Analog Sensors
The ADC will be used to retrieve data
from the sensors.
 A switch statement will be used to gather
data correctly
 Functions:

◦ ADC_Setup( );
◦ ISR(ADC_vect);
Code: Analog Sensors

Possible sensor data structures to store
sensor data:
Struct
struct sensors{
uint16_t accelX;
uint16_t accelY;
uint16_t accelZ;
uint16_t gyroX;
uint16_t gyroY;
};
Array
uint16_t sensors[5];
sensors[0] = accelX;
sensors[1] = accelY;
sensors[2] = accelZ;
sensors[3] = gyroX;
sensors[4] = gyroY;
Code: Digital Sensors

I2C will be used to retrieve data from the
compass and barometer
◦ MCU – master
◦ Compass/Barometer – slave

Functions:
◦ I2C_Setup( );
◦ ISR(TWI_vect);
Code: Communication

UART is going to be used to retrieve data
from GPS module and send/receive data
from the wireless communication module

Functions:
◦
◦
◦
◦
◦
UART_Setup( );
ISR(USART1_RX_vect);
ISR(USART1_TX_vect);
ISR(USART2_RX_vect);
ISR(USART2_TX_vect);
Computer Communication

To communicate with the computer via
UART, a UART to USB chip will be used
◦ The FT232RL will be used to create this link
◦ This chip creates a virtual communication
port on the computer which can be accessed
easily using C#
Picture used with permission from Sparkfun.com
Computer Communication
Schematic of FT232RL:
Picture used with permission from Sparkfun.com
Code: C# GUI
C# will be used for coding the GUI
 Standard Libraries for serial port
communication
 Easy to learn


Function of GUI
◦ Retrieve sensor data
◦ Monitor control system
◦ Send GPS locations to copter
Code: Overview
Wireless
Comm
Compass/
Barometer
GPS
UART
I2C
ADCs
IMU
PWM
Update
PIDs
Wireless Communication
Requirements
Work on the 2.4 GHz band
 Data rate of minimum 56 Kbs
 To have a range of 100 meters
 To cost less than $70

Design
The transceiver is TI’s CC2520
 The CC2520 has a range of 100 meters
 The data rate of the CC2520 is 250 Kbs
 For the protocol TI’s SimpliciTI will be
used
 The microcontroller to control the
CC2520 will be the MSP430F2616
 Antenna at 2.4 GHz

Antenna
Dipole Antenna
 Works at the 2.4 GHz frequency
 Has a gain of 5 dBi
 50 ohm impedance
 The is big and heavy
 If weight becomes an issue a smaller
antenna will be used

The CC2520 Balun Design
Interface the CC2520 with a 50 Ohm
antenna
 Need to match the impedances of the
CC2520 and the antenna
 Murata chip Balun LDB182G4510C-110
 This design reduces the impact of the
PCB design on performance

CC2520 Balun Circuit Design
CC2520 and MSP430F2616
Interfaced through a SPI connection
 MSP430 as master and CC2520 slave

CC2520 Complete Circuit
TI’s SimpliciTI Protocol
Is a small and simple protocol
 6 functions to get a basic peer to peer
network
 Available for free for TI’s chips
 Programming will be through Eclipse using
the open source MSPGCC compiler
 The MSP430 will be flashed using TI’s
debugger MSP-FET430UIF

SimpliciTI Functions
SMPL_Init(&linkID)
 SMPL_Link(&linkID)
 SMPL_LinkListen(&linkID)
 SMPL_Send(&linkID, uint8_t *msg, uint8_t
len)
 SMPL_Receive (&linkID, uint8_t *msg,
uint8_t *len)
 SMPL_Ioctl()

SimpliciTI Status

Struct smplStatus_t.
Name
Description
SMPL_SUCCESS
Operation successful.
SMPL_TIMEOUT
A synchronous invocation timed out.
SMPL_BAD_PARAM
SMPL_NOMEM
SMPL_NO_FRAME
Bab parameter value in call.
No memory available. Object depend on API
No frame available in input frame queue.
SMPL_NO_LINK
No reply received for Link frame sent.
SMPL_NO_JOIN
No reply received for Join frame sent
SMPL_NO_CHANNEL
Channel scan did not result in response on at least 1 channel.
SMPL_TX_CCA_FAIL
Frames transmit failed because of CCA failure.
SMPL_NO_PAYLOAD
Frame received but with no application payload.
SMPL_NO_AP_ADDRESS
Should have previously gleaned an Access Point address but we none.
Difficulty and Concerns
Developing this is harder then using an
Xbee
 Open source software
 TI’s Code Composer
 IAR Workbench
 Hardware is done
 Software will take time

Video System
Requirements
Range of 100 meters
 Weight less then 20 grams
 Be powered by any of the powered by a
standard battery
 Not interfere with the 2.4 GHz wireless
communication

Design of Video System
Pre-packaged video system: 24ghzmiwicoc
 Mount camera with transmitter on QuadCopter
 Power Supply will be a 9 volts battery
 Receiver connects to TV or Display with
composite connectors

Project Management
Project Distribution
Subsystem
Responsible
Main Software
Josh
Linear Control System
Engers
Frame
All
Motors
David
Power Supply
David
Microcontroller
Josh
Sensors
Steve
Wireless Communication
Engers
Video System
Steve
PBC Board
All
Autonomous Algorithm
All
Project Finance
Goal was to be under $700
 Current spent $460.61
 Difference $239.59
 Parts Acquisition at 80%
 Doing well!

Project Progress
Research: 90%
 Design: 75%
 Hardware Acquisition: 80%
 Programming: 20%
 Testing: 20%
 Prototyping: 20%
 Overall: 30%

Questions, Comments,
Concerns?