Crystal triode quality detection system and method based on STM32 microcontroller

Through the data acquisition and voltage signal processing of the STM32 microcontroller, automatic identification and accurate detection of transistor tube types, pins and quality are realized, solving the problems of manual dependence and insufficient accuracy in the existing technology, and improving detection efficiency and accuracy.

CN120577663AInactive Publication Date: 2025-09-02GUILIN UNIV OF AEROSPACE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510704841.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing transistor detection technology has problems such as relying on manual experience in tube type identification, insufficient parameter detection accuracy, and lack of quantitative standards for quality judgment.

Method used

The data acquisition module of the STM32 microcontroller is used to cooperate with the analog-to-digital converter to automatically identify the transistor tube type and base position through voltage signal acquisition and comparison, calculate the static working point amplification and mass parameters, and display the results through OLED.

Benefits of technology

It realizes the automation and precision of transistor detection, improves detection efficiency and accuracy, reduces hardware costs, simplifies operating procedures, and has intelligent recognition capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120577663A_ABST
    Figure CN120577663A_ABST
Patent Text Reader

Abstract

The invention discloses a crystal triode quality detection system and method based on an STM32 microcontroller, and relates to the technical field of electronic component detection. The system comprises a data acquisition module which outputs multiple groups of level signals through an I / O port of a microprocessor and acquires pin voltage data; the microprocessor module is used for analyzing and determining the polarity type and the base electrode position of the triode based on the conduction characteristic, determining a collector electrode and an emitter electrode through voltage comparison, calculating the amplification factor of a quiescent working point and judging the quality grade in combination with a preset threshold value; and the display module outputs a detection result through a serial communication interface. The method comprises the steps of system initialization, level output combination generation, pin voltage acquisition, tube type and pin judgment, amplification factor calculation, quality grade judgment and result display. The implementation effect shows that the tube type identification accuracy is higher, the amplification factor detection error is smaller, the single detection period is shorter, and automatic detection and quantitative quality judgment of triode parameters are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic component detection, and in particular to a crystal triode quality detection system and method based on an STM32 microcontroller. Background Art

[0002] A transistor, also known as a triode, bipolar transistor, or semiconductor triode, is a semiconductor device that controls current. Its function is to amplify weak signals into electrical signals with larger amplitudes. It is also used as a contactless switch. The transistor is one of the basic semiconductor components, has the function of current amplification, and is a core component of electronic circuits. Therefore, its parameters and quality requirements are strictly enforced in high-precision circuit design.

[0003] Existing transistor testing technology has the following limitations: ① Transistor characteristic tracers are only suitable for testing transistors of known tube types; ② Multimeter testing requires manual analysis of the on-state voltage and amplification factor, resulting in insufficient detection accuracy; ③ There is a lack of quantitative quality judgment standards; ④ Pin polarity identification relies on operator experience. Summary of the Invention

[0004] (1) Technical problems solved

[0005] To solve the above problems, the present invention provides a transistor quality detection system and method based on an STM32 microcontroller, which solves the technical defects in the prior art, such as the reliance on manual experience for transistor type identification, insufficient parameter detection accuracy, and lack of quantitative standards for quality determination.

[0006] (2) Technical solution

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] A crystal transistor quality detection system based on an STM32 microcontroller, comprising:

[0009] The data acquisition module uses the I / O port of the STM32F103C8T6 microprocessor in conjunction with an analog-to-digital converter to output multiple sets of level signals to the transistor pins and collect voltage data;

[0010] The microprocessor module is used to determine the transistor type and base position based on the collected data, determine the collector and emitter through voltage comparison, and calculate the static operating point amplification factor and quality parameters;

[0011] The display module uses an OLED display to display the test results, including pin polarity, magnification, and quality judgment.

[0012] Preferably, the method for the microprocessor module to determine the tube type and the base includes:

[0013] Apply a high-level signal to the hypothetical base pin and a low-level signal to the other two pins respectively;

[0014] The actual position of the base and the polarity type of the transistor are determined by detecting the conduction voltage value.

[0015] Preferably, the method for determining the collector and emitter includes:

[0016] When it is determined to be an NPN transistor, a high level is applied to the base and the first unknown pin, a low level is applied to the second unknown pin, and the voltage value of the first unknown pin is collected;

[0017] Swapping the power supply levels of the first unknown pin and the second unknown pin, and collecting the voltage value of the second unknown pin;

[0018] The collector and emitter are determined by comparing the two collected voltage values.

[0019] Preferably, the method for determining the collector and emitter includes:

[0020] When it is determined to be a PNP transistor, a low level is applied to the base, a high level is applied to the first unknown pin, a low level is applied to the second unknown pin, and the voltage value of the first unknown pin is collected;

[0021] Swapping the power supply levels of the first unknown pin and the second unknown pin, and collecting the voltage value of the second unknown pin;

[0022] The collector and emitter are determined by comparing the two collected voltage values.

[0023] Preferably, the amplification factor is calculated using a static operating point analysis method, satisfying the following relationship:

[0024] HFE=I_C / I_B

[0025] Where I_C is the collector current and I_B is the base current, which are calculated using the collected voltage value and the preset resistance value.

[0026] Preferably, the quality judgment is achieved by comparing the calculated magnification with a preset threshold range, and when the magnification is lower than the lower threshold or higher than the upper threshold, it is judged as unqualified.

[0027] Preferably, the display module is configured to 2 C communication protocol is connected to the microprocessor to display the pin polarity distribution diagram of the transistor, the amplification value and the quality judgment result in real time.

[0028] A method for detecting the quality of a transistor, applied to the above system, comprises the following steps:

[0029] (a) System initialization steps: configure the microprocessor I / O port working mode, initialize the analog-to-digital converter and display module;

[0030] (b) Level output step: outputting a preset level combination to the transistor pins through the microprocessor I / O port;

[0031] (c) Data acquisition step: collecting voltage data of each pin and converting it into a digital signal;

[0032] (d) Transistor type determination step: Determine the transistor polarity type and base position based on the conduction characteristic analysis;

[0033] (e) Pin determination step: determine the collector and emitter by voltage comparison;

[0034] (f) Parameter calculation step: Calculate the static operating point amplification factor based on the collected voltage;

[0035] (g) quality determination step: comparing the magnification with a preset threshold range to determine the quality level;

[0036] (h) Result display step: output the pin polarity distribution, magnification and quality judgment results through the display module.

[0037] Preferably, the step (d) specifically comprises:

[0038] (d1) Assume that any pin is the base and apply a high-level signal to it;

[0039] (d2) Apply low-level signals to the remaining two pins respectively;

[0040] (d3) detecting whether the on-state voltage value satisfies the PN junction conduction condition;

[0041] (d4) when the conduction condition is not met, replace the hypothetical base and repeat steps (d2)-(d3);

[0042] (d5) Determine the actual base position and tube type based on the detection result of successful conduction.

[0043] Preferably, after step (h), a cycle detection step is further included:

[0044] The detection port status is continuously monitored. When it is detected that the transistor has been removed, the display content is cleared and steps (b) to (h) are re-executed to detect a new device.

[0045] (3) Beneficial effects

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] By using this transistor quality detection system based on the STM32 microcontroller, the system integration is higher, which solves the technical defects of the existing technology such as tube type identification relying on manual experience, insufficient parameter detection accuracy, and lack of quantitative standards for quality judgment.

[0048] By using this transistor quality inspection system based on the STM32 microcontroller, the inspection process is made more coherent, the inspection process is fully automated, and real-time response in interrupt mode is supported.

[0049] Compared with traditional detection methods, the detection system and method of the present invention greatly improve detection efficiency, do not require tedious manual operations and complex analysis, and can quickly obtain detection results; the detection accuracy is higher, and errors are reduced through precise data collection and scientific algorithm analysis.

