Bidirectional transmission dry contact converter and working method thereof
By designing a two-way transmission dry contact converter, using the microcontroller and conversion detection circuit to automatically identify and switch working modes, the existing dry contact compatibility is solved, and compatibility with input devices and output devices is achieved, which improves the Applicability of intelligent control systems.
Patent Information
- Application Number
- CN202111678274.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The existing dry contacts have low compatibility in intelligent control and cannot be compatible with input devices and output devices at the same time, resulting in limited applicability in multiple usage scenarios.
Design a two-way transmission dry contact converter, using a microcontroller, Bluetooth module, input conversion circuit, output conversion circuit and conversion detection circuit. By detecting the type of access device, it automatically switches the working mode to be compatible with two different types of devices. .
The compatibility of the two-way transmission dry contact converter under different device types is realized, improving its applicability and user experience in intelligent control systems.
Smart Images

Figure CN114509968B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of electronic device control, in particular to a bidirectional transmission dry contact converter and a working method of the converter. Background Art
[0002] Smart lamps widely use dry contacts as relay devices for signal transmission because dry contacts are one of the most versatile and compatible control devices in the control system. However, the dry contacts currently on the market have a single function and a low level of intelligence, which is not conducive to accessing intelligent systems. Generally, most of the existing dry contacts only provide manual control or passive control, and cannot achieve intelligent control. In addition, most of the existing dry contacts have a single function, either only able to connect to input devices or only able to connect to output devices, and are not compatible with both input and output devices.
[0003] In order to solve the problem of low intelligence of dry contacts, the dry contacts can be connected to Bluetooth devices, and signals can be sent to or received from the dry contacts through the Bluetooth devices, and Bluetooth communications can be performed with other devices through the Bluetooth devices. However, if the dry contacts are connected to Bluetooth devices, there will be a problem of mutual conversion between Bluetooth devices and dry contacts. In the two cases where the dry contacts are connected to input devices and output devices, the Bluetooth devices need to work in two different modes: Bluetooth output and Bluetooth input. However, since the dry contacts may be connected to input devices or output devices, if the dry contacts can only work in specific modes, the dry contacts can only be connected to input devices or output devices, and the compatibility of the dry contacts is not high, which affects the use of the dry contacts. Summary of the invention
[0004] The first object of the present invention is to provide a bidirectional transmission dry contact converter that is compatible with two different usage scenarios.
[0005] A second object of the present invention is to provide a working method of the above-mentioned bidirectional transmission dry contact converter.
[0006] To achieve the first objective of the present invention, the bidirectional transmission dry contact converter provided by the present invention includes a microcontroller, which is respectively connected to a Bluetooth module, an input conversion circuit and an output conversion circuit, the input conversion circuit includes at least one input terminal and a common terminal, and the output conversion circuit includes at least one output terminal; and the bidirectional transmission dry contact converter also includes a connection port and a conversion detection circuit, the connection port includes at least one connection terminal, one connection terminal is connected to an input terminal and an output terminal, and the connection port is also connected to the common terminal; the conversion detection circuit includes at least one OR gate, the first input end of the OR gate is connected to the connection terminal, and the output end of the OR gate outputs a detection signal to the microcontroller.
[0007] It can be seen from the above scheme that both the input terminal and the output terminal are connected to the connecting terminal. By detecting the level state of the connecting terminal through the conversion detection circuit, it can be determined whether the device currently connected to the dry contact is an input device or an output device, and the working mode of the two-way transmission dry contact converter is adjusted according to the type of the connected device, such as Bluetooth to dry contact working mode or dry contact to Bluetooth working mode, so that the two-way transmission dry contact converter can be connected to two different types of devices, thereby improving the compatibility of the two-way transmission dry contact converter.
[0008] A preferred solution is that the conversion detection circuit includes more than two OR gates, and the output end of each OR gate is connected to the microcontroller. Further, the second input end of the OR gate receives a low level signal.
[0009] It can be seen that the common terminal is loaded with a high-level signal after activation. If the connected device is an input device, the common terminal and the connection terminal are short-circuited, and the output of the OR gate outputs a high-level signal; if the connected device is an output device, the common terminal and the connection terminal are open-circuited, and the output of the OR gate outputs a low-level signal. In this way, by detecting the level of the output of the OR gate, the type of the connected device can be simply and quickly determined, and thus the working mode of the bidirectional transmission dry contact converter can be determined.
[0010] A further solution is that the input conversion circuit includes a first self-recovery fuse resistor, and the first self-recovery fuse resistor is connected between the input terminal and the microcontroller.
[0011] It can be seen that the first self-recovery fuse resistor can prevent the microcontroller from being damaged when the voltage received by the input terminal is too high.
[0012] A further solution is that the input conversion circuit further includes a second self-recovery fuse resistor, and the second self-recovery fuse resistor is connected between the common terminal and the microcontroller.
[0013] It can be seen that the second self-recovery fuse resistor can prevent the microcontroller from being damaged when the voltage received by the common terminal is too high.
[0014] Furthermore, the input conversion circuit also includes an anti-reverse connection device, which is connected between the common terminal and the microcontroller.
[0015] It can be seen from this that once the connection terminals between the bidirectional transmission dry contact converter and the input device are reversely connected, the reverse flow of current in the input conversion circuit can be prevented by the anti-reverse connection device, thereby avoiding damage to devices such as the microcontroller.
[0016] To achieve the above-mentioned second purpose, the working method of the bidirectional transmission dry contact converter provided by the present invention includes setting the input terminal to a high-impedance state, activating the common terminal so that the common terminal outputs a high-level signal; obtaining the detection signal output by the OR gate, if the detection signal is a high-level signal, then setting the bidirectional transmission dry contact converter to a Bluetooth to dry contact working mode, if the detection signal is a low-level signal, then setting the bidirectional transmission dry contact converter to a dry contact to Bluetooth working mode.
[0017] It can be seen from the above scheme that by detecting the detection signal output by the OR gate in the conversion detection circuit, the type of the connected device can be quickly determined, and then the working mode of the bidirectional transmission dry contact converter can be determined, thereby improving the compatibility of the bidirectional transmission dry contact converter. The entire process does not require the user to perform any operation, thereby improving the user experience.
[0018] A preferred solution is that setting the bidirectional transmission dry contact converter to the Bluetooth to dry contact working mode includes: the microcontroller sets the pin connected to the input terminal to be invalid and outputs a control signal to the output terminal.
[0019] It can be seen that the microcontroller directly sets the pin connected to the input terminal to be invalid, that is, the function of receiving the input signal is shielded, and the Bluetooth device works in the sending mode to ensure that the input device can accurately receive the signal sent by the two-way transmission dry contact converter.
[0020] An optional solution is to set the bidirectional transmission dry contact converter to a dry contact to Bluetooth working mode, including: the microcontroller sets the pin connected to the output terminal to be invalid, and receives the input terminal output control signal.
[0021] It can be seen that the microcontroller directly sets the pin connected to the output terminal to be invalid, that is, the function of sending the output signal is shielded, and the Bluetooth device works in the receiving mode to ensure that the control signal can be correctly sent to the output device.
[0022] A further solution is that the number of OR gates in the conversion detection circuit is more than two. If the detection signal output by any OR gate is a high-level signal, the bidirectional transmission dry contact converter is set to the Bluetooth to dry contact working mode; if the detection signals output by all OR gates are low-level signals, the bidirectional transmission dry contact converter is set to the dry contact to Bluetooth working mode.
[0023] Since the connected device may have multiple connection terminals, but the connection relationship between the multiple connection terminals and the input terminals and output terminals is uncertain, for this reason, only the detection signal output by any one of the OR gates needs to be a high-level signal, that is, indicating that the currently connected device is an input device, thereby setting the two-way transmission dry contact converter to the Bluetooth to dry contact working mode to ensure the accuracy of the two-way transmission dry contact converter working mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is an electrical principle block diagram of an embodiment of a bidirectional transmission dry contact converter of the present invention.
[0025] Figure 2 It is a structural diagram of the power supply circuit of an embodiment of a bidirectional transmission dry contact converter of the present invention.
[0026] Figure 3 It is a structural diagram of a microcontroller of an embodiment of a bidirectional transmission dry contact converter of the present invention.
[0027] Figure 4 It is a structural diagram of a Bluetooth module of an embodiment of a two-way transmission dry contact converter of the present invention.
[0028] Figure 5 It is a structural diagram of the input conversion circuit of an embodiment of a bidirectional transmission dry contact converter of the present invention.
[0029] Figure 6 It is a structural diagram of the output conversion circuit of an embodiment of a bidirectional transmission dry contact converter of the present invention.
[0030] Figure 7 It is a structural diagram of a conversion detection circuit of an embodiment of a bidirectional transmission dry contact converter of the present invention.
[0031] Figure 8 It is a flow chart of an embodiment of a working method of a bidirectional transmission dry contact converter of the present invention.
[0032] The present invention is further described below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION
[0033] The bidirectional transmission dry contact converter of the present invention is used to connect intelligent control devices, such as intelligent lamps. Intelligent lamps can be used as input devices or as output devices, and a Bluetooth module can be provided in the bidirectional transmission dry contact converter to control the operation of the intelligent control device through the Bluetooth module, or the intelligent control device sends signals to the outside through the Bluetooth module, such as signals of working status parameters. The bidirectional transmission dry contact converter of this embodiment can operate in two different modes, namely, Bluetooth to dry contact mode and dry contact to Bluetooth mode. The two different modes correspond to two different types of devices. At the same time, the bidirectional transmission dry contact converter can automatically realize the startup switching of the two working modes. The user does not need to perform any operations during the switching process, thereby improving the user experience.
[0034] See also Figure 1The bidirectional transmission dry contact converter of this embodiment includes a power supply circuit 11, a microcontroller 12, a Bluetooth module 13, an input conversion circuit 14, an output conversion circuit 15 and a conversion detection circuit 16. Among them, the power supply circuit 11 can provide power to the microcontroller 12, the Bluetooth module 13, the conversion detection circuit 16, etc. Preferably, the power supply circuit 11 can provide a DC power supply of 5V to 24V. The microcontroller 12 communicates with the Bluetooth module 13 and receives a detection signal output by the conversion detection circuit 16, and determines the type of device connected to the bidirectional transmission dry contact converter according to the detection signal to determine whether the connected device is an input device or an output device, and determines the working mode of the bidirectional transmission dry contact converter according to the type of the connected device, such as Bluetooth to dry contact mode or dry contact to Bluetooth mode.
[0035] The input conversion circuit 14 includes a plurality of input terminals, the output conversion circuit 15 includes a plurality of output terminals, a plurality of connection terminals and a common terminal are provided in the connection port, and a connection terminal is connected to an input terminal and an output terminal. In addition, the conversion detection circuit 16 includes a plurality of OR gates, a first input end of each OR gate is connected to a connection terminal, a second end of each OR gate receives a low level signal, and an output end of the OR gate outputs a detection signal to the microcontroller 12. The microcontroller 12 determines the working mode of the bidirectional transmission dry contact converter according to the detection signal.
[0036] See also Figure 2 The power circuit 11 has a voltage stabilizing chip U1, which receives an external power supply through a port P1 and forms a stable voltage after stabilizing the external power supply. In addition, the power circuit 11 is also provided with a filter circuit, for example, including a plurality of parallel filter capacitors C1, C2, C6, etc., so that the DC voltage VCC output by the power circuit 11 is stable. Preferably, the voltage output by the power circuit 11 can be between 5V and 24V, and a suitable voltage stabilizing chip U1 can be selected according to actual needs.
[0037] See also Figure 3 The microcontroller 12 is a single chip microcomputer U3, a part of the pins of the single chip microcomputer U3 are connected to the input terminal of the input conversion circuit, another part of the pins of the single chip microcomputer U3 are connected to the input terminal of the output conversion circuit, and the single chip microcomputer U3 is also connected to the Bluetooth module 13.
[0038] See also Figure 4 A Bluetooth chip U4 is provided in the Bluetooth module 13. The signal sending pin BLE_TX and the signal receiving pin BLE_RX of the Bluetooth chip U4 are both connected to the microcontroller U3. The microcontroller U3 can send a control signal to the Bluetooth chip U4 to determine the working mode of the Bluetooth chip U4, that is, whether it works in the sending mode or the receiving mode.
[0039] See also Figure 5 and Figure 6 , the bidirectional transmission dry contact converter includes a connection port P2, and the connection port P2 includes four connection terminals and a common terminal COM. For example, one connection terminal is K1_IN K1_OUT, which is connected to the input terminal K1_IN in the input conversion circuit 14, and is also connected to the output terminal K1_OUT in the output conversion circuit 15. Similarly, each of the other three connection terminals of the connection port P2 is connected to an input terminal and an output terminal. At the same time, the connection port P2 is electrically connected to the connected device, that is, multiple connection terminals of the connected device are respectively connected to multiple connection terminals of the connection port P2.
[0040] The input conversion circuit 14 includes four terminals KEY_1, KEY_2, KEY_3, and KEY_4 connected to the pin points of the microcontroller 12, and four first self-recovery protection resistors L4, L5, L6, and L7 are also provided. One input terminal is connected to the microcontroller 12 through a first self-recovery protection resistor. Taking the input terminal K1_IN as an example, the input terminal K1_IN is connected to one end of the first self-recovery protection resistor L6, and the other end of the first self-recovery protection resistor L6 is connected to KEY_1 of the microcontroller 12 through a resistor R13. Since the first self-recovery protection resistor L6 has the functions of self-recovery and overcurrent protection, that is, when the current received by the input terminal K1_IN is too large, the first self-recovery protection resistor L6 will disconnect automatically to prevent excessive current from affecting the operation of the microcontroller 12. When the large current ends, the first self-recovery protection resistor L6 will automatically restore the connection state, and the bidirectional transmission dry contact converter can normally receive the signal of the input terminal K1_IN. The connection method of the other three input terminals is the same as that of the input terminal K1_IN, and will not be repeated.
[0041] In addition, the input conversion circuit 14 is also provided with a field effect transistor M1, and the control end of the field effect transistor M1, that is, the gate is connected to the microcontroller 12. For example, the gate of the field effect transistor M1 is connected to the COM_CTRL pin. When the microcontroller 12 outputs a high level signal through the COM_CTRL pin, the field effect transistor M1 is turned on.
[0042] The drain of the field effect transistor M1 is connected to the DC power supply VCC, the source is connected to the second self-recovery protection resistor L3, and is connected to the common terminal COM through the voltage-stabilizing diode DS1. Therefore, the common terminal COM is actually connected to the microcontroller 12 through the second self-recovery protection resistor L3, and the common terminal COM is connected to the microcontroller 12 with the voltage-stabilizing diode DS1 as a reverse connection protection device.
[0043] In this way, when the current received by the common terminal COM is too large, the second self-recovery protection resistor L3 will be disconnected to prevent the excessive current from affecting the operation of the microcontroller 12. When the large current ends, the second self-recovery protection resistor L3 will automatically restore the connection state. In addition, once the common terminal COM is mistakenly connected to other terminals, the current input from the common terminal COM cannot pass through the voltage regulator diode DS1, preventing the current from flowing from the COM_CTRL pin to the microcontroller 12, thereby realizing the function of preventing reverse connection.
[0044] The output conversion circuit 15 is provided with a plurality of photocouplers U5, U6, U7, and U8. Taking the connection of the photocoupler U6 as an example, one input terminal of the photocoupler U6 is connected to the DC power supply VCC, and the other input terminal is connected to the K1 pin of the microcontroller 12 through the resistor R6. One output terminal of the photocoupler U6 is connected to the common terminal COM, and the other output terminal K1_OUT is used as the output terminal of the bidirectional transmission dry contact converter and is connected to a connection terminal of the connection port P2. The connection methods of other photocouplers U6, U7, and U8 are the same and will not be repeated.
[0045] See also Figure 7 The conversion detection circuit 16 includes a 4-way OR gate chip U9, and four OR gates are arranged in the 4-way OR gate chip U9. One of the OR gates includes two input terminals A0 and B0 and an output terminal O0. For example, the input terminal A0 is connected to the output terminal K1_OUT, and is actually connected to a connection terminal of the connection port P2. The input terminal B0 is grounded, that is, it receives a low-level signal. The output terminal O0 is connected to the microcontroller 12 to output a detection signal to the microcontroller 12.
[0046] If the device connected to the bidirectional transmission dry contact converter is an input device, that is, the device receives a signal from the bidirectional transmission dry contact converter, the common terminal COM of the input device connected to the connection port P0 and any one of the connection terminals are short-circuited. If the device connected to the bidirectional transmission dry contact converter is an output device, that is, the device outputs a signal to the bidirectional transmission dry contact converter, the common terminal COM of the output device connected to the connection port P0 and any one of the connection terminals are open-circuited. The present invention utilizes this characteristic to detect the type of the connected device through the conversion detection circuit 16, and thereby determines the working mode of the bidirectional transmission dry contact converter.
[0047] Combine the following Figure 8The working method of the bidirectional transmission dry contact converter is described. First, execute step S1, set the multiple input terminals of the input conversion circuit to a high impedance state, and activate the common terminal. Specifically, the microcontroller 12 sets the pins KEY_1 to KEY_4 connected to the multiple input terminals to a high impedance state, and outputs a high-level signal through the pin COM_CTRL. At this time, the field effect transistor M1 is in a conducting state, and the current flows from the DC power supply VCC through the field effect transistor M1, the second self-recovery fuse resistor L3 and the voltage regulator diode DS1, and then flows to the common terminal COM, so that the common terminal COM outputs a high-level signal, that is, the common terminal COM is activated.
[0048] When the bidirectional transmission dry contact converter is connected to a device, if the connected device is an input device, the common terminal COM in the connection port P2 is short-circuited with any other connection terminal. At this time, since the common terminal COM outputs a high-level signal, the other connection terminals of the connection port P2 are all in a high-level state. Since the connection terminals of the connection port P2 are all connected to the input terminals of the OR gate of the conversion detection circuit 16, for example, the connection terminals K1_IN K1_OUT are connected to the input terminal A0 of the OR gate, the output terminal O0 of the OR gate outputs a high-level signal. At this time, the detection signal received by the microcontroller 12 is a high-level signal.
[0049] If the device connected to the bidirectional transmission dry contact converter is an output device, the common terminal COM in the connection port P2 and any other connection terminals are open-circuited. At this time, the input ends of all OR gates of the conversion detection circuit 16 are low-level signals, that is, the detection signals received by the microcontroller 12 are all low-level signals.
[0050] Therefore, after executing step S1, you can wait for a period of time, for example, after waiting for 0.5 seconds, execute step S2 to obtain the detection signal output by the common terminal COM, and execute step S3 to determine whether the received detection signal is a high-level signal. If so, confirm that the connected device is an input device, and then execute step S5 to configure the two-way transmission dry contact converter to a Bluetooth to dry contact working mode. Specifically, the microcontroller 12 sets the pin connected to the input terminal to invalid, and sets the Bluetooth module 13 to a signal sending mode. The microcontroller 12 receives the signal from the Bluetooth module 13 and outputs a control signal to the output terminal.
[0051] If step S3 confirms that the received detection signal is a low-level signal and confirms that the connected device is an output device, step S4 is executed to configure the two-way transmission dry contact converter to a dry contact to Bluetooth working mode. Specifically, the microcontroller 12 sets the pin connected to the output terminal to be invalid, and sets the Bluetooth module 13 to a signal receiving mode. The microcontroller 12 receives the control signal of the input terminal and sends the received control signal to the Bluetooth module 13.
[0052] It should be noted that, since the number of OR gates in the conversion detection circuit 16 is more than two, for example, four in the present embodiment, in step S3, if the detection signal output by any OR gate is a high-level signal, it can be confirmed that the connected device is an input device, and the two-way transmission dry contact converter needs to be set to the Bluetooth to dry contact working mode. Correspondingly, if the detection signals output by all OR gates are low-level signals, it is confirmed that the connected device is an output device, and the two-way transmission dry contact converter is set to the dry contact to Bluetooth working mode.
[0053] It can be seen that the invention allows the bidirectional transmission dry contact converter to automatically identify the type of device connected, that is, input device or output device, and can automatically switch to the required working mode. Therefore, the bidirectional transmission dry contact converter can be compatible with two different types of devices, and the working mode switching process does not require the user to perform any operations, thereby improving the user experience.
[0054] Finally, it should be emphasized that the present invention is not limited to the above-mentioned embodiments. For example, changes in the number of OR gates set in the conversion detection circuit, or changes in the voltage provided by the power supply circuit, etc., should also be included in the scope of protection of the claims of the present invention.
Claims
1. A working method of a bidirectional transmission dry contact converter, the bidirectional transmission dry contact converter comprising: A microcontroller, wherein the microcontroller is respectively connected to the Bluetooth module, the input conversion circuit and the output conversion circuit, wherein the input conversion circuit includes at least one input terminal and a common terminal, and the output conversion circuit includes at least one output terminal; A connection port, the connection port comprising at least one connection terminal, one of the connection terminals being connected to one of the input terminals and one of the output terminals, and the connection port being further connected to the common terminal; A conversion detection circuit, the conversion detection circuit comprising at least one OR gate, a first input end of the OR gate is connected to the connection terminal, and an output end of the OR gate outputs a detection signal to the microcontroller; Characterized in that the method comprises: After the input terminal is set to a high impedance state, the common terminal is activated so that the common terminal outputs a high level signal; Obtain the detection signal output by the OR gate. If the detection signal is a high-level signal, set the bidirectional transmission dry contact converter to the Bluetooth to dry contact working mode. If the detection signal is a low-level signal, set the bidirectional transmission dry contact converter to the dry contact to Bluetooth working mode.
2. The working method of the bidirectional transmission dry contact converter according to claim 1, characterized in that: Setting the bidirectional transmission dry contact converter to the Bluetooth to dry contact working mode includes: the microcontroller sets the pin connected to the input terminal to be invalid and outputs a control signal to the output terminal.
3. The working method of the bidirectional transmission dry contact converter according to claim 1, characterized in that: Setting the bidirectional transmission dry contact converter to the dry contact to Bluetooth working mode includes: the microcontroller sets the pin connected to the output terminal to be invalid, and receives the output control signal from the input terminal.
4. The working method of the bidirectional transmission dry contact converter according to any one of claims 1 to 3, characterized in that: The number of the OR gates in the conversion detection circuit is more than two, and if the detection signal output by any one of the OR gates is a high-level signal, the bidirectional transmission dry contact converter is set to a Bluetooth to dry contact working mode; If all the detection signals output by the OR gates are low-level signals, the bidirectional transmission dry contact converter is set to a dry contact to Bluetooth working mode.
5. The working method of the bidirectional transmission dry contact converter according to claim 1, characterized in that: The conversion detection circuit includes more than two OR gates, and the output end of each OR gate is connected to the microcontroller.
6. The working method of the bidirectional transmission dry contact converter according to claim 1 or 2, characterized in that: The second input terminal of the OR gate receives a low level signal.
7. The working method of the bidirectional transmission dry contact converter according to claim 1 or 2, characterized in that: The input conversion circuit includes a first self-recovery fuse resistor, and the first self-recovery fuse resistor is connected between the input terminal and the microcontroller.
8. The working method of the bidirectional transmission dry contact converter according to claim 1 or 2, characterized in that: The input conversion circuit further includes a second self-recovery fuse resistor connected between the common terminal and the microcontroller.
9. The working method of the bidirectional transmission dry contact converter according to claim 1 or 2, characterized in that: The input conversion circuit further includes an anti-reverse connection device connected between the common terminal and the microcontroller.
Citation Information
Patent Citations
Wireless bluetooth switch socket
CN208674529U
Dry contact conversion device
CN209962101U