Giter Club home page Giter Club logo

espcopter's Introduction

EspCopter

Project using the ESP8266 and MPU6050 to control a quadcopter. Done with arduino for esp8266 ide. RC uses the ack-less ESPNOW protocol. See "espnow_RC_TX" for transmitter.

Serial Konze 0xF5 protocol: The output to esc's is wired to the serial output pin #2 of the esp. Name is D4, GPIO02, TXD1. Baudrate is 128kb.

Normal PWM output: (#define PWMOUT) The output to esc's is wired to the pins 14, 12, 13, 15. Refresh rate is about 6ms, pulses from 1ms to 2ms. For normal PWM use 80mhz cpu frequency for ESP8266. Use serial mode for acc calib and to store pwm in eeprom, pwm mode it will crash when writing eeprom.

RC pulse input sequence is adaptable, default is orangerx sequence:

  • define ROL 0
  • define PIT 1
  • define THR 2
  • define RUD 3
  • define AU1 4

The copter will only arm after 1 second zero throttle. The copter will shut down motors RC data fails for more than 100ms.

The PID for level (acc) and gyro can be adjusted individually.

Serial console commands:

  • A - acc calib
  • D - write default PID to eeprom
  • R - read actual PID
  • Wpxx, Wixx, Wdxx - write gyro PID
  • WPxx, WIxx, WDxx - write level PID
  • WS - Store PID in EEPROM

Data display over serial console (use arduino plot function)

  • 0 - off
  • 1 - Gyro values
  • 2 - Acc values
  • 3 - Angle values
  • 4 - RC values
  • 5 - Cycle time, RC time

Be sure you do acc_calib and write default params to eeprom before taking off! Use serial version or add patch in rc.ino for pwm version! Acc_calib is done by placing the copter on a level surface and press A on the serial console. Default PID are written by press P on the serial console. Read them with R.

6050 wiring:

  • SCL to D1
  • SDA to D2
  • VCC to 3.3V
  • GND to GND.

wiring.png

DSC02280.jpg

Testflight
Telemetry

espcopter's People

Contributors

pepethefroggie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

espcopter's Issues

i have questions

i tried your source using arduino ide...
but i failed..
can you notice me method..?? please..

i want to make drone using nodemcu....

thank you.

upside down mpu

Hi
I design a pcb for your great project but in this design I should use mpu6050 in the bottom layer!
could you please tell me how should I change the mpu code to use it with upside down mounting?

motor configuration and wiring

from image you use quad x type.
motors 1 and 2 ccw,
motors 3 and 4 cw.
but in PWMOUT which motor connected to which esp8266 pin?
does it motor1(ccw) to pin14 and motor2(ccw) pin12
or motor1(ccw) to pin14 and motor3(cw) pin12 ?

Calculate PID parameters

Can you guide me to calculate the PID parameters? Thanks

else if (ch == 'R')
    {
      Serial.print("Act Rate : ");
      Serial.print(yawRate); Serial.print("  ");
      Serial.print(rollPitchRate); Serial.println();
      Serial.println("Act PID :");
      Serial.print(P_PID); Serial.print("  ");
      Serial.print(I_PID); Serial.print("  ");
      Serial.print(D_PID); Serial.println();
      Serial.print(P_Level_PID); Serial.print("  ");
      Serial.print(I_Level_PID); Serial.print("  ");
      Serial.print(D_Level_PID); Serial.println();
    }

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.