[go: up one dir, main page]

CN202904869U - RS485 bus interface with relay function - Google Patents

RS485 bus interface with relay function Download PDF

Info

Publication number
CN202904869U
CN202904869U CN 201220610272 CN201220610272U CN202904869U CN 202904869 U CN202904869 U CN 202904869U CN 201220610272 CN201220610272 CN 201220610272 CN 201220610272 U CN201220610272 U CN 201220610272U CN 202904869 U CN202904869 U CN 202904869U
Authority
CN
China
Prior art keywords
transceiver
bus
module
signal
state
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.)
Expired - Fee Related
Application number
CN 201220610272
Other languages
Chinese (zh)
Inventor
赵文福
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Taihua Science and Technology Co Ltd
Original Assignee
Tianjin Taihua Science and Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tianjin Taihua Science and Technology Co Ltd filed Critical Tianjin Taihua Science and Technology Co Ltd
Priority to CN 201220610272 priority Critical patent/CN202904869U/en
Application granted granted Critical
Publication of CN202904869U publication Critical patent/CN202904869U/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The utility model discloses an RS485 bus interface with a relay function. The RS485 bus interface with a relay function comprises a bus transmitting controller, a signal isolator connected with the bus transmitting controller, a dialing code switch and RS485 receivers 1, 2; after a port R of the RS485 receiver 1 is connected with a port D of the RS485 receiver 2, and after a port D of the RS485 receiver 1 is connected with a port R of the RS485 receiver 2, the port R of the RS485 receiver 1, the port D of the RS485 receiver 2, the port D of the RS485 receiver 1 and the port R of the RS485 receiver 2 are respectively connected with the bus transmitting controller; output signals of the bus transmitting controller control the operation states of the RS485 receivers 1, 2, and the bus transmitting controller is connected with a bus through the RS485 receiver 1 and/or the RS485 receiver 2, and transmits signals; the bus transmitting controller is connected with an external device through the signal isolator and transmits signals; and the dialing code switch sets the station number of the external device and outputs signals to the bus conveying controller. According to the utility model, the communication velocity and the anti-interference performance of the bus are improved, and the RS485 bus interface with a relay function is suitable for data transmission of a great amount of information of underground instruments.

Description

A kind of RS485 bus interface with relay function
Technical field
The utility model relates to the data communication bus interface, particularly a kind of RS485 bus interface with relay function.
Background technology
Well logging is the important step in the oil exploitation engineering, and logging quality directly has influence on exploitation quality and oil productivity, and therefore logging technology also obtains fast development.Downhole toolbus is in a very important status in logging system, be the passage that number biography and subsurface equipment carry out exchanges data.This bus design whether rationally, efficient, determined to a great extent the performance of whole logging system.
At present, the downhole toolbus of domestic logging system common are two kinds of traditional RS485 bus and CAN buses.The RS-485 bus is as a kind of bus standard of multiple spot differential data transmission, become one of standard communication interface that industry is most widely used.This communication interface allows to carry out the multiple spot two-way communication at simple a pair of twisted-pair feeder, and the noise inhibiting ability that it has, message transmission rate, cable length and reliability are that other standards is incomparable.Just because of this, many different field all adopt RS-485 as data transmission link.For example: automotive electronics, the telecommunication apparatus LAN (Local Area Network), intelligent buildings etc. all often can be seen the equipment with RS-485 interface circuit, the another one reason that this standard is widely accepted is that the electrical specification of its a versatility RS-485 standard docking port is made regulation, and do not relate to connector cable or agreement, the user can set up the high-level communications protocol of oneself on this basis, but, the communication speed of RS485 bus is low, according to the IEC61158 standard for Fieldbus, its maximum transmission rate is 10Mbps, its maximum transmission distance is 1200 meters, this moment, transfer rate was 100kbps, baud rate commonly used is 9600bps, and its speed and communication distance have direct relation, when reaching the above communication distance of hundreds of rice, and its reliable communicating speed<1200bps.
CAN bus characteristics: have that real-time, transmission range is far away, anti-electromagnetic interference capability is strong, low cost and other advantages; Adopt the two-wire serial communication mode, error detecing capability is strong, can work in the strong noise interference environment; Have right of priority and arbitration function, a plurality of control modules are suspended on the CAN-bus by the CAN controller, form many main frames localized network; Can determine to receive or shield this message according to the ID of message; Mistake is processed and error-detection mechanism reliably; After the information that sends is destroyed, can automatically retransmit; Node has a function that automatically withdraws from bus in the situation that mistake is serious; Message does not comprise source address or destination address, only comes deixis information, precedence information with identifier, according to the IEC61158 standard for Fieldbus, and CAN bus peak transfer rate 1Mbps, 40 meters of transmission ranges; The maximum transmission distance ten thousand metres, transfer rate 5kbps.
These two kinds of buses are when tens meters down-hole buses are transmitted, and traffic rate is all not high, has limited articulating of how novel big data quantity subsurface equipment.
The utility model content
The utility model is for solving the RS485 bus interface with relay function that improves traffic rate and reliability when the technical matters that exists in the known technology provides a kind of long distance transmit.
The technical scheme that the utility model is taked for the technical matters that exists in the solution known technology is: a kind of RS485 bus interface with relay function, comprise bus transfer controller and coupled RS485 transceiver 1, RS485 transceiver 2, signal isolator and toggle switch, the R port of described RS485 transceiver 1 links to each other with described bus transfer controller after the D port of RS485 transceiver 2 connects with being connected, the D port of described RS485 transceiver 1 be connected the R port of RS485 transceiver 2 and connect afterwards and link to each other with described bus transfer controller; Described bus transfer controller output signal is controlled the duty of described RS485 transceiver 1 and described RS485 transceiver 2, and is connected with bus and signal transmission by described RS485 transceiver 1 and/or described RS485 transceiver 2; Described bus transfer controller is connected with external unit and signal transmission by described signal isolator; Described toggle switch is set the station number of external unit and is outputed signal to described bus transfer controller.
Described bus transfer controller comprises such as lower module: CPU module, input/output interface module, electrification reset module, RS485 transceiver sending/receiving block of state is set, relatively judges that the order receive is/no our station command module, monitored data timing module and judge and send the complete module of data, wherein
The described RS485 transceiver sending/receiving block of state that arranges, by the drive end of described input/output interface module output signal to described RS485 transceiver 1 and described RS485 transceiver 2, control the duty of described RS485 transceiver 1 and described RS485 transceiver 2;
When described bus transfer controller powers on, described CPU module output signal is to described electrification reset module, described electrification reset module output signal is to described RS485 transceiver sending/receiving block of state and the monitored data timing module of arranging, these two module initializations are resetted, at this moment, described RS485 transceiver 1 is set to on-state and described RS485 transceiver 2 is set to the transmission state;
Described CPU module receives from bus signals by described input/output interface module, output signal to and describedly judge that relatively the order receive is/no our station command module, described relatively judge the order receive be/after no our station command module is relatively judged input signal, output signal to the described RS485 of setting transceiver sending/receiving block of state; When relatively being judged as "Yes", described RS485 transceiver 1 is set to the transmission state and described RS485 transceiver 2 is set to closed condition, and this moment, the signal from external unit was sent to bus by described input/output interface module and described RS485 transceiver 1; When relatively being judged as "No", described RS485 transceiver 1 is set to the transmission state and described RS485 transceiver 2 is set to accepting state, and described CPU module receives from bus signals, outputs signal to described monitored data timing module;
Described monitored data timing module receives from described CPU module by signal, and outputs signal to the described RS485 of setting transceiver sending/receiving block of state behind the setting-up time; When the monitored data timing equaled setting-up time, then described RS485 transceiver 1 was set to on-state and described RS485 transceiver 2 is set to the transmission state;
Described judgement sends the complete module of data and receives from described CPU module by signal, outputs signal to the described RS485 of setting transceiver sending/receiving block of state after the comparison process; When the transmission data were complete, described RS485 transceiver 1 is set to on-state and described RS485 transceiver 2 is set to the transmission state.
Described input/output interface module comprises 3 UART ports, and wherein 1 UART port links to each other with signal isolator, and 2 UART ports link to each other with the reception/transmit port of described RS485 transceiver 1 and described RS485 transceiver 2.
Described signal isolator is the two-channel digital isolator.
Also comprise the bus protection circuit.
Described bus protection circuit comprises the optical coupling isolator circuit that is arranged on the RS485 transceiver port.
Advantage and the good effect that the utlity model has are: the utility model comprises two RS485 bus transceivers: a transceiver is as reception, another transceiver is as transmission, consist of the bus transfer controller by single-chip microcomputer, the duty of two RS485 bus transceivers of control, when having avoided using a RS485 bus transceiver, the drawback that the RS485 bus adopts the host computer polls mode to produce improves the transfer rate of communication; Adopt digital isolator to make electrical isolation between external unit such as subsurface equipment and the RS485 bus; interference on the bus can not have influence on the work of external unit such as logging instrumentation; be provided with the bus protection circuit; can remove the bus small-signal disturbs; suppress surge voltage; to device overcurrent protection etc., improved the reliability of bus interference free performance and RS485 bus transfer.
Description of drawings
Fig. 1 is structural representation of the present utility model;
Fig. 2 is access downhole toolbus connection diagram of the present utility model;
Fig. 3 is workflow diagram of the present utility model.
Embodiment
For further understanding summary of the invention of the present utility model, Characteristic, hereby exemplify following examples, and cooperate accompanying drawing to be described in detail as follows:
See also Fig. 1 and Fig. 2, a kind of RS485 bus interface with relay function, comprise bus transfer controller and coupled RS485 transceiver 1, RS485 transceiver 2, signal isolator and toggle switch, the R port of described RS485 transceiver 1 links to each other with described bus transfer controller after the D port of RS485 transceiver 2 connects with being connected, the D port of described RS485 transceiver 1 be connected the R port of RS485 transceiver 2 and connect afterwards and link to each other with described bus transfer controller; Described bus transfer controller output signal is controlled the duty of described RS485 transceiver 1 and described RS485 transceiver 2, and is connected with bus and signal transmission by described RS485 transceiver 1 and/or described RS485 transceiver 2; Described bus transfer controller is connected with external unit and signal transmission by described signal isolator; Described toggle switch is set the station number of external unit and is outputed signal to described bus transfer controller.Wherein, the bus transfer controller can be single-chip microcomputer, english abbreviation MCU, and described signal isolator can be the double-channel signal isolator, and external unit comprises the various instrument and equipments such as subsurface equipment of logging system; Bus transceiver has two: one is used for receiving, and another is used for sending, and the state that sends and receives of transceiver is changed according to data transfer direction by controller.Digital isolator is used for realizing the electrical isolation function of instrument and bus, prevents that the interference on the bus from scurrying into the treatment circuit of instrument, and toggle switch is used for arranging the station number of subsurface equipment, and described signal isolator can be the two-channel digital isolator.
Described bus transfer controller can comprise such as lower module: CPU module, input/output interface module, electrification reset module, RS485 transceiver sending/receiving block of state is set, relatively judges that the order receive is/no our station command module, monitored data timing module and judge and send the complete module of data, wherein
The described RS485 transceiver sending/receiving block of state that arranges, by the drive end of described input/output interface module output signal to described RS485 transceiver 1 and described RS485 transceiver 2, control the duty of described RS485 transceiver 1 and described RS485 transceiver 2;
When described bus transfer controller powers on, described CPU module output signal is to described electrification reset module, described electrification reset module output signal is to described RS485 transceiver sending/receiving block of state and the monitored data timing module of arranging, these two module initializations are resetted, at this moment, described RS485 transceiver 1 is set to on-state and described RS485 transceiver 2 is set to the transmission state;
Described CPU module receives from bus signals by described input/output interface module, output signal to and describedly judge that relatively the order receive is/no our station command module, described relatively judge the order receive be/after no our station command module is relatively judged input signal, output signal to the described RS485 of setting transceiver sending/receiving block of state; When relatively being judged as "Yes", described RS485 transceiver 1 is set to the transmission state and described RS485 transceiver 2 is set to closed condition, and this moment, the signal from external unit was sent to bus by described input/output interface module and described RS485 transceiver 1; When relatively being judged as "No", described RS485 transceiver 1 is set to the transmission state and described RS485 transceiver 2 is set to accepting state, and described CPU module receives from bus signals, outputs signal to described monitored data timing module;
Described monitored data timing module receives from described CPU module by signal, and outputs signal to the described RS485 of setting transceiver sending/receiving block of state behind the setting-up time; When the monitored data timing equaled setting-up time, then described RS485 transceiver 1 was set to on-state and described RS485 transceiver 2 is set to the transmission state;
Described judgement sends the complete module of data and receives from described CPU module by signal, outputs signal to the described RS485 of setting transceiver sending/receiving block of state after the comparison process; When the transmission data were complete, described RS485 transceiver 1 is set to on-state and described RS485 transceiver 2 is set to the transmission state.
Described input/output interface module can comprise 3 UART ports, and wherein 1 UART port links to each other with signal isolator, and 2 UART ports link to each other with the reception/transmit port of described RS485 transceiver 1 and described RS485 transceiver 2.
The utility model also can comprise the bus protection circuit; Described bus protection circuit can comprise the optical coupling isolator that is arranged on the RS485 transceiver port.
Interface module is set to accepting state to RS485 transceiver 1 after resetting, RS485 transceiver 2 is set to the transmission state.And receive number by UART and descend and say the word: the order if not our station is identified by toggle switch, RS485 transceiver 1 is set is the transmission state, RS485 transceiver 2 is set is accepting state.If the our station order arranges RS485 transceiver 1 and is the transmission state, close RS485 transceiver 2, uploading data.
If transceiver can listen to the data that subsurface equipment is uploaded, illustrate that this instrument is in the top of the transmission of data instrument.When being sent, 485 chips of module revert to the state after resetting.If can not listen to data, illustrate that this instrument is following at the instrument of the transmission of data.485 chips of module are reverted to state after resetting.
The utility model can be applied to the downhole toolbus communication of logging system, traffic rate can reach 4Mbps, 50 meters of communication distances, compared with prior art, improved the traffic rate of downhole toolbus, improve the bus interference free performance, be suitable for the bus transfer of the subsurface equipment of imaging class big data quantity.
See also Fig. 3, workflow of the present utility model is as follows:
1, transceiver module is set to accepting state to 485 chips 1 after resetting, and 485 chips 2 are set to the transmission state.
2, receiving number by UART1 descends and says the word.
3, receive transmitting order to lower levels, identify by toggle switch if not the order of our station, 485 chips 1 are set are the transmission state, 485 chips 2 are set for accepting state, jump to 6.If the our station order arranges 485 chips 1 and is the transmission state, close 485 chips 2.
4, uploading data.
5, uploading data is complete, and 485 chips 1 are set to accepting state, and 485 chips 2 are set to the transmission state.Jump to step 2.
6, by the UART2 interface, monitor the data of current transmission slave station.If can listen to data, illustrate that then this instrument is in the top of the transmission of data instrument.When being sent, 485 chips of module revert to the state after resetting.If it is overtime to listen to data decryptor, illustrate that this instrument is following at the instrument of the transmission of data, 485 chips of module are reverted to state after resetting.Jump to step 2.
Although the above is described preferred embodiment of the present utility model by reference to the accompanying drawings; but the utility model is not limited to above-mentioned embodiment; above-mentioned embodiment only is schematic; be not restrictive; those of ordinary skill in the art is under enlightenment of the present utility model; not breaking away from the scope situation that the utility model aim and claim protect, can also make a lot of forms, these all belong within the protection domain of the present utility model.

