Two-bus-based communication and energy transmission system
Technical Field
The invention relates to the field of two-bus communication and energy transmission, in particular to a two-bus communication and energy transmission system.
Background
In the field of communication and control, a two-bus technology for simultaneously transmitting electric energy and signals is always the focus of common attention of the majority of engineering technicians. The two-bus technology is characterized in that a master computer is connected with each slave node by only two wires, and the two wires are used as electric energy transmission wires to provide power for each node and are also used as signal wires to enable the nodes to be communicated with each other. Compared with the traditional multi-bus technology, the two-bus system has the advantages of simple structure, clear division of labor, low cost and high reliability, and in addition, the two-bus system also has the characteristics of simple interface, less bus number and the like. In large-scale and remote monitoring systems, such as petroleum, chemical, electric, fire monitoring, water monitoring and the like, data measured by the detectors need to be accurately and reliably collected, and meanwhile, a master control station also needs to send control commands to an actuating mechanism. Aiming at the characteristics of wide region coverage, numerous sensors, scattered installation and the like of the system, the wire cost advantage is obvious when the communication distance is long, and the monitoring system using the two-bus structure has the advantages of convenience in installation and maintenance, cost reduction, strong anti-interference capability and the like. The method has a wide development prospect in the application field of monitoring the related physical quantities of a plurality of production and living places.
The two-bus system is usually implemented by a scheme of superimposing carrier signals on an electric energy transmission line, for example, a "two-bus remote power supply and communication device (CN 2433782Y)" of the invention patent and a "two-bus remote power supply and communication system thereof (CN 1127237C)" of the invention patent, but a communication node couples signals to the electric energy transmission line, a special signal modulation circuit is required, and a special demodulation circuit is also required when receiving the signals, so that the electric energy transmission loss of the device is large, the manufacturing cost is high, meanwhile, the process needs to be adjusted in sensitivity, the expansibility is poor, and because complete isolation is difficult to implement, carrier signals are often interfered by a power supply circuit and an electric circuit, so that the signal transmission distance is short, the communication speed is low, the node capacity is small, and the requirements on the performance of the power supply device and the electric device are greatly improved. In addition, in these occasions, the communication data mainly comprises control information or state information, the information quantity is relatively small, the real-time performance of communication is relatively weak, and the time response is long. A new two-bus implementation scheme is also proposed, for example, two-bus technical research on energy/information time division transmission is reported in pages 58-59 of paragraph 9 of 2012, "microcomputer and application," and the energy/information transmission of the two buses is realized by using a time division multiplexing method, but the problems of complex circuit, poor expansibility, low communication rate, complicated sensitivity adjustment and the like still exist. In some application fields, the system is required to have a powerful function and an ultra-low power consumption characteristic, such as a distributed energy harvesting system, the harvested energy is limited due to the weak energy distribution density in the environment and randomness, and the power consumption of the general two-bus system is too large, so that the general two-bus system is difficult to apply.
In view of the defects, the invention designs the two-bus-based communication and energy transmission system, realizes mode switching by the optocoupler switch module and the RS485 transceiver module in the master unit and the slave unit, has high communication speed and strong expansibility, and can effectively reduce the energy transmission loss of the system.
Disclosure of Invention
The purpose of the invention is as follows: the system realizes mode switching through the optocoupler switch module and the RS485 transceiver module in the master unit and the slave unit, so that the master unit and the slave unit can realize information transmission and energy transmission only through two buses, and the system can be applied to occasions of improving the traditional wired sensor network or distributed energy collection and the like.
In order to realize the purpose of the invention, the following technology is adopted: the communication and energy transmission system based on the two buses is characterized by comprising a slave unit (1) and a host unit (2), wherein the slave unit (1) is connected with the host unit (2) through the two buses formed by a bus A (3) and a bus B (4), the slave unit (1) comprises a slave energy storage module (5), a slave microprocessor (6), a slave RS485 transceiver module (7) and a slave optocoupler switch module (8), and the host unit (2) comprises a host optocoupler switch module (9), a host RS485 transceiver module (3)10) The system comprises a host microprocessor (11), a DC-DC module (12) and a host energy storage module (13). The slave RS485 transceiver module (7) comprises a slave RS485 chip and a resistorR1Resistance ofR1The two ends of the secondary energy storage module (5) are respectively connected with a pin A and a pin B of a secondary RS485 chip, an RXD port, a TXD port, a GPIO1 port and a GPIO2 port of the secondary microprocessor (6) are respectively connected with an RO pin, a DI pin, a/R/E pin and a DE pin of a secondary RS485 transceiving module (7), and the secondary energy storage module (5) comprises a secondary energy storage device and a sliding rheostatRP1The Vcc1 pin and the GND1 pin of the slave energy storage device are respectively connected with a sliding rheostatRP1Two fixed contacts, slide rheostatRP1The movable contact of the slave optical coupling switch module (8) is connected with a GPIO4 port of the slave microprocessor (6), the slave optical coupling switch module (8) comprises a slave optical coupling switch 1 and a slave optical coupling switch 2, an IN end of the slave optical coupling switch 1 is connected with an IN end of the slave optical coupling switch 2 and then connected with a GPIO3 port of the slave microprocessor (6), an NO end of the slave optical coupling switch 1 is connected with Vcc1, an NO end of the slave optical coupling switch 2 is connected with GND1, a COM end of the slave optical coupling switch 1 is connected with an A pin of a slave RS485 chip and then connected with a bus A (3), and a COM end of the slave optical coupling switch 2 is connected with a B pin of the slave RS485 chip and then connected with a bus B (. The host RS485 transceiver module (10) comprises a host RS485 chip and a resistorR2Resistance ofR2The two ends of the main machine energy storage module (13) are respectively connected with a pin A and a pin B of a main machine RS485 chip, an RXD port, a TXD port, a GPIO1 port and a GPIO2 port of the main machine microprocessor (11) are respectively connected with an RO pin, a DI pin, a/R/E pin and a DE pin of the main machine RS485 chip, and the main machine energy storage module (13) comprises a main machine energy storage and a sliding rheostatRP2Vcc2 terminal of host energy storage and sliding rheostatRP2Is connected with the IO2 end of the DC-DC module (12), and the GND2 end of the main machine energy storage is connected with the slide rheostatRP2Is connected with the other fixed contact and then connected with the GND end of the DC-DC module (12), and the slide rheostatRP2The movable contact is connected with a GPIO4 port of a host microprocessor (11), the host optical coupling switch module (9) comprises a host optical coupling switch 1 and a host optical coupling switch 2, and the host is connected with a host computerThe IN end of the optical coupling switch 1 is connected with the IN end of the host optical coupling switch 2 and then connected with a GPIO3 port of the host microprocessor (11), the NO end of the host optical coupling switch 1 is connected with an IO1 end of the DC-DC module (12), the NO end of the host optical coupling switch 2 is connected with a GND end of the DC-DC module (12), the COM end of the host optical coupling switch 1 is connected with a pin A of the host RS485 chip and then connected with a bus A (3), and the COM end of the host optical coupling switch 2 is connected with a pin B of the host RS485 chip and then connected with a bus B (4).
The invention has the beneficial effects that:
1. only two buses are used between the master unit and the slave unit to carry out communication or energy transmission, so that wires are saved, and wiring is simple.
2. Based on RS485 bus design, peripheral circuit is few, and the required low power dissipation of system, expansibility are strong, when new equipment needs to be introduced, only need for the equipment of new access assign new address alright access system.
For a better understanding of the nature and technical aspects of the present invention, reference should be made to the following detailed description of the invention, taken in conjunction with the accompanying drawings, which are provided for purposes of illustration and description and are not intended to limit the invention.
Drawings
Fig. 1 is a schematic diagram of an overall structure of a two-bus communication and energy transmission system according to the present invention.
Fig. 2 is a schematic circuit connection diagram of a two-bus communication and energy transmission system according to the present invention.
Fig. 3 is a schematic diagram illustrating a connection between a master unit and a slave unit based on a two-bus communication and energy transmission system according to the present invention.
1: a slave unit; 2: a host unit; 3: a bus A; 4: a bus B; 5: a slave energy storage module; 6: a slave microprocessor; 7: a slave RS485 receiving and transmitting module; 8: a slave optical coupling switch module; 9: the main machine optical coupling switch module; 10: a host RS485 receiving and transmitting module; 11: a host microprocessor; 12: a DC-DC module; 13: a host energy storage module.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Specifically, referring to fig. 1, a two-bus communication and energy transmission system comprises a slave unit (1) and a master unit (2), wherein the slave unit (1) and the master unit (2) are connected through two buses formed by a bus a (3) and a bus B (4), the slave unit (1) comprises a slave energy storage module (5), a slave microprocessor (6), a slave RS485 transceiver module (7) and a slave optocoupler switch module (8), the two buses formed by the bus a (3) and the bus B (4) are connected with the slave RS485 transceiver module (7) and the slave optocoupler switch module (8), the slave optocoupler switch module (8) is connected with the slave energy storage module (5), the slave energy storage module (5) is connected with the slave RS485 transceiver module (7) and the slave microprocessor (6), the slave microprocessor (6) is connected with the slave RS485 transceiver module (7) and the slave optocoupler switch module (8), host computer unit (2) including host computer optical coupling switch module (9), host computer RS485 transceiver module (10), host computer microprocessor (11), DC-DC module (12), host computer energy storage module (13), and two bus connection host computer RS485 transceiver module (10) and host computer optical coupling switch module (9) that bus A (3) and bus B (4) formed, DC-DC module (12) is connected in host computer optical coupling switch module (9), host computer energy storage module (13) is connected in DC-DC module (12), host computer RS485 transceiver module (10) and host computer microprocessor (11) are connected in host computer energy storage module (13), host computer RS485 transceiver module (10) and host computer optical coupling switch module (9) are connected in host computer microprocessor (11).
Specifically, referring to fig. 2, the slave RS485 transceiver module (7) comprises a slave RS485 chip and a resistorR1Resistance ofR1The two ends of the secondary energy storage module (5) are respectively connected with a pin A and a pin B of a secondary RS485 chip, an RXD port, a TXD port, a GPIO1 port and a GPIO2 port of the secondary microprocessor (6) are respectively connected with an RO pin, a DI pin, a/R/E pin and a DE pin of a secondary RS485 transceiving module (7), and the secondary energy storage module (5) comprises a secondary energy storage device and a sliding rheostatRP1Energy storage of slave machinesThe Vcc1 pin and the GND1 pin are respectively connected with a slide rheostatRP1Two fixed contacts, slide rheostatRP1The movable contact of the slave optical coupling switch module (8) is connected with a GPIO4 port of the slave microprocessor (6), the slave optical coupling switch module (8) comprises a slave optical coupling switch 1 and a slave optical coupling switch 2, an IN end of the slave optical coupling switch 1 is connected with an IN end of the slave optical coupling switch 2 and then connected with a GPIO3 port of the slave microprocessor (6), an NO end of the slave optical coupling switch 1 is connected with Vcc1, an NO end of the slave optical coupling switch 2 is connected with GND1, a COM end of the slave optical coupling switch 1 is connected with an A pin of a slave RS485 chip and then connected with a bus A (3), and a COM end of the slave optical coupling switch 2 is connected with a B pin of the slave RS485 chip and then connected with a bus B (. The host RS485 transceiver module (10) comprises a host RS485 chip and a resistorR2Resistance ofR2The two ends of the main machine energy storage module (13) are respectively connected with a pin A and a pin B of a main machine RS485 chip, an RXD port, a TXD port, a GPIO1 port and a GPIO2 port of the main machine microprocessor (11) are respectively connected with an RO pin, a DI pin, a/R/E pin and a DE pin of the main machine RS485 chip, and the main machine energy storage module (13) comprises a main machine energy storage and a sliding rheostatRP2Vcc2 terminal of host energy storage and sliding rheostatRP2Is connected with the IO2 end of the DC-DC module (12), and the GND2 end of the main machine energy storage is connected with the slide rheostatRP2Is connected with the other fixed contact and then connected with the GND end of the DC-DC module (12), and the slide rheostatRP2The movable contact of (2) is connected with a GPIO4 port of a host microprocessor (11), the host optical coupling switch module (9) comprises a host optical coupling switch 1 and a host optical coupling switch 2, an IN end of the host optical coupling switch 1 is connected with an IN end of the host optical coupling switch 2 and then connected with a GPIO3 port of the host microprocessor (11), an NO end of the host optical coupling switch 1 is connected with an IO1 end of a DC-DC module (12), an NO end of the host optical coupling switch 2 is connected with a GND end of the DC-DC module (12), a COM end of the host optical coupling switch 1 is connected with a pin A of a host RS485 chip and then connected with a bus A (3), and a COM end of the host optical coupling switch 2 is connected with a pin B485 of the host RS and then connected with a bus B (4).
Specifically, referring to fig. 3, the master unit (2) is connected to the bus a (3) and the bus B (4) to form two buses, and the slave units 1, 2 through the slave unit N are connected to the master unit (2) through the bus a (3) and the bus B (4) to form two buses.
In particular, the system is applied to improve the traditional wired sensor network. Addresses are allocated to all slave units. When the two buses are used for the intercommunication between the slave unit and the master unit, the sensor can transmit the collected environment information to the master unit through a slave RS485 transceiver module (7) in the slave unit and can also receive signal indication from the master unit. Meanwhile, the slave microprocessor (6) in the slave unit continuously detects the voltage of the slave energy storage module (5) in the slave unit, when the voltage is found to be lower than a set value, when the slave unit has the risk of stopping working, a slave microprocessor (6) in the slave unit sends a signal to a master unit through two buses of a slave RS485 transceiver module (7) and a slave A, B to indicate that the master unit needs to provide electric energy to maintain working, the master unit sends a response signal to the slave unit after receiving the signal, a master microprocessor (11) in the master unit and a slave microprocessor (6) in the slave unit respectively control optical coupling switches in the master unit and the slave unit to be closed, at the moment, the A, B two buses are used for transmitting energy, and the master unit starts to transmit energy to the slave unit to maintain the working of a sensor in the slave unit. When a new slave unit needs to be expanded, only A, B pins of a slave RS485 transceiver module (7) in the slave unit need to be connected to A, B buses respectively, and a new address needs to be allocated to the slave unit.
In particular, the system is applied to distributed energy harvesting. Addresses are allocated to all slave units. The energy collecting device stores collected environment energy in a slave energy storage module (5) of a slave unit, a slave microprocessor (6) in the slave unit continuously detects the voltage of the slave energy storage module (5), when the voltage of the slave energy storage module (5) in a certain slave unit reaches a set value, the slave microprocessor (6) in the slave unit sends a signal to a master unit through a slave RS485 transceiver module (7) to indicate that the collected energy can be transmitted to the master, and at the moment, two buses are used for the communication between the slave unit and the master unit. The master unit receives the signal and then sends a response signal to the slave unit, a master microprocessor (11) in the master unit and a slave microprocessor (6) in the slave unit respectively control the optical coupling switches in the master unit and the slave unit to be closed, the slave unit starts to transmit energy to the master unit, the collected energy is stored in an energy storage module (9) of the master unit, and at the moment, the two buses are used for transmitting the energy. When a new slave unit needs to be expanded, only A, B pins of the slave unit slave RS485 transceiver module (7) need to be connected to A, B buses respectively, and a new address needs to be allocated to the slave unit.
In particular, the system may be used to combine a traditional wired sensor network with distributed energy harvesting. Addresses are allocated to all slave units. When the two buses are not used for transmitting energy, the sensor can transmit the acquired environmental information to the host unit through a slave RS485 transceiver module (7) of the slave unit and can also receive signal indication from the host unit. When the environment energy is sufficient, the energy collecting device stores the collected environment energy in a slave energy storage module (5) of the slave unit, a slave microprocessor (6) in the slave unit continuously detects the voltage of the slave energy storage module (5), the voltage in the slave energy storage module (5) is higher than a set value, and when the electric energy is sufficient, the slave microprocessor (6) in the slave unit sends a signal to a host unit through an RS485 transceiver module (4) to indicate that the excess energy can be transmitted and stored to the host. The master unit receives the signals and then sends response signals to the slave unit, a master microprocessor (11) in the master unit and a slave microprocessor (6) in the slave unit respectively control optical coupling switches in the master unit and the slave unit to be closed, the slave unit starts to transmit energy to the master unit, the master unit stores the energy, and at the moment, the two buses are used for transmitting the energy. When energy in the environment is difficult to collect, for example, when no wind exists or at night, a slave microprocessor (6) in a certain slave unit detects that the voltage of a slave energy storage module (5) in the slave unit is lower than a set value, and when the slave unit has the risk of stopping working, the slave microprocessor (6) in the slave unit sends a signal to a master unit through a slave RS485 transceiver module (7) to indicate that the master unit needs to provide electric energy to maintain working, the master unit sends a response signal to the slave unit after receiving the signal, the master microprocessor (11) in the master unit and the slave microprocessor (6) in the slave unit respectively control optical coupling switches of the master unit and the slave unit to be closed, and the master unit starts to transmit energy to the slave unit to maintain working. When a new slave unit needs to be expanded, only A, B pins of the slave unit slave RS485 transceiver module (7) need to be connected to A, B buses respectively, and a new address needs to be allocated to the slave unit.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.