[0050] The system has low cost and utilizes the rich resources of the STM32F103C8T6 microprocessor to reduce external components and lower hardware costs. At the same time, the system is easy to operate and can be used without professional personnel. The test results are displayed intuitively and are easy to understand. In addition, the system has a certain degree of intelligence and can automatically identify tube types and pins and judge quality, which has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0052] Figure 1 The system hardware structure block diagram of the present invention is shown: showing the composition structure of the system hardware, including the microprocessor minimum system, pin voltage acquisition circuit, and OLED display circuit;

[0053] Figure 2 The STM32F103C8T6 microprocessor minimum system diagram of the present invention is shown: the circuit layout of the STM32F103C8T6 microprocessor minimum system is shown, including a power supply circuit, a crystal oscillator circuit, a startup circuit, and a reset circuit;

[0054] Figure 3 The pin automatic identification circuit diagram of the present invention is shown: the structure of the pin automatic identification circuit is shown, including the connection method of the protection resistor and resistors of different resistance values;

[0055] Figure 4 The OLED connection circuit diagram of the present invention is shown: showing the connection method between the OLED display screen and the microprocessor, including the connection of the SCL, SDA, VCC, GND and other pins;

[0056] Figure 5The main control program flow chart of the present invention is shown: it shows the execution process of the main control program, including system initialization, port detection, detection program call, result display and other links;

[0057] Figure 6 The flow chart of the tube type identification program of the present invention is shown: it shows the judgment process of the tube type identification program, from assuming the base to detecting the conduction status of the tube pin, and then to determining the tube type and base;

[0058] Figure 7 The flowchart of the pin position determination program of the present invention is shown: showing the process of the pin position determination program determining the pin position by comparing the voltage values ​​based on the known tube type and base;

[0059] Figure 8 A schematic diagram of a display interface for detection results after the present invention detects a transistor is shown. DETAILED DESCRIPTION

[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0061] See attached Figure 1 , Attachment Figure 2 and attached Figure 8 The embodiment of the present invention discloses a transistor quality detection system based on an STM32 microcontroller, including a data acquisition module, a microprocessor module and a display module.

[0062] In actual use, the data acquisition module uses the I / O port of the STM32F103C8T6 microprocessor in conjunction with an analog-to-digital converter to output multiple sets of level signals to the transistor pins and collect voltage data. The microprocessor module is used to determine the transistor type and base position based on the collected data, determine the collector and emitter through voltage comparison, and calculate the static operating point amplification factor and quality parameters. It can automatically identify the transistor type and pins and calculate the parameters with higher accuracy. The display module uses an OLED display to display the detection results, including pin polarity, amplification factor, and quality judgment. In general, by using this crystal transistor quality detection system based on the STM32 microcontroller, the system integration is higher, and technical defects in the existing technology, such as the reliance on manual experience for transistor type identification, insufficient parameter detection accuracy, and lack of quantitative standards for quality judgment, are solved.

[0063] Further, Figure 1Clearly present the connection relationship and data flow between various parts, providing an intuitive reference for hardware design and understanding the working principle of the system; Figure 2 The parameters and connection methods of each circuit component are clarified, which helps hardware developers to build and debug circuits; Figure 8 After completing the hardware circuit welding, when performing functional testing on the system, a low-power transistor is selected as the test object. After testing the crystal transistor, the test results are displayed.

[0064] Furthermore, the microprocessor module, based on an STM32F103C8T6 microprocessor, uses collected data and a specific algorithm to determine the transistor type and pin position, calculate the amplification factor, and assess quality. To determine transistor type and base, the module simulates the principle of a multimeter. By applying high and low voltage levels to a hypothetical base pin and measuring the voltages at the other pins, the transistor type and base are determined based on the transistor's conduction characteristics. To determine the collector and emitter, different voltage application methods and voltage comparisons are used depending on the transistor type. The amplification factor is calculated using a static operating point method based on relevant formulas. Quality is determined based on the amplification factor, which is a key indicator, combined with model standards.

