Discrete quantity acquisition circuit, method and electronic device with bit function
By designing a discrete quantity acquisition circuit with BIT function and utilizing the control of the self-test power supply and the excitation ground generating unit, a comprehensive self-test test of the discrete quantity acquisition circuit is realized, which solves the problems of complex structure and low reliability in the existing technology, reduces the test cost and improves the signal reliability.
Patent Information
- Application Number
- CN202111464956.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-12-03
AI Technical Summary
Existing discrete quantity acquisition circuits have complex structures, low reliability, and are unable to perform comprehensive self-tests, resulting in increased testing costs and extended testing cycles in equipment with high signal reliability requirements, such as aviation equipment.
A discrete quantity acquisition circuit with BIT function is designed, which includes a self-test power supply generating unit, a self-test excitation ground generating unit, a first optocoupler isolation unit and a control unit. The output of the self-test signal is controlled by a preset BIT program to realize self-test test of the discrete quantity acquisition circuit.
The invention realizes self-test of all failure modes of discrete quantity acquisition circuit, has simple circuit structure and high reliability, reduces test cost and improves signal reliability.
Smart Images

Figure CN114189241B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of test circuits, and in particular to a discrete quantity acquisition circuit, method and electronic equipment with a BIT function. Background Art
[0002] The discrete quantity acquisition circuit is a circuit structure used to realize the acquisition of discrete quantity signals such as ground / open and high / open.
[0003] Existing discrete quantity acquisition circuits are usually only used to implement discrete quantity acquisition functions, and they have the following problems: the circuit structure of the discrete quantity acquisition circuit is relatively complex and the reliability is low; some do not have a fault self-test function, or those with a self-test function cannot cover all fault modes. For example, the auxiliary contact of the contactor is a ground / open discrete quantity acquisition, and this contact is a normally closed type. If only "ground" excitation is applied to the acquisition end, it is impossible to distinguish whether the output end is an external signal or a self-test excitation signal. Therefore, the discrete quantity acquisition output is always high. This fault mode cannot be detected. In aviation equipment or other precision equipment with high signal reliability requirements, in order to ensure the accuracy of the discrete quantity acquisition signal, an external test system is required to perform fault testing on the discrete quantity acquisition circuit, which increases the test cost and lengthens the test cycle. Summary of the Invention
[0004] The present invention provides a discrete quantity acquisition circuit, method and electronic equipment with a BIT function, so as to realize self-testing of the discrete quantity acquisition circuit, reduce the test cost and improve the reliability of the discrete quantity acquisition signal.
[0005] In a first aspect, an embodiment of the present invention provides a discrete quantity acquisition circuit with a BIT function, comprising: a self-test power supply generating unit, a self-test excitation ground generating unit, a first optocoupler isolation unit, a discrete quantity acquisition end, and a control unit; the discrete quantity acquisition end is electrically connected to the first input end of the first optocoupler isolation unit or the second input end of the first optocoupler isolation unit, and the discrete quantity acquisition end is used to obtain an external discrete quantity signal; the control unit is used to control the self-test power supply generating unit to output a first self-test signal and control the self-test excitation ground generating unit to output a second self-test signal according to a preset BIT program, the first self-test signal is a high-level signal or a high-impedance signal, and the second self-test signal is a self-test excitation ground signal or a high-impedance signal; the first input end of the first optocoupler isolation unit is electrically connected to the self-test power supply generating unit, the second input end of the first optocoupler isolation unit is electrically connected to the self-test excitation ground generating unit, the first output end of the first optocoupler isolation unit is electrically connected to the first power supply end, and the second output end of the first optocoupler isolation unit is used to output BIT and discrete quantity acquisition results.
[0006] Optionally, the self-test power supply generating unit includes: a second optocoupler isolation unit, a first switch unit and a voltage divider unit; the voltage divider unit includes a first resistor and a second resistor connected in series, a first node is provided between the first resistor and the second resistor, the end of the first resistor away from the first node is electrically connected to the second power supply end, and the end of the second resistor away from the first node is electrically connected to the first output end of the second optocoupler isolation unit; the first input end of the second optocoupler isolation unit is electrically connected to the control unit through a third resistor, the second input end of the second optocoupler isolation unit is grounded, and the second output end of the second optocoupler isolation unit is grounded; the control end of the first switch unit is electrically connected to the first node, the input end of the first switch unit is electrically connected to the second power supply end, the output end of the first switch unit is electrically connected to the first input end of the first optocoupler isolation unit, and the output end of the first switch unit is used to output a high-level signal or a high-impedance signal.
[0007] Optionally, the first switch unit is a PNP MOS tube.
[0008] Optionally, the self-test excitation ground generating unit includes: a third optocoupler isolation unit and a second switch unit; the first input end of the third optocoupler isolation unit is electrically connected to the control unit through a fourth resistor, the second input end of the third optocoupler isolation unit is grounded, the first output end of the third optocoupler isolation unit is electrically connected to the second power supply end through a fifth resistor, the second output end of the third optocoupler isolation unit is grounded through a sixth resistor, and a second node is provided between the second output end of the third optocoupler isolation unit and the sixth resistor; the control end of the second switch unit is electrically connected to the second node, the input end of the second switch unit is grounded, the output end of the second switch unit is electrically connected to the second input end of the first optocoupler isolation unit, and the output end of the second switch unit is used to output a self-test excitation ground signal or a high-impedance signal.
[0009] Optionally, the second switch unit is an NPN MOS tube.
[0010] Optionally, the discrete quantity acquisition circuit with BIT function also includes: a seventh resistor and an eighth resistor, the seventh resistor is electrically connected between the first input end of the first optocoupler isolation unit and the self-test power supply generating unit; the eighth resistor is electrically connected between the second output end of the first optocoupler isolation unit and the ground end.
[0011] Optionally, the discrete quantity acquisition terminal includes a first discrete quantity acquisition terminal and / or a second discrete quantity acquisition terminal; the first discrete quantity acquisition terminal is electrically connected to the first input terminal of the first optocoupler isolation unit, and the first discrete quantity acquisition terminal is used to collect "high / open" discrete quantities; the second discrete quantity acquisition terminal is electrically connected to the second input terminal of the first optocoupler isolation unit, and the second discrete quantity acquisition terminal is used to collect "ground / open" discrete quantities.
[0012] Optionally, the preset BIT program includes at least one of the following: a preset "ground / open" discrete quantity fault detection program and a preset "high / open" discrete quantity fault detection program.
[0013] In the second aspect, an embodiment of the present invention also provides a discrete quantity acquisition method with a BIT function, comprising the following steps: obtaining an external discrete quantity signal; controlling the self-test power supply generating unit to output a first self-test signal according to a preset BIT program, and controlling the self-test excitation ground generating unit to output a second self-test signal, wherein the first self-test signal is a high-level signal or a high-impedance signal, and the second self-test signal is a self-test excitation ground signal or a high-impedance signal; outputting a BIT and a discrete quantity acquisition result according to the external discrete quantity signal, the first self-test signal and the second self-test signal.
[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising the above-mentioned discrete quantity acquisition circuit with BIT function.
[0015] The discrete quantity acquisition circuit, method, and electronic device with a BIT function provided by the present invention obtain an external discrete quantity signal through a discrete quantity acquisition terminal, control a self-test power supply generating unit to output a first self-test signal according to a preset BIT program, and the first self-test signal can be a high-level signal or a high-impedance signal. The self-test excitation ground generating unit is also controlled to output a second self-test signal, and the second self-test signal can be a self-test excitation ground signal or a high-impedance signal. A first optical coupling isolation unit is used to output a BIT and a discrete quantity acquisition result based on the first self-test signal, the second self-test signal, and the external discrete quantity signal. This solves the problem that existing discrete quantity acquisition circuits cannot perform self-test, and can implement self-test tests for all fault modes of the discrete quantity acquisition circuit. The circuit structure is simple and the reliability is high, which is conducive to reducing testing costs and improving the reliability of discrete quantity acquisition signals. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic structural diagram of a discrete quantity acquisition circuit with a BIT function provided in the first embodiment of the present invention;
[0017] Figure 2 A schematic structural diagram of a discrete quantity acquisition circuit with a BIT function provided in the second embodiment of the present invention;
[0018] Figure 3 A schematic structural diagram of a discrete quantity acquisition circuit with a BIT function provided in the third embodiment of the present invention;
[0019] Figure 4 A schematic structural diagram of a discrete quantity acquisition circuit with a BIT function provided in a fourth embodiment of the present invention;
[0020] Figure 5 A schematic structural diagram of a discrete quantity acquisition circuit with a BIT function provided in a fifth embodiment of the present invention;
[0021] Figure 6 A flowchart of a discrete quantity acquisition method with a BIT function provided in Example 6 of the present invention;
[0022] Figure 7 This is a structural diagram of an electronic device provided in Example 7 of the present invention. DETAILED DESCRIPTION
[0023] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0024] Figure 1 This is a structural schematic diagram of a discrete quantity acquisition circuit with a BIT function provided in Example 1 of the present invention. This embodiment is applicable to application scenarios in which the discrete quantity acquisition circuit performs discrete quantity acquisition and built-in self-test (BIT). The discrete quantity acquisition circuit with a BIT function can be used to output discrete quantity acquisition and BIT (Built-in Test) results.
[0025] like Figure 1 As shown, the discrete quantity acquisition circuit with BIT function includes: a self-test power supply generating unit 10, a self-test excitation ground generating unit 20, a first optical coupling isolation unit U1, a discrete quantity acquisition terminal ( Figure 1The discrete quantity acquisition terminal is electrically connected to the first input terminal A11 of the first optocoupler isolation unit U1 or the second input terminal A12 of the first optocoupler isolation unit U1, and the discrete quantity acquisition terminal is used to receive a discrete quantity signal provided externally; the control unit 30 is used to control the self-test power supply generating unit 10 to output a first self-test signal according to a preset BIT program, and control the self-test excitation ground generating unit 20 to output a second self-test signal, the first self-test signal being a high-level signal or a high-impedance signal, and the second self-test signal being a self-test excitation ground signal or a high-impedance signal; the first input terminal A11 of the first optocoupler isolation unit U1 is electrically connected to the self-test power supply generating unit 10, the second input terminal A12 of the first optocoupler isolation unit U1 is electrically connected to the self-test excitation ground generating unit 20, the first output terminal A13 of the first optocoupler isolation unit U1 is electrically connected to the first power supply terminal VCC, and the second output terminal A14 of the first optocoupler isolation unit U1 is used to output the BIT and discrete quantity acquisition results.
[0026] In this embodiment, the control unit 30 is further configured to receive the BIT and discrete quantity acquisition results output by the second output terminal A14, and perform fault mode analysis and fault alarm according to the BIT and discrete quantity acquisition results.
[0027] In one embodiment, the first power supply terminal VCC may be used for a DC +5V power supply.
[0028] In one embodiment, the control unit 30 may be a DSP (Digital Signal Processing) chip, which is used to store and execute a preset BIT program, send a first control signal to the self-test power supply generating unit 10, control the self-test power supply generating unit 10 to output a high-level signal or a high-impedance signal, and output a second control signal to the self-test excitation ground generating unit 20, control the self-test excitation ground generating unit 20 to output a self-test excitation ground signal or a high-impedance signal.
[0029] Specifically, a light-emitting diode is provided on the input side of the first optocoupler isolation unit U1, and a phototransistor is provided on the output side, wherein whether the light-emitting diode is turned on or not is controlled by the signal type of the first input terminal A11 and the second input terminal A12 of the first optocoupler isolation unit U1, and the signal status of the first input terminal A11 and the second input terminal A12 is determined by the first self-test signal, the second self-test signal and the discrete quantity signal. In other words, whether the light-emitting diode is turned on or not is controlled by the first self-test signal, the second self-test signal and the discrete quantity signal.
[0030] When executing the preset BIT program, the control unit 30 controls the signal types of the first self-test signal and the second self-test signal. The first optocoupler isolation unit U1 can output the BIT and discrete quantity acquisition results based on the first self-test signal, the second self-test signal, and the discrete quantity signal. The control unit 30 first adjusts the signal types of the first self-test signal and the second self-test signal so that the second output terminal A14 outputs the first BIT result, compares the first BIT result with the theoretical level signal at this time, and determines whether there is an abnormality in the discrete quantity acquisition and test circuit. Then, the signal types of the first self-test signal and the second self-test signal are adjusted again so that the second output terminal A14 outputs the second BIT result, and compares the second BIT result with the theoretical level signal at this time to determine whether there is an abnormality in the discrete quantity acquisition and test circuit. After the self-test is completed, the signal types of the first self-test signal and the second self-test signal are adjusted again so that the second output terminal A14 outputs the discrete quantity acquisition result. This solves the problem that the existing discrete quantity acquisition circuit cannot perform self-test, and can implement self-test testing of all fault modes of the discrete quantity acquisition circuit. The circuit structure is simple and reliable, which is conducive to reducing testing costs and improving the reliability of discrete quantity acquisition signals.
[0031] Alternatively, as Figure 1 As shown, the discrete quantity acquisition circuit 00 with BIT function also includes: a seventh resistor R7 and an eighth resistor R8. The seventh resistor R7 is electrically connected between the first input terminal A11 of the first optocoupler isolation unit U1 and the self-test power supply generating unit 10. The seventh resistor R7 is used to perform current limiting protection on the input side of the first optocoupler isolation unit U1; the eighth resistor R8 is electrically connected between the second output terminal A14 of the first optocoupler isolation unit U1 and the ground terminal DGND. The eighth resistor R8 is used to perform current limiting protection on the output side of the first optocoupler isolation unit U1, so that the actual current transfer ratio used at the front and rear ends of the optocoupler isolation unit is less than the minimum current transfer ratio of the optocoupler device characteristics, which is beneficial to improving the reliability of the optocoupler operation.
[0032] The ground terminal DGND may be a common ground terminal for digital signals, and the ground terminal DGND is isolated from the self-test excitation ground signal.
[0033] In one embodiment, the external discrete quantity signal may include a "high / open" discrete quantity and a "ground / open" discrete quantity. Different discrete quantities have different signal types at the discrete quantity acquisition terminal. When executing the preset BIT program, the signal types of the first and second self-test signals may be adjusted accordingly based on the discrete quantity signal type, thereby detecting all faults in the discrete quantity acquisition circuit.
[0034] Optionally, Figure 2The structural diagram of a discrete quantity acquisition circuit with a BIT function provided in Example 2 of the present invention exemplifies the circuit structure of a "high / open" discrete quantity acquisition circuit with a BIT function, rather than limiting the discrete quantity acquisition circuit 00 with a BIT function.
[0035] like Figure 2 As shown, the discrete quantity acquisition terminal includes a first discrete quantity acquisition terminal IN1; the first discrete quantity acquisition terminal IN1 is electrically connected to the first input terminal A11 of the first optocoupler isolation unit U1, and the first discrete quantity acquisition terminal IN1 is used to collect "high / open" discrete quantities, wherein the "high / open" discrete quantity can be a 28V high level signal or an open circuit signal.
[0036] like Figure 2 As shown, a first diode D1 is provided between the first discrete quantity acquisition terminal IN1 and the first input terminal A11, the anode of the first diode D1 is electrically connected to the first discrete quantity acquisition terminal IN1, and the cathode of the first diode D1 is electrically connected to the first input terminal A11 via a seventh resistor R7; a second diode D2 is further provided between the self-test power supply generating unit 10 and the first input terminal A11, the anode of the second diode D2 is electrically connected to the self-test power supply generating unit 10, and the cathode of the second diode D2 is electrically connected to the first input terminal A11 via the seventh resistor R7. The first diode D1 and the second diode D2 are used to prevent one discrete quantity acquisition from affecting other discrete quantity acquisitions, and to prevent a high-level signal from the first input terminal A11 from being connected to the input of another discrete quantity acquisition through the self-test excitation ground generating unit, causing the discrete quantity acquisition result to be inconsistent with the actual external input state, thereby ensuring the accuracy of the sampling result and improving the circuit reliability.
[0037] In this embodiment, the preset BIT program includes a preset "high / open" discrete quantity fault detection program. The preset "high / open" discrete quantity fault detection program is used to perform fault detection on the "high / open" discrete quantity acquisition circuit to determine whether there is a fault mode in which the "high / open" discrete quantity acquisition circuit outputs a normally-grounded signal.
[0038] Specifically, with reference to Figure 2As shown, the input side of the first optocoupler isolation unit U1 is provided with a light-emitting diode, and the output side is provided with a phototransistor. After the "high / open" discrete quantity acquisition circuit is powered on, a preset "high / open" discrete quantity fault detection program is executed. The control unit 30 first executes the first step of the "high / open" detection program, controls the self-test power supply generating unit 10 to output a high-level signal, and controls the self-test excitation ground generating unit 20 to output a self-test excitation ground signal, and obtains the first BIT result output by the second output terminal A14 of the first optocoupler isolation unit U1 in the current step. If the first BIT result is a high-level signal, it is determined that the first step of the "high / open" detection has passed, and the second step of the "high / open" detection program continues. In the second step of the "high / open" detection program, the self-test power supply generating unit 10 is controlled to output a high-level signal, and the self-test excitation ground generating unit 20 is controlled to output a high-impedance signal, and obtains the second BIT result output by the second output terminal A14 of the first optocoupler isolation unit U1 in the current step. If the second BIT result is a low-level signal, it is determined that the second step of the detection has passed. If the first BIT result is a low-level signal or the second BIT result is a high-level signal, it is determined that an abnormality occurs in the "high / open" discrete quantity acquisition circuit.
[0039] If the control unit 30 determines that the first "high / open" test has passed and the second "high / open" test has passed, that is, the power-on self-test has passed, the control unit 30 controls the self-test power supply generating unit 10 to output a high-impedance signal and controls the self-test excitation ground generating unit 20 to output a self-test excitation ground signal. If the first discrete quantity acquisition terminal IN1 provides a high-level signal, the second output terminal A14 of the first optical coupler isolation unit U1 outputs a high-level signal; if the first discrete quantity acquisition terminal IN1 provides an open-circuit signal, the second output terminal A14 of the first optical coupler isolation unit U1 outputs a low-level signal. Therefore, after the power-on self-test is completed, the second output terminal A14 of the first optical coupler isolation unit U1 outputs the discrete quantity acquisition result, and the normal discrete quantity acquisition work is not affected after the self-test is completed.
[0040] Optionally, Figure 3 The structural diagram of a discrete quantity acquisition circuit with a BIT function provided in Example 3 of the present invention exemplifies the circuit structure of a "ground / open" discrete quantity acquisition circuit with a BIT function, rather than limiting the discrete quantity acquisition circuit 00 with a BIT function.
[0041] like Figure 3 As shown, the discrete quantity acquisition terminal includes a second discrete quantity acquisition terminal IN2, which is electrically connected to the second input terminal A12 of the first optocoupler isolation unit U1. The second discrete quantity acquisition terminal is used to collect "ground / open" discrete quantities, wherein the "ground / open" discrete quantity can be a ground signal or an open circuit signal.
[0042] like Figure 3As shown, a third diode D3 is provided between the second discrete quantity acquisition terminal IN2 and the second input terminal A12, the positive terminal of the third diode D3 is electrically connected to the second input terminal A12, and the negative terminal of the third diode D3 is electrically connected to the second discrete quantity acquisition terminal IN2; a fourth diode D4 is also provided between the self-test excitation ground generating unit 20 and the second input terminal A12, the positive terminal of the fourth diode D4 is electrically connected to the second input terminal A12, and the negative terminal of the fourth diode D4 is electrically connected to the self-test excitation ground generating unit 20. The third diode D3 and the fourth diode D4 are used to prevent one discrete quantity acquisition from affecting other discrete quantity acquisitions, and prevent the high-level signal of the first input terminal A11 from being connected to the input of another discrete quantity acquisition through the self-test excitation ground generating unit, causing the discrete quantity acquisition result to be inconsistent with the actual external input state, thereby ensuring the accuracy of the sampling result and improving the circuit reliability.
[0043] In this embodiment, the preset BIT program includes a preset "ground / open" discrete quantity fault detection program. The preset "ground / open" discrete quantity fault detection program is used to perform fault detection on the "ground / open" discrete quantity acquisition circuit to determine whether a fault mode exists in which the "ground / open" discrete quantity acquisition circuit outputs a normally high signal.
[0044] Specifically, with reference to Figure 3 As shown, after the "ground / open" discrete quantity acquisition circuit is powered on, the preset "ground / open" discrete quantity fault detection program is executed. The control unit 30 first executes the first step of the "ground / open" detection program, controls the self-test power supply generating unit 10 to output a high-level signal, and controls the self-test excitation ground generating unit 20 to output a self-test excitation ground signal, and obtains the third BIT result output by the second output terminal A14 of the first optical coupling isolation unit U1 in the current step. If the third BIT result is a high-level signal, it is determined that the first step of the "ground / open" detection has passed, and the second step of the "ground / open" detection program continues to be executed. In the second step of the "ground / open" detection program, the self-test power supply generating unit 10 is controlled to output a high-impedance signal, and the self-test excitation ground generating unit 20 is controlled to output a self-test excitation ground signal, and obtains the fourth BIT result output by the second output terminal A14 of the first optical coupling isolation unit U1 in the current step. If the fourth BIT result is a low-level signal, it is determined that the second step of the "ground / open" detection has passed. If the third BIT result is a low-level signal or the fourth BIT result is a high-level signal, it is determined that an abnormality occurs in the "ground / open" discrete quantity acquisition circuit.
[0045] If the control unit 30 judges that the first step "ground / open" detection passes and the second step "ground / open" detection passes, that is, the power-on self-detection is qualified, the control unit 30 controls the self-detection power generation unit 10 to output a high level signal and controls the self-detection excitation ground generation unit 20 to output a high resistance state signal. If the second discrete quantity collection end IN2 provides a ground signal, the second output end A14 of the first optocoupler isolation unit U1 outputs a high level signal. If the first discrete quantity collection end IN1 provides an open circuit signal, the second output end A14 of the first optocoupler isolation unit U1 outputs a low level signal. Thus, after the power-on self-detection is completed, the second output end A14 of the first optocoupler isolation unit U1 outputs the discrete quantity collection result, and the normal discrete quantity collection work is not affected after the self-detection is completed.
[0046] Thus, the self-detection program can be executed according to the circuit structure, the self-detection test of all fault modes of the discrete quantity collection circuit is realized, the circuit structure is simple, the reliability is high, the test cost is reduced, and the reliability of the discrete quantity collection signal is improved.
[0047] Optionally, Figure 4 A structure schematic diagram of a discrete quantity collection circuit with a BIT function provided by the fourth embodiment of the present application is shown, and a circuit structure of a self-detection power generation unit is exemplarily shown.
[0048] As shown in the figure, Figure 4 The self-detection power generation unit 10 includes a second optocoupler isolation unit U2, a first switch unit Q1 and a voltage dividing unit 110. The voltage dividing unit 110 includes a first resistor R1 and a second resistor R2 connected in series, a first node P1 is arranged between the first resistor R1 and the second resistor R2, one end of the first resistor R1 away from the first node P1 is electrically connected with a second power supply end VDD, one end of the second resistor R2 away from the first node is electrically connected with a first output end A23 of the second optocoupler isolation unit U2. A first input end A21 of the second optocoupler isolation unit U2 is electrically connected with the control unit 30 through a third resistor R3, a second input end A22 of the second optocoupler isolation unit U2 is grounded, and a second output end A24 of the second optocoupler isolation unit U2 is grounded. A control end of the first switch unit Q1 is electrically connected with the first node P1, an input end of the first switch unit Q1 is electrically connected with the second power supply end VDD, an output end of the first switch unit Q1 is electrically connected with the first input end A11 of the first optocoupler isolation unit U1, and a seventh resistor R7 is further arranged between the output end of the first switch unit Q1 and the first input end A11 of the first optocoupler isolation unit U1. The output end of the first switch unit Q1 is used for outputting a high level signal or a high resistance state signal.
[0049] In an embodiment, the second power supply end VDD can be used for providing a direct current +28V power supply.
[0050] In one embodiment, the second input terminal A22 of the second optocoupler isolation unit U2 can be connected to the digital ground DGND, and the second output terminal A24 thereof can be connected to the general ground PGND. The input side and the output side of the second optocoupler isolation unit U2 do not share the same ground terminal, which is conducive to achieving mutual isolation between the input side and the output side and improving circuit reliability.
[0051] Optionally, the first switch unit Q1 may be a PNP MOS transistor.
[0052] Specifically, a light-emitting diode is provided on the input side of the second optocoupler isolation unit U2, and a phototransistor is provided on the output side. If the control unit 30 outputs an on-control signal to the second optocoupler isolation unit U2, for example, a high-level control signal, the light-emitting diode of the second optocoupler isolation unit U2 is turned on, and then the phototransistor of the second optocoupler isolation unit U2 is turned on. The voltage of the first node P1 is the divided voltage, the gate-source voltage difference of the first switch unit Q1 is higher than the turn-on voltage of the first switch unit Q1, the first switch unit Q1 is turned on, and the output end of the first switch unit Q1 outputs a high-level signal; if the control unit 30 outputs an off-control signal to the second optocoupler isolation unit U2, for example, a low-level control signal, the light-emitting diode of the second optocoupler isolation unit U2 is cut off, the phototransistor of the second optocoupler isolation unit U2 is turned off, the gate-source voltage difference of the first switch unit Q1 is lower than the turn-on voltage of the first switch unit Q1, the first switch unit Q1 is turned off, and the output end of the first switch unit Q1 outputs a high-impedance signal. By adjusting the signal type output by the self-test power generation unit 10 through the control unit, self-testing tests of all fault modes of the discrete quantity acquisition circuit can be realized, with a simple circuit structure and low cost.
[0053] Optionally, Figure 5 This is a structural diagram of a discrete quantity acquisition circuit with a BIT function provided in accordance with a fifth embodiment of the present invention, exemplarily showing the circuit structure of a self-test excitation generating unit.
[0054] like Figure 5As shown, the self-test excitation ground generating unit 20 includes: a third optocoupler isolation unit U3 and a second switch unit Q2; the first input terminal A31 of the third optocoupler isolation unit U3 is electrically connected to the control unit 30 through the fourth resistor R4, the second input terminal A32 of the third optocoupler isolation unit U3 is grounded, the first output terminal A33 of the third optocoupler isolation unit U3 is electrically connected to the second power supply terminal VDD through the fifth resistor R5, the second output terminal A34 of the third optocoupler isolation unit U3 is grounded through the sixth resistor R6, and a second node P2 is provided between the second output terminal A34 of the third optocoupler isolation unit U3 and the sixth resistor R6; the control terminal of the second switch unit Q2 is electrically connected to the second node P2, the input terminal of the second switch unit Q2 is grounded, the output terminal of the second switch unit Q2 is electrically connected to the second input terminal A12 of the first optocoupler isolation unit U1, and the output terminal of the second switch unit Q2 is used to output a self-test excitation ground signal or a high-impedance signal.
[0055] Optionally, the second switch unit Q2 may be an NPN MOS transistor.
[0056] In one embodiment, the second power supply terminal VDD may be used to provide a DC +28V power supply.
[0057] In one embodiment, the second input terminal A32 of the third optocoupler isolation unit U3 can be connected to the digital ground DGND, and the second output terminal A34 thereof can be connected to the general ground PGND. The input side and the output side of the third optocoupler isolation unit U3 do not share the same ground terminal, which is conducive to achieving mutual isolation between the input side and the output side and improving circuit reliability.
[0058] Specifically, refer to Figure 5 As shown, a light-emitting diode is provided on the input side of the third optocoupler isolation unit U3, and a phototransistor is provided on the output side. If the control unit 30 outputs an on-control signal to the third optocoupler isolation unit U3, for example, a high-level control signal, the light-emitting diode of the third optocoupler isolation unit U3 is turned on, and then the phototransistor of the third optocoupler isolation unit U3 is turned on, the voltage of the second node P2 is the divided voltage, the gate-source voltage difference of the second switch unit Q2 is higher than the turn-on voltage of the second switch unit Q2, the second switch unit Q2 is turned on, and the output end of the second switch unit Q2 outputs a ground signal; if the control unit 30 outputs an off-control signal to the third optocoupler isolation unit U3, for example, a low-level control signal, the light-emitting diode of the third optocoupler isolation unit U3 is cut off, the phototransistor of the third optocoupler isolation unit U3 is turned off, the gate-source voltage difference of the second switch unit Q2 is lower than the turn-on voltage of the second switch unit Q2, the second switch unit Q2 is turned off, and the output end of the second switch unit Q2 outputs a high-impedance signal. By adjusting the signal type output by the self-test excitation generating unit 20 through the control unit 30, self-testing tests of all fault modes of the discrete quantity acquisition circuit can be realized, with a simple circuit structure and low cost.
[0059] Embodiment 6 of the present invention further provides a discrete quantity acquisition method with a BIT function, which is implemented based on the discrete quantity acquisition circuit with a BIT function provided in any of the above embodiments, and is used to perform a self-test on the discrete quantity acquisition circuit and output a BIT and discrete quantity acquisition result.
[0060] Figure 6 This is a flowchart of a discrete quantity acquisition method with BIT function provided in Example 6 of the present invention.
[0061] like Figure 6 As shown, the discrete quantity acquisition method with BIT function specifically includes the following steps:
[0062] Step S1: Obtain external discrete quantity signal.
[0063] Step S2: According to the preset BIT program, the self-test power supply generating unit is controlled to output a first self-test signal, and the self-test excitation ground generating unit is controlled to output a second self-test signal. The first self-test signal is a high-level signal or a high-impedance signal, and the second self-test signal is a self-test excitation ground signal or a high-impedance signal.
[0064] Step S3: Outputting BIT and discrete quantity acquisition results according to the external discrete quantity signal, the first self-test signal and the second self-test signal.
[0065] In one embodiment, the external discrete signal may be a “high / open” discrete and / or a “ground / open” discrete.
[0066] Optionally, the preset BIT program includes at least one of the following: a preset "ground / open" discrete quantity fault detection program and a preset "high / open" discrete quantity fault detection program.
[0067] Specifically, when the external discrete quantity signal is a "high / open" discrete quantity, the preset "high / open" discrete quantity fault detection program is executed. First, the self-test power supply generating unit is controlled to output a high-level signal, and the self-test excitation ground generating unit is controlled to output a self-test excitation ground signal to obtain a first BIT result; then the self-test power supply generating unit is controlled to output a high-level signal, and the self-test excitation ground generating unit is controlled to output a high-impedance signal to obtain a second BIT result; after the power-on BIT is completed, the self-test power supply generating unit is controlled to output a high-impedance signal, and the self-test excitation ground generating unit is controlled to output a self-test excitation ground signal, and the BIT result is output according to the self-test power supply signal and the self-test excitation ground signal, and whether the "high / open" discrete quantity acquisition circuit has an abnormality is determined according to the BIT result.
[0068] When the external discrete quantity signal is a "ground / open" discrete quantity, a preset "ground / open" discrete quantity fault detection procedure is performed, first, the self-check power generation unit is controlled to output a high level signal, and the self-check excitation ground generation unit is controlled to output a self-check excitation ground signal, to obtain a third BIT result; then, the self-check power generation unit is controlled to output a high resistance state signal, and the self-check excitation ground generation unit is controlled to output the self-check excitation ground signal, to obtain a fourth BIT result; after the power-on BIT is completed, the self-check power generation unit is controlled to output the high level signal, and the self-check excitation ground generation unit is controlled to output the high resistance state signal, and the BIT result is output according to the self-check power signal and the self-check excitation ground signal, and whether the "ground / open" discrete quantity acquisition circuit is abnormal is judged according to the BIT result.
[0069] Therefore, when the preset BIT procedure is performed, the signal type of the first self-check signal and the second self-check signal can be adjusted according to the signal type of the external discrete quantity signal, the self-check test of all fault modes of the discrete quantity acquisition circuit is realized, the circuit structure is simple, the reliability is high, the test cost is reduced, and the reliability of the discrete quantity acquisition signal is improved.
[0070] Based on the above embodiment, an electronic device is further provided in the seventh embodiment of the present application.
[0071] Figure 7 A structural schematic diagram of an electronic device provided in the seventh embodiment of the present application is shown.
[0072] As shown in Figure 7 , the electronic device 1 includes the discrete quantity acquisition circuit 00 with the BIT function.
[0073] In this embodiment, the electronic device 1 can be an avionics device.
[0074] In summary, the discrete quantity acquisition circuit with the BIT function, the method and the electronic device provided in the present application acquire the external discrete quantity signal through the discrete quantity acquisition end, control the self-check power generation unit to output the first self-check signal according to the preset BIT procedure, the first self-check signal can be a high level signal or a high resistance state signal, control the self-check excitation ground generation unit to output the second self-check signal, the second self-check signal can be a self-check excitation ground signal or a high resistance state signal, and the first optocoupler isolation unit is used to output the BIT and the discrete quantity acquisition result according to the first self-check signal, the second self-check signal and the discrete quantity acquisition signal, the problem that the existing discrete quantity acquisition circuit cannot be self-checked is solved, the self-check test of all fault modes of the discrete quantity acquisition circuit can be realized, the circuit structure is simple, the reliability is high, the test cost is reduced, and the reliability of the discrete quantity acquisition signal is improved.
[0075] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A discrete quantity acquisition circuit with BIT function, characterized in that: include: A self-test power supply generating unit, a self-test excitation ground generating unit, a first optical coupling isolation unit, a discrete quantity acquisition terminal and a control unit; The discrete quantity acquisition terminal is electrically connected to the first input terminal of the first optical coupling isolation unit or the second input terminal of the first optical coupling isolation unit, and the discrete quantity acquisition terminal is used to obtain an external discrete quantity signal; The control unit is used to control the self-test power supply generating unit to output a first self-test signal and control the self-test excitation ground generating unit to output a second self-test signal according to a preset BIT program, wherein the first self-test signal is a high-level signal or a high-impedance signal, and the second self-test signal is a self-test excitation ground signal or a high-impedance signal; The first input end of the first optical coupler isolation unit is electrically connected to the self-test power supply generating unit, the second input end of the first optical coupler isolation unit is electrically connected to the self-test excitation generating unit, the first output end of the first optical coupler isolation unit is electrically connected to the first power supply end, and the second output end of the first optical coupler isolation unit is used to output BIT and discrete quantity acquisition results; The preset BIT program includes at least one of the following: a preset "ground / open" discrete quantity fault detection program and a preset "high / open" discrete quantity fault detection program; During the execution of the "high / open" discrete fault detection program, the control unit controls the self-test power supply generating unit to output a high-level signal, and controls the self-test excitation ground generating unit to output a self-test excitation ground signal, so as to obtain a first BIT result output by the first optocoupler isolation unit; the control unit controls the self-test power supply generating unit to output a high-level signal, and controls the self-test excitation ground generating unit to output a high-impedance signal, so as to obtain a second BIT result output by the first optocoupler isolation unit; During the execution of the preset "ground / open" discrete fault detection program, the control unit controls the self-test power supply generating unit to output a high-level signal, and controls the self-test excitation ground generating unit to output a self-test excitation ground signal, so as to obtain the third BIT result output by the first optocoupler isolation unit; the control unit controls the self-test power supply generating unit to output a high-impedance signal, and controls the self-test excitation ground generating unit to output a self-test excitation ground signal, so as to obtain the fourth BIT result output by the first optocoupler isolation unit.
2. The discrete quantity acquisition circuit with BIT function according to claim 1, characterized in that: The self-test power generation unit includes: a second optical coupling isolation unit, a first switch unit and a voltage dividing unit; The voltage divider unit includes a first resistor and a second resistor connected in series, a first node is provided between the first resistor and the second resistor, an end of the first resistor away from the first node is electrically connected to the second power supply end, and an end of the second resistor away from the first node is electrically connected to the first output end of the second optical coupling isolation unit; The first input terminal of the second optical coupling isolation unit is electrically connected to the control unit through a third resistor, the second input terminal of the second optical coupling isolation unit is grounded, and the second output terminal of the second optical coupling isolation unit is grounded; The control end of the first switch unit is electrically connected to the first node, the input end of the first switch unit is electrically connected to the second power supply end, the output end of the first switch unit is electrically connected to the first input end of the first optocoupler isolation unit, and the output end of the first switch unit is used to output a high-level signal or a high-impedance signal.
3. The discrete quantity acquisition circuit with BIT function according to claim 2, characterized in that: The first switch unit is a PNP MOS tube.
4. The discrete quantity acquisition circuit with BIT function according to claim 1, characterized in that: The self-test excitation generating unit includes: a third optical coupling isolation unit and a second switch unit; A first input end of the third optocoupler isolation unit is electrically connected to the control unit via a fourth resistor, a second input end of the third optocoupler isolation unit is grounded, a first output end of the third optocoupler isolation unit is electrically connected to the second power supply end via a fifth resistor, a second output end of the third optocoupler isolation unit is grounded via a sixth resistor, and a second node is provided between the second output end of the third optocoupler isolation unit and the sixth resistor; The control end of the second switch unit is electrically connected to the second node, the input end of the second switch unit is grounded, the output end of the second switch unit is electrically connected to the second input end of the first optocoupler isolation unit, and the output end of the second switch unit is used to output a self-test excitation ground signal or a high-impedance signal.
5. The discrete quantity acquisition circuit with BIT function according to claim 4, characterized in that: The second switch unit is an NPN MOS tube.
6. The discrete quantity acquisition circuit with BIT function according to any one of claims 1 to 5, characterized in that: Also includes: a seventh resistor and an eighth resistor, wherein the seventh resistor is electrically connected between the first input terminal of the first optical coupling isolation unit and the self-test power generation unit; The eighth resistor is electrically connected between the second output terminal of the first optical coupling isolation unit and the ground terminal.
7. The discrete quantity acquisition circuit with BIT function according to any one of claims 1 to 5, characterized in that: The discrete quantity acquisition terminal includes a first discrete quantity acquisition terminal and / or a second discrete quantity acquisition terminal; The first discrete quantity acquisition terminal is electrically connected to the first input terminal of the first optical coupling isolation unit, and the first discrete quantity acquisition terminal is used to acquire "high / open" discrete quantities; The second discrete quantity acquisition terminal is electrically connected to the second input terminal of the first optical coupling isolation unit, and the second discrete quantity acquisition terminal is used to acquire the "ground / open" discrete quantity.
8. A discrete quantity acquisition method with BIT function, characterized in that: The discrete quantity acquisition circuit with BIT function according to any one of claims 1 to 7 is implemented, comprising the following steps: Get external discrete signal; Controlling the self-test power supply generating unit to output a first self-test signal and controlling the self-test excitation ground generating unit to output a second self-test signal according to a preset BIT program, wherein the first self-test signal is a high-level signal or a high-impedance signal, and the second self-test signal is a self-test excitation ground signal or a high-impedance signal; A BIT and a discrete quantity acquisition result are output according to the discrete quantity signal, the first self-test signal and the second self-test signal.
9. An electronic device, characterized in that: The discrete quantity acquisition circuit with BIT function comprises the discrete quantity acquisition circuit with BIT function as described in any one of claims 1 to 7.