Tuesday, 8 October 2013

QUADROTOR : DESIGN

Contents:


  1. Introduction
  2. Components Required
  3. Hardware Design
  4. Software Design
  5. Acknowlegment

Intoduction

A Quadrotor is a unmanned micro aireal vehicle (UMAV). An unmanned vehicle is vehicle in which vehicle is controlled by pilot who is Off-Board. A Quadrotor consist of four brushless DC motor.A brushless DC motor is one of the type of servo motor which is made up of special type of permanent magnet, which provides very high torque. Now I will be Starting with the actual designing of the Quadrotor. First we need to know what we will be required to construct a quadrotor.

Components Required

  1. Four Brushless DC Motor (the motor I used provides me with 40000 rpm)
  2. Four Electronic Speed Controller (ESC)
  3. microcontroller (Arduino development Board Atmega 328 with 6 PWM channels)
  4. Two Zigbee module (I Used XBEE PRO with range of 1km-2km)
  5. One Xbee Explorer USB
  6. MPU 6050 (This Single IC contains Acclerometer, gyroscope and digital compass)
  7. An Acrylic Sheet (For Chasis design)
  8. Aluminium for Motor mounts
  9. Two Sponge Balls

Hardware Design

Being Student of electronics and telecommunication engineer, I was not able to understand the design formulations for the quadrotor which mainly consist of Aerodynamics and Aeronautics. Thanks to my Teacher Gudie Mr. Suhas Chate sir who told me to follow the basic chasis design but to keep in mind to maintain the center of gravity. 

The above image shows the chasis design of my Quadrotor. I bought the 20cmX20cmX0.2cm Acrylic sheet cut it according to the above design. I kept the inner square with dimension 10cmX10cm. 


Now this is the image of my modified version of my Quadrotor chasis in which I added Motor mounts at the end of rods. These Motor mounts are made up of aluminium. I chosed Aluminium because it is a light weight metal providing a better tensile strength. I fixed my motor through these motor mounts using M-SEAL. Now in order to provide better suspension I used two Sponge Balls (Those yellow coloured Balls Smiley faces on them). I cut them into halves and used them as stands for my Quadrotor.


Above figure shows the final chasis for our Quadrotor.

NOTE: This should be kept in mind while proceeding with each step we need to check centre of gravity at each step or you have follow reverse engineering if any defect occurs in the design.

Software Design

Before designing our software part we need to know a something about the components we are going to program.

Arduino Development Board 

I have been using Arduino duemilanove with Atmega 328. This Developement Board provides 6 PWM channels out of which we will be required 4 PWM channel for controlling the motors. PWM (pulse width modulation) is required to control the motion of our Quadrotor. The following Image shows how the motion of Quadrotor is controlled.

In this image the wide arrow shows the highest motor rotation while the narrow arrows shows the low motor rotation speed.

BRUSHLESS DC MOTOR

A brushless DC motor as I have mentioned earlier is one of type of seervo motor. This motor consist of three terminals in which one of them control terminal for controlling the speed of motor. the other two terminals are positive and negative for rotatong the motor either clockwise or anti-clockwise direction.The Following Code is to Control motor:-
/*
*  This code is in the public domain.
*  (Do whatever you want with it.)
*/

// Need the Servo library
#include <Servo.h>

// This is our motor.
Servo Motor1;
Servo Motor2;
Servo Motor3;
Servo Motor4;

// This is the final output
// written to the motor.
String incomingString;


// Set everything up
void setup()
{
  // Put the motor to Arduino pin #9
  Motor1.attach(9);
Motor2.attach(3);
Motor3.attach(5);
Motor4.attach(11);

  // Required for I/O from Serial monitor
  Serial.begin(9600);
  // Print a startup message
  Serial.println("initializing");
}


void loop()
{
  // If there is incoming value
  if(Serial.available() > 0)
  {
    // read the value
    char ch = Serial.read();
  
    /*
    *  If ch isn't a newline
    *  (linefeed) character,
    *  we will add the character
    *  to the incomingString
    */
    if (ch != 10){
      // Print out the value received
      // so that we can see what is
      // happening
      Serial.print("I have received: ");
      Serial.print(ch, DEC);
      Serial.print('\n');
    
      // Add the character to
      // the incomingString
      incomingString += ch;
    }
    // received a newline (linefeed) character
    // this means we are done making a string
    else
    {
      // print the incoming string
      Serial.println("I am printing the entire string");
      Serial.println(incomingString);
    
      // Convert the string to an integer
      int val = incomingString.toInt();
    
      // print the integer
      Serial.println("Printing the value: ");
      Serial.println(val);
    
      /*
      *  We only want to write an integer between
      *  0 and 180 to the motor. 
      */
      if (val > -1 && val < 181)
     {
       // Print confirmation that the
       // value is between 0 and 180
       Serial.println("Value is between 0 and 180");
       // Write to Servo
       Motor1.write(val);
Motor2.write(val);
Motor3.write(val);
Motor4.write(val);
     }
     // The value is not between 0 and 180.
     // We do not want write this value to
     // the motor.
     else
     {
       Serial.println("Value is NOT between 0 and 180");
      
     }
    
      // Reset the value of the incomingString
      incomingString = "";
    }
  }
}

MPU 6050

An MPU 6050 is an IC which consist of  Acclerometer, gyroscope and digital compass. These sensors are used to provide 3 axis in space in order to obtain orientation and elevation of quadrotor. 
                                                      To interface this IC with Arduino we firstly need to know I2C protocol. I2C protocol is Inter Integrated Circuit in which two wires used to create a master-slave relation between Arduino and MPU6050, In which Arduino act as a Master whereas MPU 6050 act as a slave. The master sends the clock signal to the slave while salve sends the analog signals to the master. Two create the two wire communication between MPU6050 and Arduino the 4th and 5th pins of Arduino are to the SCL and SDA pins of the MPU6050. From which 4th pin provides clock pulses.

XBEE PRO

Xbee is Transreciever which can communicate over a range of 1km-2km.XBee is a specification for a suite of high level communication protocols used to create personal area networks built from small, low-power digital radios. ZigBee is based on an IEEE 802.15 standard. Though low-powered, ZigBee devices often transmit data over longer distances by passing data through intermediate devices to reach more distant ones, creating a mesh network; i.e., a network with no centralized control or high-power transmitter/receiver able to reach all of the networked devices. The decentralized nature of such wireless ad hoc networks make them suitable for applications where a central node can't be relied upon. It can be programmed using XCTU software.
                                                         Xbee consist of a RASC 8bit register which moniters the TXE and RXE flag. when the data is present in the register to be sent then TXE flag is Set while it is reset when no data is present. similarly, when data is recieved RXE flag is set while it is reset by default.