Claims (6)

1. RS485 bus interface with relay function, it is characterized in that, comprise bus transfer controller and coupled RS485 transceiver (1), RS485 transceiver (2), signal isolator and toggle switch, the R port of described RS485 transceiver (1) links to each other with described bus transfer controller after the D port of RS485 transceiver (2) connects with being connected, the D port of described RS485 transceiver (1) be connected the R port of RS485 transceiver (2) and connect afterwards and link to each other with described bus transfer controller; Described bus transfer controller output signal is controlled the duty of described RS485 transceiver (1) and described RS485 transceiver (2), and is connected with bus and signal transmission by described RS485 transceiver (1) and/or described RS485 transceiver (2); Described bus transfer controller is connected with external unit and signal transmission by described signal isolator; Described toggle switch is set the station number of external unit and is outputed signal to described bus transfer controller.
2. the RS485 bus interface with relay function according to claim 1, it is characterized in that, described bus transfer controller comprises such as lower module: CPU module, input/output interface module, electrification reset module, RS485 transceiver sending/receiving block of state is set, relatively judges that the order receive is/no our station command module, monitored data timing module and judge and send the complete module of data, wherein
The described RS485 transceiver sending/receiving block of state that arranges, by the drive end of described input/output interface module output signal to described RS485 transceiver (1) and described RS485 transceiver (2), control the duty of described RS485 transceiver (1) and described RS485 transceiver (2);
When described bus transfer controller powers on, described CPU module output signal is to described electrification reset module, described electrification reset module output signal is to described RS485 transceiver sending/receiving block of state and the monitored data timing module of arranging, these two module initializations are resetted, at this moment, described RS485 transceiver (1) is set to on-state and described RS485 transceiver (2) is set to the transmission state;
Described CPU module receives from bus signals by described input/output interface module, output signal to and describedly judge that relatively the order receive is/no our station command module, described relatively judge the order receive be/after no our station command module is relatively judged input signal, output signal to the described RS485 of setting transceiver sending/receiving block of state; When relatively being judged as "Yes", described RS485 transceiver (1) is set to the transmission state and described RS485 transceiver (2) is set to closed condition, and this moment, the signal from external unit was sent to bus by described input/output interface module and described RS485 transceiver (1); When relatively being judged as "No", described RS485 transceiver (1) is set to the transmission state and described RS485 transceiver (2) is set to accepting state, and described CPU module receives from bus signals, outputs signal to described monitored data timing module;
Described monitored data timing module receives from described CPU module by signal, and outputs signal to the described RS485 of setting transceiver sending/receiving block of state behind the setting-up time; When the monitored data timing equaled setting-up time, then described RS485 transceiver (1) was set to on-state and described RS485 transceiver (2) is set to the transmission state;
Described judgement sends the complete module of data and receives from described CPU module by signal, outputs signal to the described RS485 of setting transceiver sending/receiving block of state after the comparison process; When the transmission data were complete, described RS485 transceiver (1) is set to on-state and described RS485 transceiver (2) is set to the transmission state.
3. the RS485 bus interface with relay function according to claim 2, it is characterized in that, described input/output interface module comprises 3 UART ports, wherein 1 UART port links to each other with signal isolator, and 2 UART ports link to each other with the reception/transmit port of described RS485 transceiver (1) with described RS485 transceiver (2).
4. according to claim 1 or 3 arbitrary described RS485 bus interface with relay function, it is characterized in that, described signal isolator is the two-channel digital isolator.
5. according to claim 1 or 3 arbitrary described RS485 bus interface with relay function, it is characterized in that, also comprise the bus protection circuit.
6. the RS485 bus interface with relay function according to claim 5 is characterized in that, described bus protection circuit comprises the optical coupling isolator circuit that is arranged on the RS485 transceiver port.
CN 201220610272 2012-11-16 2012-11-16 RS485 bus interface with relay function Expired - Fee Related CN202904869U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201220610272 CN202904869U (en) 2012-11-16 2012-11-16 RS485 bus interface with relay function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201220610272 CN202904869U (en) 2012-11-16 2012-11-16 RS485 bus interface with relay function

