This repo contains a noobie quadcopter-build and implementation based on:
- Arduino Uno
- MPU6050 Gyroscope/Accelerometer module
- nRF24L01 Wireless communication module
- Power distribution board (XT60 male)
- Electronic speed controllers : Turnigy MultiStar 30A BLHeli-S Rev16 V3 ESC 2~4S, Racerstar
- Motors : 2205 2300kV (brushless) 2xCW/2xCCW Turnigy; [RaceStar]
- Props 5045
- 3S Lipo Battery (XT60 female)
- Maybe just get a decent flight controller and start flying and collecting data.
- PID only angles/ angles and angular velocities(might be easier for tuning). source
- Check refresh rate of of sensor.
- Checkout another interseting similar project.
- Tune PID parameters.LINK
- Refactor code in setup() function of flight controller: Rewrite mpu_setup
- Understand Transmitter AutoAcknoledge, DataRate... other settings
- Make prototypeboard to place gyro in the center of geometry/mass.
- Make condition to start mount motors dependent on two signals(joysticks) to reduce the probability of an error.
- Servo.h only works with 50Hz, Need higher refresh rate for a stable drone: https://forum.arduino.cc/t/adjusting-pwm-frequency/45204
- Checkout:https://forum.arduino.cc/t/how-can-i-change-the-frequency-of-servo-library/148099/3,\
- But writing directly to the outputpins and simulating the pwm pulse doesnt work yet (applaySpeed())
- Copyright-rules for code from other repositories?!
- Joystick dead-zone might be a problem.
- Install battery mount.
- Measure batteries voltage drop.
To have properly working ESC's/motors the ESC's have to be calibrated.
This is done by applying the minimum(1000us) and maximum(2000us) PWM-signal(pulse-width-modulation) to the ESC's while they are connected to a battery.
ESC_calibration file can be used for that.
more about pulse-width-modulation: https://www.allaboutcircuits.com/textbook/semiconductors/chpt-11/pulse-width-modulation/
more about electronic speed controller calibration: https://ardupilot.org/copter/docs/esc-calibration.html\
To arm the ESC's, connect the battery with minimal throttle speed (1000us).
- PWM frequency for ESC's via analogWrite() rather than Servo.h 490Hz/50Hz -> might not be responsive enough
Usefull websites:
-
https://www.teachmemicro.com/orientation-arduino-mpu6050/ <- explanation.
-
https://lastminuteengineers.com/mpu6050-accel-gyro-arduino-tutorial/ <- basic accel./gyro readings (angles still need to be calculated)
-
https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050 <- Complete library for MPU readings! (but how to include magnetometer?)
-
digital low pass filter for MPU6050 20Hz?
-
I2C - Communication
-
DMP (digital motion processor) - programming to include magnetometer (future work)
-
Interrupt Pin signals board when new data is available.
Similar projects: https://github.com/rohanverma94/The-Open-Copter/blob/master/quadcopter-documentation/quadcopter-arduino.pdf
https://github.com/lobodol/drone-flight-controller
Features that effect minimal loop time/refresh rate of flight controller: more info
- ESC's refresh rate. When max pulse is 2ms loop cant refresh motor speed faster.
- Gyro refresh rate & low pass filter(introduces delay)
- SETUP
- Configure DMP(Digital Motion Processor) of MPU6050
- Calibrate Gyro (on drone startup, else wrong offsets)
- LOOP(AIR-Routine)
- Arm(AUX1) & Disarm(AUX2) drone.
- read reviever data [throttle, yaw, pitch, roll] from nRF24L01-module
- calc current angles [pitch, roll, yaw] from MPU6050
- calc PID-Terms for each angle
- Adjust ESC pulse (currently via Servo.h) based in PID-terms
- (integrate battery voltage) TODO
https://github.com/akarsh98/DIY-Radio-Controller-for-Drone-Arduino-Based-Quadcopter
Lipo Guide: https://rogershobbycenter.com/lipoguide\ Why storage voltage is only important for long lasting (years) batteries.
Question | Answer |
---|---|
Why? | Figure out how interesting robotics might be and learn to build drone. |
When? | starting november 2021 |
Importance | Below job search and preperation for master |
How much time? | 3d / week |
Finished | Self stabilizing drone works. |
Thanks for visiting The Markdown Guide!
This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for basic syntax and extended syntax.
These are the elements outlined in John Gruber’s original design document. All Markdown applications support these elements.
bold text
italicized text
blockquote
- First item
- Second item
- Third item
- First item
- Second item
- Third item
code
These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements.
Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
Here's a sentence with a footnote. 1
term : definition
The world is flat.
- Write the press release
- Update the website
- Contact the media
That is so funny! 😂
(See also Copying and Pasting Emoji)
I need to highlight these ==very important words==.
H2O
X^2^
Footnotes
-
This is the footnote. ↩