Introduction: Four-axis flight control based on ESP32
1 Product introduction
Four-axis flight control based on ESP32
2 Application scenarios
Quadcopter
3 Product overview A
simple four-axis flight control based on ESP32. Parameter adjustment is convenient and supports wifi PID adjustment.
Compiled with Arduino IDE, the development environment is simple to configure.
Only supports quadcopter and self-stabilizing mode flight, which facilitates code reading and secondary development.
4 product parameters
Main control: ESP32-WROOM-UE or ESP32-WROOM-32D
Gyroscope + accelerometer: MPU6050
ESC protocol: DSHOT or PWM1ms-2ms or PWM control power tube (resistor required)
Receiver: Onboard NRF24L01 or SBUS
fixed hole spacing: 30.5mm * 30.5mm
Size: 39.75mm * 39.12mm Double-layer board design double-sided layout
Working voltage: 3.3V
Working current: 20mA
Input voltage: 5V or 3.3V
Hardware interface: JST SH1.0 smd 4P + JST SH1.0 smd 6P
(Test model parameters can be found in 7 test videos)
Frame: Any size
Motor: Brushless or brushed motor that matches your
model ESC: Brushless or brushed ESC that matches your motor . Note that the ESC protocol only supports DSHOT and PWM.
Propeller: Any propeller that matches your motor
Battery: Any battery that matches your rack
Onboard NRF24L01 Control distance: Determined by the power of the remote terminal
5 Instructions for use
The source code is compiled with Arduino IDE.
1. Set the ESC protocol, receiver, etc. in the source code/esp_quad/include/config.h file. See the comments in the file for specific information.
2. Burn. (Detailed tutorials can be found in the attached tutorial)
3. Open the serial monitor of the Aduino IDE and select no terminator and a baud rate of 250000.
4. Send a, b, c, d, e, f, g to see the angle, angular velocity, acceleration, gyroscope sampling, voltage, accelerometer angle, motor output PWM value, and receiver value respectively.
5. After confirming that the values are correct, you can install it on the aircraft.
6 Note:
This module requires downloading the code driver (hard plus soft). For details, please view the code in the attachment.
This module needs to be used with software. The source code is provided in the attachment for secondary development.
The source code provided can be opened and compiled through the Arduino IDE and downloaded through the USB to UART module.
The attachments include: source code + tutorial + soldering guide + recommended component links (for reference only) + 3D model - PCB
flight control cost on F450: ~= 33
USB to UART, MPU6050 module, NRF24L01 smd/gt24, which are not included in the BOM and need to be prepared by yourself . For recommended links, please view the attachment Recommended Component Links (for reference only).
The test model material link is in the attached recommended component link (for reference only). Please view the printout on the attached 3D model-F450 PCB.
Unmounted components are not reflected in the BOM (R1, R2). Short one of these depending on your battery, see the soldering guide.
If you choose to use the onboard receiver, only attach one of U4 or U5.
The SBUS receiver (external) is connected to the serial port 2 interface. If you use an SBUS receiver, the voltage divider resistor does not need to be soldered because there is no data return.
A source BOM has been included in the attachment for reference only.
The PCB proofing of this module does not have silk screen position markings. The specific values of components and interface information can be viewed in the attachment welding guide.
The wifi parameter adjustment steps can be found in the comments in the source code/esp_quad/include/config.h.
7 Test video
The test model parameters are as follows
: F450
motor: 2212 1000KV brushless
motor ESC: blheli_s 30A ESC
propeller: 9047
battery: 3s 2200mAh 35C
(remote terminal uses NRF24l01 + PA + LNA)
onboard data return distance : 60m
onboard receiver control distance: 900m
onboard receiver safety control distance: 500m
The video shows the flight test outdoors. Including moving forward, left, and right, turning in circles (yaw), and circling.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet