Building a Quadcopter Using INVA Software and STM32F411CEU6
by 상홍임 in Workshop > 3D Printing
145 Views, 1 Favorites, 0 Comments
Building a Quadcopter Using INVA Software and STM32F411CEU6
hello. A post was posted with the title [Making a perpetual synchronous generator with a 3D printer].
I am a student of electrical engineering. Today, I built an F450 multicopter drone using INAV software and STM32F411CEU6.
Write a post about your experience.
Before introducing the manufacturing process, let's talk about the definition of a multicopter and the software used in drones.
Let's find out.
[Quadcopter]: It has four rotating wings (rotors), and these four wings are used to generate lift.
It is a flying drone.
[Features]: Each rotor faces vertically downward, two are clockwise, the other two are
Rotates counterclockwise. By adjusting the rotation speed of these rotors, the quadcopter
You can control your movements.
///////////////////////////////////////////////////// ///////////////////////////////////////////////////// ///////
Looking at the three software typically used for drone control,
1.[ARDUPILOT]:
Abbreviation for Arduino + Autopilot,
It is open source software for remote control, automation, and autonomous control of unmanned vehicles and drones.
<Advantages>: 1. The graphic design is sophisticated.
2. Available for PC, MacBook, iPhone/iPad, and Android and has a unified interface.
3. There is no mandatory disclosure of source code for commercial use.
<Disadvantages>:1Telemetry radio setup is inconvenient.
2. There is no GUI for drone motor testing.
3. Difficult for drone beginners to access.
2.[BETAFLIGHT]:
It is an open source program that anyone can use for free.
BASEFLIGHT is a software derived from CLEANFLIGHT software.
It is a derived open source software and is optimized for controlling racing drones.
<Advantages>: 1. There are many functions for controlling racing drones.
2. Acrobatics is possible with a drone. In other words, dynamic movements can be implemented.
3.Software readability is good (i.e., easy for beginners to access).
<Disadvantages>:1. Detailed and precise autonomous control such as MISSIONPLANER is weak.
2. PID control is sensitive, so the drone motor easily generates heat.
3..It is not suitable for controlling drones such as RC airplanes.
3.[INAV]: It is an open source software derived from CLEANFLIGHT software and is based on FV and can be used with DJI NAZA series or ARDUPILOT MEAG. FC is implemented that enables the same GPS-based navigation. We pursue GPS automatic flight function more than flight performance.
<Advantages>: 1. Low barrier to entry for beginners.
2. Very optimized for drone self-control using the GPS function.
3. Suitable for RC airplane control.
4. The quality of drone flight photography is good.
<Disadvantages>: 1. Weak in aerobatic flight control.
2. There are few functions for controlling drones such as VTOL.
*This is a reference video for each software.
1.<ARDUPILOT>:
https://youtu.be/LKpMfl6EHOQ?si=MciBClFHo4fTwHuu
2.<INAV>:
https://youtu.be/bEKm-PGRnks?si=klX1OA0FxGHKeu1r
3.<BETAFLIGHT>:
https://youtu.be/W8PMKUQX4q0?si=h9CDOYpX990EFmpw
This commonly used I learned about drone software.
Here I use INVA software. Controlled the drone.
Now I will explain the making process.
Supplies
◇<Parts used>:
1.STM32F411CEU6
2.Jumper cable male/female
3.PCB soldering board
4.hmc5883L (compass magnetometer sensor)
5.mpu6050 (acceleration gyro sensor)
6.BMP280 (barometric altitude sensor)
7. Pin header (female/male)
8.FS-1A6B (Receiver)
9.FLYSKY remote controller
10.Cable tie
11.ST-LINK V2 Downloader (for STM32)
12.GPS_NEO6M
12.at2212 brushless motor
13.ESC 30A
14.1045 Propeller
15.F450 drone frame
16.Lipo battery 11.1v 2200mah or 1500mah
17.Lipo battery charger
Creating a Control Board
with the above parts Connect the wires to each component according to the circuit diagram in the photo.
Assembling the Drone Frame and Installing Accessories Such As Control Board, Bldc, Esc, Etc.
Assemble the F450 drone frame and install the brushless motor, ESC, and control board on it. Additionally, it is mounted on the frame.
🌑Assembly video 1:
https://youtu.be/FhHFMDkwVjs?si=cBdLOesWLMIVmc2S
🌑Assembly video 2:
https://youtu.be/hK4Y-wKG-ug?si=v2gmql3olGbp0uca
🌑Assembly video 3:
https://youtu.be/YxgC3c9J6CA?si=oM
🌑Assembly video 4:
https://youtu.be/soJeCVLKj4s?si=qTmOhY45IxHrUi_x
Drone Body Completed
In this way, the drone body was completed.
Now let's move on to controlling this drone.
Setting Up the FLYSKY Controller
FLYSKY remote controller suitable for drone control,
Set the pull mode.
The output mode setting is performed when giving an operation signal to the remote controller.
This is to set what communication method to use with the receiver.
Here, between SBUS and IBUS, I chose the <IBUS> method.
■Here, what IBUS and SBUS are,
1.<IBUS> is a two-way communication that transmits and receives data. (That is, one port each for data output and one port for the sensor)
2.<SBUS> uses only one signal cable
It's about communicating. This remote controller supports up to 18 channels.
IBUS and SBUS are both types of SERIAL communication.
no see.
Anyone who has taken a communication engineering course has probably already heard of this....
🌑{Reference video}:
https://youtu.be/y7T4hBqOwxM?si=gGo0LOJLP8lnNCrk
Remote Controller and Receiver Binding
Turn on the FLYSKY controller while pressing the round button on the left.
Then, RX binding will appear on the screen. Please power on the receiver here.
🌑{Reference video}:
https://youtu.be/XH2hGzRc-Q8?si=oqXIX1XWa3mol_qR
Upload Firmware
Connect the STM32F411CEU6 board to the ST_LINK V2 downloader.
Connect the ST-LINK downloader to your PC. Run the STM32 ST-LINK UTILITY program on your PC.
Run the program, set the correct port for the connected device, and establish a communication connection.
And <INAV drone source code HEX file>
Enter the STM32F411CEU6 board memory
Inject.
<Reference video>:
https://youtu.be/W4jgK8oeTN0?si=_YhpoAIbdrPcWuVf
Communicate With INVA Software
Refer to the photo Install INAV software 6.0.0 and open source code(Hex file).
1.[source code]:https://github.com/ahsantahir01/STM32-NAV_Firmware
2.[install INAV]: https://github.com/iNavFlight/inav-co...
Connect the STM32F411CEU board to the PC via USB (Type C).
When connecting the control board to the PC, check in Windows Device Manager to see if the port number appears!
Run INAV software.
Then, open the device manager, check the current port number, and set the appropriate port number in the INAV port box to establish a communication connection.
*Click here for microprocessor or IoT subjects.
As those of you who have taken the course will know,
What is [STM32F411CEU6]?
It is a 32-bit microcontroller unit (MCU) made by ST Microelectronics.
This is the control board.
It is based on the ARM processor core.
Internally, it consists of static RAM, flash memory, debugging interface, and various peripherals.
It is configured.
Setting Up a Drone in INVA Software1
When communication is connected to the Inav software
It appears like a picture like this.
The first picture is setting the sensor type used in the drone.
The second picture shows the type of drone.
Setting it up and the third picture is
stm32f411ceu6 board i.e. drone control
How to use the board input/output terminals
This is a photo of the setting.
Like the attached photo
Please set it. And be sure to press the save and reboot button.
* to each input/output port
Only one function can be set.
Setting Up a Drone in INVA Software2
1. The first picture shows the process of setting the communication protocol for the signal the receiver receives from the remote controller.
The square shows real-time signal values.
2. The second picture is the [Gyro and acceleration calibration] process. In other words, this is the process of inputting the current rotation speed of the drone, that is, the angular velocity and acceleration values, as measured by mpu6050 among the drone parts.
3. The third photo shows the gyro acceleration sensor.
This is a GUI that shows the drone’s location in 3D in real time using measured values.
4. The fourth photo shows the conditions for the INAV software to fly the drone.
*If any of the conditions are not met, the drone will not operate even if you turn on ARM mode (drone startup mode).
Setting Up a Drone in INVA Software3
What flight functions will this drone use? And what happens when the drone makes an emergency landing?
Are you going to land? This is the process of setting up.
1) Here, I adopted the method of gradually reducing the drone propeller speed for emergency landing and landing gradually. and
2)Drone flight functions include ARM mode, ANGLE mode,
NAV ALTHOLD mode is selected.
◇Here, [ARM mode] is
This is the mode to start the drone. This is a mode that must be selected.
*The characteristics of ARM mode are
If you turn on the ARM mode while raising the drone controller's up/down lever, it will not be activated, and the lever will go all the way down.
When you turn on Arm mode, the drone starts. (In other words, it acts similar to a safety device.)
◇[ANGLE mode] limits the roll and pitch of the drone so that it does not tilt beyond a certain angle.
This is the mode.
*Here, roll refers to the left/right movement of the drone.
Pitch refers to the forward/backward movement of the drone.
◇[NAV ALTHOLD mode] is a mode in which the drone flies while fixing its altitude.
🌑<Calibration process reference video>:
https://youtu.be/NeK0FF2QMEU?si=a2GUWiWKtsrBYvrp
🌑<Shows ARM mode (starting) characteristics
Reference video>:
https://youtu.be/Mm9XKH536NY?si=sDWDdm7ANu91IMp6
Measuring Drone Weight
Now the last step you need to do is
The lift force (kg) that a drone can currently generate is
How many and how many items can you lift?
Raise it? no see.
The picture shows the motor used in the drone.
This is an experiment to measure lift (the force of flying).
※Here, AT2212 1000KV for drone motor
You can see the text written on it.
AT2212 is the motor product name and [1000KV] is
The voltage required to rotate the motor is not 1000KV,
It means <1000 rotations per minute at 1 volt>.
■The lift that one drone motor can generate at maximum voltage is 707g => 0.707kg.
Since there are 4 motors used here,
Total generated lift is 0.707kg x 4 = 2.828kg
no see.
■Drone weight is 884g => 0.884kg
■[Weight limit that a drone can lift]:
Total generated lift - drone weight = 2.828-0.884
=1.944kg
This completes the drone production.
Enjoy^^~
※[Drone indoor flight test]: