STAN FU

Stan

Drone-Mercury Quadcopter Making from Scratch (Part 1) - Project Introduction#

This project is currently in progress, and the latest progress is available on Github. If it is helpful to you, please give it a star to show your support!
Github link: https://github.com/Xiangyu-Fu/Drone-Mercury

1. Project Introduction#

1.1 Introduction#

This is a project that has been worked on for a long time, and it has been over a year since the beginning. The main goal of this project is to learn about embedded systems and deepen the knowledge of hardware technology. It also aims to gain experience in completing a project from start to finish. The project is mainly based on STM32C8T6 and ESP32. Due to the limitations of price and availability of modules and solutions, many modifications have been made. This project is purely a DIY project, so there may be some omissions, and I welcome everyone's feedback and suggestions.

The overall structure of the project is shown below. The hardware part of the framework has been completed, and the next step is to optimize and integrate the software. Therefore, this part will be updated in the future. In the future, I will add some advanced features, such as a camera, or combine the quadcopter with other robots to build a cluster robot, and implement digital twinning, etc.
Image

1.2 References#

This project has referenced many materials, including:

  • "DIY Quadcopter"
  • "STM32 Library Development Guide"
  • "STM32 HAL Library Development Guide"
  • "ESP-IDF Programming Guide"
  • ...

There are also various blogs and websites that cannot be listed here. The references used in the blog will be listed in the blog.

1.3 Project Overview#

The appearance of the quadcopter is shown in the following figure, which is a very simple quadcopter. The control board is customized, and the remaining parts such as motors and propellers are purchased online as kits. This ensures the overall strength and lightness of the aircraft. It should be noted that in the 3D rendering, the propellers of the aircraft are all clockwise, which is not feasible in reality. But for convenience, I didn't draw the counterclockwise propellers.

As for why I created a 3D model, it is mainly for easy export of the model and simulation in the simulator in the future. Or to complete a series of possible topics such as digital twinning.

Image

The actual assembled model is shown in the following figure, which has many additional wires compared to the 3D model. This version does not have a separate battery compartment for the quadcopter. The battery compartment will be designed after completing all software module tests.

Image

1.4 PCB Design#

The PCB design adopts a 4-layer board, mainly including the main control unit, NRF24L01 communication unit, data acquisition unit, indicator lights, power module, and motor driver module. The main control board uses STM32F103C8T6, which is a very good entry-level MCU. There is a lot of information available online, so it is easier to find solutions to any bugs encountered.

More specific content will be introduced in future blogs, such as circuit schematics and points to note for PCB design. Since this is also the first time I have designed a board, there will inevitably be many omissions, so many bugs are unavoidable.
Image

1.4.1 STM32F103C8T6#

STM32F103C8T6 is a medium-density performance line, equipped with an ARM Cortex-M3 32-bit microcontroller, and a 48-pin LQFP package. It combines a high-performance RISC core with a maximum operating frequency of 72MHz, as well as high-speed embedded memory, enhanced I/O and external connections to two APB buses. STM32F103C8T6 has a 12-bit ADC, timers, PWM timers, standard and advanced communication interfaces. A comprehensive set of power-saving modes allows designers to design low-power applications.

  • Operating voltage range: 2V to 3.6V.
  • 64K bytes of Flash memory.
  • 20K bytes of SRAM.
  • CRC calculation unit, 96-bit unique ID.
  • Two 12-bit, 1µs ADCs (up to 10 channels).
  • 7-channel DMA controller, 3 general-purpose timers, and 1 advanced control timer.
  • 37 fast I/O ports.
  • Serial wire debug (SWD) and JTAG interfaces.
  • Two SPI, two I2C, three USART, one USB, and one CAN interface.
  • Operating temperature range: -40°C to 85°C.

1.4.2 NRF24L01#

RF24L01 Transceiver Module#

We use the NRF24L01 transceiver module as the communication method between the remote control and the quadcopter.

Let's take a closer look at the NRF24L01 transceiver module. It operates in the 2.4 GHz band and can work at baud rates ranging from 250 kbps to 2 Mbps. If used in an open space with a lower baud rate, its range can reach 100 meters.

The module can use 125 different channels, which makes it possible to have a network of 125 independent working modems in one place. Each channel can have up to 6 addresses, or each unit can communicate with up to 6 other units simultaneously.

During transmission, the power consumption of the module is only about 12mA, even lower than a single LED. The module operates at a voltage of 1.9V to 3.6V, but the advantage is that other pins can withstand 5V logic, so we can easily connect it to STM32 without using any logic level converters.

The schematic diagram is shown below, image source is indicated by watermark.
Image

We have reserved a slot for the NRF24L01 module on the control board, so we can directly use the module. The entire control board is shown in the following figure.
Image

1.4.3 MPU6050#

MPU6050 is a very popular motion sensor chip that can obtain the current three acceleration components and three angular velocity components of the device. We have integrated MPU6050 into the control board to obtain the current attitude of the quadcopter. The following is an introduction from the internet.

The MPU6050 is an integrated six-axis motion processing module, which includes a three-axis MEMS gyroscope sensor and a three-axis MEMS accelerometer sensor. Compared with multi-component solutions, integrated modules can eliminate the problem of time axis differences between various components and greatly reduce the space of packaging. The module generally plays an important role in fields such as smartphones, handheld game products, navigation devices, and electronic stabilization.

1.5 Summary#

The above is a brief introduction to the project. Due to the heavy workload of coursework recently, it may take a long time to update, but I still hope to complete this project this year. This project has been worked on for over a year, but it has been delayed due to various reasons. I hope to find more time to complete this project this semester.

In terms of blog content, I will start introducing various modules in detail, from hardware to software. The software part is planned to be divided into two small parts. First, the program based on the basic STM32 library. The code based on the basic STM32 library has been completed, and tests on various modules have been completed. Fortunately, all modules are working properly. However, in order to deploy the project faster in the future and for the FOC project to be done this semester, I plan to change all the programs to be based on the HAL library. This will provide a unified code standard and make it easier to port the code in the future. Therefore, I need to write more blogs about the use of CubeMX and CubeMX IDE in the future as a record.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.