Anda di halaman 1dari 35

For the Partial Fulfilment of B.

Tech Degree

Sir Padampat Singhania University, Udaipur

Unmanned Aerial Vehicle (UAV)

Department of Electronics & Communication Engineering

Title of the Project

Unmanned Aerial Vehicle (UAV)

Certificate
This is to certify that the project report entitled Unmanned Aerial Vehicle is being submitted by

In partial fulfilment for the award of the degree of Bachelor of Technology in Electronics & Communication Engineering of Sir Padampat Singhania University is a record of bonafide work carried out by them under my guidance and supervision.

) Place: Date: .

Acknowledgements
We have taken efforts in this project. However, it would not have been possible without the kind support and help of our guide We would like to extend our sincere thanks to him. We would like to express our gratitude towards the members of Sir Padampat Singhania University for their kind co-operation and encouragement which helps us in the completion of this project. Our thanks and appreciations also go to our colleagues in developing the project and people who have willingly helped us out with their abilities.

Abstract
Gathering information from locations which are inhabitable, hostile, or difficult to reach is a crucial aspect for learning new information about unmarked territories and activities and aids in human technological advancement. This project is concerned with developing an agent for gathering visual information by holding a stationary position or pursuing a dynamic target. The agent is a quad rotor VTOL (Vertical Take Off and Landing) aircraft. This agent should have the capability to hover, fly and follow targets. It should receive and transmit data wirelessly into a base station. It should move through a predefined plan using a GPS receiver. It should also balance itself in the air through a gyro meter and an accelerometer. In addition it would utilize four ultrasonic sensors for obstacle avoidance and an extra one for landing assistance. The agent would also utilize a wireless camera to transmit a birds eye view to the base station.

Index
1. Introduction 2. Conceptual Design 3. Analysis, Component Level Design and Selection 3.1 Hardware Components 3.1.1 ARM7 LPC2138 Development Board 3.1.2 162 Serial LCD with backlight 3.1.3 Brushless motor with propeller and speed controller 3.1.4 USB ISP Programmer 3.1.5 Ultrasonic Distance Measurement Sensor 3.1.6 RF modules (Tx + Rx pair) 3.1.7 Dual motor driver module with PWM Control 3.2 Software Tools 3.2.1 Keil Software 3.2.1.1 3.2.1.2 3.2.1.3 3.2.1.4 UAV Process Remote Station Process Command Handler API 162 LCD drivers API

3.2.2 Flash Magic 4. Features 5. Applications 6. Conclusion 7. Future Advancement 8. Bibliography

Introduction
The project aims at developing an unmanned aerial vehicle (UAV), also known as a remotely piloted aircraft (RPA) or unmanned aircraft system (UAS), is a machine which functions either by the remote control of a navigator or pilot or autonomously, that is, as a self-directing entity. The rapid development of micro-processor technology and the continuous growth of integration density of electronics and mechatronics components yields a significant cost reduction of high tech products. Driven by this development it becomes feasible to embed information processing and communicating devices in all sorts of appliances, toys, production facilities, communication systems, traffic and transport systems etc. With this integration and the aid of global positioning systems, there has been a surge of development in Unmanned Vehicles (UV). The main benefits of UVs are that they do not require human control and thus can be reduced in size and cost. They also limit human error in several aspects, and reduce if not eliminate human endangerment. Unmanned vehicles are developed for use in air, over land and under water by both private and government agencies. Several unmanned systems exist such as Autonomous Underwater Vehicles (AUV), Unmanned Ground Vehicle (UGV), and Unmanned Combat Vehicles (UCV). NASA deploys USVs (Unmanned Space Vehicles) on rock gathering missions from the Moon and Mars. The military advanced UAVs and renamed them to UAVS (Unmanned Aerial Vehicle Systems) and are used in flight combat. Government search and rescue departments find the UAVs helpful in inhabitable or hazardous terrain such as earthquakes, floods or volcanoes, where no human lives have to be risked. Institutions which have onsite geologists use UAV for uncovering terrain and rock identification, without having to deploy a whole crew working outside. Departments of transportation can use this device to cover footage of inaccessible situations such as dead-lock traffic jams or multiple car-crashes. Government law enforcement and intelligence agencies can specifically find this device useful for reconnaissance and target pursuance, where the UAV provides the advantages of cheap costs, stealth and a diminished human risk factor. The Unmanned Aerial Vehicle project has been an on-going attempt to produce a reliable autonomous hovering or flying vehicle. The project designed and implemented a two-rotor hovering aerial vehicle. The advantages of a hovering vehicle over a fixed-wing flying vehicle include less complexity in design, minimal space for take-off and landing (vertical take-off and landing (VTOL)), indoor flight, manoeuvrability in obstacle heavy environments and of course the eye-catching ability of being able to maintain a static position in mid-air.