[0065] Furthermore, the analog-to-digital converter (ADC) of the STM32F103C8T6 microprocessor is a 12-bit successive approximation type with a conversion time of 1us, a conversion result range of 0-4095, an input voltage of 0-3.3V, excellent performance, and the ability to accurately collect data; I / O ports PA0-PA7, PB0, and PB1 are used for data acquisition, and the test port is directly connected to ports PA1, PA2, and PA3 and set to analog input mode.

[0066] See attached Figure 6 , (helps understand the process of implementing tube type recognition through software algorithms), in order to solve the technical problem in the prior art that tube type recognition relies on manual experience, the following design is implemented in this embodiment. Specifically, the method for the microprocessor module to determine the tube type and base includes: applying a high-level signal to the hypothetical base pin and applying low-level signals to the other two pins respectively; and determining the actual base position and the transistor polarity type by detecting the conduction voltage value.

[0067] Through the design of the above technical solution, the accuracy of base identification can be increased and the time complexity of the algorithm can be reduced. The working principle is as follows: 1. Assume that any pin is the base and apply a high level (NPN) or a low level (PNP); 2. Apply a reverse level to the remaining pins; 3. Check whether the conduction voltage meets the PN junction characteristics (about 0.7V for silicon tubes and about 0.3V for germanium tubes); 4. Determine the actual base position through iterative verification.

[0068] See attached Figure 3(Describes the hardware principle of identifying pins by detecting pin voltage and conduction status) and attached Figure 7 (This helps to understand the logic of the software algorithm for pin position determination). In order to solve the technical problem of the high misjudgment rate of the collector and emitter of the NPN transistor, the following design is implemented in this embodiment. Specifically, the method for determining the collector and emitter includes: when it is determined to be an NPN type transistor, applying a high level to the base and the first unknown pin, applying a low level to the second unknown pin, and collecting the voltage value of the first unknown pin; exchanging the power supply levels of the first unknown pin and the second unknown pin, and collecting the voltage value of the second unknown pin; and determining the collector and emitter by comparing the two collected voltage values.

[0069] Through the design of the above technical solution, the accuracy of NPN tube collector-emitter judgment can be improved and the detection cycle can be shortened; the implementation logic is as follows: 1. After the base is confirmed, two cross-level tests are performed on the unknown pin. The first time, the base + PinA high level, PinB low level → collect PinA voltage V1, the second time, the base + PinB high level, PinA low level → collect PinB voltage V2; 2. Compare V1 and V2, the higher voltage is the collector (because the collector junction reverse bias voltage drop is larger).

[0070] See attached Figure 3 and attached Figure 7 In order to solve the technical problem of a high misjudgment rate of the collector and emitter of a PNP transistor, the following design is implemented in this embodiment. Specifically, the method for determining the collector and emitter includes: when it is determined to be a PNP type transistor, applying a low level to the base, applying a high level to the first unknown pin, applying a low level to the second unknown pin, and collecting the voltage value of the first unknown pin; swapping the power supply levels of the first unknown pin and the second unknown pin, and collecting the voltage value of the second unknown pin; and determining the collector and emitter by comparing the two collected voltage values.

[0071] The above technical solution can reduce the PNP transistor recognition error rate and increase the maximum operating voltage. The working principle is as follows: using a reverse level strategy (low base level, high unknown pin level), the collector-emitter of the PNP transistor is determined by comparing the voltage drop difference in the current path between two tests. The following are the characteristics: 1. The emitter-to-base current direction of the PNP transistor is opposite to that of the NPN transistor; 2. The collector voltage drop exhibits a higher impedance characteristic. Technical advantages:

[0072] In order to solve the complexity problem of dynamic parameter testing in traditional methods, the following design is carried out in this embodiment. Specifically, the amplification factor is calculated using the static operating point analysis method, which satisfies the following relationship: HFE = I_C / I_B, where I_C is the collector current and I_B is the base current, which is calculated through the collected voltage value and the preset resistance value.

