Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quad-Copter Group 3 Fall 2010 David Malgoza Engers F Davance Mercedes

Similar presentations

Presentation on theme: "Quad-Copter Group 3 Fall 2010 David Malgoza Engers F Davance Mercedes"— Presentation transcript:

1 Quad-Copter Group 3 Fall 2010 David Malgoza Engers F Davance Mercedes
Stephen Smith Joshua West

2 Project Description Design a flying robot Robot must be able to:
Autonomously Fly Communicate Wirelessly Wireless Manual Control

3 Project Motivation The Big Question, WHY?
Wanted to design an aerial vehicle with autonomous features Wanted to do a project with fair amount of hardware and software Most of all wanted to do something cool and fun!

4 Project Overview To do this we must:
Design and code a control system for the Quad-Copter (move up, take-off, etc…) Design and code a sensor fusion algorithm for keeping the copter stable Design and build a power distribution system Design and build a chassis

5 Goals/Objectives FLY The Quad-copter must be able to remain stable and balance itself. The copter must be able to rise and descend The copter must be able to signal when power is running low (audible and visual)

6 Specifications/Requirements
Lift at least 2 kg of mass Must be able to hover at least 6 inches from the ground The Quad-Copter must communicate wirelessly at least 100m The Quad-Copter must be able flight for a minimum of 5 minutes (battery power)

7 Quad-Copter Concept

8 Frame

9 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

10 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 and Stiffness. Durable. Easily Replaceable. Less Costly. Disadvantages Can chip or shatter. More costly. Can easily bend or dent.

11 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 plate, two additional aluminum rods will be used to support the battery. Landing gear will be shaped as standard helicopter legs. 4 coat hangers will be used as landing gear.

12 Diagram of Frame

13 Motors/ESC

14 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

15 Brushless Motor Advantages Less friction on the rotor
Typically faster RPM. PWM or I2C controlled by an electronic speed control (ESC) module. Disadvantages Require more power. Sensorless motors are the standard Typically more expensive

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

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

18 Power Supply System

19 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 at least 1 minute

20 Power Distribution 9V Battery LM7805 Digital Compass GPS
Main Processor LD1117V33 Wireless Processor Transceiver 11.1V LiPo Motor LM317 Ultrasonic Motor Ultrasonic Motor Gyroscope Accel. Motor

21 LiPo Battery Specifications on the EM-35 Rated at 11.1V
Charge Capacity: 2200mAH Continuous Discharge: 35C, which delivers 77A, typically. Mass: 195g

22 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:

23 Sensors

24 Sensor Subsystems/Functions
Flight stability sensors Monitor, correct tilt Direction/Yaw sensor Maintain stable heading, establish flight path Proximity sensors (future application) Detect obstacles, ground at low altitude Navigation/Location sensor (future application) Monitor position, establish flight path *Minimize cost and weight for all choices

25 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

26 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

27 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

28 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

29 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

30 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

31 IMU Code Get sensor data from ADC’s:
accel[ROLL] = convertADC(4); accel[PITCH] = convertADC(5); accel[YAW] = convertADC(6); gyro[ROLL] = convertADC(0); gyro[PITCH] = convertADC(1); Find adjustments for each axis (accelerometer): Motor_Adj_Y = PID(&Y, angle[PITCH], 504, G_dt); Motor_Adj_X = PID(&X, angle[ROLL], 502, G_dt);

32 IMU Code Find an adjustment based on the magnitude and direction of the gyro data that is used to dampen movement/ inertia about the axes Gy_Adj = gyro[PITCH] - 418; Gx_Adj = gyro[ROLL] - 417; Gy_Adj = Gy_Adj / gyro_divisorY; // 3 Gx_Adj = Gx_Adj / gyro_divisorX; // 3

33 IMU Code Gy_Adj effectively dampens oscillations of the P term of the PID loop by acting in opposition to it: MOTOR_R = (int)limitRange((hover_speed + idkno yawAdj - Motor_Adj_Y - Gy_Adj),560,800);

34 Direction sensor (Compass)
Goals/Objectives Establish an external reference to direction For maintaining a stable heading, turning, The module should not suffer from excessive magnetic interference (compass) The module should be placed away from interfering fields and metals (compass) Specifications/Requirements Accurate to within 3 degrees

35 HMC6352 – Compass Module 3.3 V supply I 2Cserial interface
.5 degree resolution 1 to 20 Hz adjustable update rate advertised but, higher update rate difficult to encode with current hardware layout.

36 HMC6352 – Compass Module In coding the I2C interface for the HMC6352, a data update rate of only 2 Hz. was achieved As a result, the Yaw_PID function produced a loose heading. This limitation was addressed by adding a dampening term (to the P term).

37 HMC6352 – Code Yaw PID function using compass
float YAW_PID(struct PID_Data *PID_Status, float value, float desiredValue, float yaw_dt) { float error, temp, dTerm, yaw_temp = 0.0; yaw_temp = desiredValue - value; if (yaw_temp < -1800) yaw_temp += 3600; error = yaw_temp; } …

38 HMC6352 – Code Yaw_PID (cont) else if (yaw_temp > 1800){
error = yaw_temp;} else error = yaw_temp; dTerm = PID_Status->D*((PID_Status-> lastError - error)); temp = (PID_Status->P*error + dTerm); PID_Status->lastError = error; return temp; }