System Block Diagram

Conceptual Design
Our first step was to identify the design goals. These were the fundamental requirements which were decided:1. Ability to hover, in the sense of generating enough thrust and have enough control in order to maintain a mid-air static position. 2. Manoeuvrability in all directions of a three-dimensional plane. 3. Sufficient endurance of no less than 10-15 minutes. 4. A very light-weight body, including a battery with the highest power to weight ratio we could find since the battery is the heaviest single component of the vehicle. 5. High residual thrust to hover thrust ratio, an acrobatic vehicle was desirable for ability to demonstrate controllability and to perform difficult flight manoeuvres. 6. Minimal size & complexity.

We are using two ARM7 Development Board for the Unmanned Aerial Vehicle. One is used in the main UAV System and other one on remote control station. Transmitter/Receiver connected to the microcontroller boards for the wireless data transmission/reception continuously.

Main UAV System


Two brushless motor are used to give flight and appropriate pay load to UAV. Servo motor is used for the angular movement to the UAV. Ultrasonic sensor is used for the obstacle detection. Battery level indicator is used to shows the battery life.

Remote Control Station


Keypad is used to control the direction, speed and landing of the UAV. LCD is used to show the current status of the UAV. Battery Level shows the remaining charge of the battery and also shows the maximum flight time of the UAV. Buzzer is used to show if any danger to the UAV.

Analysis, Component Level Design and Selection


Hardware Components 1. ARM7 LPC2138 Development Board

Features of ARM7 LPC2138


NXP ARM7-TDMI LPC2148 microcontroller with 512 Kbytes program Flash Memory and 32 Kbytes SRAM. 12.0000 MHz crystal for maximum execution speed and standard serial bit rates 32.768 kHz RTC crystal. UART-to-USB bridge interface on UART #0 8 LEDs connected to ports. USB 2.0 device interface facility. RGB-LED, each color can be controlled via PWM signal JTAG Connection port. 64 pin expansion connector, all LPC2148 I/O pins are available on connector. Vectored Interrupt Controller (VIC) with configurable priorities and vector addresses ISP programming through inbuilt Boot loader of LPC21XX series

2. 162 Serial LCD with backlight


It can be connected with PCs, microcontrollers or any other device which can send the serial commands. It uses only 1 microcontroller pin, and so it saves lots of hardware complexities and time.

Features of 162 Serial LCD


Only 3 wire interface(RXD, VCC & GND). Works on 9600 baud rate. Supports functions like Backlight on/off, Display on/off, go to line/char, Line feed, Clear Screen, Change cursor type etc. in single command. Current consumption 20ma while backlight off and 70ma while backlight on. 512 bytes buffer for serial interface. Up to 8 custom characters can be defined and used easily.

3. Brushless Motor with Propeller and Speed Controller

Features of Brushless Motor


Motor 2822 , 1200 RPM/V Shaft Diameter 3 mm Length : 48mm with shaft and Mounting Thrust with 0945 Propeller : 790gm ESC(Electronic Speed Controller) Amp rating: 25A (max 33A burst) Voltage: 3 Cell Battery: 2-3Cell Lipo / 5-12Cell NiMH Size: 45x38x10mm Weight: 24.5g Input Pulse : PPM (Servo Pulse) Propeller Length 9" Pitch 4.5"

4. USB ISP(In-System Programming) Programmer

Features of ISP Programmer


Compatible to wide range of ARM7 &PIC microcontrollers. Auto detects hardware and ARM7 microcontrollers. High speed programming Through USB. USB powered. No external power required. 6 pin ICSP interface for programming onboard. Provides all basic functionality of Read, Write, Erase, Blank check, Configuration bits setting etc. LED indication for Power, Programming and Target power. 8 pin male headers denoted by PROG/UART0 & 1 on the board are used to program & communicate with LPC2138 board. The pins are connected to RX1, TX1, RST, P0.14, RX0, TX0, VCC, and GND.

5. Ultrasonic Distance Measurement Sensor