[0073] Through the design of the above technical solution, not only the complexity problem of dynamic parameter testing in traditional methods is solved, but also the calculation efficiency is improved compared with the AC β test method; the algorithm principle is as follows: 1. I_C calculation: I_C = (V_CC-V_C) / R_C (collector loop Ohm's law); 2. I_B calculation: I_B = (V_CC-V_B) / R_B (base loop Ohm's law); 3. HFE calculation: β = I_C / I_B (DC amplification factor); the parameters can be set as: preset resistance value R_C = 1kΩ, R_B = 10kΩ (typical working conditions); voltage sampling accuracy ±1mV (corresponding to β calculation error ≤±2%).

[0074] The quality judgment standard is also quantified in this embodiment. Specifically, the quality judgment is achieved by comparing the calculated magnification with a preset threshold range. When the magnification is lower than the lower threshold or higher than the upper threshold, it is judged as unqualified.

[0075] The design of the above technical solution can reduce the false positive rate and support customized threshold updates (through firmware upgrades). The judgment logic is as follows: 1. Take the average value of three consecutive measurements; 2. Exceeding the threshold by ±5% is judged as unqualified (tolerance design); the threshold can be set as: Silicon tube qualified range: [50,300] (such as 2N3904 nominal β = 100-300); Germanium tube qualified range: [20,100] (such as AC128 nominal β = 40-120).

[0076] See attached Figure 4 (Provide hardware basis for the realization of OLED display function), the display module is designed as follows in this embodiment. Specifically, the display module is designed as follows. 2 C communication protocol is connected to the microprocessor to display the pin polarity distribution diagram of the transistor, the amplification value and the quality judgment result in real time.

[0077] The above technical solution reduces wiring complexity (requiring only two SCL / SDA lines) and increases the refresh rate (compared to 20fps for the SPI protocol), solving the problem of significant display delay. The hardware configuration can be set to: OLED resolution: 128×64 pixels; communication rate: 400kHz (Fast Mode); data format: structured message (including pin distribution diagram, β value, and quality identification).

[0078] Furthermore, the display module uses a 0.96-inch OLED display screen, which receives data from the microprocessor module through the I2C communication protocol. The SCL and SDA ports are connected to PB6 and PB7 of the microprocessor respectively, VCC is connected to 3.3V, and GND is grounded. The transistor pin polarity, HFE amplification factor and quality identification results are clearly displayed for user convenience.

