Automatic calibration method for biosafety cabinet quality detector
Through adaptive PID control and multi-channel I2C bus communication, automatic correction of the flow rate of the four branch air ducts of the biosafety cabinet quality detector is achieved, which solves the problem of tedious and time-consuming adjustment in traditional methods and improves the automatic adjustment accuracy and stability of the system.
Patent Information
- Application Number
- CN202510364090.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-03-26
AI Technical Summary
The process of adjusting the flow rate of the four branch air ducts in traditional biosafety cabinet quality testing instruments is cumbersome and time-consuming, making it difficult to achieve automated adjustment.
Adopting the adaptive PID control method, combined with multi-channel I2C bus communication and high-precision sensors, the butterfly valve opening is automatically adjusted by calculating the flow rate of each air duct and comparing it with the target flow rate, thus realizing automatic correction of the branch air duct flow rate.
The system's responsiveness and adjustment accuracy are improved, manual intervention is reduced, and long-term stable operation of the system is ensured. Real-time feedback and optimization can be performed based on environmental changes, minimizing the impact of fan speed and pressure fluctuations.
Smart Images

Figure CN119882848B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of detection technology, and in particular relates to an automatic calibration method for a biosafety cabinet quality detector. Background Art
[0002] Biological safety cabinets (BSCs) are essential laboratory equipment, widely used in the manipulation and research of biological, chemical, and other hazardous substances. Testing devices for BSC quality control are crucial instruments for ensuring safe use.
[0003] Currently, most biosafety cabinet quality testers on the market use either the microbiological method or the potassium iodide method to test biosafety cabinets. The potassium iodide method is to first place a potassium iodide aerosol generator in the biosafety cabinet to generate potassium iodide aerosol in the biosafety cabinet, and then place the biosafety cabinet quality tester directly in front of the biosafety cabinet. By generating negative pressure in the main air duct in the measuring unit, the four branch air ducts are driven to inhale air, so that the four filter papers installed at the branch air duct openings can inhale the air in the space in front of the biosafety cabinet and adsorb the potassium iodide aerosol in the air. Finally, the four filter papers are removed and dripped with palladium chloride solution to change the color of the adsorbed potassium iodide. The number of potassium iodide spots is checked to determine whether the quality of the biosafety cabinet meets the standards.
[0004] During the quality inspection of the biosafety cabinet, it is necessary to compare the number of potassium iodide spots on four filter papers at a time. This requires that the error in the number of potassium iodide spots on the four filter papers cannot be too large. To achieve this, it is necessary to control the suction flow of the four branch air ducts to remain consistent before the inspection.
[0005] The current traditional practice is to manually adjust the butterfly valves of the four branch air ducts multiple times to eventually keep the flow rates of the four branch air ducts consistent. The adjustment process is cumbersome and time-consuming. Summary of the Invention
[0006] The purpose of the present invention is to provide an automatic calibration method for a biosafety cabinet quality detector, which solves the technical problem of automatically adjusting the flow rates of four branch air ducts.
[0007] To achieve the above objectives, the present invention adopts the following technical inventions:
[0008] A biosafety cabinet quality detector includes a pressure detection unit A, a pressure detection unit B, a pressure detection unit C, a pressure detection unit D, a pressure detection unit E, a wind speed detection unit A, a wind speed detection unit B, a wind speed detection unit C, a wind speed detection unit D, a wind speed detection unit E, a fan control circuit, a main controller, a butterfly valve drive circuit A, a butterfly valve drive circuit B, a butterfly valve drive circuit C, a butterfly valve drive circuit D, a touch screen, a communication module, and a power module. The pressure detection units A, B, C, and D are all connected to the main controller via a first I2C bus, the pressure detection unit E is connected to the main controller via a second I2C bus, the wind speed detection units A, B, C, and D are all connected to the main controller via a third I2C bus, and the wind speed detection unit E is connected to the main controller via a fourth I2C bus.
[0009] The fan control circuit is a 3.3V to 12V level drive circuit composed of field effect transistors Q1 and Q2. The G pole of field effect transistor Q1 is connected to an IO port of the main controller, and the S pole of field effect transistor Q1 drives field effect transistor Q2, which is used to control the opening or closing of the fan.
[0010] The butterfly valve drive circuit A includes an isolation drive circuit A and a motor driver A. The input end of the isolation drive circuit A is respectively connected to a group of IO ports of the main controller, and the output end drives the input end of the motor driver. The output end of the motor driver is connected to and drives an external first drive motor for controlling the opening or closing of the first butterfly valve.
[0011] The circuit principles of butterfly valve drive circuit B, butterfly valve drive circuit C, and butterfly valve drive circuit D are the same as those of butterfly valve drive circuit A. Butterfly valve drive circuit B, butterfly valve drive circuit C, and butterfly valve drive circuit D are respectively connected to different IO ports of the main controller, and respectively drive the second drive motor for controlling the second butterfly valve, the third drive motor for controlling the third butterfly valve, and the fourth drive motor for controlling the fourth butterfly valve. The touch screen and the communication module are both connected to the main controller.
[0012] The power module supplies power to all pressure detection units, all wind speed detection units, fan control circuits, main controller, touch screen, communication module and all butterfly valve drive circuits.
[0013] Preferably, the power supply module includes a 12V voltage regulator module, a 5V voltage regulator module and a 3.3V voltage regulator module, the input end of the 12V voltage regulator module is connected to the mains power, and the output end outputs 12V power, the input end of the 5V voltage regulator module is connected to the 12V power supply, and the output end outputs 5V power, and the input end of the 3.3V voltage regulator module is connected to the 5V power supply, and the output end outputs 3.3V power;
[0014] The model of the 12V voltage regulator module is LRS-35-12 switching power supply; the model of the 5V voltage regulator module is LM7805; and the model of the 3.3V voltage regulator module is AM1117.
[0015] Preferably, the pressure detection unit A includes an interface J1, a capacitor C1, a resistor R1 and a resistor R5, and the interface J1 is connected to an external first pressure sensor, specifically, pin 4 of the interface J1 is connected to the power supply end of the first pressure sensor, pin 2 is connected to the SCL end of the first pressure sensor, pin 1 is connected to the SDA end of the first pressure sensor, and pin 3 is connected to the ground wire;
[0016] Pin 4 of interface J1 is also connected to a 3.3V power supply, a filter capacitor C1 is connected between pins 3 and 4, pins 2 and 1 are connected to a 3.3V power supply through resistors R1 and R5 respectively, and pins 2 and 1 of interface J1 are the SCL1 interface and SDA1 interface of the first I2C bus respectively, which are connected to a group of IO ports of the main controller;
[0017] The circuit principles of the pressure detection unit B, the pressure detection unit C, and the pressure detection unit D are the same as those of the pressure detection unit A, and are connected to the first I2C bus together with the pressure detection unit A; the pressure detection unit B, the pressure detection unit C, and the pressure detection unit D are respectively connected to the external second pressure sensor, the third pressure sensor, and the fourth pressure sensor;
[0018] The circuit principle of the pressure detection unit E is the same as that of the pressure detection unit A. The pressure detection unit E is connected to a group of IO ports of the main controller through the second I2C bus; the pressure detection unit E is connected to an external fifth pressure sensor;
[0019] The wind speed detection unit A includes an interface J5, a capacitor C5, a resistor R9, and a resistor R13. The interface J5 is connected to an external first wind speed sensor. Specifically, pin 4 of the interface 5 is connected to the power supply terminal of the first wind speed sensor, pin 2 is connected to the SCL terminal of the first wind speed sensor, pin 1 is connected to the SDA terminal of the first wind speed sensor, and pin 3 is connected to the ground wire.
[0020] Pin 4 of interface J5 is also connected to a 3.3V power supply, a filter capacitor C5 is connected between pins 3 and 4, pins 2 and 1 are connected to a 3.3V power supply through resistors R9 and R13 respectively, and pins 2 and 1 of interface J5 are the SCL3 interface and SDA3 interface of the third I2C bus respectively, which are connected to a group of IO ports of the main controller;
[0021] The circuit principles of the wind speed detection unit B, the wind speed detection unit C, and the wind speed detection unit D are the same as those of the wind speed detection unit A, and are connected to the third I2C bus together with the wind speed detection unit A; the wind speed detection unit B, the wind speed detection unit C, and the wind speed detection unit D are respectively connected to the external second wind speed sensor, the third wind speed sensor, and the fourth wind speed sensor;
[0022] The circuit principle of the wind speed detection unit E is the same as that of the wind speed detection unit A. The wind speed detection unit E is connected to an external fifth wind speed sensor via a fourth I2C bus.
[0023] The first wind speed sensor, the second wind speed sensor, the third wind speed sensor, the fourth wind speed sensor and the fifth wind speed sensor are all AWM720P1 digital wind speed sensors; the first pressure sensor, the second pressure sensor, the third pressure sensor, the fourth pressure sensor and the fifth pressure sensor are all BMP180 digital pressure sensors.
[0024] Preferably, the motor driver A includes a driving chip IC1, a diode D1, a diode D2, a diode D3, a diode D4, a diode D5, a diode D6, a diode D7, a diode D8, a capacitor C12 and an interface J9;
[0025] The isolation drive circuit A includes a 6-way photoelectric isolation circuit consisting of an optocoupler U20, an optocoupler U21, an optocoupler U22, an optocoupler U23, an optocoupler U24 and an optocoupler U25 and their corresponding peripheral circuits;
[0026] The IN1, IN2, IN3, IN4, ENA and ENB terminals of the driver chip IC1 are connected to different IO ports of the main controller through optical couplers U20, U21, U22, U23, U24 and U25 respectively;
[0027] Connect the OUT1, OUT2, OUT3, and OUT4 terminals of the driver chip IC1 to pins 5, 4, 3, and 2 of the interface J9, respectively. Connect pin 6 of the interface J9 to the 12V power supply and pin 1 to the ground wire. Connect the ISENA, ISENB, and GND terminals of the driver chip IC1 to the ground wire.
[0028] The positive electrode of diode D1 is connected to the OUT4 terminal of driver chip IC1, and the negative electrode is connected to the 12V power supply. The negative electrode of diode D2 is connected to the OUT4 terminal of driver chip IC1, and the positive electrode is connected to the ground wire.
[0029] The anode of diode D3 is connected to the OUT3 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D4 is connected to the OUT3 terminal of driver chip IC1, and the anode is connected to the ground wire.
[0030] The anode of diode D5 is connected to the OUT2 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D6 is connected to the OUT2 terminal of driver chip IC1, and the anode is connected to the ground wire.
[0031] The anode of diode D7 is connected to the OUT1 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D8 is connected to the OUT1 terminal of driver chip IC1, and the anode is connected to the ground wire.
[0032] The VSS terminal of the driver chip IC1 is connected to a 5V power supply, and the VS terminal is connected to a 12V power supply. Capacitor C12 is a ground capacitor for the VSS terminal of the driver chip IC1.
[0033] The model of the driver chip IC1 is L298N DC motor driver, and the models of the first drive motor, the second drive motor, the third drive motor and the fourth drive motor are all N20 micro DC motors.
[0034] Preferably, the fan control circuit specifically includes a field effect transistor Q1, a field effect transistor Q2, a resistor R21, a resistor R22, a resistor R35, a diode D9 and an interface J12, the G pole of the field effect transistor Q1 is connected to an IO port of the main controller through the resistor R22, the S pole is connected to the G pole of the field effect transistor Q2 through the resistor R35, and the D pole is connected to a 3.3V power supply, one end of the resistor R21 is connected to the 3.3V power supply, and the other end is connected to the G pole of the field effect transistor Q1 through the resistor R22, the S pole of the field effect transistor Q2 is connected to the ground wire, the D pole is connected to the positive pole of the diode D9, and the negative pole of the diode D9 is connected to the 12V power supply, and the pins 1 and 2 of the interface J12 are both connected to the negative pole of the diode D9, and the pins 3 and 4 are both connected to the positive pole of the diode D9;
[0035] Interface J12 is connected to the fan;
[0036] The model of the main controller is STM32F407, and the model of the communication module is RS485. A method for automatically calibrating a quality detector for a biological safety cabinet comprises the following steps:
[0037] Step 1: Place the biosafety cabinet quality detector in the detection space, connect the mains power to the biosafety cabinet quality detector, select the correction mode through the touch screen, and the main controller controls the biosafety cabinet quality detector to enter the correction mode;
[0038] The specific process of the correction mode is as follows:
[0039] Step 1-1: Initialization phase:
[0040] Starting the system: The main controller first starts the fan installed in the main air duct through the fan control circuit, and collects data from the fifth wind speed sensor installed in the main air duct through the wind speed detection unit E, thereby obtaining the wind speed in the main air duct; at the same time, the pressure detection unit E collects data from the fifth pressure sensor installed in the main air duct, thereby obtaining the pressure value in the main air duct;
[0041] Similarly, the main controller obtains the wind speeds in the four branch air ducts through the first wind speed sensor, the second wind speed sensor, the third wind speed sensor, and the fourth wind speed sensor respectively;
[0042] The main controller obtains the pressure values in the four branch air ducts respectively through the first pressure sensor, the second pressure sensor, the third pressure sensor, and the fourth pressure sensor;
[0043] According to the obtained wind speed, calculate the flow rate in each air duct:
[0044] Q i =A i ×v i ;
[0045] Where Q is the flow rate; A is the cross-sectional area of the air duct, which is a preset value; v is the wind speed; i represents the number of the air duct, i = 1, 2, 3, 4, 5, where i = 5 represents the main air duct;
[0046] Record the initial flow of each branch air duct: Q1, Q2, Q3, Q4;
[0047] Step 1-2: The main controller calculates the error between the current flow rate and the target flow rate of each branch duct. The target flow rate is the expected flow rate:
[0048] e i (0) = Q i (0)-Q target ;
[0049] Among them, e i (0) is the calculated initial error, Q i (0) represents the initial flow rate; Q target The target traffic:
[0050] Q target =Q5÷4;
[0051] Q5 represents the flow rate of the main air duct;
[0052] Step 1-3: The main controller designs a PID controller for each branch air duct, the goal is to adjust the butterfly valve opening θ j Make the flow rate of each branch duct Qj Always keep it close to the set target value, and keep the values of j and i consistent:
[0053] The control equation of the PID controller is as follows:
[0054]
[0055] Among them, e j (t) = Q j (t)-Q target , represents the current flow error of duct j; K p , K i , K d are proportional, integral and differential gains respectively; Δu m (t) is the correction value calculated by the dynamic model of the air duct and fan, which is used to compensate for the nonlinear or dynamic characteristics of the system response; Δu c (t) is the adjustment calculated by interference compensation;
[0056] Δu m (t) = α × (Q pred1 (t)-Q measured (t));
[0057] Among them, α is a coefficient used to adjust the influence of the model correction on the butterfly valve opening; Q pred1 (t) is the predicted flow rate obtained based on dynamic modeling; Q measured (t) is the actual measured flow rate;
[0058] Δu c (t) = β × (Q pred2 (t)-Q measured (t));
[0059] Among them, β is a coefficient used to adjust the intensity of interference compensation, Q pred2 (t) is the predicted flow rate obtained by the flow prediction model; Q measured (t) is the actual measured flow rate;
[0060] Step 1-4: Update the butterfly valve opening θ of each branch air duct according to the adjustment amount calculated by PID i (t):
[0061] θ i (t) = θ prev +Δθ i (t);
[0062] Among them, θ prev is the previous butterfly valve opening, Δθ i (t) is the adjustment amount calculated by the PID controller;
[0063] Step 1-5: When executing steps 1-1 to 1-4, you need to wait for the airflow to stabilize, that is, wait for a certain time t after each adjustment of the butterfly valve. wait To ensure stable airflow, t wait Estimate by duct length and gas sound velocity:
[0064]
[0065] Where L2 is the length of the branch air duct, which is the preset value; v sound is the speed of sound of the gas, fixed at 343 m / s; τ is the inertial time constant of the system;
[0066] Waiting for wait After a certain time, re-measure the flow rate of each branch duct and calculate the error:
[0067] e i (t new )=Q i (t new )-Q target ;
[0068] e i (t new ) and the preset error tolerance threshold ∈ threshold For comparison, if e i (t new ) at the threshold ∈ threshold Inside, that is, e i (t new )≤∈ threshold , it means that the branch air duct i has reached the expected level;
[0069] Step 1-6: Repeat the process from step 1-1 to step 1-5 and continue iterative adjustment until the flow of all branch ducts is within the set threshold, that is, the condition Q is met. i In Q target ±∈ threshold Within, the adjustment process is considered complete;
[0070] Step 1-7: Record the final butterfly valve opening of each branch air duct as the default adjustment strategy and save it as the system default configuration;
[0071] Step 2: In actual use, the default adjustment strategy is preferred. If the adjustment fails to meet the condition Q i In Q target ±∈ threshold If the value is within the range, the correction mode method in step 1 is called to readjust.
[0072] Preferably, when performing steps 1-3, K p , Ki , K d The value of is adaptively adjusted according to the flow error, specifically:
[0073] Use the initial preset PID parameter K pbase , K ibase , K dbase Start the PID controller and calculate the flow error e j (t) size, real-time adjustment of PID parameters:
[0074] K p =K pbase ×(1+λ×|e j (t)∣);
[0075] K i =K ibase ×(1+λ×|e j (t)∣);
[0076] K d =K dbase ×(1+λ×|e j (t)∣);
[0077] Among them, λ is the adjustment coefficient.
[0078] Preferably, the predicted flow Q obtained by dynamic modeling pred1 The calculation formula of (t) is as follows:
[0079] Q pred1 (t) = C × N (t) × A;
[0080] Where C is the constant coefficient between the fan and the air duct, which is the factory preset value; A is the cross-sectional area of the air duct; N(t) is the speed of the fan;
[0081] N(t)=k1×ΔP(t)+k2;
[0082] Wherein, ΔP(t) is the pressure value change measured by the fifth pressure sensor, and k1 and k2 are both preset constants;
[0083] The predicted flow Q obtained by the flow prediction model pred2 The calculation formula of (t) is as follows:
[0084] Q pred2 (t) = a × θ(t) + b;
[0085] Among them, a and b are coefficients obtained by fitting historical data. Both a and b are factory preset values, and θ(t) is the current butterfly valve opening.
[0086] Preferably, the main controller monitors the stability of the working state of the biosafety cabinet quality detector according to the change in the pressure value in the four branch air ducts, generates a stability report, and uploads it to the host computer through the communication module.
[0087] The automatic calibration method of a biosafety cabinet quality detector described in the present invention solves the technical problem of automatically adjusting the flow of four branch air ducts. The present invention introduces an adaptive PID control method, which can adjust the control parameters according to the real-time flow error. By adaptively adjusting the PID gain parameters, the control strategy can be automatically optimized according to different operating states, effectively improving the system's responsiveness and adjustment accuracy, and reducing manual intervention. By establishing a dynamic model of the air duct and fan, the flow can be predicted in real time, and corrections can be made based on the deviation between the predicted value of the model and the actual flow. Dynamic modeling can not only improve the accuracy of flow regulation, but also effectively compensate for the nonlinearity and dynamic characteristics of the system, thereby better coping with environmental changes and interferences. High-precision pressure and wind speed sensors are used, combined with multi-channel The I2C bus communication ensures the real-time and accuracy of multi-point data collection. By calculating the flow rate of each air duct and comparing it with the target flow rate, the butterfly valve can be adjusted efficiently to ensure that the flow rate of all branch air ducts is equal and meets the set standard. When the system cannot meet the set flow accuracy, it can automatically enter the correction mode and readjust the flow rate of each air duct by dynamically adjusting the butterfly valve to ensure long-term stable operation of the system. This automatic correction function reduces the need for manual operation and improves the self-repair ability of the system. By accurately calculating the stabilization time of the airflow and predicting the flow rate, it can make more precise adjustments and provide real-time feedback and optimization according to environmental changes. The influence of interference factors such as fan speed and pressure fluctuations is minimized, thereby ensuring the stability of the system and precise control of the flow rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] Figure 1 It is a schematic block diagram of the present invention;
[0089] Figure 2 It is a schematic diagram of the external interface of the present invention;
[0090] Figure 3 It is a circuit diagram of the I2C bus of the present invention;
[0091] Figure 4 1 is a circuit diagram of a butterfly valve drive circuit A of the present invention;
[0092] Figure 5 is a circuit diagram of a fan control circuit of the present invention;
[0093] Figure 6 It is the main flow chart of the present invention. DETAILED DESCRIPTION
[0094] Example 1:
[0095] Depend on Figure 1-Figure 5 A biosafety cabinet quality detector shown in the figure includes a pressure detection unit A, a pressure detection unit B, a pressure detection unit C, a pressure detection unit D, a pressure detection unit E, a wind speed detection unit A, a wind speed detection unit B, a wind speed detection unit C, a wind speed detection unit D, a wind speed detection unit E, a fan control circuit, a main controller, a butterfly valve drive circuit A, a butterfly valve drive circuit B, a butterfly valve drive circuit C, a butterfly valve drive circuit D, a touch screen, a communication module and a power module. The power module supplies power to all pressure detection units, all wind speed detection units, the fan control circuit, the main controller, the touch screen, the communication module and all butterfly valve drive circuits.
[0096] The power supply module includes a 12V voltage regulator module, a 5V voltage regulator module and a 3.3V voltage regulator module. The input end of the 12V voltage regulator module is connected to the mains power and the output end outputs 12V power. The input end of the 5V voltage regulator module is connected to the 12V power supply and the output end outputs 5V power. The input end of the 3.3V voltage regulator module is connected to the 5V power supply and the output end outputs 3.3V power.
[0097] The model of the 12V voltage regulator module is LRS-35-12 switching power supply; the model of the 5V voltage regulator module is LM7805; and the model of the 3.3V voltage regulator module is AM1117.
[0098] Pressure detection unit A, pressure detection unit B, pressure detection unit C, and pressure detection unit D are all connected to the main controller via a first I2C bus, pressure detection unit E is connected to the main controller via a second I2C bus, wind speed detection unit A, wind speed detection unit B, wind speed detection unit C, and wind speed detection unit D are all connected to the main controller via a third I2C bus, and wind speed detection unit E is connected to the main controller via a fourth I2C bus;
[0099] The pressure detection unit A includes an interface J1, a capacitor C1, a resistor R1 and a resistor R5. The interface J1 is connected to an external first pressure sensor. Specifically, pin 4 of the interface J1 is connected to the power supply terminal of the first pressure sensor, pin 2 is connected to the SCL terminal of the first pressure sensor, pin 1 is connected to the SDA terminal of the first pressure sensor, and pin 3 is connected to the ground wire;
[0100] Pin 4 of interface J1 is also connected to a 3.3V power supply, a filter capacitor C1 is connected between pins 3 and 4, pins 2 and 1 are connected to a 3.3V power supply through resistors R1 and R5 respectively, and pins 2 and 1 of interface J1 are the SCL1 interface and SDA1 interface of the first I2C bus respectively, which are connected to a group of IO ports of the main controller;
[0101] The circuit principles of the pressure detection unit B, the pressure detection unit C, and the pressure detection unit D are the same as those of the pressure detection unit A, and are connected to the first I2C bus together with the pressure detection unit A; the pressure detection unit B, the pressure detection unit C, and the pressure detection unit D are respectively connected to the external second pressure sensor, the third pressure sensor, and the fourth pressure sensor;
[0102] The circuit principle of the pressure detection unit E is the same as that of the pressure detection unit A. The pressure detection unit E is connected to a group of IO ports of the main controller through the second I2C bus; the pressure detection unit E is connected to an external fifth pressure sensor;
[0103] The wind speed detection unit A includes an interface J5, a capacitor C5, a resistor R9, and a resistor R13. The interface J5 is connected to an external first wind speed sensor. Specifically, pin 4 of the interface 5 is connected to the power supply terminal of the first wind speed sensor, pin 2 is connected to the SCL terminal of the first wind speed sensor, pin 1 is connected to the SDA terminal of the first wind speed sensor, and pin 3 is connected to the ground wire.
[0104] Pin 4 of interface J5 is also connected to a 3.3V power supply, a filter capacitor C5 is connected between pins 3 and 4, pins 2 and 1 are connected to a 3.3V power supply through resistors R9 and R13 respectively, and pins 2 and 1 of interface J5 are the SCL3 interface and SDA3 interface of the third I2C bus respectively, which are connected to a group of IO ports of the main controller;
[0105] The circuit principles of the wind speed detection unit B, the wind speed detection unit C, and the wind speed detection unit D are the same as those of the wind speed detection unit A, and are connected to the third I2C bus together with the wind speed detection unit A; the wind speed detection unit B, the wind speed detection unit C, and the wind speed detection unit D are respectively connected to the external second wind speed sensor, the third wind speed sensor, and the fourth wind speed sensor;
[0106] The circuit principle of the wind speed detection unit E is the same as that of the wind speed detection unit A. The wind speed detection unit E is connected to an external fifth wind speed sensor via a fourth I2C bus.
[0107] The first wind speed sensor, the second wind speed sensor, the third wind speed sensor, the fourth wind speed sensor and the fifth wind speed sensor are all AWM720P1 digital wind speed sensors; the first pressure sensor, the second pressure sensor, the third pressure sensor, the fourth pressure sensor and the fifth pressure sensor are all BMP180 digital pressure sensors.
[0108] The fan control circuit is a 3.3V to 12V level drive circuit composed of field effect transistors Q1 and Q2. The G pole of field effect transistor Q1 is connected to an IO port of the main controller, and the S pole of field effect transistor Q1 drives field effect transistor Q2, which is used to control the opening or closing of the fan.
[0109] The fan control circuit specifically includes a field effect transistor Q1, a field effect transistor Q2, a resistor R21, a resistor R22, a resistor R35, a diode D9 and an interface J12. The G pole of the field effect transistor Q1 is connected to an IO port of the main controller through the resistor R22, the S pole is connected to the G pole of the field effect transistor Q2 through the resistor R35, and the D pole is connected to the 3.3V power supply. One end of the resistor R21 is connected to the 3.3V power supply, and the other end is connected to the G pole of the field effect transistor Q1 through the resistor R22. The S pole of the field effect transistor Q2 is connected to the ground wire, the D pole is connected to the positive pole of the diode D9, and the negative pole of the diode D9 is connected to the 12V power supply. Pins 1 and 2 of the interface J12 are both connected to the negative pole of the diode D9, and pins 3 and 4 are both connected to the positive pole of the diode D9;
[0110] Interface J12 is connected to the fan;
[0111] The model of the main controller is STM32F407, and the model of the communication module is RS485.
[0112] The butterfly valve drive circuit A includes an isolation drive circuit A and a motor driver A. The input end of the isolation drive circuit A is respectively connected to a group of IO ports of the main controller, and the output end drives the input end of the motor driver. The output end of the motor driver is connected to and drives an external first drive motor for controlling the opening or closing of the first butterfly valve.
[0113] The circuit principles of butterfly valve drive circuit B, butterfly valve drive circuit C, and butterfly valve drive circuit D are the same as those of butterfly valve drive circuit A. Butterfly valve drive circuit B, butterfly valve drive circuit C, and butterfly valve drive circuit D are respectively connected to different IO ports of the main controller, and respectively drive the second drive motor for controlling the second butterfly valve, the third drive motor for controlling the third butterfly valve, and the fourth drive motor for controlling the fourth butterfly valve. The touch screen and the communication module are both connected to the main controller.
[0114] The motor driver A includes a driver chip IC1, a diode D1, a diode D2, a diode D3, a diode D4, a diode D5, a diode D6, a diode D7, a diode D8, a capacitor C12 and an interface J9;
[0115] The isolation drive circuit A includes a 6-way photoelectric isolation circuit consisting of an optocoupler U20, an optocoupler U21, an optocoupler U22, an optocoupler U23, an optocoupler U24 and an optocoupler U25 and their corresponding peripheral circuits;
[0116] The IN1, IN2, IN3, IN4, ENA and ENB terminals of the driver chip IC1 are connected to different IO ports of the main controller through optical couplers U20, U21, U22, U23, U24 and U25 respectively;
[0117] Connect the OUT1, OUT2, OUT3, and OUT4 terminals of the driver chip IC1 to pins 5, 4, 3, and 2 of the interface J9, respectively. Connect pin 6 of the interface J9 to the 12V power supply and pin 1 to the ground wire. Connect the ISENA, ISENB, and GND terminals of the driver chip IC1 to the ground wire.
[0118] The positive electrode of diode D1 is connected to the OUT4 terminal of driver chip IC1, and the negative electrode is connected to the 12V power supply. The negative electrode of diode D2 is connected to the OUT4 terminal of driver chip IC1, and the positive electrode is connected to the ground wire.
[0119] The anode of diode D3 is connected to the OUT3 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D4 is connected to the OUT3 terminal of driver chip IC1, and the anode is connected to the ground wire.
[0120] The anode of diode D5 is connected to the OUT2 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D6 is connected to the OUT2 terminal of driver chip IC1, and the anode is connected to the ground wire.
[0121] The anode of diode D7 is connected to the OUT1 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D8 is connected to the OUT1 terminal of driver chip IC1, and the anode is connected to the ground wire.
[0122] The VSS terminal of the driver chip IC1 is connected to a 5V power supply, and the VS terminal is connected to a 12V power supply. Capacitor C12 is a ground capacitor for the VSS terminal of the driver chip IC1.
[0123] The model of the driver chip IC1 is L298N DC motor driver, and the models of the first drive motor, the second drive motor, the third drive motor and the fourth drive motor are all N20 micro DC motors.
[0124] In this embodiment, the butterfly valve drive circuit B, the butterfly valve drive circuit C and the butterfly valve drive circuit D are respectively provided with a drive chip IC2, a drive chip IC3, a drive chip IC4 and a drive chip IC5, and the model is L298N DC motor driver.
[0125] Example 2:
[0126] like Figure 6As shown, the automatic calibration method of a biosafety cabinet quality detector described in Example 2 is implemented on the basis of the biosafety cabinet quality detector described in Example 1, and includes the following steps:
[0127] Step 1: Place the biosafety cabinet quality detector in the detection space, connect the mains power to the biosafety cabinet quality detector, select the correction mode through the touch screen, and the main controller controls the biosafety cabinet quality detector to enter the correction mode;
[0128] The specific process of the correction mode is as follows:
[0129] Step 1-1: Initialization phase:
[0130] Starting the system: The main controller first starts the fan installed in the main air duct through the fan control circuit, and collects data from the fifth wind speed sensor installed in the main air duct through the wind speed detection unit E, thereby obtaining the wind speed in the main air duct; at the same time, the pressure detection unit E collects data from the fifth pressure sensor installed in the main air duct, thereby obtaining the pressure value in the main air duct;
[0131] Similarly, the main controller obtains the wind speeds in the four branch air ducts through the first wind speed sensor, the second wind speed sensor, the third wind speed sensor, and the fourth wind speed sensor respectively;
[0132] The main controller obtains the pressure values in the four branch air ducts respectively through the first pressure sensor, the second pressure sensor, the third pressure sensor, and the fourth pressure sensor;
[0133] According to the obtained wind speed, calculate the flow rate in each air duct:
[0134] Q i =A i ×v i ;
[0135] Where Q is the flow rate; A is the cross-sectional area of the air duct, which is a preset value; v is the wind speed; i represents the number of the air duct, i = 1, 2, 3, 4, 5, where i = 5 represents the main air duct;
[0136] Record the initial flow of each branch air duct: Q1, Q2, Q3, Q4;
[0137] Step 1-2: The main controller calculates the error between the current flow rate and the target flow rate of each branch duct. The target flow rate is the expected flow rate:
[0138] e i (0) = Q i (0)-Q target ;
[0139] Among them, e i(0) is the calculated initial error, Q i (0) represents the initial flow rate; Q target The target traffic:
[0140] Q target =Q5÷4;
[0141] Q5 represents the flow rate of the main air duct;
[0142] Step 1-3: The main controller designs a PID controller for each branch air duct, the goal is to adjust the butterfly valve opening θ j Make the flow rate of each branch duct Q j Always keep it close to the set target value, and keep the values of j and i consistent:
[0143] The control equation of the PID controller is as follows:
[0144]
[0145] Among them, e j (t) = Q j (t)-Q target , represents the current flow error of duct j; K p , K i , K d are proportional, integral and differential gains respectively;
[0146] K p , K i , K d The value of is adaptively adjusted according to the flow error, specifically:
[0147] Use the initial preset PID parameter K pbase , K ibase , K dbase Start the PID controller and calculate the flow error e j (t) size, real-time adjustment of PID parameters:
[0148] K p =K pbase ×(1+λ×|e j (t)∣);
[0149] K i =K ibase ×(1+λ×|e j (t)∣);
[0150] K d =K dbase ×(1+λ×|e j (t)∣);
[0151] Among them, λ is the adjustment coefficient.
[0152] Δu m (t) is the correction value calculated by the dynamic model of the air duct and fan, which is used to compensate for the nonlinear or dynamic characteristics of the system response; Δu c (t) is the adjustment calculated by interference compensation;
[0153] Δu m (t) = α × (Q pred1 (t)-Q measured (t));
[0154] Among them, α is a coefficient used to adjust the influence of the model correction on the butterfly valve opening; Q pred1 (t) is the predicted flow rate obtained based on dynamic modeling; Q measured (t) is the actual measured flow rate;
[0155] Δu c (t) = β × (Q pred2 (t)-Q measured (t));
[0156] Among them, β is a coefficient used to adjust the intensity of interference compensation, Q pred2 (t) is the predicted flow rate obtained by the flow prediction model; Q measured (t) is the actual measured flow rate;
[0157] The predicted flow Q obtained by dynamic modeling pred1 The calculation formula of (t) is as follows:
[0158] Q pred1 (t) = C × N (t) × A;
[0159] Where C is the constant coefficient between the fan and the air duct, which is the factory preset value; A is the cross-sectional area of the air duct; N(t) is the speed of the fan;
[0160] N(t)=k1×ΔP(t)+k2;
[0161] Wherein, ΔP(t) is the pressure value change measured by the fifth pressure sensor, and k1 and k2 are both preset constants;
[0162] In this embodiment, the fan speed N(t) is estimated based on the pressure change in the air duct, and compensation is performed based on the relationship between wind speed and pressure. The estimated value of the fan speed and the cross-sectional area of the air duct are combined to calculate the predicted flow rate Q. pred1 (t), which provides more accurate input for the PID control algorithm, making flow control more precise.
[0163] The predicted flow Q obtained by the flow prediction model pred2The calculation formula of (t) is as follows:
[0164] Q pred2 (t) = a × θ(t) + b;
[0165] Among them, a and b are coefficients obtained by fitting historical data. Both a and b are factory preset values, and θ(t) is the current butterfly valve opening.
[0166] Step 1-4: Update the butterfly valve opening θ of each branch air duct according to the adjustment amount calculated by PID i (t):
[0167] θ i (t) = θ prev +Δθ i (t);
[0168] Among them, θ prev is the previous butterfly valve opening, Δθ i (t) is the adjustment amount calculated by the PID controller;
[0169] Step 1-5: When executing steps 1-1 to 1-4, you need to wait for the airflow to stabilize, that is, wait for a certain time t after each adjustment of the butterfly valve. wait To ensure stable airflow, t wait Estimate by duct length and gas sound velocity:
[0170]
[0171] Where L2 is the length of the branch air duct, which is the preset value; v sound is the speed of sound of the gas, fixed at 343 m / s; τ is the inertial time constant of the system;
[0172] Waiting for wait After a certain time, re-measure the flow rate of each branch duct and calculate the error:
[0173] e i (t new )=Q i (t new )-Q target ;
[0174] e i (t new ) and the preset error tolerance threshold ∈ threshold For comparison, if e i (t new ) at the threshold ∈ threshold Inside, that is, e i (t new )≤∈ threshold , it means that the branch air duct i has reached the expected level;
[0175] Step 1-6: Repeat the process from step 1-1 to step 1-5 and continue iterative adjustment until the flow of all branch ducts is within the set threshold, that is, the condition Q is met. i In Q target ±∈ threshold Within, the adjustment process is considered complete;
[0176] Step 1-7: Record the final butterfly valve opening of each branch air duct as the default adjustment strategy and save it as the system default configuration;
[0177] Step 2: In actual use, the default adjustment strategy is preferred. If the adjustment fails to meet the condition Q i In Q target ±∈ threshold If the value is within the range, the correction mode method in step 1 is called to readjust.
[0178] The main controller monitors the stability of the working state of the biosafety cabinet quality detector according to the changes in the pressure values in the four branch air ducts, generates a stability report, and uploads it to the host computer through the communication module.
[0179] The automatic calibration method of a biosafety cabinet quality detector described in the present invention solves the technical problem of automatically adjusting the flow of four branch air ducts. The present invention introduces an adaptive PID control method, which can adjust the control parameters according to the real-time flow error. By adaptively adjusting the PID gain parameters, the control strategy can be automatically optimized according to different operating states, effectively improving the system's responsiveness and adjustment accuracy, and reducing manual intervention. By establishing a dynamic model of the air duct and fan, the flow can be predicted in real time, and corrections can be made based on the deviation between the predicted value of the model and the actual flow. Dynamic modeling can not only improve the accuracy of flow regulation, but also effectively compensate for the nonlinearity and dynamic characteristics of the system, thereby better coping with environmental changes and interferences. High-precision pressure and wind speed sensors are used, combined with multi-channel The I2C bus communication ensures the real-time and accuracy of multi-point data collection. By calculating the flow rate of each air duct and comparing it with the target flow rate, the butterfly valve can be adjusted efficiently to ensure that the flow rate of all branch air ducts is equal and meets the set standard. When the system cannot meet the set flow accuracy, it can automatically enter the correction mode and readjust the flow rate of each air duct by dynamically adjusting the butterfly valve to ensure long-term stable operation of the system. This automatic correction function reduces the need for manual operation and improves the self-repair ability of the system. By accurately calculating the stabilization time of the airflow and predicting the flow rate, it can make more precise adjustments and provide real-time feedback and optimization according to environmental changes. The influence of interference factors such as fan speed and pressure fluctuations is minimized, thereby ensuring the stability of the system and precise control of the flow rate.
Claims
1. A method for automatically calibrating a biosafety cabinet quality detector, characterized by: The biosafety cabinet quality detector includes a pressure detection unit A, a pressure detection unit B, a pressure detection unit C, a pressure detection unit D, a pressure detection unit E, a wind speed detection unit A, a wind speed detection unit B, a wind speed detection unit C, a wind speed detection unit D, a wind speed detection unit E, a fan control circuit, a main controller, a butterfly valve drive circuit A, a butterfly valve drive circuit B, a butterfly valve drive circuit C, a butterfly valve drive circuit D, a touch screen, a communication module and a power supply module. The pressure detection unit A, the pressure detection unit B, the pressure detection unit C and the pressure detection unit D are all connected to the main controller through a first I2C bus, the pressure detection unit E is connected to the main controller through a second I2C bus, the wind speed detection unit A, the wind speed detection unit B, the wind speed detection unit C and the wind speed detection unit D are all connected to the main controller through a third I2C bus, and the wind speed detection unit E is connected to the main controller through a fourth I2C bus; The fan control circuit is a 3.3V to 12V level drive circuit composed of field effect transistors Q1 and Q2. The G pole of field effect transistor Q1 is connected to an IO port of the main controller, and the S pole of field effect transistor Q1 drives field effect transistor Q2, which is used to control the opening or closing of the fan. The butterfly valve drive circuit A includes an isolation drive circuit A and a motor driver A. The input end of the isolation drive circuit A is respectively connected to a group of IO ports of the main controller, and the output end drives the input end of the motor driver. The output end of the motor driver is connected to and drives an external first drive motor for controlling the opening or closing of the first butterfly valve. The circuit principles of butterfly valve drive circuit B, butterfly valve drive circuit C, and butterfly valve drive circuit D are the same as those of butterfly valve drive circuit A. Butterfly valve drive circuit B, butterfly valve drive circuit C, and butterfly valve drive circuit D are respectively connected to different IO ports of the main controller, and respectively drive the second drive motor for controlling the second butterfly valve, the third drive motor for controlling the third butterfly valve, and the fourth drive motor for controlling the fourth butterfly valve. The touch screen and the communication module are both connected to the main controller. The power module supplies power to all pressure detection units, all wind speed detection units, fan control circuits, main controllers, touch screens, communication modules and all butterfly valve drive circuits; The automatic correction method includes the following steps: Step 1: Place the biosafety cabinet quality detector in the detection space, connect the mains power to the biosafety cabinet quality detector, select the calibration mode through the touch screen, and the main controller controls the biosafety cabinet quality detector to enter the calibration mode; The specific process of the correction mode is as follows: Step 1-1: Initialization phase: Starting the system: The main controller first starts the fan installed in the main air duct through the fan control circuit, and collects data from the fifth wind speed sensor installed in the main air duct through the wind speed detection unit E, thereby obtaining the wind speed in the main air duct; at the same time, the pressure detection unit E collects data from the fifth pressure sensor installed in the main air duct, thereby obtaining the pressure value in the main air duct; Similarly, the main controller obtains the wind speeds in the four branch air ducts through the first wind speed sensor, the second wind speed sensor, the third wind speed sensor, and the fourth wind speed sensor respectively; The main controller obtains the pressure values in the four branch air ducts respectively through the first pressure sensor, the second pressure sensor, the third pressure sensor, and the fourth pressure sensor; According to the obtained wind speed, calculate the flow rate in each air duct: Q i =A i ×v i ; Where Q is the flow rate; A is the cross-sectional area of the air duct, which is a preset value; v is the wind speed; i represents the number of the air duct, i = 1, 2, 3, 4, 5, where i = 5 represents the main air duct; Record the initial flow of each branch air duct: Q1, Q2, Q3, Q4; Step 1-2: The main controller calculates the error between the current flow rate and the target flow rate of each branch duct. The target flow rate is the expected flow rate: e i (0)=Q i (0)-Q target ; Among them, e i (0) is the calculated initial error, Q i (0) represents the initial flow rate; Q target The target traffic: Q target =Q5÷4; Q5 represents the flow rate of the main air duct; Step 1-3: The main controller designs a PID controller for each branch air duct, the goal is to adjust the butterfly valve opening θ j Make the flow rate of each branch duct Q j Always keep it close to the set target value, and keep the values of j and i consistent: The control equation of the PID controller is as follows: Among them, e j (t) = Q j (t)-Q target , represents the current flow error of air duct j; K p , K i , K d are proportional, integral and differential gains respectively; Δu m (t) is the correction value calculated by the dynamic model of the air duct and fan, which is used to compensate for the nonlinear or dynamic characteristics of the system response; Δu c (t) is the adjustment calculated by interference compensation; Δu m (t)=α×(Q pred1 (t)-Q measured (t)); Among them, α is a coefficient used to adjust the influence of the model correction on the butterfly valve opening; Q pred1 (t) is the predicted flow rate obtained based on dynamic modeling; Q measured (t) is the actual measured flow rate; Δu c (t)=β×(Q pred2 (t)-Q measured (t)); Among them, β is a coefficient used to adjust the intensity of interference compensation, Q pred2 (t) is the predicted flow rate obtained by the flow prediction model; Q measured (t) is the actual measured flow rate; Step 1-4: Update the butterfly valve opening θ of each branch air duct according to the adjustment amount calculated by PID i (t): i i (t)=θ prev +Δθ i (t); Among them, θ prev is the previous butterfly valve opening, Δθ i (t) is the adjustment amount calculated by the PID controller; Step 1-5: When executing steps 1-1 to 1-4, you need to wait for the airflow to stabilize, that is, wait for a certain time t after each adjustment of the butterfly valve. wait To ensure stable airflow, t wait Estimate by duct length and gas sound velocity: Where L2 is the length of the branch air duct, which is the preset value; v sound is the speed of sound of the gas, fixed at 343 m / s; τ is the inertial time constant of the system; Waiting for wait After a certain time, re-measure the flow rate of each branch duct and calculate the error: e i (t new )=Q i (t new )-Q target ; e i (t new ) and the preset error tolerance threshold ∈ threshold For comparison, if e i (t new ) at the threshold ∈ threshold Inside, that is, e i (t new )≤∈ threshold , it means that the branch air duct i has reached the expected level; Step 1-6: Repeat the process from step 1-1 to step 1-5 and continue iterative adjustment until the flow of all branch ducts is within the set threshold, that is, the condition Q is met. i In Q target ±∈ threshold Within, the adjustment process is considered complete; Step 1-7: Record the final butterfly valve opening of each branch air duct as the default adjustment strategy and save it as the system default configuration; Step 2: In actual use, the default adjustment strategy is preferred. If the adjustment fails to meet the condition Q i In Q target ±∈ threshold If the value is within the range, the correction mode method in step 1 is called to readjust.
2. The automatic calibration method for a biosafety cabinet quality detector according to claim 1, characterized in that: The power supply module includes a 12V voltage regulator module, a 5V voltage regulator module and a 3.3V voltage regulator module. The input end of the 12V voltage regulator module is connected to the mains power and the output end outputs 12V power. The input end of the 5V voltage regulator module is connected to the 12V power supply and the output end outputs 5V power. The input end of the 3.3V voltage regulator module is connected to the 5V power supply and the output end outputs 3.3V power. The model of the 12V voltage regulator module is LRS-35-12 switching power supply; the model of the 5V voltage regulator module is LM7805; and the model of the 3.3V voltage regulator module is AM1117.
3. The automatic calibration method for a biosafety cabinet quality detector according to claim 2, characterized in that: The pressure detection unit A includes an interface J1, a capacitor C1, a resistor R1 and a resistor R5. The interface J1 is connected to an external first pressure sensor. Specifically, pin 4 of the interface J1 is connected to the power supply terminal of the first pressure sensor, pin 2 is connected to the SCL terminal of the first pressure sensor, pin 1 is connected to the SDA terminal of the first pressure sensor, and pin 3 is connected to the ground wire; Pin 4 of interface J1 is also connected to a 3.3V power supply, a filter capacitor C1 is connected between pins 3 and 4, pins 2 and 1 are connected to a 3.3V power supply through resistors R1 and R5 respectively, and pins 2 and 1 of interface J1 are the SCL1 interface and SDA1 interface of the first I2C bus respectively, which are connected to a group of IO ports of the main controller; The circuit principles of the pressure detection unit B, the pressure detection unit C, and the pressure detection unit D are the same as those of the pressure detection unit A, and are connected to the first I2C bus together with the pressure detection unit A; the pressure detection unit B, the pressure detection unit C, and the pressure detection unit D are respectively connected to the external second pressure sensor, the third pressure sensor, and the fourth pressure sensor; The circuit principle of the pressure detection unit E is the same as that of the pressure detection unit A. The pressure detection unit E is connected to a group of IO ports of the main controller through the second I2C bus; the pressure detection unit E is connected to an external fifth pressure sensor; The wind speed detection unit A includes an interface J5, a capacitor C5, a resistor R9, and a resistor R13. The interface J5 is connected to an external first wind speed sensor. Specifically, pin 4 of the interface 5 is connected to the power supply terminal of the first wind speed sensor, pin 2 is connected to the SCL terminal of the first wind speed sensor, pin 1 is connected to the SDA terminal of the first wind speed sensor, and pin 3 is connected to the ground wire. Pin 4 of interface J5 is also connected to a 3.3V power supply, a filter capacitor C5 is connected between pins 3 and 4, pins 2 and 1 are connected to a 3.3V power supply through resistors R9 and R13 respectively, and pins 2 and 1 of interface J5 are the SCL3 interface and SDA3 interface of the third I2C bus respectively, which are connected to a group of IO ports of the main controller; The circuit principles of the wind speed detection unit B, the wind speed detection unit C, and the wind speed detection unit D are the same as those of the wind speed detection unit A, and are connected to the third I2C bus together with the wind speed detection unit A; the wind speed detection unit B, the wind speed detection unit C, and the wind speed detection unit D are respectively connected to the external second wind speed sensor, the third wind speed sensor, and the fourth wind speed sensor; The circuit principle of the wind speed detection unit E is the same as that of the wind speed detection unit A. The wind speed detection unit E is connected to an external fifth wind speed sensor; The first wind speed sensor, the second wind speed sensor, the third wind speed sensor, the fourth wind speed sensor and the fifth wind speed sensor are all AWM720P1 digital wind speed sensors; the first pressure sensor, the second pressure sensor, the third pressure sensor, the fourth pressure sensor and the fifth pressure sensor are all BMP180 digital pressure sensors.
4. The automatic calibration method for a biosafety cabinet quality detector according to claim 2, wherein: The motor driver A includes a driver chip IC1, a diode D1, a diode D2, a diode D3, a diode D4, a diode D5, a diode D6, a diode D7, a diode D8, a capacitor C12 and an interface J9; The isolation drive circuit A includes a 6-way photoelectric isolation circuit consisting of an optocoupler U20, an optocoupler U21, an optocoupler U22, an optocoupler U23, an optocoupler U24 and an optocoupler U25 and their corresponding peripheral circuits; The IN1, IN2, IN3, IN4, ENA and ENB terminals of the driver chip IC1 are connected to different IO ports of the main controller through optical couplers U20, U21, U22, U23, U24 and U25 respectively; Connect the OUT1, OUT2, OUT3 and OUT4 terminals of the driver chip IC1 to pins 5, 4, 3 and 2 of the interface J9 respectively. Connect pin 6 of the interface J9 to the 12V power supply and pin 1 to the ground wire. The ISENA, ISENB and GND terminals of the driver chip IC1 are all connected to the ground wire; The positive electrode of diode D1 is connected to the OUT4 terminal of driver chip IC1, and the negative electrode is connected to the 12V power supply. The negative electrode of diode D2 is connected to the OUT4 terminal of driver chip IC1, and the positive electrode is connected to the ground wire. The anode of diode D3 is connected to the OUT3 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D4 is connected to the OUT3 terminal of driver chip IC1, and the anode is connected to the ground wire. The anode of diode D5 is connected to the OUT2 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D6 is connected to the OUT2 terminal of driver chip IC1, and the anode is connected to the ground wire. The anode of diode D7 is connected to the OUT1 terminal of driver chip IC1, and the cathode is connected to the 12V power supply. The cathode of diode D8 is connected to the OUT1 terminal of driver chip IC1, and the anode is connected to the ground wire. The VSS terminal of the driver chip IC1 is connected to a 5V power supply, and the VS terminal is connected to a 12V power supply. Capacitor C12 is a ground capacitor for the VSS terminal of the driver chip IC1. The model of the driver chip IC1 is L298N DC motor driver, and the models of the first drive motor, the second drive motor, the third drive motor and the fourth drive motor are all N20 micro DC motors.
5. The automatic calibration method for a biosafety cabinet quality detector according to claim 2, wherein: The fan control circuit specifically includes a field effect transistor Q1, a field effect transistor Q2, a resistor R21, a resistor R22, a resistor R35, a diode D9 and an interface J12. The G pole of the field effect transistor Q1 is connected to an IO port of the main controller through the resistor R22, the S pole is connected to the G pole of the field effect transistor Q2 through the resistor R35, and the D pole is connected to the 3.3V power supply. One end of the resistor R21 is connected to the 3.3V power supply, and the other end is connected to the G pole of the field effect transistor Q1 through the resistor R22. The S pole of the field effect transistor Q2 is connected to the ground wire, the D pole is connected to the positive pole of the diode D9, and the negative pole of the diode D9 is connected to the 12V power supply. Pins 1 and 2 of the interface J12 are both connected to the negative pole of the diode D9, and pins 3 and 4 are both connected to the positive pole of the diode D9; Interface J12 is connected to the fan; The model of the main controller is STM32F407, and the model of the communication module is RS485.
6. The automatic calibration method for a biosafety cabinet quality detector according to claim 1, wherein: When executing steps 1-3, K p , K i , K d The value of is adaptively adjusted according to the flow error, specifically: Use the initial preset PID parameter K pbase , K ibase , K dbase Start the PID controller and calculate the flow error e j (t) size, real-time adjustment of PID parameters: K p =K pbase ×(1+λ×∣e j (t)∣); K i =K ibase ×(1+λ×∣e j (t)∣); K d =K dbase ×(1+λ×∣e j (t)∣); Among them, λ is the adjustment coefficient.
7. The automatic calibration method for a biosafety cabinet quality detector according to claim 1, wherein: The predicted flow Q obtained by dynamic modeling pred1 The calculation formula of (t) is as follows: Q pred1 (t)=C×N(t)×A; Where C is the constant coefficient between the fan and the air duct, which is the factory preset value; A is the cross-sectional area of the air duct; N(t) is the speed of the fan; N(t)=k1×ΔP(t)+k2; Wherein, ΔP(t) is the pressure value change measured by the fifth pressure sensor, and k1 and k2 are both preset constants; The predicted flow Q obtained by the flow prediction model pred2 The calculation formula of (t) is as follows: Q pred2 (t)=a×θ(t)+b; Among them, a and b are coefficients obtained by fitting historical data. Both a and b are factory preset values, and θ(t) is the current butterfly valve opening.
8. The automatic calibration method for a biosafety cabinet quality detector according to claim 1, wherein: The main controller monitors the stability of the working state of the biosafety cabinet quality detector according to the changes in the pressure values in the four branch air ducts, generates a stability report, and uploads it to the host computer through the communication module.