Digital switching value input / output multiplexing circuit and extension module comprising same
By designing a digital switching input and output multiplexing circuit including MOS tubes, diodes, TVS tubes, resistors and capacitors, the problem of limited number of terminals in small-volume expansion modules is solved, and the input and output multiplexing of digital switching quantities is realized, reducing the module volume.
Patent Information
- Application Number
- CN202421637610.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2034-07-11
AI Technical Summary
In small-volume expansion modules, due to the limited number of terminals, it is necessary to seek efficient ways to reduce the number of terminals while achieving input and output of digital switches.
Design a digital switching quantity input and output multiplexing circuit, which includes MOS tube, diode, TVS tube, resistor and capacitor, and realizes the input and output of the digital switching quantity through one port to reduce the demand for the number of terminals.
It realizes the use of a circuit to simultaneously perform input and output of digital switch quantities, achieving the purpose of interface multiplexing, and reducing the volume of the expansion module.
Smart Images

Figure CN222928378U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of input / output interfaces, and specifically, to a digital switch input / output multiplexing circuit and an expansion module including the circuit. Background Art
[0002] A digital switch input circuit usually includes components such as resistors, capacitors, and opto-isolators. These components work together to achieve signal isolation, filtering, and level conversion, and the output end may be connected to the I / O port of a DSP (Digital Signal Processing) or other digital circuits. For example, the Chinese patent with the application number 202323087637.2 discloses a digital switch input circuit, which includes a voltage sampling resistor, an amplifier circuit, a switching transistor, an opto-isolator, and a shunt circuit.
[0003] A digital switch output circuit usually includes an output driving circuit, an interface circuit, etc., which are used to convert the control signal generated by the microprocessor into an actual level signal capable of driving an external device or circuit, and control the state of the external device or circuit. For example, the Chinese patent with the application number 202321618084.6 discloses a switch output circuit, which includes a plurality of isolation driving circuits and switch output ports corresponding to the isolation driving circuits one by one.
[0004] Digital switch input circuits and digital switch output circuits play an important role in fields such as industrial automation, electronic measurement and control, and home automation. They are respectively used to read the switch signals of external devices and control the switch states of external devices to achieve intelligent management and control of the devices.
[0005] Currently, in most scenarios, the digital switch input circuit and the digital switch in the expansion module are set separately. With the rapid development of technology and the diversification of requirements, a large number of digital switch input circuits and digital switch output circuits need to be equipped for the same device. However, in a small-sized expansion module, due to the limited number of wiring terminals, an efficient way needs to be found to reduce the demand for the number of terminals while realizing the input and output of digital switches.
[0006] Therefore, it is very necessary to design a digital switch input / output multiplexing circuit.
[0007] In order to solve the above problems, people have been seeking an ideal technical solution. Summary of the Invention
[0008] The object of the present utility model is to address the deficiencies of the prior art, and thus provide a digital switch input / output multiplexing circuit and an expansion module including this circuit, which realizes the input and output of digital switch quantities in one port, reduces the demand for the number of terminals, and effectively reduces the volume of the expansion module.
[0009] To achieve the above object, the first aspect of the present utility model provides a digital switch input / output multiplexing circuit, which includes an MOS transistor Q1, a diode D1, a TVS diode D2, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, and a capacitor C1. The drain of the MOS transistor Q1 is respectively connected to the negative pole of the diode D1, one end of the TVS diode D2, and an external port. The source of the MOS transistor Q1 and the other end of the TVS diode D2 are respectively connected to the ground terminal. The gate of the MOS transistor Q1 is respectively connected to one end of the resistor R1 and one end of the resistor R3. The other end of the resistor R1 serves as the output IO port, and the other end of the resistor R3 is connected to the ground terminal. The positive pole of the diode D1 is respectively connected to one end of the resistor R2 and one end of the resistor R5. The other end of the resistor R2 is connected to the power supply terminal, and the other end of the resistor R5 serves as the input IO port. The resistor R4 and the capacitor C1 are connected in parallel between the other end of the resistor R5 and the ground terminal.
[0010] To achieve the above object, the second aspect of the present utility model provides an expansion module, which includes a microprocessor and at least one of the above digital switch input / output multiplexing circuits. The output IO port and the input IO port of the digital switch input / output multiplexing circuit are respectively connected to the microprocessor, and the external port of the digital switch input / output multiplexing circuit is used to connect an external device.
[0011] The beneficial effects of the present utility model are as follows:
[0012] 1) The present utility model provides a digital switch input / output multiplexing circuit, which includes both an input branch and an output branch. The output IO port of the input branch and the input IO port of the output branch are used to connect different I / O ports of the microprocessor respectively. The external port can be used as both an external signal input port and an internal signal output port. Therefore, the present utility model realizes the input and output of digital switch quantities by using one circuit, achieving the purpose of interface multiplexing.
[0013] 2) The present utility model also provides an expansion module including a digital switch input / output multiplexing circuit, which can realize the input and output of digital switch quantities through one external port, reducing both the demand for the number of terminals and achieving the input and output of digital switch quantities simultaneously. Description of the Drawings
[0014] Figure 1 is the circuit schematic diagram of the present utility model. Detailed implementation manners
[0015] The technical solution of the present utility model will be further described in detail below through specific implementation manners.
[0016] Embodiment 1
[0017] As shown in the attached Figure 1 This embodiment gives a specific implementation manner of a digital switch input / output multiplexing circuit;
[0018] The digital switch input / output multiplexing circuit includes an MOS transistor Q1, a diode D1, a TVS diode D2, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, and a capacitor C1. The drain of the MOS transistor Q1 is respectively connected to the negative electrode of the diode D1, one end of the TVS diode D2, and an external port. The source of the MOS transistor Q1 and the other end of the TVS diode D2 are respectively connected to the ground terminal;
[0019] The gate of the MOS transistor Q1 is respectively connected to one end of the resistor R1 and one end of the resistor R3. The other end of the resistor R1 serves as the output IO port, and the other end of the resistor R3 is connected to the ground terminal;
[0020] The positive electrode of the diode D1 is respectively connected to one end of the resistor R2 and one end of the resistor R5. The other end of the resistor R2 is connected to the power supply terminal, and the other end of the resistor R5 serves as the input IO port;
[0021] The resistor R4 and the capacitor C1 are connected in parallel between the other end of the resistor R5 and the ground terminal.
[0022] It should be noted that the present utility model includes both an input branch and an output branch. The input branch includes a diode D1, a resistor R2, a resistor R4, a resistor R5, and a capacitor C1. The output branch includes an MOS transistor Q1, a resistor R1, and a resistor R3. The output IO port of the input branch and the input IO port of the output branch are used to connect different I / O ports of the microprocessor respectively. The external port can be used as both an external signal input port and an internal signal output port. Therefore, the present utility model realizes the input / output multiplexing function of digital switch quantities with fewer components.
[0023] In some embodiments, the MOS transistor Q1 is an NMOS transistor;
[0024] Specifically, the model of the NMOS transistor can be WMF05N70MM, or other models that can achieve the above functions.
[0025] It should be noted that when the external port is used as an input, the output IO port outputs a low level to control the NMOS to turn off;
[0026] When the external port input is at a high level, due to the isolation of diode D1, the right - hand side level remains unchanged, that is, the input IO port remains at a high level. When the external port is at a low level, since the right - hand side of diode D1 is at a high level, diode D1 conducts at this time, and the right - hand side level is pulled down to a low level, and the input IO port becomes a low level, that is, a digital input is detected.
[0027] It should also be noted that when the external port is used as an output, the input IO port is set to a high - impedance state; when the output IO port controls the NMOS transistor to turn on, the external port is at a low level, and when the output IO port controls the NMOS transistor to turn off, the external port is at a high level, thus realizing the output of digital signals.
[0028] In some embodiments, the model of the TVS diode D2 is BV - SMBJ60CA, and the model of the diode D1 is G15M;
[0029] It can be understood that the TVS diode D2 can suppress surge interference and improve the anti - interference ability of this digital input - output multiplexing circuit for digital signals.
[0030] It should also be noted that the diode D1 is used to isolate the levels at both ends. Resistors R2, R5, and R4 are all voltage - dividing resistors. Among them, resistor R2 also plays a pull - up role. The function of capacitor C1 is filtering. The NMOS transistor controls whether the external port is an input or an output. Resistor R3 provides a stable low level for the source electrode of the NMOS transistor, and resistor R1 is a current - limiting resistor.
[0031] Embodiment 2
[0032] Based on Embodiment 1, this embodiment gives a specific implementation of an expansion module;
[0033] In some embodiments, the expansion module includes a microprocessor and at least one digital input - output multiplexing circuit for digital signals in Embodiment 1. The output IO port and the input IO port of the digital input - output multiplexing circuit for digital signals are respectively connected to the microprocessor, and the external port of the digital input - output multiplexing circuit for digital signals is used to connect corresponding devices.
[0034] In some embodiments, the microprocessor can be an STM32 series single - chip microcomputer or other controllers that can implement the above functions.
[0035] It should be noted that the expansion module can meet more diverse digital input - output requirements with a smaller volume.
[0036] When the external port is used as an input, the input branch of the digital switch input / output multiplexing circuit is mainly used to detect various signals, such as switch actions, proximity switch actions, etc., and is applicable to various scenarios that require precise detection of switch states, such as industrial automation, control systems, smart homes, security systems, etc.
[0037] When the external port is used as an output, the output branch of the digital switch input / output multiplexing circuit converts the control signal generated by the microprocessor into an actual level signal capable of driving an external device or circuit, and transmits it to the external device or circuit through the external port, enabling precise control of the external device or circuit. It is applicable to various scenarios that require precise control of switch states, such as industrial automation, smart homes, security systems, etc.
[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that it is still possible to modify the specific implementation manners of the present invention or perform equivalent replacements for some technical features; without departing from the spirit of the technical solutions of the present invention, they should all be covered within the scope of the technical solutions claimed by the present invention.
Claims
1. A digital switch input and output multiplexing circuit, characterized in that: It includes a MOS tube Q1, a diode D1, a TVS tube D2, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5 and a capacitor C1, wherein the drain of the MOS tube Q1 is respectively connected to the cathode of the diode D1, one end of the TVS tube D2 and an external port, and the source of the MOS tube Q1 and the other end of the TVS tube D2 are respectively connected to the ground terminal; The gate of the MOS tube Q1 is connected to one end of the resistor R1 and one end of the resistor R3 respectively, the other end of the resistor R1 is used as an output IO port, and the other end of the resistor R3 is connected to the ground end; The anode of the diode D1 is connected to one end of the resistor R2 and one end of the resistor R5 respectively, the other end of the resistor R2 is connected to the power supply end, and the other end of the resistor R5 is used as an input IO port; The resistor R4 and the capacitor C1 are connected in parallel between the other end of the resistor R5 and the ground.
2. The digital switch input and output multiplexing circuit according to claim 1, characterized in that: The MOS tube Q1 is an NMOS tube.
3. The digital switch input and output multiplexing circuit according to claim 1, characterized in that: The model of the TVS tube D2 is BV-SMBJ60CA.
4. An expansion module, characterized in that: It comprises a microprocessor and at least one digital switch input / output multiplexing circuit as claimed in any one of claims 1 to 3, wherein the output IO port and the input IO port of the digital switch input / output multiplexing circuit are respectively connected to the microprocessor, and the external port of the digital switch input / output multiplexing circuit is used for externally connecting a corresponding device.
Citation Information
Patent Citations
Switching value output circuit and DCS system
CN220340565U
A digital switch quantity input circuit and electronic equipment
CN220985647U