Giter Site home page Giter Site logo

saonam / agroquad_prototype-cortex-m4-stm32f407 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alesanu/agroquad_prototype-cortex-m4-stm32f407

0.0 0.0 0.0 862 KB

Source Code for an ARM Cotrex M4 based Quadcopter. Development Platform - Atollic TrueStudio. Hardware Implementation - A Custom Flight Control Board using STM32F407VET6 Micro-controller.

C 94.95% HTML 3.09% C++ 1.08% Assembly 0.88%

agroquad_prototype-cortex-m4-stm32f407's Introduction

AgroQuad_Prototype-Cortex-M4-STM32F407

For a detailed description, refer: https://projectsjalark.wordpress.com/2016/10/24/agroquad/

Hardware

The schematics and Layout of the Flight Control Board can be found here: https://drive.google.com/open?id=0B2tfhqDjs2sUbGIwY3VqNENHMXc

Modules used:

  • MPU6050 - Accelerometer and Gyroscope
  • HMC5883L - Magnetometer
  • HC-SR04 - Ultrasonic Sensor (For Collision Avoidance)
  • uBlox 6M - GPS
  • XBee S2 - Wireless Communication (ZigBee)

System Description

The Modules are interfaced with the flight control board and a wireless communication is set up using two XBees. The Quadcopter is controlled using a Ground Control Station based on Windows or Android. The source code includes the custom protocol used for communication with the Ground Control Station. However, for tests, a simple terminal application had been used.

The Status Paramters (Roll, Pitch and Yaw) of the System are obtained using the Acceleromter, Gyroscope and Magnetometer (MPU6050 and HMC5883L). A Kalman Filter for State Estimation had been designed for the Quadcopter used specifically for this project. For general purposes, a Complementary Filter is used. The source code also includes a Complex Complementary Filter. This had been tested to account for vibrations generated in the system. It's use, however, is not encouraged unless the user has well understood the Design of the Complex Complementary Filter.

The Status Parameters are used as an Input to the PID Control Loop. A fine tuning of the PID Gains is required in order to achieve a stable flight. The Control Parameters (Output of the PID Loop) are the changes in Motor Speeds given in Microseconds. 4 PWM Signals are used as inputs to ESCs which in turn control the Motor Speeds. A complex PID Loop was also designed. However, a very precise tuning is necessary for its use.

The Process of Measuring the Status Paramters along with obtaining the Output Signals is done in a periodic loop of 4ms.

Project Files

The project was developed using Atollic TrueStudio for STM32F407. The Source Code includes routines for Communication with the Sensor Modules and XBee. The Complementary Filter and PID Control Loop can be used with some tuning. It is important to note that the Code Calibrates ESCs everytime upon reset. REMOVE THE LINE FROM THE MAIN FILE: "Init_Motors();" in case the ESCs are calibrated. For testing purposes a terminal program can be used. The USART Interrupt is used to control the Desired State of the Quadcoter.

To directly import the Code for Atollic TrueStudio, follow: https://drive.google.com/open?id=0B2tfhqDjs2sURm9MTkpRb2diN3c

Contributions and Support

Project Developed by Siddhant Gangapurwala (Author).

I would like to thank Shreyas Shah for his help in the design of the Flight Control Board. Also, Prof. Pavan Borra for his support throughout this project.

agroquad_prototype-cortex-m4-stm32f407's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.