quad-copter group 3 fall 2010 david malgoza engers f davance mercedes stephen smith joshua west

Post on 26-Dec-2015

228 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Quad-CopterQuad-CopterGroup 3Fall 2010

David Malgoza Engers F Davance Mercedes              Stephen SmithJoshua West

Project DescriptionProject DescriptionDesign a flying robotRobot must be able to:

◦Avoid Obstacles◦Navigate to GPS location◦Communicate Wirelessly◦Wireless Manual Control◦Stream Wireless Video

Project MotivationProject Motivation

The Big Question, WHY?Wanted to design an aerial

vehicle for surveillance purposesWanted to do a project with fair

amount of hardware and softwareMost of all wanted to do

something cool and fun!

Project OverviewProject OverviewTo 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 stableDesign and code a wireless

communication system (send commands)

Design and build a power distribution system

Design and build a chassis

Goals/ObjectivesGoals/ObjectivesFLYThe 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/Specifications/RequirementsRequirementsLift at least 2 kg of massNavigation accuracy within 3mThe Quad-Copter must communicate

wirelessly at least 100mThe Quad-Copter must flight for a

minimum of 5 minutesThe Quad-Copter must be able to detect

objects from at least 18 inches awayThe Quad-Copter must have video

capabilities at 100m

Quad-Copter ConceptQuad-Copter Concept

FrameFrame

FrameFrameGoals:Create a lightweight chassis for the Quad-

CopterThe chassis must support all batteries,

external sensors, motors, and the main boardCost EffectiveRequirements:Create a chassis with a mass of 800g or lessThe area the Quad-Copter cannot exceed a

radius of 18in.Must be able to support at least a 1.2kg load

Materials ComparisonMaterials ComparisonThere 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 and Stiffness.Durable.

Easily Replaceable.Less Costly.

Disadvantages Can chip or shatter.More costly.

Can easily bend or dent.

Design of FrameDesign of Frame2 aluminum square plates will be used as the

main structural support4 rods will be screwed to the top square

plate at and secured at the cornersBelow 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 FrameDiagram of Frame

Motors/ESCMotors/ESC

MotorsMotorsGoals:To use lightweight motors for flightThe motors must be cost effectiveRequirements:Use motors with a total mass of 300gEach motor must be able to go above 2700

rpmEach motor is to be controlled via PWM

signal from the processor

Brushless MotorBrushless Motor1. Advantages

1. Less friction on the rotor2. Typically faster RPM.3. PWM or I2C controlled by an electronic

speed control (ESC) module.2. Disadvantages

1. Require more power.2. Sensorless motors are the standard3. Typically more expensive

TowerPro 2410-09Y BLDCTowerPro 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 ESCSensorless ESCThe 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 SystemPower Supply System

PowerPowerGoals 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

BatteriesBatteriesType 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 BatteryLiPo BatterySpecifications on the EM-35Rated at 11.1VCharge Capacity: 2200mAHContinuous Discharge: 35C, which delivers

77A, typically.Mass: 195g

Power DistributionPower Distribution6V – 4 AA

GPS

Digital Compass

Main Processor

LM7805

LD1117V33

Accel.

Ultrasonic

Ultrasonic

Wireless Processor

LM317

Gyroscope

11.1V LiPo

Motor

Motor

Motor

Motor

11.1V LiPo

Transceiver

LM7805LM78055V 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.

LD1117V33LD1117V333.3V LDO regulator, with 500mA maximum.Will be used for powering the transceiver

and the wireless system, and most of the analog components.

LM317LM317The 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 ConverterLogic ConverterAllows 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

SensorsSensors

