Intelligent port conversion device and system
Through the design of the intelligent port conversion device, the port type and direction are automatically converted, and the problem of mismatch between port type and direction in the existing technology is solved, the equipment complexity and cost are reduced, and the demand for multiple signal transmission is realized.
Patent Information
- Application Number
- CN202110429805.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-21
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-04-21
AI Technical Summary
In the prior art, the port type and direction are determined, resulting in the remaining port portion of a certain type or direction while the ports in other types or directions are insufficient, which cannot meet the technical requirements, resulting in increased equipment complexity and increased cost.
Design an intelligent port conversion device, including controller input/output sub-port module, load input/output port and port switching module, to ensure effective signal transmission by automatically changing port types and directions.
Automatic conversion of port type and direction is realized, solving the problem of insufficient ports, reducing equipment complexity and cost, and meeting various signal transmission needs.
Smart Images

Figure CN113110281B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of measurement, control and communication, and in particular to an intelligent port conversion device and system. Background Art
[0002] Ports are the outlets for devices to communicate with the outside world. Ports can be divided into virtual ports and physical ports. Physical ports are visible ports, such as the RJ45 network port, USB port, and 232 port on the back panel of a computer, the RJ45 ports of switches, routers, hubs, etc., the switch input port, output port, and AD input port of a PLC controller, etc.
[0003] In the prior art, because the port type and direction are fixed, in some applications, some ports of a certain type or / and different directions are partially surplus, while ports of other types or directions are insufficient. For example, a PLC is configured with 10 digital input points, 2 analog input points, 8 digital output points, and no analog input, while a specific project requires 3 analog input points, 10 digital output points, and 1 analog output point, while digital input only requires 5 points. In order to meet the technical requirements, only a PLC model with more points can be used to meet the requirements of the project, although the total number of points required does not exceed the number of input and output points of the PLC, or an analog input and output expansion unit is added, and then a digital output expansion unit is added. Although this will meet the project requirements, the cost and system complexity will increase significantly, and there will be a large number of ports of a certain type or direction surplus, while the number of ports of other types / directions is insufficient to meet the technical requirements. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an intelligent port conversion device and a port conversion system, which have the advantages of automatically converting port types and / or directions to solve the problem that there are a large number of ports of a certain type or direction remaining while the number of ports of another type / direction is insufficient to meet the technical requirements, thereby reducing the complexity of the equipment.
[0005] One of the embodiments of this specification provides a smart port conversion device, including:
[0006] A controller input / output subport module, including at least one type of input / output subport, for outputting signals or receiving signals;
[0007] A load input / output port, used to receive a signal output by the controller input / output sub-port module, or to output a signal to the controller input / output sub-port module;
[0008] A port switching module is used to electrically connect an input / output sub-port of a corresponding type among at least one type of input / output sub-ports with the load input / output port according to the type of signal output from the controller input / output sub-port module to the load input / output port or the type of signal output from the load input / port to the controller input / output sub-port module.
[0009] The beneficial effect of the present invention is that the controller input / output subport module can be connected to an external controller, the controller is used to output at least one type of signal to the controller input / output subport module, and transmit the signal to the load input / output port through the input / output subport corresponding to the type of the signal in at least one type of input / output subport, the load input / output port can be connected to an external load, and is used to receive the signal output by the controller, and the port switching module is used to electrically connect the corresponding type of input / output subport in at least one type of input / output subport with the load input / output port according to the type of the signal output by the controller input / output subport module to the load input / output port. The load can also transmit a signal to the controller, and the port switching module is also used to electrically connect the corresponding type of input / output subport in at least one type of input / output subport with the load input / output port according to the type of the signal output by the load input / port to the controller input / output subport module, so that the output signal of the load can be transmitted to the controller, or the signal output by the controller can be transmitted to the load, thereby achieving the technical effect of automatically converting the port type, solving the problem that a large number of ports of a certain type or direction are surplus while the number of ports of other types / directions is insufficient and cannot meet the technical requirements, and reducing the complexity of the equipment.
[0010] Furthermore, the input / output sub-port is at least one or more combinations of an analog output sub-port, an analog / digital input sub-port and a digital output sub-port.
[0011] The beneficial effect of adopting the above further scheme is that the intelligent port conversion device can be used for various types of signals as needed, and can electrically connect the corresponding type of input / output sub-ports in at least one type of input / output sub-port to the load input / output port according to the type of signal.
[0012] Further, the port switching module includes at least one of an analog output switch, an analog input switch, a digital output switch and a digital input switch;
[0013] The input end of the analog output switch is used to be electrically connected to the analog output sub-port, and the output end of the analog output switch is used to be electrically connected to the load input / output port;
[0014] The input end of the analog input switch is used to be electrically connected to the load input / output port, and the output end of the analog input switch is used to be electrically connected to the analog / digital input sub-port;
[0015] The input end of the digital output switch is used to be electrically connected to the digital output sub-port, and the output end of the digital output switch is used to be electrically connected to the load input / output port;
[0016] The input end of the digital quantity input switch is used to be electrically connected to the load input / output port, and the output end of the digital quantity input switch is used to be electrically connected to the analog quantity / digital quantity input sub-port.
[0017] The beneficial effect of adopting the above further scheme is that when the external controller needs to output an analog quantity to the load input / output port, the input end of the analog quantity output switch is electrically connected to the analog quantity output sub-port, the output end of the analog quantity output switch is electrically connected to the load input / output port, and the analog quantity to be output is transmitted to the load input / output port through the analog quantity output sub-port. When the external controller needs to output a digital quantity to the load input / output port, the input end of the digital quantity output switch is electrically connected to the digital quantity output sub-port, the output end of the digital quantity output switch is electrically connected to the load input / output port, and the digital quantity to be output is transmitted to the load input / output port through the digital quantity output sub-port. When the external load needs to input an analog quantity to the controller, the input end of the analog quantity input switch is electrically connected to the load input / output port, the output end of the analog quantity input switch is electrically connected to the analog quantity / digital quantity input sub-port, and the analog quantity to be input is input to the analog quantity / digital quantity input sub-port through the load input / output port. When the external load needs to input digital quantity to the controller, the input end of the digital quantity input switch is electrically connected to the load input / output port, and the output end of the digital quantity input switch is electrically connected to the analog quantity / digital quantity input sub-port, and the digital quantity to be input is input to the analog quantity / digital quantity input sub-port through the load input / output port.
[0018] Furthermore, the analog output switch includes a first resistor R1, an amplifier AMP and an isolator. The output signal of the analog output subport is coupled to the amplifier AMP through the first resistor R1. The isolator is connected in series between the output end of the amplifier AMP and the load input / output port.
[0019] The beneficial effect of adopting the above further scheme is that the analog quantity output by the controller to the analog quantity output sub-port is coupled to the amplifier AMP through the first resistor R1 for amplification and then output, and the analog quantity output by the amplifier AMP is isolated by the isolator and then output to the load input / output port, thereby completing the output of the analog quantity.
[0020] Further, the analog input switch includes a second resistor R2 and a third resistor R3, one end of the second resistor R2 is electrically connected to the load input / output port, the other end of the second resistor R2 is electrically connected to one end of the third resistor R3, the other end of the third resistor R3 is grounded, and the connection node between the second resistor R2 and the third resistor R3 is electrically connected to the analog / digital input sub-port.
[0021] The beneficial effect of adopting the above further solution is that the analog quantity that the load needs to input to the controller is input to the second resistor R2 and the third resistor R3 through the load input / output port and then loaded to the analog quantity / digital quantity input sub-port after voltage division.
[0022] Furthermore, the digital output switch includes a first transistor switch, which is connected in series between the digital output sub-port and the load input / output port, and the signal output from the digital output sub-port to the first transistor switch is used to control the conduction state of the first transistor switch.
[0023] The beneficial effect of adopting the above further solution is that the digital quantity output by the controller is output to the first transistor switch via the digital quantity output sub-port, and the signal is used to control the conduction state of the first transistor switch.
[0024] Further, the digital quantity input switch includes a digital quantity input circuit;
[0025] The input end of the digital quantity input circuit is electrically connected to the load input / output port, and the output end of the digital quantity input circuit is electrically connected to the analog quantity / digital quantity input sub-port.
[0026] The beneficial effect of adopting the above further scheme is that the digital quantity input by the load is input to the analog quantity / digital quantity input sub-port through the digital quantity input circuit, and the controller receives the digital quantity input by the load from the analog quantity / digital quantity input sub-port. The analog quantity / digital quantity input sub-port can also receive voltage-type digital switch quantity input of appropriate amplitude, for example, the voltage reaching the appropriate threshold represents the digital 1, and the voltage below the threshold represents the digital 0; the specific threshold is determined by the threshold characteristics of the corresponding interface of the external controller corresponding to the analog quantity / digital quantity input sub-port and the voltage division ratio of the second resistor R2 and the third resistor R3, and any value within the full range can also be set as a critical value through the ADC conversion software as the input of the digital input 1 or 0.
[0027] Furthermore, the digital quantity input switch also includes an enable signal input sub-port and an optical isolation input circuit;
[0028] The input end of the optical isolation input circuit is electrically connected to the load input / output port, and the output end of the optical isolation input circuit is electrically connected to the analog quantity / digital quantity input sub-port;
[0029] The output signal of the enable signal input subport is used to control the conduction state of the optical isolation input circuit.
[0030] The beneficial effect of adopting the above further scheme is that when it is necessary to input a digital quantity through optical isolation, the output signal of the enable signal input sub-port controls the optical isolation input circuit to be in a conductive state, the optical isolation input circuit and the analog quantity / digital quantity input sub-port, and the controller receives the digital quantity signal from the analog quantity / digital quantity input sub-port. When optical isolation input is adopted, the enable signal input sub-port can receive signals from various dry contact switches, such as push button switches, emergency stop buttons, sensors with dry contact outputs, intermediate relay contact signals, etc.
[0031] One of the embodiments of this specification provides a smart port conversion system, including a main control module and at least one smart port conversion device;
[0032] The main control module is electrically connected to at least one type of input / output sub-port of the intelligent port conversion device. The main control module is used to output signals to the at least one type of input / output sub-port. The main control module is also used to receive signals input by the load input / output port of the intelligent port conversion device.
[0033] The beneficial effect of adopting the above further scheme is that the controller input / output sub-port module can be connected to the main control module, the main control module is used to output at least one type of signal to the controller input / output sub-port module, and transmit the signal to the load input / output port through the input / output sub-port corresponding to the type of the signal in at least one type of input / output sub-port, the load input / output port can be externally connected to the load, and is used to receive the signal output by the main control module, and the port switching module is used to electrically connect the corresponding type of input / output sub-port in at least one type of input / output sub-port with the load input / output port according to the type of the signal output from the controller input / output sub-port module to the load input / output port. The load can also transmit a signal to the controller, and the port switching module is also used to electrically connect the corresponding type of input / output sub-port in at least one type of input / output sub-port with the load input / output port according to the type of the signal output from the load input / port to the controller input / output sub-port module, so that the output signal of the load can be transmitted to the controller, thereby achieving the technical effect of automatically converting the port type, solving the problem that a large number of ports of a certain type or direction are surplus while the number of ports of other types / directions is insufficient and cannot meet the technical requirements, and reducing the complexity of the equipment.
[0034] Further, it includes at least one of a power conversion device, an optional display device, an optional reference voltage device, and a communication device;
[0035] The display device is used to display status data and / or working status;
[0036] The input device is used to locally set system parameters, including system communication address and / or baud rate;
[0037] The reference voltage device is used to provide a voltage reference for the analog output switch and the analog input switch;
[0038] The power conversion device is at least used to supply power to the main control module and / or the reference voltage device.
[0039] The beneficial effect of adopting the above further scheme is that the optional display device can be used to display the set status data and / or system working status (for example, digital input and output status, analog input and output parameter data and other information), and the optional reference voltage device can provide the voltage reference of the analog output switch and the analog input switch to improve the accuracy of the analog unit. The power conversion device can provide the required working power for the main control module. The working power VDD is converted from the main power VCC by voltage reduction and provided to the main control module for use, and is also provided to the reference voltage device as a power source. The power conversion device can also power the optional communication device and / or display device. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of an intelligent port conversion device of the present invention;
[0041] Figure 2 A circuit diagram of an intelligent port conversion device of the present invention for displaying an analog output switch and a digital output switch;
[0042] Figure 3 A circuit diagram of an intelligent port conversion device of the present invention for displaying an analog output switch, an analog input switch, a digital input switch and a digital output switch;
[0043] Figure 4 A circuit diagram of an intelligent port conversion system of the present invention;
[0044] Figure 5 The present invention is a circuit diagram of an intelligent port conversion device for displaying an interlocking logic circuit. DETAILED DESCRIPTION
[0045] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following.
[0046] Reference Figure 1 In some embodiments, an intelligent port conversion device includes a controller input / output sub-port module, a load input / output port I / O and a port switching module.
[0047] In some embodiments, the controller input / output subport module may include at least one type of input / output subport for outputting signals or receiving signals. In some embodiments, the input / output subport is one of an analog output subport DAC, an analog / digital input subport ADC, and a digital output subport OUT. In some embodiments, the controller input / output subport module may include at least one input / output subport, for example, the controller input / output subport module includes an analog output subport DAC; for example, the controller input / output subport module includes an analog output subport DAC and an analog / digital input subport ADC; for example, the controller input / output subport module includes an analog / digital input subport ADC and a digital output subport OUT.
[0048] In some embodiments, the load input / output port I / O may be used to receive a signal output by the controller input / output sub-port module, or to output a signal to the controller input / output sub-port module.
[0049] In some embodiments, the port switching module can be used to electrically connect a corresponding type of input / output sub-port in at least one type of input / output sub-port to a load input / output port I / O according to the type of signal output from the controller input / output sub-port module to the load input / output port I / O or the type of signal output from the load input / port I / O to the controller input / output sub-port module.
[0050] In some embodiments, the port switching module includes at least one of an analog output switch, an analog input switch, a digital output switch, and a digital input switch;
[0051] The input end of the analog output switch is used to be electrically connected to the analog output sub-port DAC, and the output end of the analog output switch is used to be electrically connected to the load input / output port I / O;
[0052] The input end of the analog input switch is used to be electrically connected to the load input / output port I / O, and the output end of the analog input switch is used to be electrically connected to the analog / digital input sub-port ADC;
[0053] The input end of the digital output switch is used to be electrically connected to the digital output sub-port OUT, and the output end of the digital output switch is used to be electrically connected to the load input / output port I / O;
[0054] The input end of the digital quantity input switch is used to be electrically connected to the load input / output port I / O, and the output end of the digital quantity input switch is used to be electrically connected to the analog quantity / digital quantity input sub-port ADC.
[0055] Specifically, when the external controller needs to output analog quantity to the load input / output port I / O, the input end of the analog quantity output switch is electrically connected to the analog quantity output sub-port DAC, the output end of the analog quantity output switch is electrically connected to the load input / output port I / O, and the analog quantity to be output is transmitted to the load input / output port I / O through the analog quantity output sub-port DAC. When the external controller needs to output digital quantity to the load input / output port I / O, the input end of the digital quantity output switch is electrically connected to the digital quantity output sub-port OUT, the output end of the digital quantity output switch is electrically connected to the load input / output port I / O, and the digital quantity to be output is transmitted to the load input / output port I / O through the digital quantity output sub-port OUT. When the external load needs to input analog quantity to the controller, the input end of the analog quantity input switch is electrically connected to the load input / output port I / O, the output end of the analog quantity input switch is electrically connected to the analog quantity / digital quantity input sub-port ADC, and the analog quantity to be input is input to the analog quantity / digital quantity input sub-port ADC through the load input / output port I / O. When the external load needs to input a digital quantity to the controller, the input end of the digital quantity input switch is electrically connected to the load input / output port I / O, and the output end of the digital quantity input switch is electrically connected to the analog quantity / digital quantity input sub-port ADC, and the digital quantity to be input is input to the analog quantity / digital quantity input sub-port ADC through the load input / output port I / O.
[0056] In some embodiments, the port switch module may correspond to the controller input / output sub-port module.
[0057] For example, refer to Figure 2 , the controller input / output sub-port module includes an analog output sub-port DAC and a digital output sub-port OUT, and the port switching module includes an analog output switch and a digital output switch. The analog output switch may include a first resistor R1, an amplifier AMP and an isolator. The output signal of the analog output sub-port DAC is coupled to the amplifier AMP through the first resistor R1, and an isolator is connected in series between the output end of the amplifier AMP and the load input / output port I / O. The isolator may include a first diode D1, the positive electrode of the first diode D1 is electrically connected to the output end of the amplifier AMP, and the negative electrode of the first diode D1 is electrically connected to the load input / output port I / O. In some embodiments, the first diode D1 may be a Schottky diode to reduce the voltage drop and meet the high-speed signal output requirements while completing isolation.
[0058] The digital output switch may include a first transistor switch, which is connected in series between the digital output sub-port OUT and the load input / output port I / O, and the signal output from the digital output sub-port to the first transistor switch is used to control the conduction state of the first transistor switch; wherein the first transistor switch includes a digital output tube Q1 and a protection isolation tube Q2. In some embodiments, the load may be a resistive load or a capacitive load. In other embodiments, the load may be an inductive load (for example, an intermediate relay coil, etc.). When the load is an inductive load, the output point of the digital output tube Q1 is reversely connected to the third diode D3 of the main power supply VCC for releasing the reverse instantaneous voltage generated by the inductive load inductance at the moment of disconnection, so as to ensure that the digital output tube Q1 and the present circuit will not be damaged due to overvoltage. The fourth resistor R4 is a driving pull-down resistor, which is used to ensure that the digital output tube Q1 is in a closed state when the controller is reset and initialized at power-on.
[0059] Specifically, the analog output subport DAC can be electrically connected to the DAC output port of the processor (a single-chip microcomputer with a DAC port), the PWM output port of the processor through the PWM+filter circuit to convert the PWM to DAC output, the DAC output generated by the external DAC chip, and the DAC output generated by the parallel port module through the R / 2R resistor network. In some embodiments, the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0060] When analog quantity needs to be output, the output of the digital output sub-port OUT is 0, the digital output tube Q1 and the protection isolation tube Q2 are in the off state, and the analog quantity output by the analog output sub-port DAC is coupled to the amplifier AMP through the first resistor R1 for amplification and output. The analog quantity output by the amplifier AMP is isolated by the isolator and output to the load input / output port I / O. When it is necessary to output a digital quantity, the analog quantity output sub-port DAC is turned off, and the digital signal to be output is output to the digital quantity output sub-port OUT through the port of the single-chip microcomputer to control the on and off states of the digital quantity output tube Q1, so as to realize the open-drain output of the digital quantity output tube Q1. At the same time, a protection isolation tube Q2 is also connected in parallel to the output digital quantity output tube Q1. When the digital quantity output tube Q1 is turned on and outputs a valid signal, the output signal of the analog quantity output sub-port DAC is short-circuited to the ground through the first resistor R1. At this time, the first resistor R1 is the load of the analog quantity output switch, and the input end of the amplifier AMP is 0, so as to ensure that when the digital quantity is output, the output of the analog quantity output switch is 0, so that the analog quantity output switch will not generate analog quantity signals due to system failures, software conflicts or interference, and will not be directly short-circuited to the ground due to the conduction of the digital quantity output tube Q1, resulting in damage to the analog quantity output switch, related circuits and devices.
[0061] For example, refer to Figure 3 The controller input / output sub-port module includes an analog output sub-port DAC, an analog / digital input sub-port ADC and a digital output sub-port OUT, and the port switching module includes an analog output switch, an analog input switch, a digital output switch and a digital input switch.
[0062] The analog output switch may include a first resistor R1, an amplifier AMP and an isolator. The output signal of the analog output sub-port DAC is coupled to the amplifier AMP through the first resistor R1. An isolator is connected in series between the output end of the amplifier AMP and the load input / output port I / O. It is worth noting that in some embodiments, the isolator may be a first diode D1, the anode of the first diode D1 is electrically connected to the output end of the amplifier AMP, and the cathode of the first diode D1 is electrically connected to the load input / output port I / O. In some embodiments, the first diode D1 may be a Schottky diode to reduce the voltage drop and meet the high-speed signal output requirements while completing isolation; in other embodiments, the isolator may be a transmission gate circuit and a MOS tube switch.
[0063] The analog input switch may include a second resistor R2 and a third resistor R3, one end of the second resistor R2 is electrically connected to the load input / output port I / O, the other end of the second resistor R2 is electrically connected to one end of the third resistor R3, the other end of the third resistor R3 is grounded, and the connection node between the second resistor R2 and the third resistor R3 is electrically connected to the analog / digital input sub-port ADC. In some embodiments, the analog input switch may also include an isolation control and hardware filtering anti-interference circuit to increase the anti-interference capability so as to be reliably applied to work in harsh environments.
[0064] The digital output switch may include a first transistor switch, which is connected in series between the digital output sub-port OUT and the load input / output port I / O, and the signal output from the digital output sub-port OUT to the first transistor switch is used to control the on and off or closed state of the first transistor switch; wherein the first transistor switch includes a digital output tube Q1 and a protection isolation tube Q2, and the output point of the digital output tube Q1 is reversely connected to the third diode D3 of the main power supply VCC, which is used to release the reverse instantaneous voltage generated by the load inductance at the moment of disconnection when driving the inductive load, so as to ensure that the digital output tube Q1 and the circuit will not be damaged due to overvoltage. The fourth resistor R4 is a driving pull-down resistor, which is used to ensure that the digital output tube Q1 is in a closed state when the controller is reset and initialized at power-on.
[0065] The digital quantity input switch may include a digital quantity input circuit. In some embodiments, the analog quantity input switch may be used as a digital quantity input circuit. The digital quantity input switch also includes an enable signal input sub-port EN and an optical isolation input circuit. The optical isolation input circuit may include an optical isolation control tube Q3, an optical coupler IC, and an optical coupler input current limiting resistor R5. The enable signal sub-port EN is electrically connected to the optical isolation control tube Q3 to control the conduction state of the optical isolation control tube Q3. An external dry contact type input signal (such as from a control button, a limit switch, etc.) is connected between the main power supply VCC and the load input / output port I / O to form an on-off connection to detect the switch state. The output of the optocoupler IC is connected to the analog / digital input sub-port ADC, and the seventh resistor R7 connects the enable signal to the ground to ensure that when the controller is powered on and reset, the optical isolation input enable is in a certain closed state. At the same time, the signal EN also provides a pull-up for the analog / digital input sub-port ADC through the sixth resistor R6 to ensure the necessary port level to increase anti-interference, and the pull-up is provided by the fourth diode D4 isolation connection to ensure that when the optical isolation input is not needed, the circuit will not affect the input of the analog / digital input sub-port ADC.
[0066] Specifically, the analog output subport OUT can be electrically connected to the DAC output port of the single-chip microcomputer (single-chip microcomputer with a DAC port), the DAC output composed of the PWM output port of the single-chip microcomputer through the PWM+filter circuit, the DAC output generated by the external DAC chip, and the DAC output generated by the parallel port module through the R / 2R resistor network. When the analog quantity needs to be output, the digital output subport OUT outputs 0, the digital output tube Q1 and the protection isolation tube Q2 are in a closed state, and the analog quantity output by the analog output subport DAC is coupled to the amplifier AMP through the first resistor R1 for amplification and output, and the analog quantity output by the amplifier AMP is output to the load input / output port I / O after isolation by the isolator. The enable signal input subport EN is closed so that the optical isolation input circuit does not affect the output of the analog quantity. When the isolation device uses a diode, due to the influence of the diode voltage drop, the actual output value will be lower than the required preset value. The feedback signal is input to the analog / digital input subport ADC through the second resistor R2 and the third resistor R3 to detect the output of the analog output switch. The external controller can correct the output of the analog output switch to reach the set value according to the output of the analog output switch. The second diode D2 is connected between the analog / digital input sub-port ADC and the VDDA analog power supply port to ensure that the input voltage does not exceed the sum of the analog power supply voltage plus the voltage drop of the second diode D2, so as to ensure that the input voltage of the analog / digital input sub-port ADC will not be damaged due to being too high.
[0067] When an analog quantity needs to be input, the analog quantity to be input is input to the second resistor R2 and the third resistor R3 through the load input / output port I / O, and then loaded to the analog / digital input sub-port ADC after voltage division, and the enable signal input sub-port EN and the digital output sub-port OUT are closed.
[0068] When it is necessary to output digital quantity, the analog quantity output sub-port DAC is turned off, and the digital signal to be output is output to the digital quantity output sub-port OUT through the port of the single-chip microcomputer to control the on and off state of the digital quantity output tube Q1, so as to realize the open-drain output of the digital quantity output tube Q1. At the same time, a protection isolation tube Q2 is also connected in parallel to the output digital quantity output tube Q1. When the digital quantity output tube Q1 is turned on and outputs a valid signal, it is used to short-circuit the output signal of the analog quantity output sub-port DAC to the ground through the first resistor R1. At this time, the first resistor R1 is the load of the analog quantity output switch, and the input end of the amplifier AMP is 0, so as to ensure that when the digital quantity is output, the output of the analog quantity output switch is 0, so that the analog quantity output switch will not generate analog quantity signals due to system failure, software conflict or interference, and will not be directly short-circuited to the ground due to the conduction of the digital quantity output tube Q1, resulting in damage to the analog quantity output switch. When digital quantity output is required, the load input / output port I / O can be connected to loads such as relays and optical isolation input points of other devices, which require current requirements above the milliampere level. The resistance values of the second resistor R2 and the third resistor R3 are set to 10KΩ to 100KΩ, and the current divided by the second resistor R2 and the third resistor R3 is at the microampere level, so it will not affect the output. The third diode D3, which is reversely connected to the main power supply VCC of the load input / output port I / O, is used to release the reverse instantaneous voltage generated by the load inductance at the moment of disconnection when driving the inductive load, so as to ensure that the digital quantity output tube Q1 will not be damaged due to overvoltage. The fourth resistor R4 is a driving pull-down resistor, which is used to ensure that the load input / output port I / O is in a closed state when the controller is powered on and reset and initialized.
[0069] When digital quantity input is required, the device can provide two modes. The first mode is the digital signal quantity input mode. When the digital signal quantity input mode is adopted, the enable signal input sub-port EN and the digital quantity output sub-port OUT are closed, and the signal required to be input is input to the analog quantity / digital quantity input sub-port ADC through the analog quantity input switch; the second mode is the optical isolation input mode. When the optical isolation input mode is adopted, the digital quantity output sub-port OUT is fixed to the closed state, that is, the output is 0, and the analog quantity output sub-port DAC is also fixed to output 0, and then the enable signal input sub-port EN is output to 1, so that the optical isolation control tube Q3 is turned on and connected to the load input / output port I / O for use as an optical isolation input unit, and the output end of the optical isolation control tube Q3 is electrically connected to the analog quantity / digital quantity input sub-port ADC.
[0070] In some embodiments, a smart port conversion system includes a main control module and at least one smart port conversion device, for example, referring to Figure 4 , the main control module is connected with four intelligent port conversion devices FCM;
[0071] The port of the main control module is electrically connected to at least one type of input / output sub-port of the port conversion device FCM, and the main control module is used to output signals to the at least one type of input / output sub-port.
[0072] In some embodiments, the main control module may include a processor, which may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0073] In some embodiments, the system may further include at least one of a power conversion device, a keyboard (input device), a display device, a reference voltage device, and a communication device. The communication device may use at least one of 485, USB, WLAN, TTL serial port, 422, SPI, IIC, CAN, etc. The keyboard (input device) may be used to set system parameters, including system communication address and / or baud rate. The input device may be a rotary encoder with / without buttons, a matrix keyboard, or an input device with single / multiple independent buttons. In other embodiments, to meet the requirements of harsh environments, it may also be a magnetic encoder, an optical induction switch, a visible or infrared gesture sensor, or a combination of multiple ones. The display device may be used to display the set status data and / or the system working status (for example, digital input and output status, analog input and output parameter data, etc.). The reference voltage device may provide a voltage reference for the analog output switch and the analog input switch to improve the accuracy of the analog unit. The voltage reference is optional and may be integrated inside the microcontroller or external. The power conversion device can provide the single-chip microcomputer with the required working power supply. The working power supply VDD is converted from the main power supply VCC by voltage reduction and provided to the single-chip microcomputer for use, and is also provided to the reference voltage device as a power supply.
[0074] In some embodiments, the system may also add a universal single direction / type port, and integrate the operational amplifier, diode, MOS tube, etc. related to the port conversion device in the form of a chip product for implementation.
[0075] In some embodiments, the system can also change the NMOS open-drain output to the open-drain / open-source output of the NMOS or PMOS tube.
[0076] In some embodiments, the system can also change the NMOS switch open-drain output to a half-bridge form to achieve push-pull output.
[0077] In some embodiments, an interlocking logic circuit can be added between the digital output subport OUT and the optical isolation input enable subport EN to ensure that the two signals cannot be valid at the same time regardless of hardware interference, software vulnerabilities, failures, etc. If the digital output subport OUT and the enable signal input subport EN output signals at the same time, when the external dry contact input signal is valid and connected, the main power supply will be directly shorted to the power ground through the external dry contact input device, such as the button switch and the digital output tube Q1, causing the device and the circuit to burn out. Therefore, in some embodiments, refer to Figure 5 , an eighth resistor R8 can be directly added to the gate of the digital output tube Q1 and the protection isolation tube Q2 when the main control module OUT outputs a signal, one end of the eighth resistor R8 is connected to the pin of the digital output sub-port OUT, and the other end of the eighth resistor R8 is connected to the gate of the digital output tube Q1 and the protection isolation tube Q2. At the same time, a fifth diode D5 is directly connected in series from the gate of the digital output tube Q1 and the protection isolation tube Q2 to the drain of the optical isolation control tube Q3, the positive electrode of the fifth diode D5 is connected to the gate of the digital output tube Q1 and the protection isolation tube Q2, and the negative electrode of the fifth diode D5 is connected to the drain of the optical isolation control tube Q3. When the enable signal input sub-port EN outputs a signal, if the digital output sub-port OUT outputs a signal at the same time, the output signal of the digital output sub-port OUT will be shorted to the power ground through the eighth resistor R8, the fifth diode D5 and the EN enable control tube Q3, and the digital output tube Q1 and the protection isolation tube Q2 will not be turned on.
[0078] The above are only preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be regarded as excluding other embodiments. It can be used in various other combinations, modifications and environments, and can be modified within the scope of the conception of this article through the above teachings or technologies or knowledge in related fields. The modifications and changes made by those skilled in the art do not depart from the spirit and scope of the present invention.
Claims
1. A smart port conversion device, characterized in that: include; A controller input / output subport module, including at least one type of input / output subport, for outputting signals or receiving signals; A load input / output port, used to receive a signal output by the controller input / output sub-port module, or to output a signal to the controller input / output sub-port module; a port switching module, configured to electrically connect an input / output subport of a corresponding type among the at least one type of input / output subports with the load input / output port according to the type of the signal output from the controller input / output subport module to the load input / output port or the type of the signal output from the load input / port to the controller input / output subport module; The input / output sub-port is at least one or more combinations of an analog output sub-port, an analog / digital input sub-port and a digital output sub-port; The port switching module includes at least one of an analog output switch, an analog input switch, a digital output switch and a digital input switch; The input end of the analog output switch is used to be electrically connected to the analog output sub-port, and the output end of the analog output switch is used to be electrically connected to the load input / output port; The input end of the analog input switch is used to be electrically connected to the load input / output port, and the output end of the analog input switch is used to be electrically connected to the analog / digital input sub-port; The input end of the digital output switch is used to be electrically connected to the digital output sub-port, and the output end of the digital output switch is used to be electrically connected to the load input / output port; The input end of the digital quantity input switch is used to be electrically connected to the load input / output port, and the output end of the digital quantity input switch is used to be electrically connected to the analog quantity / digital quantity input sub-port; The analog output switch comprises a first resistor R1, an amplifier AMP and an isolator. The output signal of the analog output sub-port is coupled to the amplifier AMP through the first resistor R1. The isolator is connected in series between the output end of the amplifier AMP and the load input / output port. The digital output switch includes a first transistor switch, which is connected in series between the digital output sub-port and the load input / output port and includes a digital output tube and a protection isolation tube. The signal output from the digital output sub-port to the first transistor switch is used to control the conduction state of the first transistor switch.
2. The intelligent port conversion device according to claim 1, characterized in that: The analog input switch includes a second resistor R2 and a third resistor R3, one end of the second resistor R2 is electrically connected to the load input / output port, the other end of the second resistor R2 is electrically connected to one end of the third resistor R3, the other end of the third resistor R3 is grounded, and the connection node between the second resistor R2 and the third resistor R3 is electrically connected to the analog / digital input sub-port.
3. The intelligent port conversion device according to claim 1, characterized in that: The digital output switch includes a first transistor switch, which is connected in series between the digital output sub-port and the load input / output port. The signal output from the digital output sub-port to the first transistor switch is used to control the conduction state of the first transistor switch.
4. The intelligent port conversion device according to claim 1, characterized in that: The digital quantity input switch comprises a digital quantity input circuit; The input end of the digital quantity input circuit is electrically connected to the load input / output port, and the output end of the digital quantity input circuit is electrically connected to the analog quantity / digital quantity input sub-port.
5. The intelligent port conversion device according to claim 4, characterized in that: The digital quantity input switch also includes an enable signal input sub-port and an optical isolation input circuit; The input end of the optical isolation input circuit is electrically connected to the load input / output port, and the output end of the optical isolation input circuit is electrically connected to the analog quantity / digital quantity input sub-port; The output signal of the enable signal input subport is used to control the conduction state of the optical isolation input circuit.
6. An intelligent port conversion system, characterized in that: It comprises a main control module and at least one intelligent port conversion device according to any one of claims 1 to 5; The main control module is electrically connected to at least one type of input / output sub-port of the intelligent port conversion device. The main control module is used to output signals to the at least one type of input / output sub-port. The main control module is also used to receive signals input by the load input / output port of the intelligent port conversion device.
7. The intelligent port conversion system according to claim 6, characterized in that: Also includes at least one of a power conversion device, a display device, a reference voltage device, a communication device, and an input device; The display device is used to display status data and / or working status; The input device is used to locally set system parameters, including system communication address and / or baud rate; The reference voltage device is used to provide a voltage reference for the analog output switch and the analog input switch; The power conversion device is at least used to supply power to the main control module and / or the reference voltage device.
Citation Information
Patent Citations
Two-way 4-20mA DC analogue quantity output device
CN101136637A
Digital excitation control system based on 32-bit floating-point type processor and working method
CN102223128A
Intelligent connector
CN108075322A
Intelligent port conversion device and system
CN214474593U