- Home >> News >> Blog articles >> Internet of things
Quadcopter circuit board design and development
In recent years, with the development of unmanned technology, the technology of multi-rotor aircraft has become increasingly mature. The multi-rotor aircraft is not restricted by the take-off and landing site, can take off and land vertically, hover in the air, and can fly flexibly in any direction. Widely used in various fields. The emergence of aerial photography aircraft such as DJI and the application of plant protection drones have brought quadcopter technology into thousands of households, and more and more people have come into contact with and applied quadcopters. With the rapid development and popularization of quadcopter technology, the shortage of unmanned aerial vehicle pilots and maintenance personnel has become increasingly apparent. This paper proposes a design scheme for a miniature quadcopter, which uses the STM32 chip as the main control chip, uses the motion sensor MPU6050 as the attitude sensor to collect the status information of the aircraft, and communicates with the remote control board through the 2.4G wireless communication module , the aircraft combines the flight status information and the received remote control signal, and uses the PID control algorithm to drive the hollow cup motor through PWM to realize remote control. Through the design and manufacture of the miniature quadcopter, the flight control principle of the quadcopter can be deeply understood, which lays the foundation for the application and development of the quadcopter.
1. The structure and principle of the quadcopter
The quadcopter is a multi-rotor aircraft. Unlike a helicopter, it consists of 4 rotors, and the 4 rotors are simple mechanisms directly connected to the motor. By controlling the speed of the 4 rotors, the forward, backward, and steering of the aircraft can be realized. and rotation actions. Its structural diagram is shown in Figure 1. As shown in Figure 1, the quadcopter mainly includes: the rotor part, the flight control part and the fuselage 3 parts, wherein the rotor is fixed at the end of the 4 axes of the frame to provide power for the entire aircraft, which includes propellers (forward and reverse propellers) , motors and some fixed components; the flight control part is fixed in the center of the frame for processing and attitude control of aircraft attitude information, including the main control module, remote control receiving module, sensor module, etc.; the frame is the basic platform of the aircraft, The rotor module, flight control module, power supply, etc. must be installed on the frame. The size of the frame directly determines the size of the aircraft. As a miniature quadcopter, in order to reduce the volume and weight of the aircraft, an integrated design is generally adopted.
2. Hardware Design of Quadcopter
The four-axis aircraft can realize simple movements such as forward and backward by changing the magnitude and direction of the pulling force of its four propellers. In order to achieve stable multi-attitude control of the aircraft, it is necessary to obtain information through the attitude sensor, and then further calculate and process it through the main controller. . Based on the above design ideas, the design system block diagram is shown in Figure 2. As shown in Figure 2, the control system mainly includes five parts: STM32 main controller, power module, coreless motor, communication module and sensor module.
(1) Main control circuit: the main controller, as the core of the four-axis flight control system, the main function is to receive the remote control signal, compare the current flight attitude information with the target attitude information, and calculate the PWM pulse of each motor through the control algorithm. The duty cycle value is output to the motor for flight control. Considering the convenience of STM32 learning, this design chooses STM32F103 as the main control chip.
(2) Sensor module: The sensor module uses the MPU6050 sensor as the attitude sensor to measure the spatial acceleration and angular velocity information of the aircraft. After the measurement data is budgeted by the main controller, the speed of each motor is controlled by PWM to realize motion control.
(3) Communication module: In order to realize the flight remote control of the quadcopter, wireless communication between the quadcopter and the remote control terminal is required. Considering the cost and design simplification, this design uses NRF24L01 as the wireless communication module to design and manufacture the quadcopter remote control terminal .
(4) Power supply module: The power supply module supplies power for the entire system. The power supply module of this design uses a relatively light 5 V small lithium battery as the power supply, and realizes the microcontroller, wireless communication module, and sensor module through the LM1117-3.3V voltage regulator circuit. powered by.
3. Software design of quadcopter
As an important part of quadcopter design, software design directly affects the stability and reliability of the flight control of the aircraft. The software design of the quadcopter is mainly composed of two parts: the program design of the STM32 main controller and the program design of the remote control terminal. The main function of the STM32 main controller is to receive wireless signals, process sensor information and control the motor speed. The processing flow is to initialize the wireless communication module, sensor module and motor, then obtain attitude information and calibrate the entire system, and then enter the standby state to wait Unlock the incoming of the control signal. The main controller adopts the method of timer interrupt to process the time in the interrupt, and the counting mark of each interrupt will increase automatically, and the tasks with different priorities are processed according to different interrupt accumulations. When the main controller is working, it is interrupted every 0.5 ms, and each interruption will check the reception of wireless module data to ensure the real-time performance of the control information of the flight control system; every two interruptions, the sensor module data is read, and the acquired data is passed through Kalman The filtering algorithm obtains more accurate aircraft attitude data; the attitude data of the four-axis aircraft is calculated through the attitude data acquired by the filtering algorithm every 4 interruptions (ie 2 ms), and then combined with the target attitude of the remote control terminal, the difference between the two is controlled by PID The algorithm calculates the PWM value of each motor, and controls the speed of each motor.
The remote control designed in this design is mainly used for simple control of the aircraft. The remote control board converts the operator's operation actions into signals and sends them to the flight control board to realize the remote control of the aircraft.
Summarize
This paper designs and implements a miniature four-axis aircraft system. The four-axis aircraft uses STM32 chip as the control chip, and the motion sensor MPU6050 as the attitude acquisition sensor. PWM drive value to achieve flight control. The system structure is simple, easy to implement, and can be used for beginners and enthusiasts to experience and learn.
The above is the example of Bluetooth headset development introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have bluetooth headset solution development needs, you can trust us. We represent a variety of single-chip microcomputers, voice chips, dual-mode Bluetooth ICs, and wifi chips. Brands include Songhan MCU, Yingguang MCU, Jerry Bluetooth, Ankai Bluetooth, Allwinner, and Realtek. Our technical services include: PCB design, microcontroller development, Bluetooth solutions, software and hardware custom development, APP development, small program development, WeChat official account development, etc. It can also undertake the design of intelligent electronic products, the development of living appliances, the research and development of beauty equipment, the application of Internet of things platform, the smart home control system, the development of TWS earphones, Bluetooth earphone speakers, the development of children's educational toys, the design of electronic education products, etc.
Proposal recommendation
- TOP