CN213934874U - RS485 serial bus communication equipment based on monitoring technology - Google Patents

RS485 serial bus communication equipment based on monitoring technology Download PDF

Info

Publication number
CN213934874U
CN213934874U CN202022203888.2U CN202022203888U CN213934874U CN 213934874 U CN213934874 U CN 213934874U CN 202022203888 U CN202022203888 U CN 202022203888U CN 213934874 U CN213934874 U CN 213934874U
Authority
CN
China
Prior art keywords
bus
state
power supply
main unit
unit
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.)
Active
Application number
CN202022203888.2U
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.)
Beijing Research Institute of Mechanical and Electrical Technology
Original Assignee
Beijing Research Institute of Mechanical and Electrical Technology
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 Beijing Research Institute of Mechanical and Electrical Technology filed Critical Beijing Research Institute of Mechanical and Electrical Technology
Priority to CN202022203888.2U priority Critical patent/CN213934874U/en
Application granted granted Critical
Publication of CN213934874U publication Critical patent/CN213934874U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Selective Calling Equipment (AREA)

Abstract

The utility model provides a RS485 serial bus communication equipment based on monitoring technique, this equipment are applied to underwater robot's control system, underwater robot's control system constitute by main unit and a plurality of subelement, use the RS485 bus, integrated control computer and sensor all establish ties on the bus. According to the scheme, only two shielding cable lines are needed, a differential signal mode is adopted, the anti-electromagnetic interference performance is good, a communication mode with one master and multiple slaves is adopted, and the problems that the cycle acquisition period of an RS485 serial bus main unit is long, information of the subunits cannot be timely sent to the main unit when changed, the response processing speed of the system to a sudden change event is low, or bus communication data are lost are solved in a control system through bus state detection and active transmission of the slaves.

Description