[0079] See attached Figure 5 (The program's operating logic is intuitively presented). This embodiment also discloses a crystal transistor quality detection method, which is applied to the above-mentioned system and includes the following steps: (a) system initialization step: configuring the microprocessor I / O port working mode, initializing the analog-to-digital converter and the display module; (b) level output step: outputting a preset level combination to the transistor pins through the microprocessor I / O port; (c) data acquisition step: collecting voltage data of each pin and converting it into a digital signal; (d) tube type determination step: determining the transistor polarity type and base position based on conduction characteristic analysis; (e) pin determination step: determining the collector and emitter by voltage comparison; (f) parameter calculation step: calculating the static operating point amplification factor based on the collected voltage; (g) quality determination step: comparing the amplification factor with the preset threshold range to determine the quality level; (h) result display step: outputting the pin polarity distribution, amplification factor and quality determination result through the display module.

[0080] Through the design of the above technical solution, the detection process is made more coherent, the detection process is fully automated and supports real-time response in interrupt mode; this technical solution optimizes the process and can use state machine design to achieve step jumps.

[0081] See attached Figure 6 Furthermore, in order to refine the steps of tube type determination, step (d) is designed as follows in this embodiment. Specifically, preferably, step (d) specifically includes: (d1) assuming that any pin is the base and applying a high-level signal to it; (d2) applying a low-level signal to the remaining two pins respectively; (d3) detecting whether the conduction voltage value meets the PN junction conduction condition; (d4) when the conduction condition is not met, replacing the assumed base and repeating steps (d2)-(d3); (d5) determining the actual base position and tube type according to the detection result of successful conduction.

[0082] Through the design of the above technical solution, the base positioning time can be shortened and the power consumption can be reduced; this technical solution also improves the algorithm. Specifically, a quick elimination method is introduced to automatically switch the tube type hypothesis after the first detection fails, and the maximum number of iterations is ≤3 times (to prevent dead loops).

[0083] Furthermore, this embodiment also introduces a cyclic detection mechanism. Specifically, after step (h), a cyclic detection step is also included: continuously monitoring the detection port status, clearing the display content when it is detected that the transistor is removed, and re-executing steps (b)-(h) to perform new device detection.

[0084] The above technical solution supports continuous detection of the production line and extends the standby time of the equipment. The implementation method is as follows: GPIO interrupt is used to detect transistor plug-in and unplug events, and idle mode current (low power design).

[0085] Furthermore, based on the above solution, the following designs are also carried out in this embodiment, specifically: 1. Hardware implementation:

[0086] When soldering the system hardware, first draw the schematic in Altium Designer and generate the PCB. Before soldering, carefully check the components and PCB for proper function. Power on the microprocessor minimum system and test it to ensure proper operation. Because this design uses the STM32F103C8T6 minimum system board, while containing relatively few components, it also requires extensive microprocessor I / O connections. Therefore, extreme care must be taken during soldering to avoid cold solder joints and solder bridging.

[0087] After soldering is complete, debug the hardware circuit. Before powering on, carefully check the connection lines to ensure there are no welding adhesion, solder leaks, or cold solder joints. Ensure the board is grounded and powered correctly, and there are no short circuits to prevent damage to the hardware or chips.

[0088] 2. Software implementation:

[0089] The system software is based on the STM32 platform and is programmed in C within the KEIL5 MDK development environment. It uses library functions for modular programming. The software is divided into modules such as the main control program, system detection program, ADC acquisition program, OLED display program, and transistor qualification judgment program.

[0090] The main control program is responsible for system initialization, configuring the port mode, initializing the ADC, OLED and other devices, displaying the detection system name, and detecting whether a transistor is inserted into the port. If so, it calls the system detection program and sends the results to the OLED display after the detection is completed.

[0091] The system detection program includes functions such as transistor type identification, pin position determination, HFE calculation, and quality identification. The transistor type identification program determines the transistor type and base based on the pin conduction status. The pin position determination program determines the pin position by comparing voltage values ​​based on the known transistor type and base. The HFE calculation program calculates the amplification factor based on the amplification factor calculation principle and the detected parameters. The quality identification program determines the quality of the transistor based on the amplification factor.

[0092] The OLED display program configures the OLED to receive and display the test results. The transistor qualification judgment program judges the qualification of the transistor according to the preset quality standards.

[0093] 3. System testing:

[0094] The system's functional tests used low-power transistors, 2N3904 and 2N3906. After testing using this testing system, the data was recorded and compared with the multimeter's test data. When testing with a multimeter, the transistors were treated as diodes with different connection methods based on their shape. Using red and black test leads, the pins were checked for continuity, confirming the transistor type and base. The HFE setting was then used to determine the amplification factor.

[0095] Test results show that the detection system accurately detects transistor shape and pin position. While there are some errors in the amplification factor detection, they are within the normal range. The main causes of these errors are the influence of transistor amplification factors such as temperature, collector and emitter, as well as circuit soldering errors and power loss. Multiple tests have verified that the system's overall detection results are accurate and highly precise, achieving its intended function.

[0096] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0097] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is only for the convenience of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore cannot be understood as limiting the scope of protection of this application.

[0098] While 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 these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A transistor quality detection system based on STM32 microcontroller, characterized in that: include: The data acquisition module uses the I / O port of the STM32F103C8T6 microprocessor in conjunction with an analog-to-digital converter to output multiple sets of level signals to the transistor pins and collect voltage data; The microprocessor module is used to determine the transistor type and base position based on the collected data, determine the collector and emitter through voltage comparison, and calculate the static operating point amplification factor and quality parameters; The display module uses an OLED display to display the test results, including pin polarity, magnification, and quality judgment.