Sensor Subsystems/FunctionsFlight 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 SensorsFlight Stability SensorsGoals/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 SensorsFlight Stability SensorsOptions (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 SensorsFlight Stability SensorsIMU (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 HardwareADXL335 - 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 LayoutADXL335 – PCB LayoutSurface mount soldered to main PCB3.3 V supply filtered by .1µf cap.1µf caps at C2, C3, C4 that filter > 50HzX, Y, Z outputs to MCU A/D converters S1 self test switch

IDG500 – Board LayoutIDG500 – Board LayoutSoldered to main PCB3.0V supply X & Y gyro outputs with low pass filter, to

A/DC5-C6 for internal regulation

IMU – Algorithm OverviewIMU – Algorithm OverviewAccelerometer vector R projected onto the

xz and yz planes forms angles Axz and Ayz (yellow), which represent current tilt

Gyro yields instantaneousvelocity and direction of the same angles at regular interval T

Results merged into an improved estimated angular state

The algorithm’s outputis the input to the linearcontrol system

IMU – code progressIMU 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 SensorsOptions

◦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 Layout3 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 MeasurementHigh altitude MeasurementGoals/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 MeasurementHigh altitude MeasurementOptions:

◦ 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 layout6 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 ModuleMediaTek chip

◦ Sensitivity: Up to -165 dBm tracking

◦ Position Accuracy: < 3m ◦ Coding/Library support

available from DIYdronesAdapter 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 LayoutMain PCB will have an EM406 connector (6 pins)Rx and Tx to MCU5.0 V supply, 3.0 V enable, digital ground20 cm EM406 compatible connector cableModule can be attached to the frame

(tape/Velcro)

MicrocontrollerMicrocontroller

Goals/ObjectivesGoals/Objectives

16-bit timers with 4 output compare registers

2 UART ports8 ADC ports (minimum 10-bit accuracy)

Specifications/Specifications/RequirementsRequirements

Able to produce PWM signalSend/Receive UART signalsHardware ADCs not just comparatorsI2C capability

ATmega2560 SpecsATmega2560 Specs0 – 16Mhz @ 4.5 – 5.5 volts256 KB Flash memory4 KB RAM4 16-bit timers16 10-bit ADC4 UARTTWI (I2C)

Microcontroller Microcontroller InformationInformationThe main MCU will be

programmed through the SPI pins using the AVRISP-MKII.

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

CodeCode

Code: Linear Control Code: Linear Control SystemSystemstruct 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 ControlCode: Motor ControlA PWM signal will be produced by

the MCU to control the motorsOnce the PWM signal is setup,

they run independent of the MCUFunctions:

◦PWM_Setup( );◦updateMotor(uint8_t motor, uint16_t

speed);◦startMotors( );◦stopMotors( );

Code: Analog SensorsCode: Analog SensorsThe ADC will be used to retrieve

data from the sensors.A switch statement will be used

to gather data correctlyFunctions:

◦ADC_Setup( );◦ISR(ADC_vect);

Code: Analog SensorsCode: Analog SensorsPossible sensor data structures to

store sensor data:

Structstruct sensors{

uint16_t accelX;

uint16_t accelY;

uint16_t accelZ;

uint16_t gyroX;

uint16_t gyroY;};

Arrayuint16_t sensors[5];sensors[0] = accelX;sensors[1] = accelY;sensors[2] = accelZ;sensors[3] = gyroX;sensors[4] = gyroY;

Code: Digital SensorsCode: Digital SensorsI2C will be used to retrieve data from

the compass and barometer◦MCU – master◦Compass/Barometer – slave

Functions:◦I2C_Setup( );◦ISR(TWI_vect);

Code: CommunicationCode: CommunicationUART 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 CommunicationComputer CommunicationTo 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 CommunicationComputer Communication

Schematic of FT232RL:

Picture used with permission from Sparkfun.com

Code: C# GUICode: C# GUIC# will be used for coding the GUIStandard Libraries for serial port

communicationEasy to learn

Function of GUI◦Retrieve sensor data◦Monitor control system◦Send GPS locations to copter

Code: OverviewCode: Overview GPS

UART

UART

I2CCompass/Barometer

WirelessComm

IMU

PWM

Wireless CommunicationWireless Communication

RequirementsRequirementsWork on the 2.4 GHz bandData rate of minimum 56 KbsTo have a range of 100 metersTo cost less than $70

DesignDesignThe transceiver is TI’s CC2520The CC2520 has a range of 100

metersThe data rate of the CC2520 is 250

KbsFor the protocol TI’s SimpliciTI will

be usedThe microcontroller to control the

CC2520 will be the MSP430F2616Antenna at 2.4 GHz

AntennaAntennaDipole AntennaWorks at the 2.4 GHz frequencyHas a gain of 5 dBi50 ohm impedanceThe is big and heavyIf weight becomes an issue a

smaller antenna will be used

The CC2520 Balun DesignThe CC2520 Balun DesignInterface the CC2520 with a 50

Ohm antennaNeed to match the impedances

of the CC2520 and the antennaMurata chip Balun

LDB182G4510C-110This design reduces the impact of

the PCB design on performance

CC2520 Balun Circuit CC2520 Balun Circuit DesignDesign

CC2520 and CC2520 and MSP430F2616 MSP430F2616 Interfaced through a SPI

connectionMSP430 as master and CC2520

slave

CC2520 Complete CircuitCC2520 Complete Circuit

TI’s SimpliciTI ProtocolTI’s SimpliciTI ProtocolIs a small and simple protocol6 functions to get a basic peer to

peer networkAvailable for free for TI’s chipsProgramming will be through

Eclipse using the open source MSPGCC compiler

The MSP430 will be flashed using TI’s debugger MSP-FET430UIF

SimpliciTI FunctionsSimpliciTI FunctionsSMPL_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 StatusSimpliciTI StatusStruct smplStatus_t.

Name Description

SMPL_SUCCESS Operation successful.

SMPL_TIMEOUT A synchronous invocation timed out.

SMPL_BAD_PARAM Bab parameter value in call.

SMPL_NOMEM No memory available. Object depend on API

SMPL_NO_FRAME 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 ConcernsDifficulty and ConcernsDeveloping this is harder then

using an XbeeOpen source softwareTI’s Code ComposerIAR WorkbenchHardware is doneSoftware will take time

Video SystemVideo System

RequirementsRequirementsRange of 100 metersWeight less then 20 gramsBe powered by any of the

powered by a standard batteryNot interfere with the 2.4 GHz

wireless communication

Design of Video SystemDesign of Video SystemPre-packaged video system:

24ghzmiwicocMount camera with transmitter

on Quad-CopterPower Supply will be a 9 volts

batteryReceiver connects to TV or

Display with composite connectors

Project ManagementProject Management

Project DistributionProject Distribution

Project FinanceProject FinanceGoal was to be under $700Current spent $460.61Difference $239.59Parts Acquisition at 80%Doing well!

Project ProgressProject ProgressResearch: 90%Design: 75%Hardware Acquisition: 80%Programming: 20%Testing: 20%Prototyping: 20%Overall: 30%

Questions, Comments, Concerns?

top related