This sensor is a high performance ultrasonic range finder. It is compact and measures an amazingly wide range from 2cm to 4m. This ranger is a perfect for any robotic application, or any other projects requiring accurate ranging information. This sensor can be connected directly to the digital I/O lines of your microcontroller and distance can be measured in time required for travelling of sound signal using simple formula as below. Distance = (Echo pulse width high time * Sound Velocity (340M/S)/2) Or Distance in cm = (Echo pulse width high time (in us)*0.017)

Features of Ultrasonic Distance Measurement Sensor


Working Voltage : 5V(DC) Working Current : 15mA Working frequency : 40HZ Output: 0-5V (Output high when obstacle detected in range) Beam Angle : Max 15 degree Distance : 2cm - 400cm

Accuracy : 0.3cm Input trigger signal : 10us impulse TTL Echo signal : PWM signal (time required for sound signal to travel twice between source and obstacle) Size : 45mm*20mm*15 mm

Working
First of all a 10us trigger input has to be given to the pin named Trig on the sensor. This starts one cycle of range conversion and sends 8 bursts of sound waves from the transmitter. As soon as the signals are transmitted the Echo pin goes to high level and remains in high level until the same sound waves are received by the receiver. If the received sound waves are same as what the same sensor transmitted then the Echo pin goes to low level. If no object is detected within 5M after 30ms the Echo signal will automatically go to low level.

6. RF Modules (Tx + Rx Pair) a. Transmitter 433 MHz ASK


The ST-TX01-ASK is an ASK Hybrid transmitter module. It is designed by the Saw Resonator, with an effective low cost, small size, and simple-to-use for designing.

Features of Transmitter
Frequency Range: 315 / 433.92 MHZ. Supply Voltage: 3~12V. Output Power : 4~16dBm Circuit Shape: Saw

b. Receiver 433 MHz ASK


The ST-RX02-ASK is an ASK Hybrid receiver module. An effective low cost solution for using at 433.92 MHz

Features of Receiver
Low power consumption. Operation temperature range : 20 to 70 Operation voltage: 5 Volts. Frequency at:434 MHz Sensitivity: 105dBm IF Frequency:1MHz

7. Dual Motor Driver module with PWM control


This is an easy-to-use circuit with TTL compatible inputs. It can work up to 55V and 2Amp.

Features of Dual Motor Driver


Can be easily power from an AC DC source or Battery On Board 5V Regulator to supply power output to any external control unit like MCU Jumpers for selecting PWM or Non-PWM mode TTL input interface

Software Tools
1. Keil Software
To write, compile and execute the LPC2148 NXP programs in embedded C

2. Flash Magic
To transfer programs into Microcontrollers at appropriate baud rate

Programming Microcontroller through Flash Magic

UAV Process
int main() { System::initializeSystemPeripherals(); CommandHandler *commandHandler = new CommandHandler(); commandHandler->initialize(); while(true) { if(commandHandler->hasNextCommand()) { commandHandler->processNextCommand(); } MonitorSystemStatus::monitorAndSendInfo(); } return 0; }

Remote Station Process


int main() { System::initializeSystemPeripherals(); CommandHandler CommandHandler(); commandHandler->initialize(); *commandHandler = new

while(true) { if(commandHandler->hasNextCommand()) { commandHandler->processNextCommand();

} return 0; }

Command Handler API


hasNextCommand() { // Returns true if there are any other commands in the command queue. } initialize() { // Registers itself to the process handler for command handling. } addCommand() { // Adds command to the queue. This function is called by Process Handler } processNextCommand() { //Process next command in the command quque. }

16 X 2 LCD Drivers API


initialize() { //Initializes LCD You should call this function before any other function. } printData(char data[]) { // prints the data to the screen from the current cursor position } clearScreen() { // Clears the screen and moves the cursor to the initial 0 position. }

Displaying Text on 162 Serial LCD


#define UART_BAUD_RATE 9600 int main(void) { uart_init( UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU) ); //Initialize Uart sei(); // Enable Interrupts uart_puts("KINESIS); uart_puts("Unmanned Aerial Vehicle); }

Brushless Motor with Propeller and Speed Controller


/***************************************************************************** * pwm.c: PWM module file for Philips LPC214x Family Microprocessors * * Copyright(C) 2006, Philips Semiconductor * All rights reserved. * * History * 2005.10.01 ver 1.00 Prelimnary version, first Release * ******************************************************************************/ #include "LPC214x.H" /* LPC21xx definitions */ #include "type.h" #include "irq.h" #include "timer.h" #include "pwm.h" DWORD match_counter; /****************************************************************************** ** Function name: PWMHandler ** ** Descriptions: PWM interrupt handler ** For now, it only deals with PWM match 0 ** ** parameters: None ** Returned value: None ** ******************************************************************************/ voidPWMHandler (void) __irq { DWORD regVal; regVal = PWMIR; IENABLE; if ( regVal& MR0_INT ) { match_counter++; } PWMIR |= regVal; IDISABLE; VICVectAddr = 0; }

/* handles nested interrupt */

/* clear interrupt flag on match 0 */ /* Acknowledge Interrupt */

/****************************************************************************** ** Function name: PWM_Init ** ** Descriptions: PWM initialization, setup all GPIOs to PWM0~6, ** reset counter, all latches are enabled, interrupt

** on PWMMR0, install PWM interrupt to the VIC table. ** ** parameters: Duty cycle ** Returned value: true or fase, if VIC table is full, return false ** ******************************************************************************/ DWORD PWM_Init( DWORD cycle ) { match_counter = 0; PINSEL0 = 0x000A800A; /* set GPIOs for all PWMs */ PINSEL1 = 0x00000400; PWMTCR = TCR_RESET; /* Counter Reset */

PWMPR = 0x00; /* count frequency:Fpclk */ PWMMCR = PWMMR0I | PWMMR0R; /* interrupt on reset on PWMMR0, reset TC if PWM0 matches */ PWMMR0 = cycle; /* set PWM cycle */ PWMMR1 = cycle * 5/6; PWMMR2 = cycle * 2/3; PWMMR3 = cycle * 1/2; PWMMR4 = cycle * 1/3; PWMMR5 = cycle * 1/6;

PWMMR0,

/* all PWM latch enabled */ PWMLER = LER0_EN | LER1_EN | LER2_EN | LER3_EN | LER4_EN | LER5_EN | LER6_EN; if ( install_irq( PWM0_INT, (void *)PWMHandler ) == FALSE ) { return (FALSE); } return (TRUE); } /****************************************************************************** ** Function name: PWM_Set ** ** Descriptions: PWM cycle setup ** ** parameters: PWM cycle and offset ** Returned value: None ** ******************************************************************************/ voidPWM_Set( DWORD cycle, DWORD offset ) { PWMMR0 = cycle; /* set PWM cycle */ PWMMR1 = cycle * 5/6 + offset;

PWMMR2 = cycle * 2/3 + offset; PWMMR3 = cycle * 1/2 + offset; PWMMR4 = cycle * 1/3 + offset; PWMMR5 = cycle * 1/6 + offset; /* The LER will be cleared when the Match 0 takes place, in order to load and execute the new value of match registers, all the PWMLERs need to reloaded. all PWM latch enabled */ PWMLER = LER0_EN | LER1_EN | LER2_EN | LER3_EN | LER4_EN | LER5_EN | LER6_EN; return; } /****************************************************************************** ** Function name: PWM_Start ** ** Descriptions: Enable PWM by setting the PCR, PTCR registers ** ** parameters: None ** Returned value: None ** ******************************************************************************/ voidPWM_Start( void ) { /* All single edge, all enable */ PWMPCR = PWMENA1 | PWMENA2 | PWMENA3 | PWMENA4 | PWMENA5 | PWMENA6; PWMTCR = TCR_CNT_EN | TCR_PWM_EN; /* counter enable, PWM enable */ return; } /****************************************************************************** ** Function name: PWM_Stop ** ** Descriptions: Stop all PWM channels ** ** parameters: None ** Returned value: None ** ******************************************************************************/ voidPWM_Stop( void ) { PWMPCR = 0; PWMTCR = 0x00; /* Stop all PWMs */ return; }

To generate PWM signal for the rotation of Brushless Motor


/***************************************************************************** * pwmtest.c: main C entry file for Philips LPC214x Family Microprocessors * * Copyright(C) 2006, Philips Semiconductor * All rights reserved. * * History * 2005.10.01 ver 1.00 Prelimnary version, first Release * ******************************************************************************/ #include "LPC214x.h" /* LPC21xx definitions */ #include "type.h" #include "irq.h" #include "timer.h" #include "pwm.h" extern DWORD timer_counter; extern DWORD match_counter; /****************************************************************************** ** Main Function main() ******************************************************************************/ int main (void) { DWORD cycle = PWM_CYCLE, offset = 0; init_VIC(); if ( PWM_Init( 0 ) != TRUE ) { while( 1 ); /* fatal error */ } PWM_Set( cycle, offset ); PWM_Start(); while ( 1 ) { if ( match_counter != 0 ) { match_counter = 0; if( offset <= PWM_CYCLE ) offset += PWM_OFFSET; else offset = 0; PWM_Set( cycle, offset ); }

} PWM_Stop() ; return 0; }

162 Serial LCD


#include"LPC21xx.h" void Initialize(void); /* Macro Definitions */ #define TEMT (1<<6) #define LINE_FEED 0xA #define CARRIAGE_RET 0xD /************************* MAIN *************************/ int main() { inti; char c[]=" Welcome "; Initialize(); /* Print forever */ // while(1) // { i=0; /* Keep Transmitting until Null character('\0') is reached */ while(c[i]) { U0THR=c[i]; i++; } U0THR=LINE_FEED; U0THR=CARRIAGE_RET; /* Wait till U0THR and U0TSR are both empty */ while(!(U0LSR & TEMT)){} // } } /*************** System Initialization ***************/ void Initialize() { /* Initialize Pin Select Block for Tx and Rx */ PINSEL0=0x5; /* Enable FIFO's and reset them */ U0FCR=0x7; /* Set DLAB and word length set to 8bits */ U0LCR=0x83; /* Baud rate set to 9600 */ U0DLL=0x10;

U0DLM=0x0; /* Clear DLAB */ U0LCR=0x3; } /*********************************************************/

