Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/xtalism/aero-pid-controller
- Owner: Xtalism
- License: mit
- Created: 2024-05-29T03:57:54.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-05-29T09:17:07.000Z (8 months ago)
- Last Synced: 2024-11-18T04:45:13.113Z (2 months ago)
- Topics: arduino, control-systems, electronics, pid-controller
- Language: C++
- Homepage:
- Size: 6.65 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
#includeTo 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.