RS485 serial bus communication equipment based on monitoring technology
Technical Field
The utility model relates to a computer communication field especially relates to a RS485 half-duplex bus communication equipment.
Background
The RS485 bus can be connected with 255 RS485 interface devices at most, the farthest communication distance can support 1500m, only two shielding cable lines are needed for wiring in the mode, and the anti-electromagnetic interference effect is good due to the adoption of a differential signal mode. A master-band multi-slave communication mode is used. In the underwater robot control system, the integrated control computer is a master device, and all sensors are slave devices. The data of each subunit is generally collected by a master-slave calling mode, that is, the master unit calls each subunit in sequence, as shown in fig. 1, the right of use of the bus is completely allocated by the master unit, and each subunit cannot arbitrarily take possession of the bus.
In summary, the prior art has the following disadvantages:
if the number of the subunits of the system is large, the time for the main unit to circularly collect the information for one week is long, and the information of the subunits cannot be timely sent to the main unit when changing, so that the reaction processing speed of the system to the mutation event is low, or the bus communication data is lost.
A disclosed invention patent application CN110690978A describes an RS485 ammeter power failure alarm reporting method based on a timing broadcast strategy, which uses an RS485 communication mode for timing communication between an intelligent ammeter and a master station, and in order to solve the problem of RS485 circuit multi-signal communication conflict, a concentrator is adopted to monitor a shared medium after sending a broadcast command of power failure state inquiry, a monitoring reply is carried out to prevent the situation that two or more nodes send simultaneously, if conflict occurs, a random event is returned, the message requirement of power failure state reply after the requirement of waiting for random time is sent after the conflict is determined, and the receipt of a plurality of power failure information is confirmed through the intelligent ammeter node random time reply information.
Disclosure of Invention
In order to solve the technical problem, the utility model provides an RS485 serial bus communication equipment, this equipment is applied to the control system of underwater robot, the control system of underwater robot constitute by main unit and a plurality of subelements, use the RS485 bus, comprehensive control computer and sensor are all connected in series on the bus; the main unit comprises an STM32F407 controller, a program memory, a data memory, an RS485 communication interface circuit of the main unit, a power supply and a communication isolation power supply; the sub-unit comprises: the MSP430F133 single chip microcomputer, an RS485 communication interface circuit of the subunit, a system power supply and a communication isolation power supply; in the main unit, the external memory 39VF1601 is used as a program memory, and the external memory HY57V641620HG is used as a data memory; the system comprises 2 UART serial interfaces, and uses ADM2483 to carry out interface level conversion; the bus detection circuit detects the use state of the bus, and the bus detection circuit uses a 74HC125 tri-state gate chip; the method is characterized in that the slave device works in a mode of listening first and then sending, a bus detection circuit of the slave device detects the using state of a bus, and the bus state detection uses two I/O interfaces of a 74HC125 tri-state gate chip and a subunit single chip microcomputer; when the system does not use the bus, the 74HC125 of each unit outputs a high-impedance state, and the bus is at a low level; the subunit detects that the bus state is low level, the unit sets the 74HC125 into output state, the bus becomes high level, the unit occupies the bus, sends data to the bus, and sets the 74HC125 into high-impedance state after the data sending is finished; the subunit detects that the bus state is high, and continues to detect until the bus goes low and then seizes the bus.
Furthermore, the power circuit adopts a switching power supply to supply power and outputs 5V and 3.3V of direct-current voltage. The isolated 5V power supply required by RS485 is generated by a DC/DC module.
Adopt the utility model discloses a method, slave unit adopts and listens earlier then sends out the mode work, adopts this kind of data bus data monitoring technology can improve RS485 serial data bus's communication efficiency.
Drawings
Fig. 1 is a diagram of an RS485 bus master-slave mode interface.
Fig. 2 is a block diagram of an RS485 bus system.
Fig. 3 is a bus detection circuit.
Fig. 4 is an isolation 485 circuit.
Fig. 5 is a flow chart of RS485 bus snooping communication software.
Detailed Description
The following detailed description of the embodiments of the present invention will be made with reference to the accompanying drawings.
In the underwater robot control system, an RS485 bus is used, an integrated control computer and a sensor are connected in series on the bus, and the whole system consists of a main unit and a plurality of sub-units, as shown in figure 2.
The main unit includes: an STM32 controller, a program memory, a data memory, an RS485 interface circuit for communication of the main unit, a power supply and a communication isolation power supply; the subunit includes: the MSP430 single chip microcomputer, an RS485 interface circuit for communication of the subunits, a system power supply and a communication isolation power supply.
1. Main unit
The main unit controller is the core of the main unit, the main unit controller adopts STM32F4 series of intentional semiconductors, and the STM32F407 series is oriented to medical, industrial and consumer applications requiring high integration, high performance, embedded memories and peripherals in a package as small as 10 x 10 mm. STM32F407 provides Cortex at 168MHzTM-performance of M4 kernel; STM32F407/417 product line has 512 KB-1 MB Flash and 192KB SRAM, and SST company is extended in main unitThe produced 39VF1601 is used as a program memory FLASH, and the produced HY57V641620HG is externally used as a data memory SDRAM. In the system, 2 UART serial interfaces are used, an ADI isolation RS485 chip ADM2483 is used for interface level conversion, and a 74HC125 tri-state gate chip is used for bus state detection.
2. Sub-unit
The microcontroller of the subunit uses a TI MSP430F133 singlechip, the processing speed of the singlechip can reach 8MHz, FLASH storage in 8K byte chips and SRAM in 256K byte chips.
3. Power supply of power source
The power supply circuit adopts a switching power supply to supply power, the input voltage range of the switching power supply is wide, 5V direct-current voltage is output, and 3.3V power supply is output through SP1117-3.3 and SP1117-2.5 chips. And the 5V isolation power supply required by the RS485 is output through the DC/DC module.
4. Bus detection circuit
The bus state detection uses two I/O of 74HC125 tri-state gate chip and singlechip, as shown in FIG. 3, when the system does not use the bus, 74HC125 of each unit outputs high impedance state, at this time, the bus is low level, when a unit needs to use the bus, he first detects the bus state, if the bus is low level, the unit changes 74HC125 into output state rapidly, at this time, the bus becomes high level, the unit takes over the bus, sends data to the bus, and changes 74HC125 into high impedance state after finishing sending data. If the bus is detected as high, the bus is waited for detection until it is busy after the bus goes low.
5. Isolation 485 circuit
The ADM2483 chip of ADI is used for interface level conversion, and belongs to an isolation 485 as shown in figure 4, and the dual power supply input and output are isolated.
6. Software design
And the software realizes the receiving, processing and uploading of the uploaded data of each subunit. The main unit receives the information of the sub-units through an RS485 serial port, the data format is 16-system, the communication baud rate is 115200, n,8,1, namely the baud rate is 115200bps, no parasitic check bit, 8-bit data bit and 1-bit stop bit. And receiving by adopting a serial port interruption mode.
After the main unit software is initialized, waiting for each sub unit to send information, wherein the information data frame format is as follows:
TABLE 1 communication protocol
Figure DEST_PATH_GDA0003036713920000041
Figure DEST_PATH_GDA0003036713920000051
The software processing flow is as follows:
1. after the main unit receives the first byte, judging whether the byte is the equipment number, and if not, clearing the receiving number;
2. if the equipment number continues to receive the second byte, judging whether the second byte is a correct function code, and if the function code is wrong, clearing the receiving number and re-receiving;
3. if the function code correctly continues to receive the third byte, the byte is the byte number X of the information sent by the slave unit, after the host receives the X bytes, the host judges the CRC check code, if the check code is wrong, the received data frame is abandoned, and the data frame is received again;
4. if the check code is correct, the information of the slave unit is stored in the data area, the receiving is finished, and the host continues to wait for receiving.
5. After the data reception is completed, the main unit can process the corresponding terminal according to the data and can also send the data to the upper computer, and the sending information comprises the equipment number, the function code, the number of the sending bytes, the information bytes and the CRC check code.
The host unit receives a data flow diagram as shown in fig. 5.
It is obvious to the person skilled in the art that the embodiments of the invention are not restricted to the details of the above-described exemplary embodiments. The above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention and are not limited, and although the embodiments of the present invention have been described in detail with reference to the above preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions to the technical solutions of the embodiments of the present invention may be made without departing from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (3)

