Unmanned aerial vehicle hydrogen fuel cell control system and method based on STM32 single-chip microcomputer
By using an STM32 microcontroller control system, combined with a MAX6675 thermocouple module and FOC algorithm, precise temperature and humidity control of the hydrogen fuel cell is achieved, solving the problems of drone endurance and immature control systems, and improving the drone's endurance and system stability.
Patent Information
- Application Number
- CN202410982513.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-19
AI Technical Summary
Existing drones have limited endurance, traditional battery technology is insufficient to meet the needs of long-duration flights, and the control system for hydrogen fuel cells in drones is not yet mature.
Using an STM32 microcontroller as the core control unit, combined with a MAX6675 thermocouple module and FOC algorithm, real-time temperature and humidity control of the hydrogen fuel cell is achieved. Stable communication is achieved through RS485 protocol, and the hydrogen supply, fuel cell and energy management system are integrated to achieve efficient control.
It improves the drone's endurance and system stability, ensures that the fuel cell operates within its optimal operating temperature range, prevents flooding, and achieves stable data transmission and real-time system monitoring.
Smart Images

Figure CN118983476A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles, and in particular to a hydrogen fuel cell control system and method for an unmanned aerial vehicle based on an STM32 single-chip microcomputer. Background Art
[0002] Driven by the new round of energy revolution, as the world's awareness of sustainable development and environmental protection increases, the demand for clean and efficient energy systems is becoming increasingly urgent. Hydrogen fuel cells, as zero-emission energy conversion devices that only produce water and heat as by-products, are an ideal environmentally friendly energy solution.
[0003] In recent years, hydrogen fuel cell technology has made significant progress, especially in terms of improving energy density, extending service life, and reducing costs. This makes it possible to use hydrogen fuel cells in mobile devices such as drones, solving the problem of limited endurance of traditional batteries.
[0004] At the same time, the STM32 series microcontrollers are widely used in embedded system design due to their high performance, low power consumption, rich peripheral interfaces and good ecosystem, especially in the field of UAV flight control. It can process complex sensor data, execute precise control algorithms, and support multiple communication protocols to meet the real-time, stability and flexibility requirements of UAV control systems.
[0005] Therefore, a UAV hydrogen fuel cell control system and method based on STM32 single chip microcomputer is proposed. Summary of the invention
[0006] The purpose of the present invention is to provide a UAV hydrogen fuel cell control system and method based on an STM32 single-chip microcomputer to solve the problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides the following technical solution: a hydrogen fuel cell control system for a drone based on an STM32 single-chip microcomputer, comprising a host computer, the host computer is connected to an STM32 single-chip microcomputer for controlling the overall function through a remote signal, and the STM32 single-chip microcomputer is connected to a first hydrogen supply system, a second fuel cell system and a third energy management system;
[0008] The first hydrogen supply system includes a hydrogen storage bottle and a pressure reducing valve, and the pressure reducing valve is connected to the STM32 single chip microcomputer;
[0009] The second fuel cell system includes a fuel cell stack, the fuel cell stack is connected to a cooling fan and a solenoid valve, and the cooling fan and the solenoid valve are connected to an STM32 single chip microcomputer;
[0010] The third energy management system includes a lithium battery, a high-power DC-DC power supply module is connected to the lithium battery, and the high-power DC-DC power supply module is connected to the STM32 single-chip microcomputer.
[0011] Preferably: the STM32 single chip computer includes an MT30 model aircraft connector, a J30J-15 core rectangular connector and a 14-pin intermediate connector connection;
[0012] The MT30 model aircraft connector is connected to the pressure reducing valve, the J30J-15 core rectangular connector is connected to the cooling fan and the solenoid valve, and the 14-pin intermediate connector is connected to the high-power DC-DC power supply module.
[0013] Preferably, the STM32 single chip microcomputer is also connected with a communication interface, an in-box temperature detection module and an in-box humidity detection module, and the communication interface adopts RS485 protocol for data transmission.
[0014] Preferably, the temperature detection module in the box samples the temperature through a K-type thermocouple module MAX6675.
[0015] Preferably, the humidity detection module in the box monitors the humidity through a humidity sensor.
[0016] Preferably, the chip model of the STM32 single chip microcomputer is STM32F103RET6.
[0017] Preferably, the STM32 single chip microcomputer quantitatively controls the cooling fan through the FOC algorithm according to the current temperature.
[0018] A control method for a UAV hydrogen fuel cell control system based on an STM32 single-chip microcomputer according to any one of the above-mentioned methods comprises the following steps:
[0019] S1, system initialization: execute STM32 microcontroller startup, communication interface configuration, sensor and actuator initialization, and system self-test in sequence;
[0020] S2, then start the hydrogen fuel cell to prepare for power supply;
[0021] S3, collecting various data through sensors, and then preprocessing the collected data, filtering and calibrating the collected data;
[0022] S4, control algorithm execution, based on the pre-processed data, the control algorithm is executed, and the FOC algorithm and PID control are used for operation;
[0023] S5, actuator control, controls the motor and valve actuator, and adjusts the hydrogen supply;
[0024] S6. During operation, monitor the system status, battery status and UAV flight status in real time;
[0025] S7. After detecting an abnormal situation, execute corresponding treatment measures;
[0026] S8, user interaction, the host computer written in C# algorithm provides a user interface, allowing users to set parameters, view system status, etc.;
[0027] S9, data recording and analysis, record operation data, and perform data analysis to optimize system performance Excel;
[0028] S10: System shutdown, safety shutdown of the system, shut down the hydrogen fuel cell, and perform a safety check.
[0029] Preferably: in step S3, the collected data includes the pressure of the hydrogen bottle, the cooling fan of the fuel cell stack and the control data of the solenoid valve, and the control data includes temperature, pressure and flow.
[0030] Compared with the prior art, the invention has the following beneficial effects: the STM32F103RET6 chip is used as the core control unit to be responsible for the control and data processing of the entire system. The fuel cell temperature is sampled in real time by integrating the MAX6675 thermocouple module, and the 12V fan is precisely adjusted by using the FOC algorithm (vector control algorithm) to keep the fuel cell within the optimal operating temperature range.
[0031] At the same time, the solenoid valve is used to drain water regularly to adjust the humidity and prevent flooding from affecting the performance of the fuel cell. The controller achieves stable communication with external devices through the RS485 protocol to ensure the stability of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a system diagram of the present invention;
[0033] Figure 2 It is a schematic diagram of the front structure of the STM32 single-chip microcomputer chip of the present invention;
[0034] Figure 3 The back structure diagram of the STM32 single-chip microcomputer chip of the present invention is shown;
[0035] Figure 4 A circuit diagram of the present invention;
[0036] Figure 5 It is a flow chart of the control method of the present invention. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0038] See also Figure 1-5 The present invention provides a technical solution: a UAV hydrogen fuel cell control system based on STM32 single-chip microcomputer, including a host computer, which is connected to an STM32 single-chip microcomputer for controlling the overall function through a remote signal, and the chip model of the STM32 single-chip microcomputer is STM32F103RET6. As the core control unit of the system, the chip has powerful processing capabilities and rich peripheral interfaces. Figure 4 The circuit in can realize efficient parameter sampling and control.
[0039] Fan control circuit: The speed of the 12V fan is controlled by a PWM signal to achieve precise control of the fuel cell temperature.
[0040] Solenoid valve control circuit: used to control the opening and closing of the solenoid valve and adjust the humidity inside the fuel cell by regular drainage.
[0041] Parameter sampling and communication Fuel cell parameter sampling: The system uses sensors to sample the temperature, humidity, voltage, current and other parameters of the fuel cell in real time.
[0042] The STM32 single chip microcomputer is connected to a first hydrogen supply system, a second fuel cell system and a third energy management system;
[0043] The first hydrogen supply system includes a hydrogen storage bottle and a pressure reducing valve, which is connected to the STM32 single-chip microcomputer. When hydrogen fuel is needed, the pressure reducing valve is controlled by the STM32 single-chip microcomputer to allow the hydrogen fuel to enter the second fuel cell system for use in the power stack.
[0044] The second fuel cell system includes a fuel cell stack, which is connected to a cooling fan and a solenoid valve, which are connected to an STM32 microcontroller. The humidity is monitored by a humidity sensor. When the humidity is high, the solenoid valve is controlled to open and close to achieve automatic drainage and keep the humidity within a reasonable range. At the same time, when the temperature is high, the STM32 microcontroller uses the FOC algorithm to quantitatively control the cooling fan according to the current temperature, adjusts the fan speed, and achieves precise temperature control.
[0045] The third energy management system includes a lithium battery, a high-power DC-DC power supply module is connected to the lithium battery, and the high-power DC-DC power supply module is connected to the STM32 single-chip microcomputer.
[0046] like Figure 2 and Figure 3 As shown: The STM32 microcontroller includes MT30 aircraft model connector, J30J-15 core rectangular connector and 14-pin intermediate connector connection;
[0047] The MT30 model aircraft connector is connected to the pressure reducing valve, the J30J-15 core rectangular connector is connected to the cooling fan and the solenoid valve, and the 14-pin intermediate connector is connected to the high-power DC-DC power module; through the above settings, Figure 2 14-pin intermediate connector: Pin 1, lithium battery charging current; Pin 2, lithium battery discharging current; Pin 3, box temperature; Pin 4, charging enable control; Pin 5, battery stack discharge current; Pin 6, battery stack voltage; Pin 7, load voltage; Pin 8, SWITCH; Pin 9, load current; Pin 10, lithium battery voltage; Pin 11, GND; Pin 12, GND; Pin 13, VBAT; Pin 14, VBAT.
[0048] Figure 3 In the J30J-15 core rectangular connector: Pin 1, stack temperature; Pin 2, GND; Pin 3, DC5V; Pin 4, pressure sensor; Pin 5, fan PWM; Pin 6, fan power; Pin 7, GND; Pin 8, solenoid valve; Pin 9, GND; Pin 10, 12V signal output; Pin 11, GND; Pin 12, GND; Pin 13, lithium battery DC48V; Pin 14, lithium battery DC48V; Pin 15, lithium battery DC48V.
[0049] like Figure 1 As shown: the STM32 microcontroller is also connected to a communication interface, an in-box temperature detection module, and an in-box humidity detection module. The communication interface uses the RS485 protocol to transmit data; the in-box temperature detection module samples the temperature through the K-type thermocouple module MAX6675; the in-box humidity detection module monitors the humidity through a humidity sensor; through the above settings, the sampled data is transmitted through the RS485 protocol to achieve stable communication with other devices. The temperature control samples the temperature of the fuel cell through the K-type thermocouple module MAX6675, collects the temperature data of the fuel cell in real time, and ensures the accuracy of the data. The humidity control collects the internal humidity of the fuel cell, and uses a humidity sensor to monitor the humidity inside the fuel cell.
[0050] like Figure 5 As shown, a control method for a UAV hydrogen fuel cell control system based on an STM32 single-chip microcomputer comprises the following steps:
[0051] S1, system initialization: execute STM32 microcontroller startup, communication interface configuration, sensor and actuator initialization, and system self-test in sequence;
[0052] S2, then start the hydrogen fuel cell to prepare for power supply;
[0053] S3. Collect various data through sensors, including the pressure of hydrogen cylinders, the cooling fan of the stack and the control data of the solenoid valve, including temperature, pressure and flow, and then pre-process the collected data, filter and calibrate the collected data;
[0054] S4, control algorithm execution, based on the pre-processed data, the control algorithm is executed, and the FOC algorithm and PID control are used for operation;
[0055] S5, actuator control, controls the motor and valve actuator, and adjusts the hydrogen supply;
[0056] S6. During operation, monitor the system status, battery status and UAV flight status in real time;
[0057] S7. After detecting an abnormal situation, execute corresponding treatment measures;
[0058] S8, user interaction, the host computer written in C# algorithm provides a user interface, allowing users to set parameters, view system status, etc.;
[0059] S9, data recording and analysis, record operation data, and perform data analysis to optimize system performance Excel;
[0060] S10: System shutdown, safety shutdown of the system, shut down the hydrogen fuel cell, and perform a safety check.
[0061] like Figure 5 As shown in the figure, starting from the "Start" node, the system initialization, STM32 microcontroller startup, communication interface configuration, sensor and actuator initialization, hydrogen fuel cell startup and other steps are executed in sequence. Then it enters a loop to monitor the battery status, perform data acquisition and preprocessing, determine whether the data is abnormal, and perform abnormal processing if it is abnormal. If the data is normal, the control algorithm is executed to adjust the hydrogen supply and monitor the flight status of the drone. Feedback is provided through the user interface, the system status is recorded and analyzed, and finally it is determined whether to continue running or shut down the system.
[0062] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A UAV hydrogen fuel cell control system based on STM32 single chip microcomputer, including a host computer, characterized in that: The host computer is connected to an STM32 single-chip computer for controlling the overall function through a remote signal, and the STM32 single-chip computer is connected to a first hydrogen supply system, a second fuel cell system and a third energy management system; The first hydrogen supply system includes a hydrogen storage bottle and a pressure reducing valve, and the pressure reducing valve is connected to the STM32 single chip microcomputer; The second fuel cell system includes a fuel cell stack, the fuel cell stack is connected to a cooling fan and a solenoid valve, and the cooling fan and the solenoid valve are connected to an STM32 single chip microcomputer; The third energy management system includes a lithium battery, a high-power DC-DC power supply module is connected to the lithium battery, and the high-power DC-DC power supply module is connected to the STM32 single-chip microcomputer.
2. According to claim 1, a UAV hydrogen fuel cell control system based on STM32 single chip microcomputer is characterized in that: The STM32 microcontroller includes an MT30 aircraft model connector, a J30J-15 core rectangular connector and a 14-pin intermediate connector connection; The MT30 model aircraft connector is connected to the pressure reducing valve, the J30J-15 core rectangular connector is connected to the cooling fan and the solenoid valve, and the 14-pin intermediate connector is connected to the high-power DC-DC power supply module.
3. The UAV hydrogen fuel cell control system based on STM32 single chip microcomputer according to claim 1 is characterized in that: The STM32 single chip microcomputer is also connected with a communication interface, an in-box temperature detection module and an in-box humidity detection module, and the communication interface adopts RS485 protocol to transmit data.
4. The UAV hydrogen fuel cell control system based on STM32 single chip microcomputer according to claim 3 is characterized in that: The temperature detection module in the box samples the temperature through a K-type thermocouple module MAX6675.
5. The UAV hydrogen fuel cell control system based on STM32 single chip microcomputer according to claim 3 is characterized in that: The humidity detection module in the box monitors the humidity through a humidity sensor.
6. The UAV hydrogen fuel cell control system based on STM32 single chip microcomputer according to claim 1 is characterized in that: The chip model of the STM32 microcontroller is STM32F103RET6.
7. The UAV hydrogen fuel cell control system based on STM32 single chip microcomputer according to claim 1 is characterized in that: The STM32 single chip microcomputer quantitatively controls the cooling fan according to the current temperature through the FOC algorithm.
8. A control method for a UAV hydrogen fuel cell control system based on an STM32 single-chip microcomputer according to any one of claims 1 to 7, characterized in that: The following steps are involved: S1, system initialization: execute STM32 microcontroller startup, communication interface configuration, sensor and actuator initialization, and system self-test in sequence; S2, then start the hydrogen fuel cell to prepare for power supply; S3, collecting various data through sensors, and then preprocessing the collected data, filtering and calibrating the collected data; S4, control algorithm execution, based on the pre-processed data, the control algorithm is executed, and the FOC algorithm and PID control are used for operation; S5, actuator control, controls the motor and valve actuator, and adjusts the hydrogen supply; S6. During operation, monitor the system status, battery status and UAV flight status in real time; S7. After detecting an abnormal situation, execute corresponding treatment measures; S8, user interaction, the host computer written in C# algorithm provides a user interface, allowing users to set parameters, view system status, etc.; S9, data recording and analysis, record operation data, and perform data analysis to optimize system performance Excel; S10: System shutdown, safety shutdown of the system, shut down the hydrogen fuel cell, and perform a safety check.
9. The control method of a UAV hydrogen fuel cell control system based on an STM32 single-chip microcomputer according to claim 8, characterized in that: In step S3, the collected data includes the pressure of the hydrogen bottle, the cooling fan of the fuel cell stack and the control data of the solenoid valve, and the control data includes temperature, pressure and flow.
