Drone-Mercury Quadcopter Building from Scratch (Part 1) - Project Introduction
This project is currently ongoing, and the latest progress is available on GitHub. If you find it helpful, please give it a star to show your support! GitHub Repository: https://github.com/Xiangyu-Fu/Drone-Mercury
1. Project Introduction
1.1 Introduction
This project has been in progress for quite some time, spanning over a year now. Its primary goal is to delve into embedded systems knowledge, enhance hardware skills, and gain experience in completing a full project. The project is mainly based on STM32C8T6 and ESP32. Due to price and accessibility constraints abroad, many modules and solutions couldn't be easily implemented, resulting in numerous modifications. It's purely a DIY project, undoubtedly with many areas for improvement, welcoming feedback and suggestions from everyone.
The overall project structure is as follows, with the hardware part of the framework already set up. The next steps involve optimizing and integrating the software. Hence, this section will be updated in the future. I plan to add advanced features in subsequent parts, such as incorporating a camera, or integrating the quadcopter with other robots to build a cluster of robots, and implementing digital twins, among others.
1.2 References
This project draws inspiration from various sources, including: - "DIY Quadcopter" - STM32 Library Development Practical Guide - STM32 HAL Library Development Practical Guide - ESP-IDF Programming Guide - ...
Additionally, various blogs and websites have been referenced, which cannot all be listed here. References used in the blog will also be cited in the blog itself.
1.3 Project Overview
The appearance of the quadcopter is depicted below, presenting a very basic design. The control board is custom-made, while the remaining parts such as motors and propellers are purchased online as kits. This ensures the overall durability and lightweight nature of the aircraft. It's worth noting that in the 3D rendering, the propellers are all depicted as clockwise, which is not feasible in reality. However, for convenience, I didn't include the counterclockwise parts.
The reason for creating a 3D model is mainly for future ease of exporting models for simulation in simulators or completing a series of subsequent topics such as digital twins.
The assembled model looks like the image below, featuring many additional wiring compared to the 3D model. This version also doesn't have a separate battery compartment for the drone, which will be designed after completing all software module tests.
1.4 PCB Design
The PCB design employs a 4-layer board, mainly comprising the main control unit, NRF24L01 communication unit, data acquisition unit, indicator lights, power supply module, and motor drive module. The main control board utilizes STM32F103C8T6, an excellent entry-level MCU. Due to the abundance of online resources, debugging any issues becomes more manageable.
More specific content will be covered in future blog posts, such as circuit schematics and considerations for the PCB. As this is my first time designing a board, there are bound to be many areas for improvement, and bugs are inevitable.
1.4.1 STM32C8T6
STM32F103C8T6 is a medium-density performance line with an ARM Cortex-M3 32-bit microcontroller, packaged in a 48-pin LQFP package. It combines a high-performance RISC core with a maximum operating frequency of 72MHz, high-speed embedded memories, and enhanced I/Os and peripherals connected to two APB buses. STM32F103C8T6 features a 12-bit analog-to-digital converter, timers, PWM timers, standard and advanced communication interfaces. A comprehensive set of power-saving modes allows designers to create 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 input/output 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 utilize the NRF24L01 transceiver module for communication between the remote controller 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 bit rates ranging from 250 kbps to 2 Mbps. When used in an open space with lower bit rates, its range can reach up to 100 meters.
The module can utilize 125 different channels, enabling the possibility of having 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 module's power consumption is only around 12mA, even lower than a single LED. The module operates at a voltage range of 1.9V to 3.6V, but the advantage is that other pins can withstand 5V logic, allowing easy connection to STM32 without the need for any logic level converters.
Its schematic is as shown below, with the image source indicated in the watermark.
We've reserved a slot directly for the NRF24L01 module on the central control board, enabling us to use the module directly. The entire central control board looks as depicted below.
1.4.3 MPU6050
The MPU6050 is a popular motion sensor chip capable of obtaining the current three-axis acceleration components and three-axis angular velocities of the device. We've integrated the MPU6050 into the central control board to acquire the current attitude of the quadcopter. Below is an introduction sourced from the internet.
The MPU6050 is an integrated six-axis motion processing module, comprising a three-axis MEM
S gyroscope sensor and a three-axis MEMS accelerometer sensor. Compared to multi-component solutions, integrated modules can eliminate the problem of time-axis differences between various components and significantly reduce package space. The module generally plays an important role in smartphones, handheld gaming products, navigation devices, electronic stabilization, and other fields.
1.5 Conclusion
These are some of the important introductions to the project. Due to significant academic pressures recently, updates might be infrequent. However, I still hope to complete this project this year. Despite spanning over a year, various interruptions have delayed its progress. I hope to allocate more time to it this semester.
In terms of the blog content, I'll soon start introducing various modules, from hardware to software. The software part will be divided into two smaller sections. Firstly, the program based on the basic STM32 library is already completed, with tests conducted on each module, all of which are functioning correctly. However, to expedite future deployments and for the FOC project planned for this semester, I plan to transition all programs to be based on the HAL library. This will ensure a unified code standard and facilitate future code porting. Therefore, I intend to write more blogs about the usage of CubeMX and CubeMX IDE for documentation purposes.
- Title: Drone-Mercury Quadcopter Building from Scratch (Part 1) - Project Introduction
- Author: xiangyu fu
- Created at : 2022-10-26 23:36:47
- Updated at : 2024-06-09 00:13:40
- Link: https://redefine.ohevan.com/2022/10/26/Drone/drone-01/
- License: This work is licensed under CC BY-NC-SA 4.0.