Publications (1)

Publication Number Publication Date
CN202904869U true CN202904869U (en) 2013-04-24

Family

ID=48125508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201220610272 Expired - Fee Related CN202904869U (en) 2012-11-16 2012-11-16 RS485 bus interface with relay function

Country Status (1)

Country Link
CN (1) CN202904869U (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008169A (en) * 2019-11-20 2020-04-14 南京南瑞水利水电科技有限公司 Low-cost high-speed communication bus and transmission control method thereof
CN113820971A (en) * 2021-08-17 2021-12-21 广东智科电子股份有限公司 Isolation repeater and control method thereof
CN114499583A (en) * 2021-12-10 2022-05-13 四川普罗拉赫科技有限公司 485 repeater based on MCU control

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008169A (en) * 2019-11-20 2020-04-14 南京南瑞水利水电科技有限公司 Low-cost high-speed communication bus and transmission control method thereof
CN113820971A (en) * 2021-08-17 2021-12-21 广东智科电子股份有限公司 Isolation repeater and control method thereof
CN113820971B (en) * 2021-08-17 2023-06-06 广东智科电子股份有限公司 Isolation repeater and control method thereof
CN114499583A (en) * 2021-12-10 2022-05-13 四川普罗拉赫科技有限公司 485 repeater based on MCU control

Similar Documents

Publication Publication Date Title
CN204928889U (en) Many interfaces protocol converter
CN101813935A (en) Non-polar field bus system and realization method
CN102053935A (en) MODBUS serial communication protocol-based communication method
CN203933593U (en) Half-duplex RS-485 isolation communicating circuit
CN201118630Y (en) A non-polarity two-core communication bus receiver/transmitter for photoelectrical separation
CN101719791A (en) Optic fiber transceiver having remote monitoring function and data transmission method
CN202904869U (en) RS485 bus interface with relay function
CN102026050A (en) Optical fiber CAN bus hub and networking method thereof
CN105515927A (en) Remote serial port communication system and method based on Ethernet Cat.5 wiring framework
CN107682084A (en) A kind of photoelectric communication conversion equipment and photoelectric communication system
CN203847102U (en) CAN bus and 485 bus node circuit
CN101547526B (en) Fault handling method, wireless device and communication system
CN204481837U (en) Serial port networked communication apparatus
CN202795352U (en) Wiring method for recommend standard (RS) 232 interface and RS 485 interface
CN109597783A (en) A kind of double light-coupled isolation type RS485 circuits
CN221263821U (en) RS485 communication circuit with optical coupling isolation and communication system
CN204013549U (en) A kind of CAN bus network based on optical fiber communication
CN213957869U (en) Internet gateway circuit
CN106413027B (en) Wireless networking method for primary relay
CN110297795A (en) Single channel serial data transmission system and its method are realized based on ethernet PHY chip
CN101778025B (en) Ethernet transmission device and method suitable for transmission rate lower than 1 kilomega
CN210093253U (en) System for fusing PLC control system and control system of DALI protocol
CN209447019U (en) RS485 equipment connects circuit and system
CN107966936A (en) A kind of RS485 telecommunication circuits
CN210693978U (en) CAN bus gateway with optical fiber interface

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130424

Termination date: 20151116

EXPY Termination of patent right or utility model