Drone-Mercury Quadcopter Building from Scratch (Part 2) - Hardware and PCB

2. Hardware and PCB
Let's delve into the hardware part, which is crucial for the project. Often, the challenge lies in the lack of comprehensive documentation, making it difficult to grasp the overall design concept. Therefore, starting from the ground up to build a complete project is essential for gaining a conceptual understanding and enhancing the overall grasp of the subject.
Before starting this project, I always found the hardware part challenging, and my current perspective still holds true. Hardware difficulties are more tangible, with many debugging aspects involving physical considerations, which significantly differ from software. Hardware, in my view, relies heavily on experience. Unlike programming errors that provide feedback for debugging, hardware issues may stem from various physical factors, such as soldering or short-circuiting. However, with ample experience, one can develop a systematic debugging approach to identify and resolve issues effectively. While self-exploration is valuable, having guidance from mentors can significantly streamline the process, albeit with its own set of pros and cons.
As mentioned in the previous part "Drone-Mercury Quadcopter Building from Scratch (Part 1)," this project is based on the STM32C8T6. Due to limited hardware experience, the hardware schematics mainly reference the following materials: - "DIY Quadcopter" - Wildfire Tyrant Development Board v2 Schematics
PCB design tutorials are widely available online, facilitating quick entry into the field. The overall hardware design was completed using Altium Designer 21, with attention to version compatibility for viewing design drawings.
2.1 Schematics
The schematic overview is depicted below, featuring the STM32C8T6 as the main control chip with a 16MHz external crystal oscillator. The schematic is divided into several sections: - STM32 main control circuit, - Motor drive circuit, - NRF24L01 interface circuit, - MPU6050 module circuit, - Power supply module circuit, - Indicator light drive circuit, - Battery, UART pins.

2.1.1 STM32 Main Control Circuit
The STM32C8T6 main control
circuit includes modules to drive the STM32C8T6, including power supply
and a 16MHz external crystal oscillator. The circuit also incorporates
an LED indicator module connected to GPIOB 3 for displaying various
states. Additionally, a power voltage detection module composed of
2.1.2 Motor Drive Circuit
The motor drive circuit
consists of four identical modules. The AO3402 MOSFET, packaged in
SOT23, is used for motor drive control. PWM signals generated by timers
control the opening and closing of the MOSFET AO3402, thereby
controlling the motor output. Diodes
2.1.3 NRF24L01 Interface Circuit
The NRF24L01 module
interfaces via an 8-pin header, with attention to orientation during PCB
layout.
The module communicates
with the STM32C8T6 via SPI, operating in the 2.4 GHz frequency band with
communication speeds ranging from 250 kbps to 2 Mbps.
#### 2.1.4 MPU6050 Module Circuit
The MPU6050 circuit primarily
consists of power supply pins. The MPU6050 communicates with the
STM32C8T6 via I2C. To minimize electromagnetic interference and ensure
signal integrity, the I2C communication lines should be kept short, with
equal lengths for SCL and SDA.
#### 2.1.5 Power Supply Module Circuit
The power supply module is divided into two parts:
boost and voltage stabilization circuits. The LTC3200 is used for
voltage boosting, raising the battery voltage from 3.7V to 5V. The
XC6206 LDO regulator provides stable voltage output.
2.1.6 Indicator Light Drive Circuit
Four LEDs, representing
different directions, are driven for status indication. All LEDs are
controlled via pin LED3.
2.1.7 Battery, UART Pins
Battery connection is
facilitated through reserved solder pads for easy connection with
matching connectors. UART pins are also available for communication.
### 2.2 PCB Once the
schematics are confirmed, PCB fabrication can commence. Altium Designer
21 was used for PCB design, with abundant tutorials available online for
guidance. The current version of the PCB features a 4-layer design, with
components placed on the top layer, power layers as 2 and 3, and the
bottom layer as the signal layer.
2D View of PCB
3D View of PCB ###
2.2.1 Bill of Materials (BOM) The Bill of Materials includes all the
components used. Pay attention to component packages while ordering to
ensure compatibility.
###
2.2.2 PCB Considerations During PCB layout, several considerations are
essential: 1. Battery voltage detection using resistors
2.2.3 Soldering
After verifying the design, send the project files to the PCB
manufacturer. JLC was used in this case. After receiving the boards,
solder all components onto the PCB. Ensure thorough soldering, checking
for any soldering defects with a multimeter.
### 2.3 Conclusion This concludes
the hardware part of the project. As this section was completed
approximately a year ago, some details may have been forgotten. Future
adjustments will be made based on issues encountered in subsequent
projects. Next, we'll proceed with testing various modules. Each module
will undergo testing with two programs: one based on the basic library
for continuity with previous content, and another based on the HAL
library for improved portability and compatibility. Additionally, the
content based on the HAL library is currently limited, providing scope
for further exploration and learning.
- Title: Drone-Mercury Quadcopter Building from Scratch (Part 2) - Hardware and PCB
- Author: xiangyu fu
- Created at : 2022-10-27 23:36:47
- Updated at : 2024-06-09 00:13:42
- Link: https://redefine.ohevan.com/2022/10/27/Drone/drone-02/
- License: This work is licensed under CC BY-NC-SA 4.0.