2. a kind of crystal triode quality detection system based on STM32 microcontroller according to claim 1, is characterized in that, The method for the microprocessor module to determine the tube type and the base includes: Apply a high-level signal to the hypothetical base pin and a low-level signal to the other two pins respectively; The actual position of the base and the polarity type of the transistor are determined by detecting the conduction voltage value.

3. a kind of crystal triode quality detection system based on STM32 microcontroller according to claim 2, is characterized in that, The method for determining the collector and emitter includes: When it is determined to be an NPN transistor, a high level is applied to the base and the first unknown pin, a low level is applied to the second unknown pin, and the voltage value of the first unknown pin is collected; Swapping the power supply levels of the first unknown pin and the second unknown pin, and collecting the voltage value of the second unknown pin; The collector and emitter are determined by comparing the two collected voltage values.

4. a kind of crystal triode quality detection system based on STM32 microcontroller according to claim 2, is characterized in that, The method for determining the collector and emitter includes: When it is determined to be a PNP transistor, a low level is applied to the base, a high level is applied to the first unknown pin, a low level is applied to the second unknown pin, and the voltage value of the first unknown pin is collected; Swapping the power supply levels of the first unknown pin and the second unknown pin, and collecting the voltage value of the second unknown pin; The collector and emitter are determined by comparing the two collected voltage values.

5. a kind of crystal triode quality detection system based on STM32 microcontroller according to claim 1, is characterized in that, The amplification factor calculation adopts the static working point analysis method, which satisfies the following relationship: HFE=I_C / I_B Where I_C is the collector current and I_B is the base current, which are calculated using the collected voltage value and the preset resistance value.

6. a kind of crystal triode quality detection system based on STM32 microcontroller according to claim 1, is characterized in that, The quality judgment is achieved by comparing the calculated magnification with a preset threshold range. When the magnification is lower than the lower threshold or higher than the upper threshold, it is judged to be unqualified.

7. A kind of crystal triode quality detection system based on STM32 microcontroller according to claim 1, it is characterized in that, The display module is connected to the 2 C communication protocol is connected to the microprocessor to display the pin polarity distribution diagram of the transistor, the amplification value and the quality judgment result in real time.

8. A method for detecting the quality of a transistor, applied to the system according to any one of claims 1 to 7, characterized in that: The following steps are involved: (a) System initialization steps: configure the microprocessor I / O port working mode, initialize the analog-to-digital converter and display module; (b) Level output step: outputting a preset level combination to the transistor pins through the microprocessor I / O port; (c) Data acquisition step: collecting voltage data of each pin and converting it into a digital signal; (d) Transistor type determination step: Determine the transistor polarity type and base position based on the conduction characteristic analysis; (e) Pin determination step: determine the collector and emitter by voltage comparison; (f) Parameter calculation step: Calculate the static operating point amplification factor based on the collected voltage; (g) quality determination step: comparing the magnification with a preset threshold range to determine the quality level; (h) Result display step: output the pin polarity distribution, magnification and quality judgment results through the display module.

9. A method for detecting the quality of a transistor according to claim 8, characterized in that: The step (d) specifically comprises: (d1) Assume that any pin is the base and apply a high-level signal to it; (d2) Apply low-level signals to the remaining two pins respectively; (d3) detecting whether the on-state voltage value satisfies the PN junction conduction condition; (d4) when the conduction condition is not met, replace the hypothetical base and repeat steps (d2)-(d3); (d5) Determine the actual base position and tube type based on the detection result of successful conduction.

10. The method for detecting the quality of a transistor according to claim 8, wherein: After step (h), the method further comprises a cycle detection step: The detection port status is continuously monitored. When it is detected that the transistor has been removed, the display content is cleared and steps (b) to (h) are re-executed to detect a new device.