Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xtalism/aero-pid-controller

PID controller using two brushless motors with they respective ESC, and an Arduino Mega 2560.
https://github.com/xtalism/aero-pid-controller

arduino control-systems electronics pid-controller

Last synced: 11 days ago
JSON representation

PID controller using two brushless motors with they respective ESC, and an Arduino Mega 2560.

Awesome Lists containing this project

README

        

# Aero PID Controller

In order for the project to work, make sure to calibrate both ESC before running the main code. You gotta make sure you have installed the [Servo](https://www.arduino.cc/reference/en/libraries/servo/) and [Wire](https://www.arduino.cc/reference/en/language/functions/communication/wire/) Arduino libraries.

#include
#include

To read MPU6050's raw accelerometer and gyroscope data, we must register our MPU's hex addresses. Just as follows:

// Accelerometer raw data
Acc_rawX = Wire.read() << 8 | Wire.read();
Acc_rawY = Wire.read() << 8 | Wire.read();
Acc_rawZ = Wire.read() << 8 | Wire.read();

// Gyro raw data
Gyr_rawX = Wire.read() << 8 | Wire.read();
Gyr_rawY = Wire.read() << 8 | Wire.read();

If you'd like to make any changes, you can check the MPU6050's [datasheet](https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf) anytime you want.

![structure](img/render.png)

Ideal aero PID controller structure.

![schematic](img/schematic.png)

We can use any Arduino board, as long as SDA and SCL pins are available.