39 Proximity Sensors (future application)
Bottom and forward sonar application using the Maxbotix LV-EZ2 ultrasonic sensor Detect the ground at 1-15 feet Obstacles 30˚ arc forward 1- 8 feet 6 inches resolution

40 GPS - future application
Goals/Objectives Needed for autonomous flight mode The system could establish an external reference to position (latitude and longitude) The system would have a serial output Should be compact, requiring minimal external support (internal antenna) Requirements/Specifications: The system would need to be accurate to within 3 meters (latitude and longitude). The update rate should be at least 1Hz.

41 Microcontroller

42 Specifications/Requirements
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)

43 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)

44 Microcontroller Information
The 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

45 Code

46 Code: Linear Control System
struct PID_Data { float P; float I; float D; float lastError; float integratedError; } void initPID(struct PID_Data *PID_Status, float kp, float ki, float kd) float PID(struct PID_Data *PID_Status, float value, float desiredValue, float dt) In addition to this the gyro is used to slow down the momentum of the Quad-Copter.

47 PID Loop error = desiredValue - value;
PID_Status->integratedError += error*dt; dTerm = PID_Status->D*((error)/dt); (PID_Status->P*error + PID_Status- >I*PID_Status->integratedError + dTerm);

48 Testing the PID Trail and error The Ziegler-Nichols method
Center of gravity The testing procedure is as follow Isolate an axis Increase P gain until oscillation occur Increase D gain until it dampens the oscillation Increase the effect of the gyro to slow the speed of rotation Increase I just enough so that it corrects steady errors slowly.

49 PID Controller Constants
Kp Ki Kd X-Axis 1.809 0.0699 Y-Axis 0.1099 Yaw 0.1

50 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: initPWM( ); updateMotor();

51 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: initADC ( ); convertADC(uint8_t value);

52 Code: Digital Sensors I2C will be used to retrieve data from the compass MCU – master Compass – slave Functions: initI2C( ); ISR(TWI_vect);

53 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(USART0_RX_vect); ISR(USART0_TX_vect); ISR(USART2_RX_vect); ISR(USART2_TX_vect);

54 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 and display to user

55 Code: Overview IMU PWM Compass Wireless Comm I2C UART UART PIDs Update

56 Wireless Communication

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

58 Xbee Module The Xbee module is a Zigbee compatible device.
Zigbee meets all the requirements of the wireless communication. Xbee will be used to control and get status messages from the Quad-Copter. Xbee modules can be setup as end device or coordinator.

59 Xbee Setup PANID: This is the ID of the network
MY: Is the 16 bit address of the source device DL: Is the 16 bit address of the destination device. A1: Register that controls who the end device can talk to. A2: Register that controls how the Coordinator manages the network.

60 Xbee: A1 Register A1 has three bits that decide how the end device connects to a network: bit0: if set it will allow the end device to join any network bit1: if set it the end device will allow the channel to be change by a coordinator bit2: if set the end device will try to auto associate.

61 Xbee: A2 register A2 has three bits that decide how the coordinator manages a network: bit0: if set it will allow the coordinator to look for a free PANID bit1: if set it will allow a coordinator to change the end device’s channel bit2: if set the coordinator will allow end devices to associate to it.

62 PCB Hardware Layout

63 Requirements Must be able to mount the MCU, the wireless system, and the IMU components For easy plug-and-play, the level logic converters are to be mounted for all UART connections Power distribution for the digital section of the board is to be distributed using a star design IMU components must be relative central to the Quad- Copter for the most accurate readings Male header pins are to be used for connecting to all external components Due to time and cost, through-hole parts are preferred for all passive components

64 Main Board - Initial

65 Modifications Design flaws in the schematic for the level logic converters created a setback in implementing UART devices were fixed. All voltage regulators are connected to the main power lines to prevent voltage dropout effects All regulators were exchanged to TO-220 packaging Xbee module is mounted.

66 Main board - Final

67 Project Management

68 Wireless Communication
Project Distribution Subsystem Responsible Main Software Josh Linear Control System Engers Frame All Motors David Power Supply Microcontroller Sensors Steve Wireless Communication Video System PBC Board Autonomous Algorithm

69 Project Finance Goal was to be under $700
Unfortunately the group did not meet this goal. Estimated spent: ~$ Reason: Underestimated the amount of parts that would need to be replaced and shipping costs

70 Problems I2C not working on main board
Fix: Use another MCU that it was tested with

71 Problems Accelerometer is susceptible to vibration noise
The vibration from the motors induces oscillation on the accelerometer. Fix: Use a software low-pass filter y(nT) = y(nT – T) + (dt/(dt + RC))(x(nT)-y(nt-T)

72 Problems Sensor fusion algorithms not working.
Starlino’s sensor fusion algorithm would get stuck on a angle. Kalman filter would get stuck on a angle. Fix: Instead of using a combination of accelerometer and gyro to get a better estimate of position, we used the accelerometer value and passed it through a low pass filter.

73 Problems Grounding on our first PCB was problematic.
Fix: Designed a new PCB with wider ground traces

74 Questions, Comments, Concerns?

Download ppt "Quad-Copter Group 3 Fall 2010 David Malgoza Engers F Davance Mercedes"

Similar presentations

Ads by Google