System for realizing positive and negative adjustable control of threshold voltage of trigger circuit
By using a microcontroller to output PWM signals in the trigger circuit and adjusting the threshold voltage in combination with the feedback network, the problems of low accuracy, high cost and insufficient anti-interference ability in the prior art are solved, and the positive and negative continuous adjustable and efficient anti-interference ability of the threshold voltage are achieved.
Patent Information
- Application Number
- CN202411670988.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-25
AI Technical Summary
The existing trigger circuit threshold voltage generation method has the defects of low accuracy, high cost, large PCB area, insufficient anti-interference ability, and lack of positive and negative adjustable control of the threshold voltage.
A microcontroller is used to connect to the threshold voltage generation circuit, and the PWM signal is output through the PA2 pin. The feedback network is used to stably output when interference exists, adjust the threshold voltage, and output the threshold voltage. The system includes resistors, capacitors, and transistors, which adjust the threshold voltage by adjusting the PWM duty cycle.
The positive and negative continuous adjustable threshold voltage is realized, and the feedback mechanism is provided, which improves the anti-interference ability of the circuit, reduces the cost and PCB area, and simplifies circuit control.
Smart Images

Figure CN119690177A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of instruments and meters, in particular to the field of trigger circuits, and specifically refers to a system for realizing positive and negative adjustable control of a threshold voltage of a trigger circuit. Background Art
[0002] In the field of instrumentation, there are trigger circuits that process trigger signals. Trigger signals can be used for synchronization between instruments and between instruments and devices. It can enable devices to synchronously measure specific events or signals, so that different devices can analyze the same event at the same time. The trigger signal can accurately control the moment when the instrument starts sampling, reduce sampling delay or jitter, and improve measurement accuracy. This is especially true in the acquisition of high-speed signals or periodic signals.
[0003] The trigger circuit mainly includes a threshold voltage generation module, a voltage comparison module, and a trigger input protection module. Figure 1 As shown. The threshold voltage module is used to generate the required level for triggering, the voltage comparison module is used to determine the trigger generation, and the trigger input protection module is used to protect the input signal. At present, the circuit of the threshold voltage generation module is mostly to directly generate the required threshold voltage through the microcontroller to control the DAC, or use the microcontroller to generate the PWM signal, the PWM signal is converted into an analog voltage through the RC circuit, and the analog voltage is passed through the operational amplifier to generate the required threshold voltage. If the solution of using DAC to generate the threshold voltage requires high-precision output, the device cost is high, the circuit design is complex, and the control program is complex. The solution of using PWM, RC circuit, and operational amplifier to generate the threshold voltage has many circuit components and occupies a large PCB area. In addition, the output accuracy of this solution is not high. To improve the accuracy, it is necessary to increase the number of RC filter stages and select a high-performance operational amplifier, which will increase the circuit cost and PCB area. When there is interference or other problems on site, the output threshold voltage of the above two solutions will be disturbed because there is no feedback mechanism, affecting the output accuracy.
[0004] In view of the above-mentioned existing threshold voltage generation method, when there is interference or other problems on site, it is necessary to respond quickly and at the same time, the trigger voltage is stable and anti-interference, and the PCB area is small, the hardware cost is low, the threshold voltage can be continuously controlled, and the threshold voltage can be adjusted positively and negatively. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a system for realizing positive and negative adjustable control of the threshold voltage of a trigger circuit, which meets the requirements of voltage stability, anti-interference and a relatively wide range of applications.
[0006] In order to achieve the above-mentioned purpose, the system for realizing positive and negative adjustable control of the threshold voltage of the trigger circuit of the present invention is as follows:
[0007] The system for realizing positive and negative adjustable control of the threshold voltage of a trigger circuit has the following main features: the system includes a single-chip microcomputer and a threshold voltage generating circuit, the single-chip microcomputer is connected to the threshold voltage generating circuit, the single-chip microcomputer outputs a PWM signal through a PA2 pin and inputs it to the threshold voltage generating circuit, the threshold voltage generating circuit is used to generate an adjustable current, stabilize the output when interference exists through a feedback network between the output and the input, adjust the threshold voltage, and output the threshold voltage.
[0008] Preferably, the threshold voltage generating circuit includes a first resistor R1, a second resistor R2, a third resistor R3, a first capacitor C1, a second capacitor C2, and a first transistor Q1, one end of the first resistor R1 receives a PWM signal of the single-chip microcomputer, the other end of the first resistor R1 is connected to one end of the second resistor R2, the other end of the second resistor R2 is connected to one end of the third resistor R3, the other end of the third resistor R3 is connected to the base of the first transistor Q1, one end of the first capacitor C1 is connected to the connection point between the first resistor R1 and the second resistor R2, the other end of the first capacitor C1 is grounded, one end of the second capacitor C2 is connected to the connection point between the second resistor R2 and the third resistor R3, and the other end of the second capacitor C2 is grounded.
[0009] Preferably, the threshold voltage generating circuit further includes a fourth resistor R4, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, and a second triode Q2, the collector of the first triode Q1 is connected to one end of the fourth resistor R4, the other end of the fourth resistor R4 is connected to the positive power supply, the emitter of the first triode Q1 is connected to the negative power supply, one end of the fourth resistor R4 is connected to the base of the second triode Q2, the collector of the second triode Q2 is connected to one end of the fifth resistor R5, the emitter of the second triode Q2 is connected to one end of the seventh resistor R7, the other end of the seventh resistor R7 is connected to one end of the eighth resistor R8, the other end of the fifth resistor R5 is connected to the positive power supply, the other end of the eighth resistor R8 is connected to the negative power supply, one end of the sixth resistor R6 is connected to the connection point between the seventh resistor R7 and the eighth resistor R8, the other end of the sixth resistor R6 is connected to the base of the first triode Q1, and is the threshold voltage output.
[0010] Preferably, the threshold voltage generating circuit outputs a threshold voltage, specifically:
[0011] The output threshold voltage is based on the following formula:
[0012]
[0013] Among them, I BQ1 is the base current of the first transistor Q1, I BQ2is the base current of the second transistor Q2, β Q1 is the gain of the first transistor Q1, β Q2 is the gain of the second transistor Q2, U CQ1 is the collector voltage of the first transistor Q1, U BE is the voltage between the base and emitter of the transistor.
[0014] Preferably, if the temperature of the threshold voltage generating circuit increases, the current of the second transistor Q2 increases, and the increase in the current of the second transistor Q2 increases the voltage at one end of the sixth resistor R6. After the other end of the sixth resistor R6 increases, the base current of the first transistor Q1 increases. After the base current of the first transistor Q1 increases, the voltage drop of the fourth resistor R4 increases. After the voltage across the fourth resistor R4 increases, the base current of the second transistor Q2 decreases. After the current base of the second transistor Q2 decreases, the voltage at one end of the sixth resistor R6 decreases.
[0015] The system for realizing positive and negative adjustable control of the threshold voltage of the trigger circuit of the present invention has a simple circuit structure, a small number of components, and saves cost and PCB area. The present invention realizes the positive and negative continuous adjustment of the threshold voltage and has a feedback mechanism. The circuit control method is simple, and only one PWM control is needed to adjust the threshold voltage output. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 Construct a block diagram for the trigger circuit.
[0017] Figure 2 The present invention is a schematic diagram of a single-chip microcomputer circuit of a system for realizing positive and negative adjustable control of a trigger circuit threshold voltage.
[0018] Figure 3 The schematic diagram of the threshold voltage adjustable circuit of the system for realizing positive and negative adjustable control of the threshold voltage of the trigger circuit of the present invention is shown. DETAILED DESCRIPTION
[0019] In order to more clearly describe the technical content of the present invention, further description is given below in conjunction with specific embodiments.
[0020] The system for realizing positive and negative adjustable control of the threshold voltage of a trigger circuit of the present invention includes a single-chip microcomputer and a threshold voltage generating circuit. The single-chip microcomputer is connected to the threshold voltage generating circuit. The single-chip microcomputer outputs a PWM signal through a PA2 pin and inputs it to the threshold voltage generating circuit. The threshold voltage generating circuit is used to generate an adjustable current, stabilize the output when interference exists through a feedback network between the output and the input, adjust the threshold voltage, and output the threshold voltage.
[0021] As a preferred embodiment of the present invention, the threshold voltage generating circuit includes a first resistor R1, a second resistor R2, a third resistor R3, a first capacitor C1, a second capacitor C2, and a first transistor Q1, one end of the first resistor R1 receives the PWM signal of the single-chip microcomputer, the other end of the first resistor R1 is connected to one end of the second resistor R2, the other end of the second resistor R2 is connected to one end of the third resistor R3, the other end of the third resistor R3 is connected to the base of the first transistor Q1, one end of the first capacitor C1 is connected to the connection point between the first resistor R1 and the second resistor R2, the other end of the first capacitor C1 is grounded, one end of the second capacitor C2 is connected to the connection point between the second resistor R2 and the third resistor R3, and the other end of the second capacitor C2 is grounded.
[0022] As a preferred embodiment of the present invention, the threshold voltage generating circuit further includes a fourth resistor R4, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, and a second transistor Q2, the collector of the first transistor Q1 is connected to one end of the fourth resistor R4, the other end of the fourth resistor R4 is connected to the positive power supply, the emitter of the first transistor Q1 is connected to the negative power supply, one end of the fourth resistor R4 is connected to the base of the second transistor Q2, the collector of the second transistor Q2 is connected to one end of the fifth resistor R5, the emitter of the second transistor Q2 is connected to one end of the seventh resistor R7, the other end of the seventh resistor R7 is connected to one end of the eighth resistor R8, the other end of the fifth resistor R5 is connected to the positive power supply, the other end of the eighth resistor R8 is connected to the negative power supply, one end of the sixth resistor R6 is connected to the connection point between the seventh resistor R7 and the eighth resistor R8, the other end of the sixth resistor R6 is connected to the base of the first transistor Q1, and is the threshold voltage output.
[0023] As a preferred embodiment of the present invention, the threshold voltage generating circuit outputs a threshold voltage, specifically:
[0024] The output threshold voltage is based on the following formula:
[0025]
[0026] Among them, I BQ1 is the base current of the first transistor Q1, I BQ2 is the base current of the second transistor Q2, β Q1 is the gain of the first transistor Q1, β Q2 is the gain of the second transistor Q2, U CQ1 is the collector voltage of the first transistor Q1, U BE is the voltage between the base and emitter of the transistor.
[0027] As a preferred embodiment of the present invention, if the temperature of the threshold voltage generating circuit increases, the current of the second transistor Q2 increases. The increase in the current of the second transistor Q2 increases the voltage at one end of the sixth resistor R6. After the other end of the sixth resistor R6 increases, the base current of the first transistor Q1 increases. After the base current of the first transistor Q1 increases, the voltage drop of the fourth resistor R4 increases. After the voltage across the fourth resistor R4 increases, the base current of the second transistor Q2 decreases. After the current base of the second transistor Q2 decreases, the voltage at one end of the sixth resistor R6 decreases.
[0028] In a specific embodiment of the present invention, it relates to the field of instrument technology. It mainly relates to the application field of the instrument external trigger voltage threshold which is continuously adjustable in the positive and negative range. Specifically, it refers to a method of using current to control voltage, while introducing feedback control, to achieve continuous adjustment of the external trigger voltage threshold of the channel simulator, custom setting of the voltage threshold, and voltage range covering positive and negative voltages, so as to achieve rapid acquisition of the desired voltage, stable and reliable voltage, and high precision.
[0029] Insufficient anti-interference ability. External interference factors may cause the threshold voltage output by the existing trigger circuit to be unstable, affecting the accuracy and reliability of the trigger signal. Solve the problems of complex circuit control, high cost, and large circuit area. The threshold voltage adjustment range is limited and cannot be adjusted continuously. It is impossible to achieve continuous adjustment of the threshold voltage within the positive and negative range, which limits the flexibility and adaptability of the system under different working conditions.
[0030] The present invention realizes a method for controlling the positive and negative adjustable threshold voltage of a trigger circuit. The present invention can realize the positive and negative continuous adjustment of the threshold voltage. The technical solution is as follows:
[0031] 1. PWM signal generation: Figure 2 As shown, PWM (pulse width modulation signal) is generated by the microcontroller and output from the PA2 pin.
[0032] 2. Adjustable current generation: Figure 3 As shown, the PWM signal output by the PA2 pin is connected to the first end of the resistor R1, the second end of R1 is connected to the first end of R2, the second end of R2 is connected to the first end of R3, the second end of R3 is connected to the base of the transistor Q1, the first end of the capacitor C1 is connected to the connection point between the resistor R1 and the resistor R2, the second end of the capacitor C1 is connected to the ground, the first end of the capacitor C2 is connected to the connection point between the resistor R2 and the resistor R3, and the second end of the capacitor C2 is connected to the ground. The above circuit is used to convert the PWM signal into the base current I of Q1 BQ1 By adjusting the PWM duty cycle D, I BQ1 .
[0033] 3. Feedback control mechanism: There is a feedback network between the output and the input, which is used to stabilize the output when interference exists. When the collector of the transistor Q2 is disturbed, such as the temperature rises, the collector current of Q2 will increase. The increase in the collector current of Q2 will increase the voltage at the first terminal of R6. The increase in the voltage at the first terminal of R6 will increase the base current of Q1. The increase in the base current of Q1 will increase the voltage drop of resistor R4. After the voltage across R4 increases, the base current of Q2 will decrease. After the base current of Q2 decreases, the voltage at the first terminal of R6 will decrease. This process is the feedback mechanism, which can improve the anti-interference ability of the circuit and enhance the stability of the circuit.
[0034] Threshold voltage adjustment: the collector of Q1 is connected to the first end of R4, the emitter of Q1 is connected to the negative power supply, the second end of the resistor R4 is connected to the positive power supply, the first end of R4 is connected to the base of Q2, the collector of Q2 is connected to the first end of the resistor R5, the emitter of Q2 is connected to the first end of R7, the second end of R7 is connected to the first end of R8, the second end of R5 is connected to the positive power supply, the second end of R8 is connected to the negative power supply, the first end of R6 is connected to the second end of R3, and the second end of R6 is connected to the connection point of R7 and R8. The first end of R6 is the threshold voltage output.
[0035] The present invention provides a method for controlling the positive and negative adjustable threshold voltage of a trigger circuit. The present invention can realize the positive and negative adjustable threshold voltage. Figure 2 After the PA2 pin of the microcontroller outputs the PWM signal, the PWM signal enters Figure 3 The threshold voltage generating circuit shown in the figure. The specific signal flow is as follows:
[0036] For a PWM signal of a certain frequency, its duty cycle is D. After passing through R1, C1, R2, and C2, the output voltage is PWM high level * D. Figure 2 The high level of the PWM signal output by the microcontroller is 3.3V, and the current flowing into the base of Q1 is:
[0037]
[0038] The current flowing through the collector of Q1 is:
[0039]
[0040] The current flowing through the collector of Q2 is:
[0041]
[0042] Output threshold voltage:
[0043] V OUT =+V CC -β Q2 ×I BQ2
[0044] Simplified:
[0045]
[0046] Among them, I BQ1 is the base current of the first transistor Q1, I BQ2 is the base current of the second transistor Q2, β Q1 is the gain of the first transistor Q1, β Q2 is the gain of the second transistor Q2, U CQ1 is the collector voltage of the first transistor Q1, U BE is the voltage between the base and emitter of the transistor.
[0047] Based on this condition, the corresponding circuit parameters can be determined and a circuit that meets the requirements can be designed to achieve positive and negative adjustable threshold voltage and strong anti-interference ability.
[0048] The triode amplifier circuit used in the technical solution of the present invention is used for instruments and meters, has high precision, and can adjust positive and negative outputs.
[0049] The threshold voltage generated in the technical solution of the present invention is continuously adjustable in positive and negative directions and is implemented by using a triode amplification circuit.
[0050] The PWM is generated by the single-chip microcomputer output in the technical solution of the present invention, and the duty cycle is controlled by the single-chip microcomputer.
[0051] The variable current generated in the technical solution of the present invention is a voltage generated by PWM after second-order filtering, which is converted into a base current through the base resistor of the transistor, and the base current is changed by changing the PWM duty cycle. In the field of instrumentation, the voltage magnitude, positive and negative values, and output accuracy generated by the trigger voltage generating circuit are a design difficulty. The multi-stage amplifier circuit with feedback used in the technical solution of the present invention can achieve output voltage at the mV level or V level according to system requirements, and the positive and negative values are adjustable, and the anti-interference ability is strong.
[0052] The specific implementation scheme of this embodiment can refer to the relevant description in the above embodiment, which will not be repeated here.
[0053] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0054] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0055] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0056] The system for realizing positive and negative adjustable control of the threshold voltage of the trigger circuit of the present invention has a simple circuit structure, a small number of components, and saves cost and PCB area. The present invention realizes the positive and negative continuous adjustment of the threshold voltage and has a feedback mechanism. The circuit control method is simple, and only one PWM control is needed to adjust the threshold voltage output.
[0057] In this specification, the present invention has been described with reference to specific embodiments thereof. However, it is apparent that various modifications and variations may be made without departing from the spirit and scope of the present invention. Therefore, the specification and drawings should be regarded as illustrative rather than restrictive.
Claims
1. A system for realizing positive and negative adjustable control of the threshold voltage of a trigger circuit, characterized in that: The system includes a single-chip microcomputer and a threshold voltage generating circuit. The single-chip microcomputer is connected to the threshold voltage generating circuit. The single-chip microcomputer outputs a PWM signal through a PA2 pin and inputs it into the threshold voltage generating circuit. The threshold voltage generating circuit is used to generate an adjustable current, stabilize the output when interference exists through an output and input feedback network, adjust the threshold voltage, and output the threshold voltage.
2. The system for realizing positive and negative adjustable control of trigger circuit threshold voltage according to claim 1, characterized in that: The threshold voltage generating circuit includes a first resistor R1, a second resistor R2, a third resistor R3, a first capacitor C1, a second capacitor C2, and a first transistor Q1. One end of the first resistor R1 receives a PWM signal of a single-chip microcomputer, the other end of the first resistor R1 is connected to one end of the second resistor R2, the other end of the second resistor R2 is connected to one end of the third resistor R3, the other end of the third resistor R3 is connected to the base of the first transistor Q1, one end of the first capacitor C1 is connected to a connection point between the first resistor R1 and the second resistor R2, the other end of the first capacitor C1 is grounded, one end of the second capacitor C2 is connected to a connection point between the second resistor R2 and the third resistor R3, and the other end of the second capacitor C2 is grounded.
3. The system for realizing positive and negative adjustable control of trigger circuit threshold voltage according to claim 1, characterized in that: The threshold voltage generating circuit further includes a fourth resistor R4, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, and a second triode Q2. The collector of the first triode Q1 is connected to one end of the fourth resistor R4, the other end of the fourth resistor R4 is connected to a positive power supply, the emitter of the first triode Q1 is connected to a negative power supply, one end of the fourth resistor R4 is connected to the base of the second triode Q2, the collector of the second triode Q2 is connected to one end of the fifth resistor R5, the emitter of the second triode Q2 is connected to one end of the seventh resistor R7, the other end of the seventh resistor R7 is connected to one end of the eighth resistor R8, the other end of the fifth resistor R5 is connected to the positive power supply, the other end of the eighth resistor R8 is connected to the negative power supply, one end of the sixth resistor R6 is connected to a connection point between the seventh resistor R7 and the eighth resistor R8, the other end of the sixth resistor R6 is connected to the base of the first triode Q1, and is a threshold voltage output.
4. The system for realizing positive and negative adjustable control of trigger circuit threshold voltage according to claim 1, characterized in that: The threshold voltage generating circuit outputs a threshold voltage, specifically: The output threshold voltage is based on the following formula: Among them, I BQ1 is the base current of the first transistor Q1, I BQ2 is the base current of the second transistor Q2, β Q1 is the gain of the first transistor Q1, β Q2 is the gain of the second transistor Q2, U CQ1 is the collector voltage of the first transistor Q1, U BE is the voltage between the base and emitter of the transistor.
5. The system for realizing positive and negative adjustable control of trigger circuit threshold voltage according to claim 1, characterized in that: If the temperature of the threshold voltage generating circuit increases, the current of the second triode Q2 increases. The increase in the current of the second triode Q2 increases the voltage at one end of the sixth resistor R6. After the other end of the sixth resistor R6 increases, the base current of the first triode Q1 increases. After the base current of the first triode Q1 increases, the voltage drop of the fourth resistor R4 increases. After the voltage across the fourth resistor R4 increases, the base current of the second triode Q2 decreases. After the current base of the second triode Q2 decreases, the voltage at one end of the sixth resistor R6 decreases.