1. An RS485 serial bus communication device is applied to a control system of an underwater robot, the control system of the underwater robot consists of a main unit and a plurality of sub-units, an RS485 bus is used, and a comprehensive control computer and a sensor are connected on the bus in series; the main unit comprises an STM32F407 controller, a program memory, a data memory, an RS485 communication interface circuit of the main unit, a power supply and a communication isolation power supply; the sub-unit comprises: the MSP430F133 single chip microcomputer, an RS485 communication interface circuit of the subunit, a system power supply and a communication isolation power supply; in the main unit, the external memory 39VF1601 is used as a program memory, and the external memory HY57V641620HG is used as a data memory; 2 UART serial interfaces of the system use ADM2483 to carry out interface level conversion; the bus detection circuit detects the use state of the bus, and the bus detection circuit uses a 74HC125 tri-state gate chip; the system is characterized in that the slave device works in a mode of listening first and then sending, a bus detection circuit of the slave device detects the using state of a bus, the bus state detection uses two I/O interfaces of a 74HC125 tri-state gate chip and a subunit single chip microcomputer, when the system uses the bus, the 74HC125 of each unit outputs a high-impedance state, and the bus is in a low level; the subunit detects that the bus state is low level, the unit sets the 74HC125 into output state, the bus becomes high level, the unit occupies the bus, sends data to the bus, and sets the 74HC125 into high-impedance state after the data sending is finished; the subunit detects that the bus state is high, and continues to detect until the bus goes low and then seizes the bus.
2. The RS485 serial bus communication device according to claim 1, wherein the power circuit is powered by a switching power supply, outputting dc voltages of 5V and 3.3V; the isolated 5V power supply required by RS485 is generated by a DC/DC module.
3. The RS485 serial bus communication device of claim 1, wherein the format of the information between the master unit and the slave unit is arranged to: the data format is 16-system, 8 bits of data, 1 start bit, 1 end bit, no spurious check bit and a baud rate of 115200 bps.
CN202022203888.2U 2020-09-30 2020-09-30 RS485 serial bus communication equipment based on monitoring technology Active CN213934874U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202022203888.2U CN213934874U (en) 2020-09-30 2020-09-30 RS485 serial bus communication equipment based on monitoring technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202022203888.2U CN213934874U (en) 2020-09-30 2020-09-30 RS485 serial bus communication equipment based on monitoring technology

