Bidirectional input and output interface device and control method
By designing a bidirectional input and output interface device, which includes an output circuit, an acquisition circuit and a switching control circuit, the problem of determining the function of the existing interface device is solved, and flexible adjustment of the function after the circuit is built and safe and reliable voltage signal transmission are achieved.
Patent Information
- Application Number
- CN202111602109.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-12-24
AI Technical Summary
The existing interface device cannot adjust the function of the point according to the actual situation, resulting in the point function being determined after the circuit is built and unable to be flexibly adjusted to output or acquisition point.
A bidirectional input and output interface device is designed, which includes an output circuit, an acquisition circuit and a switching control circuit. The transmission direction of the voltage signal is controlled by the switching control circuit, so that the interface device can adjust its function according to actual needs after the circuit is built.
The flexibility of the circuit after construction is enhanced, the function of the interface device can be adjusted according to actual needs, and flexible switching of output or collection voltage signals can be achieved, thereby improving the adaptability and safety of the circuit.
Smart Images

Figure CN114268308B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of circuit design, and in particular to a bidirectional input and output interface device and a control method. Background Art
[0002] In existing circuit design schemes, it is often necessary to output voltage signals or collect voltage signals. However, in existing interface devices, the points are either output points or collection points. Therefore, before building the circuit, it is necessary to accurately determine which points in the circuit are output points and which points are collection points. After the circuit is built, the functions of the points in the circuit are determined, and the functions of the points cannot be adjusted according to actual conditions. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide a bidirectional input and output interface device and a control method, wherein the output point of the bidirectional input and output interface device can both collect the second voltage signal of the external application circuit and output the voltage signal to the external application circuit. For the constructed circuit, the function of the bidirectional input and output interface device can be adjusted according to actual conditions.
[0004] An embodiment of the present application provides a bidirectional input and output interface device, the interface device comprising an output circuit, an acquisition circuit, and a switching control circuit;
[0005] The output end of the output circuit is electrically connected to the input end of the switching control circuit, and the output end of the switching control circuit is electrically connected to the acquisition end of the acquisition circuit; the output end of the switching control circuit is also electrically connected to an external application circuit;
[0006] The output circuit is used to output a first voltage signal;
[0007] The switching control circuit is configured to receive the first voltage signal output by the output circuit and determine whether to output the first voltage signal to the external application circuit according to the control state of the switching control circuit;
[0008] The acquisition circuit is used to acquire the second voltage signal of the external application circuit through the acquisition terminal when the switching control circuit does not output the first voltage signal to the external application circuit.
[0009] In some embodiments, the acquisition circuit in the bidirectional input and output interface device is further used to acquire the first voltage signal at the output end of the switching control circuit through the acquisition end when the switching control circuit outputs the first voltage signal to the external application circuit.
[0010] In some embodiments, the control end of the switching control circuit in the bidirectional input and output interface device is further connected to a controller to receive a control signal from the controller and determine the control state of the switching control circuit according to the received control signal.
[0011] In some embodiments, the bidirectional input and output interface device further includes a voltage isolation module;
[0012] The input end of the voltage isolation module is electrically connected to the output end of the switching control circuit, and the output end of the voltage isolation module is electrically connected to the collection end of the collection circuit.
[0013] In some embodiments, the output circuit in the bidirectional input-output interface device is a power supply circuit or a voltage output circuit of an electric power device.
[0014] In some embodiments, a bidirectional input and output control method is also provided, which is applied to a bidirectional input and output interface device, wherein the interface device includes an output circuit, an acquisition circuit, and a switching control circuit;
[0015] The output end of the output circuit is electrically connected to the input end of the switching control circuit, and the output end of the switching control circuit is electrically connected to the acquisition end of the acquisition circuit; the output end of the switching control circuit is also electrically connected to an external application circuit;
[0016] The control method includes:
[0017] The output circuit outputs a first voltage signal to the switching control circuit;
[0018] The switching control circuit receives the first voltage signal output by the output circuit and determines whether to output the first voltage signal to the external application circuit according to a control state of the switching control circuit;
[0019] If yes, the switching control circuit outputs the first voltage signal to the external application circuit;
[0020] If not, the switching control circuit does not output the first voltage signal to the external application circuit, and the acquisition circuit acquires the second voltage signal of the external application circuit through the acquisition terminal.
[0021] In some embodiments, the bidirectional input and output control method, before determining whether to output the first voltage signal to the external application circuit based on the control state of the switching control circuit, further comprises:
[0022] The control state of the switching control circuit is set so that the interface device can output a first voltage signal to an external application circuit or collect a second voltage signal from an external application circuit.
[0023] In some embodiments, the control end of the switching control circuit of the interface device applied in the bidirectional input and output control method is further connected to a controller;
[0024] Before determining whether to output the first voltage signal to the external application circuit according to the control state of the switching control circuit, the control method further includes:
[0025] The controller sends a control signal to the switching control circuit;
[0026] The switching control circuit receives the control signal and updates the control state of the switching control circuit according to the received control signal.
[0027] In some embodiments, the bidirectional input and output control method further includes:
[0028] The controller sends a preset control signal to the switching control circuit to control the switching control circuit to output the first voltage signal to the external application circuit;
[0029] The acquisition end of the acquisition circuit acquires the first voltage signal output by the external application circuit;
[0030] It is determined whether the interface device is abnormal according to the collected first voltage signal.
[0031] In some embodiments, the bidirectional input and output control method further includes:
[0032] The controller sends a control signal that changes according to a preset period to the switching control circuit;
[0033] The switching control circuit receives the control signal that changes according to a preset period, and controls the switching control circuit to intermittently output the first voltage signal according to the preset period, so that the interface device alternately implements the following two functions according to the preset period: outputting the first voltage signal to the external application circuit, or collecting the second voltage signal of the external application circuit.
[0034] The present application provides an output circuit and an acquisition circuit in a bidirectional input and output interface device, and controls, through a switching control circuit, whether the first voltage signal output by the output circuit is transmitted to an external application circuit, or whether the acquisition circuit acquires the second voltage signal of the external application circuit. This enables the interface device to output the first voltage signal to the external application circuit or acquire the second voltage signal of the external application circuit according to the control state of the switching control circuit. This enables the power equipment using the interface device to adjust its external connection points according to actual needs even after the circuit is built, thereby greatly enhancing the flexibility of the circuit after construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 A circuit schematic diagram of a bidirectional input and output interface device according to an embodiment of the present application is shown;
[0037] Figure 2 A circuit schematic diagram of another bidirectional input and output interface device according to an embodiment of the present application is shown;
[0038] Figure 3 A circuit diagram of a bidirectional input and output interface device according to an embodiment of the present application is shown;
[0039] Figure 4 A flow chart showing a method for controlling bidirectional input and output according to an embodiment of the present application is shown;
[0040] Figure 5 A method flow chart of another bidirectional input and output control method described in an embodiment of the present application is shown.
[0041] Explanation of the accompanying symbols: 101, output circuit; 102, acquisition circuit; 103, switching control circuit; 201, controller; 202, voltage isolation module; VCC, DC power supply; Q301, QMOS tube; U301, optocoupler; R301, first resistor; R302, second resistor; R303, third resistor; R304, fourth resistor; R305, fifth resistor. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0043] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0044] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0045] In existing circuit design solutions, it is often necessary to output voltage signals or collect voltage signals. For example, when designing a central processing unit, the central processing unit often includes a processing module and peripheral circuits. The processing module can be a single-chip microcomputer or other processing chip.
[0046] The central processing unit often needs to be provided with a number of output points to output the first voltage signal to the external application circuit, and also needs to be provided with a number of acquisition points to acquire the voltage signal in the external application circuit.
[0047] However, in the existing interface devices, the interface device points used by the central processing unit to connect to the external application circuit are either output points or collection points. The staff must set up the peripheral interface device of the central processing unit in advance according to the actual usage requirements (for example, for realizing intelligent control of washing machines, air conditioners, rice cookers, etc., for realizing industrial automation control and intelligent instrument control, etc.), and clarify which points of the external interface device are output points and which points are collection points. After the peripheral interface device is built, the functions of the points in the circuit are determined, and the functions of the points cannot be adjusted according to the actual situation, such as adjusting the output point to the collection point, or adjusting the collection point to the output point.
[0048] Based on this, Figure 1 As shown, an embodiment of the present application provides a bidirectional input and output interface device, the interface device comprising an output circuit 101, an acquisition circuit 102 and a switching control circuit 103;
[0049] The output end of the output circuit 101 is electrically connected to the input end of the switching control circuit 103, and the output end of the switching control circuit 103 is electrically connected to the acquisition end of the acquisition circuit 102; the output end of the switching control circuit 103 is also electrically connected to an external application circuit;
[0050] The output circuit 101 is configured to output a first voltage signal;
[0051] The switching control circuit 103 is configured to receive the first voltage signal output by the output circuit 101 and determine whether to output the first voltage signal to the external application circuit based on the control state of the switching control circuit 103;
[0052] The acquisition circuit 102 is configured to acquire a second voltage signal from the external application circuit via an acquisition terminal when the switching control circuit 103 does not output the first voltage signal to the external application circuit.
[0053] The output end of the switching control circuit 103 is electrically connected to the acquisition end of the acquisition circuit 102 , and the output end of the switching circuit is used as an external connection point of the interface device and is electrically connected to the external application circuit.
[0054] The output circuit 101 may be a power supply circuit or a voltage output circuit of an electric device. The voltage output circuit of the electric device may be a rectifier circuit, a voltage transformer circuit, a DC-DC converter circuit, an AC-DC converter circuit, a voltage stabilizing circuit, etc.
[0055] The switching control circuit 103 has at least two control states: a first control state and a second control state. When the switching control circuit 103 is in the first control state, it receives the first voltage signal output by the output circuit 101 and outputs the first voltage signal to the external application circuit; when the switching control circuit 103 is in the second control state, it receives the first voltage signal output by the output circuit 101 but does not output the first voltage signal to the external application circuit. That is, when the switching control circuit 103 is in the first control state, the output terminal of the switching control circuit 103 outputs the first voltage signal; when the switching control circuit 103 is in the second control state, the output terminal of the switching control circuit 103 outputs a low-level signal.
[0056] In the embodiment of the present application, specifically, the first control state of the switching control circuit 103 is an on state, and the second control state is an off state.
[0057] The switching control circuit 103 may be a switch circuit, and the switch circuit may be a transistor, a relay, a logic gate circuit, etc.
[0058] like Figure 2 As shown, in order to realize the control of the switching circuit, the control end of the switching control circuit 103 is further connected to a controller 201 to receive a control signal from the controller 201 and determine the control state of the switching control circuit 103 according to the received control signal.
[0059] In some embodiments, to ensure that the bidirectional input / output interface device cannot simultaneously output a first voltage signal to an external application circuit and collect a second voltage signal from the external application circuit, and to prevent the collection and output functions of the interface device from interfering with each other and causing a malfunction of the interface device, the collection circuit 102 is further provided with a collection control circuit linked to the switching control circuit 103. When the switching control circuit 103 is in an on-control state, the collection control circuit is in an off-control state, so that the collection circuit 102 cannot collect the voltage signal at the output end of the switching circuit, and thus cannot collect the voltage signal of the external application circuit. When the switching control circuit 103 is in an off-control state, the collection control circuit is in an on-control state, so that the collection circuit 102 cannot normally collect the voltage signal at the output end of the switching circuit, and thus cannot collect the voltage signal of the external application circuit.
[0060] In some embodiments, the acquisition circuit 102 is further configured to acquire the first voltage signal at the output end of the switching control circuit 103 through an acquisition end when the switching control circuit 103 outputs the first voltage signal to the external application circuit.
[0061] That is, the acquisition circuit 102 is always in a controlled state of electrical connection with the output terminal of the switching control circuit 103 (i.e., the external connection point of the bidirectional input and output interface device). When the switching control circuit 103 is in the conductive state, the output terminal of the switching control circuit 103 outputs a high-level signal, and the acquisition circuit 102 acquires the high-level signal, compares the acquired high-level signal in real time with a preset standard high-level signal, and determines whether the interface device has any abnormality based on the comparison result.
[0062] like Figure 2 As shown, in some embodiments, the bidirectional input and output interface device further includes a voltage isolation module; the input end of the voltage isolation module is electrically connected to the output end of the switching control circuit 103, and the output end of the voltage isolation module is electrically connected to the acquisition end of the acquisition circuit 102. The voltage isolation module effectively isolates the voltage signal of the external application circuit, making it safer and more reliable. Even if the external connection points of the interface device are incorrectly wired and a very high voltage is connected, only the voltage supplied to the module will be damaged, effectively protecting the microcontroller or chip electrically connected to the interface device and the central processing unit using the interface device.
[0063] The present application provides an output circuit 101 and an acquisition circuit 102 in a bidirectional input and output interface device, and controls through a switching control circuit 103 whether the first voltage signal output by the output circuit 101 is transmitted to an external application circuit, or whether the acquisition circuit 102 acquires the second voltage signal of the external application circuit. This enables the interface device to output the first voltage signal to the external application circuit or acquire the second voltage signal of the external application circuit according to the control state of the switching control circuit 103. This allows the power equipment using the interface device to adjust its external connection points according to actual needs even after the circuit is built, thereby greatly enhancing the flexibility of the circuit after construction.
[0064] like Figure 3 As shown, the output circuit 101 adopts a DC power supply VCC, the switching control circuit 103 includes a first resistor R301 and a MOS transistor Q301; the acquisition circuit 102 includes a fourth resistor R304 and a fifth resistor R305; the voltage isolation circuit adopts an optocoupler U301;
[0065] The MOS transistor Q301 is connected to the control point of the controller 201 through the first resistor R301;
[0066] The output end of the DC power supply VCC is connected to the input end of the MOS transistor Q301, the output end of the MOS transistor Q301 is connected to the first end of the third resistor R303, and the second end of the third resistor R303 is grounded; the output end of the MOS transistor Q301 serves as an external connection point CJ1 of the bidirectional input and output interface device;
[0067] The output end of the MOS tube Q301 is connected to the first end of the optocoupler U301 through a second resistor R302, the second end of the optocoupler U301 is grounded, the third end of the optocoupler U301 is connected to the optocoupler U301 power supply, the fourth end of the optocoupler U301 is connected to the first end of the fourth resistor R304, and the second end of the fourth resistor R304 is grounded; the first end of the fourth resistor R304 is connected to the first end of the fifth resistor R305; the second end of the fifth resistor R305 is connected to the collection point of the processing module, and the collected voltage signal is input into the processing module.
[0068] The controller 201 is used to control the on / off state of the MOS transistor Q301. When the MOS transistor Q301 is on, the voltage level of the external connection point CJ1 of the interface device is pulled to the value of the power supply voltage VCC, so that the "external connection point CJ1" functions as a voltage output. In other words, the function of the interface device is to output a first voltage signal to the external application circuit.
[0069] When the external connection point CJ1 becomes the first voltage signal, the optocoupler U301 is turned on, so that the output pole of the optocoupler U301 is turned on, and the "IN_1" point becomes a high level. The interface device realizes the internal acquisition function and determines whether the external connection point CJ1 is a high level according to the voltage value of the "IN_1" point.
[0070] Therefore, when the MOS transistor Q301 is not turned on and the "external connection point CJ1" is detected to be at a high level, that is, the high level of the external connection point CJ1 is not the first voltage signal of the power supply voltage VCC, but the second voltage signal in the external application circuit. The function of the bidirectional input and output interface device is to collect the second voltage signal of the external application circuit.
[0071] At the same time, the optocoupler U301 also effectively isolates the high voltage signal in the external application, making it safer and more reliable. Even if the external wiring is wrong and a very high voltage is connected, only one optocoupler U301 will be burned, effectively protecting the central processing unit of the bidirectional input and output interface device.
[0072] In the embodiment of the present application, the function of the bidirectional input and output interface device can be determined by the control signal output by the controller 201 and the voltage signal collected by the acquisition circuit 102, and it can be determined whether the external connection point outputs the first voltage signal to the external application circuit or collects the second voltage signal of the external application circuit.
[0073] In some embodiments, the control state of the switching control circuit 103 is set so that the bidirectional input / output interface device can output a first voltage signal to an external application circuit or collect a second voltage signal from the external application circuit. That is, when the switching circuit is put into use, the bidirectional input / output interface device can be set to either an output state (outputting a high-level signal to an external application circuit) or a collection state (collecting the second voltage signal from the external application circuit) based on actual needs.
[0074] In some embodiments, the switching control circuit 103 receives a control signal sent by the controller 201 and updates or sets a control state of the switching control circuit 103 according to the received control signal.
[0075] In some embodiments, the processor sends a preset control signal to the switching control circuit 103, and the preset control signal controls the switching control circuit 103 to output the first voltage signal to the external application circuit;
[0076] The acquisition end of the acquisition circuit 102 acquires the first voltage signal output by the external application circuit;
[0077] It is determined whether the interface device is abnormal according to the collected first voltage signal.
[0078] That is, when the bidirectional input / output interface device is in the acquisition state, if it is necessary to determine whether the interface device is normal, the bidirectional input / output interface device can be switched to the output state, so that the acquisition end of the acquisition circuit 102 acquires the first voltage signal output by the external application circuit. Based on the acquired first voltage signal, it is determined whether the interface device is abnormal. If it is normal, the bidirectional input / output interface device is switched back to the acquisition state. If it is abnormal, an alarm or other operation can be performed.
[0079] The determining whether the interface device is abnormal based on the collected first voltage signal may be implemented by the controller 201 .
[0080] In some embodiments, the controller 201 is further configured to send a control signal that changes according to a preset period to the switching control circuit 103;
[0081] The switching control circuit 103 is also used to receive the control signal that changes according to the preset period, and control the switching control circuit 103 to intermittently output the first voltage signal according to the preset period, so that the bidirectional input and output interface device alternately implements the following two functions according to the preset period: outputting the first voltage signal to the external application circuit, or collecting the second voltage signal of the external application circuit.
[0082] The bidirectional input / output interface device alternately implements the following two functions according to a preset cycle, enriching the functionality of the bidirectional input / output interface device. For example, a bidirectional input / output interface device in a collection state can be periodically switched to an output state to periodically detect whether the bidirectional input / output interface device is abnormal. Alternatively, the bidirectional input / output interface device can be used to meet the special needs of external application circuits. For example, the motor of some devices operates periodically, outputting a first voltage signal to the motor when the circuit is rotating, and collecting the voltage signal in circuit 102 when the circuit is not rotating to provide feedback on the device status.
[0083] The embodiment of the present application further provides a bidirectional input and output control method, which is applied to an interface device with bidirectional input and output, wherein the interface device includes an output circuit 101, an acquisition circuit 102, and a switching control circuit 103;
[0084] The output end of the output circuit 101 is electrically connected to the input end of the switching control circuit 103, and the output end of the switching control circuit 103 is electrically connected to the acquisition end of the acquisition circuit 102; the output end of the switching control circuit 103 is also electrically connected to an external application circuit;
[0085] like Figure 4 As shown, the bidirectional input and output control method includes:
[0086] S401, the output circuit 101 outputs a first voltage signal to the switching control circuit 103;
[0087] S402, the switching control circuit 103 receives the first voltage signal output by the output circuit 101, and determines whether to output the first voltage signal to the external application circuit according to the control state of the switching control circuit 103;
[0088] S403: If yes, the switching control circuit 103 outputs the first voltage signal to the external application circuit;
[0089] S404 : If not, the switching control circuit 103 does not output the first voltage signal to the external application circuit, and the acquisition circuit 102 acquires the second voltage signal of the external application circuit through the acquisition terminal.
[0090] Furthermore, the bidirectional input and output control method further includes, before determining whether to output the first voltage signal to the external application circuit according to the control state of the switching control circuit 103:
[0091] The control state of the switching control circuit 103 is set so that the interface device can output a first voltage signal to an external application circuit or collect a second voltage signal from an external application circuit.
[0092] Furthermore, in the bidirectional input and output control method, the control end of the switching control circuit 103 of the interface device is further connected to a controller 201;
[0093] Before determining whether to output the first voltage signal to the external application circuit according to the control state of the switching control circuit 103, the control method further includes:
[0094] The controller 201 sends a control signal to the switching control circuit 103;
[0095] The switching control circuit 103 receives the control signal and updates the control state of the switching control circuit 103 according to the received control signal.
[0096] Further, such as Figure 5 As shown, the bidirectional input and output control method further includes:
[0097] S501: The controller 201 sends a preset control signal to the switching control circuit 103 to control the switching control circuit 103 to output the first voltage signal to the external application circuit;
[0098] S502: The acquisition terminal of the acquisition circuit 102 acquires a first voltage signal output by the external application circuit;
[0099] S503: Determine whether the interface device is abnormal based on the collected first voltage signal.
[0100] Furthermore, the bidirectional input and output control method further includes:
[0101] The controller 201 sends a control signal that changes according to a preset period to the switching control circuit 103;
[0102] The control switching control circuit 103 receives the control signal that changes according to the preset period, and controls the switching control circuit 103 to intermittently output the first voltage signal according to the preset period, so that the interface device alternately implements the following two functions according to the preset period: outputting the first voltage signal to the external application circuit, or collecting the second voltage signal of the external application circuit.
[0103] In some embodiments, in an interface device to which the bidirectional input and output control method is applied, the output circuit 101 is a power supply circuit or a voltage output circuit of an electric power device.
[0104] In some embodiments, the interface device used in the bidirectional input and output control method further includes a voltage isolation module;
[0105] The input end of the voltage isolation module is electrically connected to the output end of the switching control circuit 103 , and the output end of the voltage isolation module is electrically connected to the collection end of the collection circuit 102 .
[0106] Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the method embodiments and will not be described in detail in this application. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways.
[0107] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0108] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A bidirectional input and output interface device, characterized in that: The interface device includes an output circuit, an acquisition circuit and a switching control circuit; The output end of the output circuit is electrically connected to the input end of the switching control circuit, and the output end of the switching control circuit is electrically connected to the acquisition end of the acquisition circuit; the output end of the switching control circuit is also electrically connected to an external application circuit; The output circuit is used to output a first voltage signal; The switching control circuit is configured to receive the first voltage signal output by the output circuit and determine whether to output the first voltage signal to the external application circuit according to the control state of the switching control circuit; The acquisition circuit is configured to acquire a second voltage signal from the external application circuit through an acquisition terminal when the switching control circuit does not output the first voltage signal to the external application circuit; The acquisition circuit is further configured to acquire the first voltage signal at the output end of the switching control circuit through the acquisition end when the switching control circuit outputs the first voltage signal to the external application circuit; The output circuit uses a DC power supply VCC. The switching control circuit includes a first resistor and a MOS transistor. The output end of the MOS transistor serves as an external connection point of a bidirectional input and output interface device. When the MOS transistor is turned on, the voltage level of the external connection point of the interface device is pulled to the value of the power supply voltage VCC, so that the external connection point functions as a voltage output. When the MOS transistor is not turned on and the external connection point is detected to be at a high level, the function of the bidirectional input and output interface device is to collect a second voltage signal from the external application circuit.
2. The bidirectional input and output interface device according to claim 1, characterized in that: The control end of the switching control circuit is further connected to a controller to receive a control signal from the controller and determine the control state of the switching control circuit according to the received control signal.
3. The bidirectional input and output interface device according to claim 1, characterized in that: The interface device also includes a voltage isolation module; The input end of the voltage isolation module is electrically connected to the output end of the switching control circuit, and the output end of the voltage isolation module is electrically connected to the collection end of the collection circuit.
4. The bidirectional input and output interface device according to claim 1, characterized in that: The output circuit is a power supply circuit or a voltage output circuit of an electric power device.
5. A bidirectional input and output control method, characterized in that: An interface device for bidirectional input and output, comprising an output circuit, an acquisition circuit, and a switching control circuit; The output end of the output circuit is electrically connected to the input end of the switching control circuit, and the output end of the switching control circuit is electrically connected to the acquisition end of the acquisition circuit; the output end of the switching control circuit is also electrically connected to an external application circuit; the output circuit uses a DC power supply VCC, the switching control circuit includes a first resistor and a MOS transistor, and the output end of the MOS transistor serves as an external connection point of a bidirectional input and output interface device; The control method includes: The output circuit outputs a first voltage signal to the switching control circuit; The switching control circuit receives the first voltage signal output by the output circuit and determines whether to output the first voltage signal to the external application circuit according to a control state of the switching control circuit; If yes, the switching control circuit outputs the first voltage signal to the external application circuit; If not, the switching control circuit does not output the first voltage signal to the external application circuit, and the acquisition circuit acquires the second voltage signal of the external application circuit through the acquisition terminal; When the MOS transistor is turned on, the voltage level of the external connection point of the interface device is pulled to the value of the power supply voltage VCC, so that the external connection point functions as a voltage output; when the MOS transistor is not turned on and the external connection point is still detected to be at a high level, the function of the bidirectional input and output interface device is to collect the second voltage signal of the external application circuit.
6. The bidirectional input and output control method according to claim 5, characterized in that: Before determining whether to output the first voltage signal to the external application circuit according to the control state of the switching control circuit, the control method further includes: The control state of the switching control circuit is set so that the interface device can output a first voltage signal to an external application circuit or collect a second voltage signal from an external application circuit.
7. The bidirectional input and output control method according to claim 5, characterized in that: The control end of the switching control circuit of the interface device is also connected to a controller; Before determining whether to output the first voltage signal to the external application circuit according to the control state of the switching control circuit, the control method further includes: The controller sends a control signal to the switching control circuit; The switching control circuit receives the control signal and updates the control state of the switching control circuit according to the received control signal.
8. The bidirectional input and output control method according to claim 7, characterized in that: The control method further includes: The controller sends a preset control signal to the switching control circuit to control the switching control circuit to output the first voltage signal to the external application circuit; The acquisition end of the acquisition circuit acquires the first voltage signal output by the external application circuit; It is determined whether the interface device is abnormal according to the collected first voltage signal.
9. The bidirectional input and output control method according to claim 7, characterized in that: The controller sends a control signal that changes according to a preset period to the switching control circuit; The switching control circuit receives the control signal that changes according to a preset period, and controls the switching control circuit to intermittently output the first voltage signal according to the preset period, so that the interface device alternately implements the following two functions according to the preset period: outputting the first voltage signal to the external application circuit, or collecting the second voltage signal of the external application circuit.
Citation Information
Patent Citations
Isolated bidirectional digital input output circuit
CN102497197A