the kodel, an rc airplane autopilot for aerial photography

Post on 26-Aug-2014

20.332 Views

Category:

Self Improvement

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

My efforts to build an autopilot for RC airplanes based upon a gps module, IR sensors and a microcontroller. Presented at Barcamp Antwerp on March 21 2009.

TRANSCRIPT

My DIY RC autopilot

First try on aerial photography

Conclusion:it’s difficultwithout anAutopilot

• to hold it steady• to aim the camera

Autopilot design goals

• User selects object on Google Maps• Plane flies to location and starts circling• Camera takes pictures always pointed to target• Pictures can be “glued together” in viewer

(Not: ortho pictures to add on google maps)

Goal: easy photography of buildings / landscapes

PRINCIPLES

Forces on an airplane

Thrust:Controls heigth

Elevator:Controls speed

Rudder:Controls direction

Ailerons:Control roll

What is a servo, how does it work ?

Pitch / roll sensingIR sensors (thermophiles)

GPS navigation

Yaw/height:calculated

Waypoints:• straight• circular• Failsafe

$gprmc,114019.489,A,5048.9524,N,00511.8268,E,0.00,130.10,190907,,,A*60$gpgga,114019.489,5048.9524,N,00511.8268,E,1,08,01.4,57.9,M,45.6,M,,*52gga = time,latitude,ns,longitude,ew,posfix,sats,precision,altitudelatitude=xxx.zzzz to xxxxx.zzzz (degrees*100+minutes=deel voor komma)longitude=xxx.zzzz to xxxxx.zzzz (degrees*100+minutes=deel voor komma)

Microcontroller: a computer on a chip (but no OS)

RAM + FLASHEPROM

TimersInterrupts

I/O ports (digital)Analog portsSerial interface(usb, bluetooth)

Bus (I2C, SPI, CAN)

HARDWARE COMPONENTS

KISS : just plug board between servo’s and receiver(dsPIC30F4012 from Microchip)

Paper adhesive tapeprovides intended point of failure uponimpact(crash tested)

Only 3 things to connect and install

IR sensor Autopilot CPU GPS module

CODE SAMPLES

Input pulse collection:Interrupt on change

Output pulse generation:Interrupt on timer

Flight logic:Continious loop

Calculation of stabilisation:Use of floating point

Watch out for th

e math

Error TRAP (code sto

ps)

TOOLS

PIC Programmer:Velleman K8048 (15€)

Programmer software:Freeware WIN PIC

IDE: free MPLAB available from Microchip

Alternative microcontrollersGood:• AVR: very powerfull, more expensive/compex• Arduino: pre-integrated, less effort• Ti

Bad:• BASIC stamp: ripoff with lousy programming• LEGO Mindstorms: expensive plastic• PIC16, PIC18: voorbijgestreefd

I stick with dsPIC since the learning curve was not too steep

OTHER AUTOPILOTS

Tompycke.be :a Belgian, 10x betterthen I am at this stuff

Paparazzi:Very comprehensive,open source, starts toget a bit long in the tooth

Attopilot:The best, very recent effort by a dedicated ex-intel engineer

ArduPilot:Arduino based andopen source, recentbut very basic SW,From Chris “The LongTail” Anderson (& others)

Let’s go fly!

top related