Publications (1)

Publication Number Publication Date
CN213934874U true CN213934874U (en) 2021-08-10

Family

ID=77218719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202022203888.2U Active CN213934874U (en) 2020-09-30 2020-09-30 RS485 serial bus communication equipment based on monitoring technology

Country Status (1)

Country Link
CN (1) CN213934874U (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168519A (en) * 2021-11-19 2022-03-11 沈阳航天新光集团有限公司 Working robot control system based on serial bus communication technology
CN114244753A (en) * 2021-11-29 2022-03-25 上海繁易信息科技股份有限公司 RS485 bus-based rapid communication structure and rapid communication method for multiple upper computers and controllers
CN115499032A (en) * 2022-09-01 2022-12-20 上海盛本智能科技股份有限公司 One-to-many UART communication method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168519A (en) * 2021-11-19 2022-03-11 沈阳航天新光集团有限公司 Working robot control system based on serial bus communication technology
CN114244753A (en) * 2021-11-29 2022-03-25 上海繁易信息科技股份有限公司 RS485 bus-based rapid communication structure and rapid communication method for multiple upper computers and controllers
CN114244753B (en) * 2021-11-29 2023-09-29 上海繁易信息科技股份有限公司 Quick communication method for multiple upper computers and controllers based on RS485 bus
CN115499032A (en) * 2022-09-01 2022-12-20 上海盛本智能科技股份有限公司 One-to-many UART communication method

Similar Documents

Publication Publication Date Title
CN213934874U (en) RS485 serial bus communication equipment based on monitoring technology
US10468078B2 (en) Methods and systems for pin-efficient memory controller interface using vector signaling codes for chip-to-chip communication
CN108733604B (en) 485 bus intelligent expansion method and device based on modbus communication protocol
US6697897B1 (en) Data communication interface between host and slave processors
CN201604665U (en) Communication interface equipment of train control center
CN1821913A (en) Communication system and method based on I2C
CN102253910B (en) Inter-integrated circuit (I2C) transmission method and device
CN104008082A (en) Converter of 1553B bus remote terminal (RT) node and controller area network (CAN) bus
CN201639589U (en) Embedded dual-redundant network card based on ARM
CN103139052A (en) Controller area network (CAN)-Ethernet communication gateway and data processing method and system
CN101498963A (en) Method for reducing CPU power consumption, CPU and digital chip
CN113626365A (en) Communication method based on SPI bus
CN102637453A (en) Phase change memory including serial input/output interface
US6625163B1 (en) Collision detection on a differential bus
CN114168519A (en) Working robot control system based on serial bus communication technology
CN101753393B (en) Communication chip architecture based on IEC 61158 standard field bus
CN114661646A (en) Serial port switching control circuit
WO2001031801A1 (en) One way single-wire communication interface
CN105743927A (en) CANopen and DP protocol data converter and conversion method
CN112929356A (en) Method and system for converting cclink protocol into modbus protocol
CN111813732A (en) Multi-machine communication method based on serial port communication of single chip microcomputer
CN206364831U (en) Data transmission device based on ring network structure
CN215186797U (en) Differential data and protocol conversion embedded gateway equipment
CN210924498U (en) Peripheral power-saving circuit for master control device control in embedded operating system
CN217904426U (en) High-flexibility modularized field bus

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant