unmanned aerial vehicle _summer project report
TRANSCRIPT
-
7/30/2019 Unmanned Aerial vehicle _summer project report
1/35
For the Partial Fulfilment of B.Tech Degree
Sir Padampat Singhania University, Udaipur
Unmanned Aerial Vehicle (UAV)
Department of Electronics & Communication Engineering
-
7/30/2019 Unmanned Aerial vehicle _summer project report
2/35
Title of the Project
Unmanned Aerial Vehicle (UAV)
-
7/30/2019 Unmanned Aerial vehicle _summer project report
3/35
Certificate
This is to certify that the project report entitled Unmanned Aerial Vehicle is beingsubmitted 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: .
-
7/30/2019 Unmanned Aerial vehicle _summer project report
4/35
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 sincerethanks to him.
We would like to express our gratitude towards the members of Sir PadampatSinghania University for their kind co-operation and encouragement which helps usin the completion of this project.
Our thanks and appreciations also go to our colleagues in developing the project andpeople who have willingly helped us out with their abilities.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
5/35
Abstract
Gathering information from locations which are inhabitable, hostile, or difficult toreach is a crucial aspect for learning new information about unmarked territories andactivities and aids in human technological advancement. This project is concernedwith developing an agent for gathering visual information by holding a stationaryposition or pursuing a dynamic target. The agent is a quad rotor VTOL (Vertical TakeOff and Landing) aircraft. This agent should have the capability to hover, fly andfollow targets. It should receive and transmit data wirelessly into a base station. Itshould move through a predefined plan using a GPS receiver. It should also balanceitself in the air through a gyro meter and an accelerometer. In addition it would utilizefour ultrasonic sensors for obstacle avoidance and an extra one for landingassistance. The agent would also utilize a wireless camera to transmit a birds eyeview to the base station.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
6/35
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 UAV Process
3.2.1.2 Remote Station Process
3.2.1.3 Command Handler API
3.2.1.4 162 LCD drivers API
3.2.2 Flash Magic
4. Features
5. Applications
6. Conclusion
7. Future Advancement
8. Bibliography
-
7/30/2019 Unmanned Aerial vehicle _summer project report
7/35
Introduction
The project aims at developing an unmanned aerial vehicle (UAV), also known as aremotely piloted aircraft (RPA) or unmanned aircraft system (UAS), is a machinewhich 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 ofintegration density of electronics and mechatronics components yields a significantcost reduction of high tech products. Driven by this development it becomes feasibleto embed information processing and communicating devices in all sorts ofappliances, toys, production facilities, communication systems, traffic and transportsystems etc.
With this integration and the aid of global positioning systems, there has been asurge of development in Unmanned Vehicles (UV). The main benefits of UVs arethat 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 humanendangerment. Unmanned vehicles are developed for use in air, over land andunder water by both private and government agencies. Several unmanned systemsexist such as Autonomous Underwater Vehicles (AUV), Unmanned Ground Vehicle(UGV), and Unmanned Combat Vehicles (UCV). NASA deploys USVs (UnmannedSpace Vehicles) on rock gathering missions from the Moon and Mars. The militaryadvanced 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 orhazardous terrain such as earthquakes, floods or volcanoes, where no human liveshave to be risked. Institutions which have onsite geologists use UAV for uncoveringterrain and rock identification, without having to deploy a whole crew workingoutside. Departments of transportation can use this device to cover footage ofinaccessible situations such as dead-lock traffic jams or multiple car-crashes.Government law enforcement and intelligence agencies can specifically find thisdevice 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 areliable autonomous hovering or flying vehicle. The project designed andimplemented a two-rotor hovering aerial vehicle. The advantages of a hoveringvehicle over a fixed-wing flying vehicle include less complexity in design, minimalspace for take-off and landing (vertical take-off and landing (VTOL)), indoor flight,manoeuvrability in obstacle heavy environments and of course the eye-catchingability of being able to maintain a static position in mid-air.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
8/35
System Block Diagram
-
7/30/2019 Unmanned Aerial vehicle _summer project report
9/35
Conceptual Design
Our first step was to identify the design goals. These were the fundamentalrequirements which were decided:-
1. Ability to hover, in the sense of generating enough thrust and have enoughcontrol 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 thevehicle.
5. High residual thrust to hover thrust ratio, an acrobatic vehicle was desirablefor ability to demonstrate controllability and to perform difficult flightmanoeuvres.
6. Minimal size & complexity.
We are using two ARM7 Development Board for the Unmanned Aerial Vehicle. Oneis used in the main UAV System and other one on remote control station.Transmitter/Receiver connected to the microcontroller boards for the wireless datatransmission/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 themaximum flight time of the UAV.Buzzer is used to show if any danger to the UAV.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
10/35
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 FlashMemory 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
-
7/30/2019 Unmanned Aerial vehicle _summer project report
11/35
-
7/30/2019 Unmanned Aerial vehicle _summer project report
12/35
2. 162 Serial LCD with backlight
It can be connected with PCs, microcontrollers or any other device which can sendthe serial commands. It uses only 1 microcontroller pin, and so it saves lots ofhardware 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.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
13/35
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"
-
7/30/2019 Unmanned Aerial vehicle _summer project report
14/35
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, andGND.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
15/35
5. Ultrasonic Distance Measurement Sensor
This sensor is a high performance ultrasonic range finder. It is compact andmeasures an amazingly wide range from 2cm to 4m. This ranger is a perfect forany robotic application, or any other projects requiring accurate ranging
information. This sensor can be connected directly to the digital I/O lines of yourmicrocontroller and distance can be measured in time required for travelling ofsound 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
-
7/30/2019 Unmanned Aerial vehicle _summer project report
16/35
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 fromthe transmitter.
As soon as the signals are transmitted the Echo pin goes to high level and remainsin high level until the same sound waves are received by the receiver. If the receivedsound waves are same as what the same sensor transmitted then the Echo pin goesto low level.
If no object is detected within 5M after 30ms the Echo signal will automatically go tolow level.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
17/35
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 theSaw Resonator, with an effective low cost, small size, and simple-to-use fordesigning.
Features of Transmitter
Frequency Range: 315 / 433.92 MHZ. Supply Voltage: 3~12V. Output Power : 4~16dBm Circuit Shape: Saw
-
7/30/2019 Unmanned Aerial vehicle _summer project report
18/35
b. Receiver 433 MHz ASK
The ST-RX02-ASK is an ASK Hybrid receiver module. An effective low costsolution for using at 433.92 MHz
Features of Receiver
Low power consumption. Operation temperature range : 20 to70
Operation voltage: 5 Volts. Frequency at:434 MHz Sensitivity: 105dBm IF Frequency:1MHz
-
7/30/2019 Unmanned Aerial vehicle _summer project report
19/35
7. Dual Motor Driver module with PWM control
This is an easy-to-use circuit with TTL compatible inputs. It can work up to55V 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
-
7/30/2019 Unmanned Aerial vehicle _summer project report
20/35
Software Tools
1. Keil Software
To write, compile and execute the LPC2148 NXP programs in embedded C
2. Flash MagicTo transfer programs into Microcontrollers at appropriate baud rate
Programming Microcontroller through Flash Magic
-
7/30/2019 Unmanned Aerial vehicle _summer project report
21/35
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 = newCommandHandler();
commandHandler->initialize();
while(true)
{
if(commandHandler->hasNextCommand())
{
commandHandler->processNextCommand();
-
7/30/2019 Unmanned Aerial vehicle _summer project report
22/35
} }
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.
}
-
7/30/2019 Unmanned Aerial vehicle _summer project report
23/35
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 9600int main(void){uart_init( UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU) ); //Initialize Uartsei(); // Enable Interrupts
uart_puts("KINESIS);uart_puts("Unmanned Aerial Vehicle);}
-
7/30/2019 Unmanned Aerial vehicle _summer project report
24/35
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; /* handles nested interrupt */
if ( regVal& MR0_INT )
{match_counter++;}PWMIR |= regVal; /* clear interrupt flag on match 0 */IDISABLE;
VICVectAddr = 0; /* Acknowledge Interrupt */}
/******************************************************************************** Function name: PWM_Init**
** Descriptions: PWM initialization, setup all GPIOs to PWM0~6,** reset counter, all latches are enabled, interrupt
-
7/30/2019 Unmanned Aerial vehicle _summer project report
25/35
** on PWMMR0, install PWM interrupt to the VICtable.**** 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 PWMMR0,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;
/* 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;
-
7/30/2019 Unmanned Aerial vehicle _summer project report
26/35
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 toload and execute the new value of match registers, all the PWMLERsneed toreloaded. 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;}
-
7/30/2019 Unmanned Aerial vehicle _summer project report
27/35
To generate PWM signal for the rotation of Brushless Motor
/****************************************************************************** pwmtest.c: main C entry file for Philips LPC214x FamilyMicroprocessors
** 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
-
7/30/2019 Unmanned Aerial vehicle _summer project report
28/35
}PWM_Stop() ;
return 0;}
162 Serial LCD
#include"LPC21xx.h"void Initialize(void);/* Macro Definitions */#define TEMT (1
-
7/30/2019 Unmanned Aerial vehicle _summer project report
29/35
U0DLM=0x0;/* Clear DLAB */U0LCR=0x3;
}/*********************************************************/
Obstacle Detection using Ultrasonic Sensor
char timer0counter;void main(){char buffer[10];float range;sei(); //Enable global interruptsbi(DDRA,6); //Set pin as outputcbi(DDRA,7); //Set pin as inputwhile(1){sbi(PORTA,6); //Send TriggerDELAYUS(10);
cbi(PORTA,6); //Send trigger
timer0counter=0;TCNT0=0; //Clear timerwhile(bit_is_clear(PINA,7)); //Wait for rising edgesbi(TCCR0,CS02); //Select prescalar 256sbi(TIMSK,TOIE0); //Enable timer0 overflow interruptLCD_CLRSCR();while(bit_is_set(PINA,7) && timer0counter
-
7/30/2019 Unmanned Aerial vehicle _summer project report
30/35
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);
}}
-
7/30/2019 Unmanned Aerial vehicle _summer project report
31/35
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.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
32/35
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 forsearch and rescue recreational purpose.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
33/35
Conclusion
This project is an embedded system; a bottom-down programming method wasused, followed by integrating elements into a greater whole. All single elements weretested and worked successfully. With more time PID control techniques could havebeen implemented.
-
7/30/2019 Unmanned Aerial vehicle _summer project report
34/35
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
http://en.wikipedia.org/wiki/Lithium_polymer_batteryhttp://en.wikipedia.org/wiki/Lithium_polymer_battery -
7/30/2019 Unmanned Aerial vehicle _summer project report
35/35
Bibliography
ARM System Developers Guide - Designing and Optimizing SystemSoftware 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