CN206479976U - A kind of port automatic identification switching device of universal serial port - Google Patents
A kind of port automatic identification switching device of universal serial port Download PDFInfo
- Publication number
- CN206479976U CN206479976U CN201621465040.4U CN201621465040U CN206479976U CN 206479976 U CN206479976 U CN 206479976U CN 201621465040 U CN201621465040 U CN 201621465040U CN 206479976 U CN206479976 U CN 206479976U
- Authority
- CN
- China
- Prior art keywords
- level
- shifting circuits
- level shifting
- analog switch
- interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn - After Issue
Links
Abstract
The utility model discloses a kind of port automatic identification switching device of universal serial port, the device includes automatic identification control unit, first order analog switch unit, RS485 level shifting circuits, RS232 level shifting circuits, second level analog switch unit and Versatile Interface Unit;The automatic identification control unit is provided with serial line interface and control end;The first order analog switch unit connects the RS485 level shifting circuits, RS232 level shifting circuits and the serial line interface, and is connected the serial line interface with RS485 level shifting circuits or RS232 level shifting circuits under the control of the control end.The utility model has the advantages that, site operation and the complexity safeguarded can be greatly reduced, and be significantly reduced the input cost of equipment and manpower.
Description
Technical field
The utility model belongs to electronic technology field, and in particular to a kind of port automatic identification switching dress of universal serial port
Put.
Background technology
At present, industry or communication monitoring field smart device communication interface mainly have two kinds of specifications of RS485 and RS232.It is past
Past is the interface type that institute's access device is just known to job site, and is all single RS485 or RS232 with its corollary equipment
Connecting interface, causes the mismatch of live access interface.Conventional settling mode is to change access device or increase one-level RS485
RS 232, RS232 turn RS485 modular converters, but the shortcoming of this 2 kinds of settling modes is delay project duration, increase construction and dimension
Protect difficulty, in addition it is also necessary to extra input large number quipments and human cost.
The content of the invention
The purpose of this utility model be according in place of above-mentioned the deficiencies in the prior art there is provided a kind of port of universal serial port from
Dynamic identification switching device, the device realizes the automatic detection of universal serial port by using analog switch and level shifting circuit
And switching.
The utility model purpose is realized and completed by following technical scheme:
A kind of port automatic identification switching device of universal serial port, it is characterised in that:Including automatic identification control unit,
One-level analog switch unit, RS485 level shifting circuits, RS232 level shifting circuits, second level analog switch unit and logical
Use interface unit;The automatic identification control unit is provided with serial line interface and control end;The first order analog switch list
The member connection RS485 level shifting circuits, RS232 level shifting circuits and the serial line interface, and in the control end
Control under the serial line interface is connected with the RS485 level shifting circuits or the RS232 level shifting circuits;It is described
Second level analog switch unit connects the RS485 level shifting circuits, RS232 level shifting circuits and described general
Interface unit, and by the Versatile Interface Unit and the RS485 level shifting circuits or institute under the control of the control end
State the connection of RS232 level shifting circuits.
Light-coupled isolation module is provided between the serial line interface and the first order analog switch unit;The control end
The first order analog switch unit and the second level analog switch unit are provided with light-coupled isolation module.
The RS485 level shifting circuits include Transistor-Transistor Logic level interface and RS485 electric level interfaces;The RS485 level turns
Changing circuit is used to mutually be changed the signal of the signal of the Transistor-Transistor Logic level interface and the RS485 electric level interfaces;It is described
Transistor-Transistor Logic level interface connects the first order analog switch unit, and the RS485 electric level interfaces connect the second level analog switch
Unit.
The RS232 level shifting circuits include Transistor-Transistor Logic level interface and RS232 electric level interfaces;The RS232 level turns
Changing circuit is used to mutually be changed the signal of the signal of the Transistor-Transistor Logic level interface and the RS232 electric level interfaces;It is described
Transistor-Transistor Logic level interface connects the first order analog switch unit, and the RS232 electric level interfaces connect the second level analog switch
Unit.
The RS232 level shifting circuits and the RS485 level shifting circuits are respectively connected with insulating power supply.
The utility model has the advantages that, switched using unified external interface hardware circuit design and combination automatic identification and controlled
The method of processing procedure sequence can efficient stable the automatic identification for realizing RS485 and RS232 interface equipments switching and equipment access, handle
Method is simple, it is possible to site operation and the complexity safeguarded is greatly reduced, and is significantly reduced the throwing of equipment and manpower
Enter cost, be adapted to use in industry or communication monitoring techniques field large-scale promotion.
Brief description of the drawings
Fig. 1 is the structured flowchart of the port automatic identification switching device of the utility model universal serial port;
Fig. 2 is automatic identification control unit, light-coupled isolation module and the first order analog switch list in the utility model
The circuit diagram of member;
Fig. 3 is RS485 level shifting circuits, RS232 level shifting circuits and the second level simulation in the utility model
The circuit diagram of switch element;
Fig. 4 be the utility model in Versatile Interface Unit circuit diagram;
Fig. 5 be the utility model in insulating power supply circuit diagram.
Embodiment
Feature of the present utility model and other correlated characteristics are made further specifically by embodiment below in conjunction with accompanying drawing
It is bright, in order to the understanding of technical staff of the same trade:
Mark 1-10 is respectively in such as Fig. 1-5, figure:Automatic identification control unit 1, first order analog switch unit 2,
RS485 level shifting circuits 3, RS232 level shifting circuits 4, second level analog switch unit 5, Versatile Interface Unit 6, optocoupler
Isolation module 7, insulating power supply 8, RS232 independent current sources module 9, RS485 independent current sources module 10.
Embodiment:As shown in figure 1, the present embodiment is specifically related to a kind of port automatic identification switching device of universal serial port,
It includes automatic identification control unit 1, first order analog switch unit 2, RS485 level shifting circuits 3, RS232 level conversions
Circuit 4, second level analog switch unit 5 and Versatile Interface Unit 6.
As shown in Figure 1, 2, automatic identification control unit 1 is provided with serial line interface Uart1 and control end ComSel;Automatically
The selection of identification control unit 1 includes but is not limited to single-chip microcomputer, PLC or peripheral hardware control chip;Serial line interface Uart1 includes sending
Signal wire Uart1_Tx and transmission signal wire Uart1_Rx, serial line interface Uart1 two signal wires pass through light-coupled isolation mould
The connection first order of block 7 analog switch unit 2;Control end ComSel connects first order analog switch list by light-coupled isolation module 7
Member 2 and second level analog switch unit 5, automatic identification control unit 1 can control the first order to simulate by control end ComSel
The turn-on action of switch element 2 and second level analog switch unit 5.
As shown in Figure 1, 2, the connection RS485 of first order analog switch unit 2 level shifting circuits 3, RS232 level conversions electricity
Road 4 and the serial line interface Uart1 of automatic identification control unit 1;First order analog switch unit 2 can be in automatic identification control
Under the control end ComSel of unit 1 control, serial line interface Uart1 and RS485 level shifting circuits 3 or RS232 level are turned
Circuit 4 is changed to link together;Specifically, the COM1 pins and COM2 pins of first order analog switch unit 2 pass through light respectively
The connection serial line interface of coupling isolation module 7 Uart1 transmission signal wire Uart1_Tx and transmission signal wire Uart1_Rx;Work as control
When the signal for holding ComSel is high level, RS485 level shifting circuits 3 are connected to serial interface by first order analog switch unit 2
Mouth Uart1;When ComSel signal is low level, first order analog switch unit 2 connects RS232 level shifting circuits 4
To serial line interface Uart1.
As shown in figure 1, the serial line interface Uart1 of automatic identification control unit 1 signal is changed by light-coupled isolation module 7
It is Transistor-Transistor Logic level afterwards, it is incompatible with RS485 level and RS232 level, it is therefore desirable to respectively using RS485 level shifting circuits
And RS232 level shifting circuits carry out the level conversion of signal.
As shown in Figure 1,3, RS485 level shifting circuits 3 include Transistor-Transistor Logic level interface and RS485 electric level interfaces;RS485
Level shifting circuit 3 includes receiving terminal Com1Rx_485 and transmitting terminal Com1Tx_485;RS485 level shifting circuits 3 connect
Receiving end Com1Rx_485 and transmitting terminal Com1Tx_485 connect the Com1Rx_485 pins of first order analog switch unit 2 respectively
And Com1Tx_485 pins;The RS485 electric level interfaces of RS485 level shifting circuits 3 are connected to second level analog switch unit 5
S1A pins and S2A pins;RS485 level shifting circuits 3 are used to connect the signal of Transistor-Transistor Logic level interface and RS485 level
The signal of mouth is mutually changed.
As shown in Figure 1, 2, 3, RS232 level shifting circuits 4 include Transistor-Transistor Logic level interface and RS232 electric level interfaces;
RS232 level shifting circuits 4 include receiving terminal Com1Rx_TTL and transmitting terminal Com1Tx_TTL;RS232 level shifting circuits 4
Receiving terminal Com1Rx_TTL and transmitting terminal Com1Tx_TTL connect the Com1Rx_TTL of first order analog switch unit 2 respectively
Pin and Com1Tx_TTL pins;The RS232 electric level interfaces of RS232 level shifting circuits 4 are connected to second level analog switch
The S1B pins and S2B pins of unit 5;RS232 level shifting circuits 4 are used for the signal and RS232 of Transistor-Transistor Logic level interface
The signal of electric level interface is mutually changed.
As shown in Figure 1, 2, 3, the connection RS485 of second level analog switch unit 5 level shifting circuits 3, RS232 level conversions
Circuit 4 and Versatile Interface Unit 6;Second level analog switch unit 5 can automatic identification control unit 1 control end
Under ComSel control, Versatile Interface Unit 6 and RS485 level shifting circuits 3 or RS232 level shifting circuits 4 are connected to
Together;Specifically, S1A pins and S2A pins connection the RS485 level shifting circuits 3 of second level analog switch unit 5
RS485 electric level interfaces;S1B pins and S2B pins connection the RS232 level shifting circuits 4 of second level analog switch unit 5
RS232 electric level interfaces;When control end ComSel signal is high level, second level analog switch unit 5 turns RS485 level
Change circuit 3 and be connected to Versatile Interface Unit 6;When ComSel signal is low level, second level analog switch unit 5 will
RS232 level shifting circuits 4 are connected to Versatile Interface Unit 6.
First order analog switch unit 2 and second level analog switch unit 5 play a part of to connect signal or cut-off signal.
Analog switch has the advantages that low in energy consumption, speed is fast, long without mechanical contact, small volume and service life;In addition analog switch is also
The positive negative level of bus can be kept constant, i.e., bus signal voltages can keep completely the same before and after analog switch.
As shown in Fig. 1,4, Versatile Interface Unit 6 is used to connect external equipment;The ARX1 pins of Versatile Interface Unit 6 and
BTX1 is connected to the D1 pins and D2 pins of second level analog switch unit 5.
As shown in Figure 1,5, RS232 level shifting circuits 4 and RS485 level shifting circuits 3 are supplied by insulating power supply 8
Electricity;In the present embodiment, insulating power supply 8 includes RS232 independent current sources module 9 and RS485 independent current sources module 10, RS232
The exportable positive and negative 15V of independent current source module 9 voltage.
As shown in Fig. 1 to 5, a kind of work side of the present embodiment also port automatic identification switching device including universal serial port
Method, this method comprises the following steps:
1)Automatic identification control unit 1 detects the device type being connected on Versatile Interface Unit 6 by way of poll;
When external equipment is connected to Versatile Interface Unit 6, in order to be adapted to RS232 interfaces and RS485 agreements, automatic identification control is single
Member 1 needs to detect the interface type that external equipment is used;In detection process, automatic identification control unit 1 gates RS485 electricity successively
Flat ALT-CH alternate channel and RS232 level conversion passage, while carrying out trial communication by above-mentioned ALT-CH alternate channel.
RS485 level conversions passage includes first order analog switch unit 2, RS485 level shifting circuits 3 and the second level
Analog switch unit 5;When RS485 level conversion passages are strobed, RS485 level shifting circuits 3 pass through first order mould respectively
Intend switch element 2 and the connection serial line interface Uart1 of second level analog switch unit 5 and Versatile Interface Unit 6;Communicating
Cheng Zhong, the signal between serial line interface Uart1 and Versatile Interface Unit 6 enters line level by RS485 level shifting circuits 3 and turned
Change.
RS232 level conversions passage includes first order analog switch unit 2, RS232 level shifting circuits 4 and the second level
Analog switch unit 5;When RS232 level conversion passages are strobed, RS232 level shifting circuits 4 pass through first order mould respectively
Intend switch element 2 and the connection serial line interface Uart1 of second level analog switch unit 5 and Versatile Interface Unit 6;Communicating
Cheng Zhong, the signal between serial line interface Uart1 and Versatile Interface Unit 6 enters line level by RS232 level shifting circuits 4 and turned
Change.
The interface type that detection external equipment is used specifically includes following steps:Automatic identification control unit 1 passes through control
ComSel gating RS485 level conversion passages are held, and by RS485 level conversions passage and are connected on Versatile Interface Unit 6
Equipment carry out trial communication;When the communication is successful, it is possible to determine that the equipment on Versatile Interface Unit 6 is RS485 equipment;When tasting
When trying communication failure, automatic identification control unit 1 gates RS232 level conversion passages by control end, and passes through RS232 level
ALT-CH alternate channel carries out again attempting to communicate with the equipment being connected on Versatile Interface Unit 6;When the communication is successful, it is possible to determine that even
The equipment being connected on Versatile Interface Unit 6 is RS232 equipment;If again attempting to communication failure, show to be connected to general-purpose interface
The non-RS485 and RS232 interface equipments of equipment on unit 6, or access device break down;When again attempting to communication failure,
Detection is connected to the device type on Versatile Interface Unit again after the automatic identification control unit interval scheduled time.
2)When automatic identification control unit 1 is according to according to testing result, RS232 electricity is persistently gated by control end ComSel
Flat ALT-CH alternate channel or RS485 level conversion passage;When the equipment being connected on Versatile Interface Unit 6 is RS232 equipment, automatically
Identification control unit 1 persistently gates RS232 level conversion passages;When the equipment being connected on Versatile Interface Unit 6 sets for RS485
When standby, automatic identification control unit 1 persistently gates RS485 level conversion passages.
The advantageous effects of the present embodiment are:Using unified external interface hardware circuit design and combine automatic identification
The method of switching control program can efficient stable realize RS485 and RS232 interface equipments automatic identification switching and equipment connect
Enter, processing method is simple, it is possible to site operation and the complexity safeguarded is greatly reduced, and is significantly reduced equipment and people
The input cost of power, is adapted to use in industry or communication monitoring techniques field large-scale promotion.
Claims (5)
1. a kind of port automatic identification switching device of universal serial port, it is characterised in that:Including automatic identification control unit, first
Level analog switch unit, RS485 level shifting circuits, RS232 level shifting circuits, second level analog switch unit and general
Interface unit;The automatic identification control unit is provided with serial line interface and control end;The first order analog switch unit
The RS485 level shifting circuits, RS232 level shifting circuits and the serial line interface are connected, and in the control end
The serial line interface is connected with the RS485 level shifting circuits or the RS232 level shifting circuits under control;Described
Two grades of analog switch units connect the RS485 level shifting circuits, the RS232 level shifting circuits and described general connect
Mouth unit, and by the Versatile Interface Unit and the RS485 level shifting circuits or described under the control of the control end
RS232 level shifting circuits are connected.
2. a kind of port automatic identification switching device of universal serial port according to claim 1, it is characterised in that:The string
Light-coupled isolation module is provided between line interface and the first order analog switch unit;The control end and the first order mould
Intend switch element and the second level analog switch unit is provided with light-coupled isolation module.
3. a kind of port automatic identification switching device of universal serial port according to claim 1, it is characterised in that:It is described
RS485 level shifting circuits include Transistor-Transistor Logic level interface and RS485 electric level interfaces;The RS485 level shifting circuits are used for will
The signal of the signal of the Transistor-Transistor Logic level interface and the RS485 electric level interfaces is mutually changed;The Transistor-Transistor Logic level interface
The first order analog switch unit is connected, the RS485 electric level interfaces connect the second level analog switch unit.
4. a kind of port automatic identification switching device of universal serial port according to claim 1, it is characterised in that:It is described
RS232 level shifting circuits include Transistor-Transistor Logic level interface and RS232 electric level interfaces;The RS232 level shifting circuits are used for will
The signal of the signal of the Transistor-Transistor Logic level interface and the RS232 electric level interfaces is mutually changed;The Transistor-Transistor Logic level interface
The first order analog switch unit is connected, the RS232 electric level interfaces connect the second level analog switch unit.
5. a kind of port automatic identification switching device of universal serial port according to claim 1, it is characterised in that:It is described
RS232 level shifting circuits and the RS485 level shifting circuits are respectively connected with insulating power supply.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201621465040.4U CN206479976U (en) | 2016-12-29 | 2016-12-29 | A kind of port automatic identification switching device of universal serial port |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201621465040.4U CN206479976U (en) | 2016-12-29 | 2016-12-29 | A kind of port automatic identification switching device of universal serial port |
Publications (1)
Publication Number | Publication Date |
---|---|
CN206479976U true CN206479976U (en) | 2017-09-08 |
Family
ID=59750935
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201621465040.4U Withdrawn - After Issue CN206479976U (en) | 2016-12-29 | 2016-12-29 | A kind of port automatic identification switching device of universal serial port |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN206479976U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106649177A (en) * | 2016-12-29 | 2017-05-10 | 上海贝电实业(集团)股份有限公司 | Device for automatic identification and switching of port of universal serial interface and working method thereof |
-
2016
- 2016-12-29 CN CN201621465040.4U patent/CN206479976U/en not_active Withdrawn - After Issue
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106649177A (en) * | 2016-12-29 | 2017-05-10 | 上海贝电实业(集团)股份有限公司 | Device for automatic identification and switching of port of universal serial interface and working method thereof |
CN106649177B (en) * | 2016-12-29 | 2023-06-09 | 上海贝电实业(集团)股份有限公司 | Automatic port identification switching device of universal serial port and working method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106649177A (en) | Device for automatic identification and switching of port of universal serial interface and working method thereof | |
CN204086504U (en) | Power supply product measurement jig | |
CN204155273U (en) | A kind of multi-functional data switch based on elevator communication | |
CN206479976U (en) | A kind of port automatic identification switching device of universal serial port | |
CN204946336U (en) | The metering communication module of intelligent electric energy meter | |
CN208572102U (en) | A kind of aging testing system | |
CN204143252U (en) | Frequency Converter Control board test device | |
CN211478591U (en) | Module power supply multichannel intelligent test and ageing device | |
CN208110328U (en) | A kind of switch test control device of band PD fast charge agreement | |
CN218387308U (en) | Full-automatic pulse generation and display circuit for inter-station safety information transmission system | |
CN204903978U (en) | Communication signals self -adaptation device between test system and sorting machine | |
CN205283240U (en) | Main and secondary power automatic switch -over circuit of boats and ships | |
CN210804414U (en) | Circuit with reusable communication interface | |
CN210328082U (en) | Adaptive lamp group driving module | |
CN210986518U (en) | One-wire three-colour lamp | |
CN209570837U (en) | A kind of digital output card | |
CN208143556U (en) | Mechanical double control switch realizes more control bus intelligent wireless relay module | |
CN207182033U (en) | A kind of building remote control switch circuit | |
CN206788609U (en) | A kind of power supply comprehensive control management system | |
CN102800181B (en) | Wireless remote controlled socket assembly, remote controlled socket and remote controller for controlling socket | |
CN206452589U (en) | A kind of building intelligence lighting circuit | |
CN205920368U (en) | Intelligent control ware convenient to light current flush mounting plate of switch wiring construction that resets | |
CN204256142U (en) | Switching power supply of frequency converter board test device | |
CN205899300U (en) | Four ways switch quantity output device based on CIB BUS bus control mode | |
CN110933806A (en) | One-wire three-color lamp and control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
AV01 | Patent right actively abandoned | ||
AV01 | Patent right actively abandoned | ||
AV01 | Patent right actively abandoned |
Granted publication date: 20170908 Effective date of abandoning: 20230609 |
|
AV01 | Patent right actively abandoned |
Granted publication date: 20170908 Effective date of abandoning: 20230609 |