Quadcopter Using Atmega644

Summary of Quadcopter Using Atmega644


This article introduces a DIY quadcopter project aimed at learning about sensors, wireless communication, and motor control. The team utilizes an IMU chip containing an accelerometer and gyroscope to measure flight dynamics (roll, pitch, yaw) and employs a PID controller for stability. Flight is managed via an Xbox joystick, with four motors arranged in a square where opposite pairs rotate in opposing directions to maintain balance.

Parts used in the Quadcopter:

  • Accelerometer
  • Gyroscope
  • IMU chip
  • PID system
  • Xbox joystick
  • Four motors
  • Propellers
  • Atmega644 microcontroller

Introduction

Many embedded systems use sensors that combine an accelerometer and a gyroscope. Quadcopter is one of the examples of that. Already-built cheap toy-like quadcopters are available on e-bay around at $25~$30, but many hobbyists and avid AVR programmers build their own quadcopters. We thought building our own quadcopter would give us a good opportunity to learn about accelerometers, gyroscopes, wireless communications and motor control. Also, we could have a cool high-tech toy at the end of the project!
Quadcopter Using Atmega644 Schemetic

Team members

Joao Diogo Lisboa de Menezes Falcao
Terry Young Hwa Kim
Thu-Thao Nguyen

High Level Design

Quadcopter

A quadcopter is a multicopter lifted and propelled by four rotors. The motors are mounted in the same plane, on the helicopter, forming a square. This allows this quadcopter to lift vertically without rotating on itself. There are several advantages to quadcopters over comparably-scaled helicopters. The fact that four motors are involved reduces the minimum size of the propellers on each motor. This means that in case the quadcopter hits anything the damage is significant less than if a similar sized helicopter crashed. The following figure shows how the motors are mounted. The rotation direction is critical to the correct functioning of a quadcopter.
All motors have to rotate at the same speed for a vertical lift; however, motor 1 and 3 have to rotate opposite to motors 2 and 4. This is necessary to compensate the angular acceleration generated by each motor. This way the total angular acceleration should be zero, maintaining the quadcopter stable.
According to Wikipedia, flight dynamics is the science of air vehicle orientation and control in three dimensions. Roll, pitch and yaw as shown in the picture below are the three critical flight dynamics parameters, which are the angles of rotation in three dimensions about the flying object’s center of mass. In our project, we use our IMU chip to measure these values and also employ the PID (proportionalintegralderivative controller) system from lab 4 to fine-tune them. Roll, pitch, yaw and throttle (up and down) movements are controlled by an Xbox joystick.

Accelerometer and gyroscope

Quadcopter Using Atmega644
An accelerometer is an electromechanical device that measures acceleration forces. There is an excellent tutorial on the web at http://www.instructables.com/id/Accelerometer-Gyro-Tutorial/step3/Combining-the-Accelerometer-and-Gyro/
Let us briefly explain how accelerometers and gyroscopes work (a summary from the website). Let the vector R in the diagram below be the force vector that the accelerometer is measuring. Rx, Ry, and Rz are projections of the R vector on the X, Y, and Z axes.

For more detail: Quadcopter Using Atmega644

Quick Solutions to Questions related to Quadcopter:

  • Why do hobbyists build their own quadcopters instead of buying cheap ones?
    Building their own offers a good opportunity to learn about accelerometers, gyroscopes, wireless communications, and motor control.
  • How are the motors mounted on the quadcopter?
    The motors are mounted in the same plane on the helicopter, forming a square.
  • What is the required rotation direction for the motors?
    Motors 1 and 3 must rotate opposite to motors 2 and 4 to compensate for angular acceleration and maintain stability.
  • Which three critical flight dynamics parameters does the project measure?
    The project measures roll, pitch, and yaw using the IMU chip.
  • How are roll, pitch, yaw, and throttle movements controlled?
    These movements are controlled by an Xbox joystick.
  • What system is used to fine-tune the flight dynamics values?
    A PID (proportionalintegralderivative) system is employed to fine-tune the values.
  • What advantages do quadcopters have over comparably-scaled helicopters?
    Using four motors reduces the minimum size of propellers, resulting in significantly less damage if the vehicle crashes.
  • What does the vector R represent in the accelerometer diagram?
    The vector R represents the force vector that the accelerometer is measuring.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top