410 likes | 422 Views
This project focuses on the design and development of an autonomous photography aircraft. Its uses include government reconnaissance, search and rescue, commercial mapping, real estate, and artistic photography. The goal is for the aircraft to take off, fly to target coordinates, take photos, return to landing coordinates, and land.
E N D
Autonomous Photography Aircraft Group 18 Chris Hansen & Mark Inderhees ECE 445 Senior Design December 1, 2005
Introduction – Uses • Government • Reconnaissance • Search and Rescue • Commercial • Mapping • Real Estate • Artistic Photography
Introduction – Goal • Takeoff • Fly to target coordinates • Take photos • Return to landing coordinates • Land
Overview – Components • Power Supply • dsPIC – control processing, CPU • GPS – location • Compass – heading • Accelerometer – pitch & roll • Video & Text Overlay – feedback • RS232 – debugging • Servo control – mechanical control
Design – Power • Latching ON/OFF with self shut-down • First attempt with MAX5035 • Servo and logic power are seperate • Second attempt with TPS40190 • Plug-in Power module • Powers both servos and logic • Problems with high frequency ringing • Scope measurements
Design – dsPIC • Microchip’s dsPIC30F6014A • Used because fast, many peripherals, advanced 16 bit architecture and ISA • CPU: ties all components together • Logic for mechanical control • Interrupt priority levels • Aligned code
Design – dsPIC – PID • Proportional Integral Derivative (PID) • Error = Actual – Target (used in P,I,D) • Servo = P+I+D • Nested PID’s for Heading and Roll/Pitch • Test: Target Pitch & Roll = 0 • Plane servos/ailerons response
Design – GPS • Garmin GPS 18 5Hz • Fast updates: 40mph, 1 update per 12ft • Universal output in NMEA 0183 • Latitude, Longitude, Velocity, Heading, Altitude (Satellites, Quality, Magnetic Declination) • String processing, < 5% CPU
Design – GPS – Calculations • Target Heading, depends on quadrant • Heading = arctan(ΔLong/ΔLat) • Quad 1 same, 2 add 360°, 3or4 add 180° • Target Roll = ΔHeading * -.5 • Target Pitch = arctan(ΔAlt/2D Distance) • Approximate Target Distance = √(Long^2+Lat^2+Alt^2) • Test “Are we close to Target”
Design – GPS – Testing • Heading & Pitch: target as apartment, drove around campus • Roll: while driving, made sure roll was changing with ΔHeading • Distance: set target coordinates to current location, resulted in distance of ±5m
Design – Accelerometer • Freescale A7260 3-axis Accelerometer • Force in x, y, z values • RC filtering • Average value over 20ms • Calibrate
Design – Accelerometer – Calc • Force from Gravity = √(x^2+y^2+z^2) • Actual Pitch = -arcsin(x/G) • Actual Roll = arcsin(y/ (G*cos(Pitch))
Design – Accelerometer – Test • Tilt board, measure with protractor • Measurements are extremely accurate • Problems with vibrations • Problem when flying, acceleration of plane • Subtract centripetal acceleration ~K*V^2/r
Design – Compass • PNI 3-Axis Magneto-Inductive Compass (MicroMag3) • Outputs 3 16bit integers (x, y, z) via SPI • Problems, outside fields (circuits, motor)
Design – Compass – Calc • Earth Magnetic Field runs N to S, • Actual Heading is Quadrant dependent • Heading = arctan(Cy/Cx) • Quad 1 same, 2 add 360°, 3or4 add 180° • But compass needs to be compensated for aircraft tilt • Somewhat complicated trig equations to account for aircraft tilt • Functions written, but untested
Design – Compass – Testing • Easy to find N in Urbana-Champaign • Problems • Magnetic field in room • Magnetic field from circuit, motor • Place compass far away in wing • Really needs integrated calibration routine
Design – Video & Text Overlay • Began previous semester • Added I2C • Added text black and white control • Video muxing between two cameras
Design – RS232 • dsPIC UART module, MAX3223 • Used when debugging • Can see large amount of data • Compatible with HyperTerminal or “RS232 Receiver” • Reusable for other projects
Design – Servo Control • Need ability to switch between manual and autonomous control • Time incoming pulses using Cn interupts and timers • Output either same pulse or our own calculated from PID • Use WDT to determine if incoming servo data is good
Design – Servo Control – Test • Measure incoming and outgoing pulse length with oscilloscope • Problems with servo glitching • Solution: servo code has highest priority
Fabrication – Circuit • Double layer circuit boards constructed using photo process • Can do 7mil traces and spaces • Special attention paid to power buses • Designed with Cadsoft Eagle
Fabrication – Airplane • Used old airplane from last semester • Not large enough to fit all circuitry • Damaged during windy flight testing • New plane under construction • Can house all circuitry including digital camera
Flight Testing • Promising, could stay stable in high winds for short time. • Need many more flights to calibrate PID and Accelerometer
Recommendations • Much more flight testing • Heavier, Larger Airplane (not complete) • Add 3-axis gyro for complete 6 degree of freedom motion sensing • Don’t fly in high winds • Do not need compass, use only GPS • Use Kalman filter to determine orientation/position
Credits • Melvin Lathara – roommate C Guru