Obstacle Detection using Ultrasonic Sensor


char timer0counter; void main() { char buffer[10]; float range; sei(); //Enable global interrupt sbi(DDRA,6); //Set pin as output cbi(DDRA,7); //Set pin as input while(1) { sbi(PORTA,6); //Send Trigger DELAYUS(10); cbi(PORTA,6); //Send trigger timer0counter=0; TCNT0=0; //Clear timer while(bit_is_clear(PINA,7)); //Wait for rising edge sbi(TCCR0,CS02); //Select prescalar 256 sbi(TIMSK,TOIE0); //Enable timer0 overflow interrupt LCD_CLRSCR(); while(bit_is_set(PINA,7) && timer0counter<9) //wait for falling edge of echo { DELAYUS(5); } cbi(TCCR0,CS02); //Stop timer cbi(TIMSK,TOIE0); if(bit_is_set(PINA,7)) { LCD_PRINT("No OBSTACLE"); } else { range=(256*timer0counter+TCNT0)*16*0.017; //range conversion itoa(range,buffer,10); LCD_PRINT(buffer); UART_PRINT(buffer);

UART_PRINT("\n\r"); } DELAYMS(100); } } SIGNAL(SIG_OVERFLOW0) { cbi(TIMSK,TOIE0); TCNT0=0; timer0counter++; UART_PUTCHAR(timer0counter); sbi(TIMSK,TOIE0); if(timer0counter>8) { cbi(TCCR0,CS02); cbi(TIMSK,TOIE0); } }

Features
Medium range remotely controlled rotor based aircraft Flexible and instantaneous control over the aircraft. No servos; directional control only via variable power to the tail rotor. High powered lithim ion battery for improved performance. Battery voltage level indicator for constant monitoring. Obstacle detection and avoidance using highly reliable algorithms. Automatic landing in case of power failure. Highly maneuverable and aerodynamic.

Applications
Low altitude aerial photography. Remote observation or inspection. Search & Rescue Operations Surveillance and reconnaissance Data collection over areas dangerous to human intervention

Recently there has been drastic increase in usage of UAVs in multiple areas like, widely used as a millatry support aircraft for recon operations, commercially used for search and rescue recreational purpose.

Conclusion
This project is an embedded system; a bottom-down programming method was used, followed by integrating elements into a greater whole. All single elements were tested and worked successfully. With more time PID control techniques could have been implemented.

Future Advancement
Heavy lift generating motors. Increased power to weight ratio. Introduction of high-performance lithium polymer battery. More reliable control features Night vision technology

Bibliography
ARM System Developers Guide - Designing and Optimizing System Software by Andrew N. Sloss, Dominic Symes, and Chris Wright ARM7 TDMI Technical Reference Manual by ARM Limited Robokits Serial LCD User Manual Ultrasonic Distance Measurement Sensor User Manual

Anda mungkin juga menyukai