The content of the invention
In order to solve the above-mentioned technical problem, the object of the present invention is to provide a kind of TTL to turn MBUS communicating terminals, for being compatible with
Host voltage is sent and slave current receiv, real-time monitoring MBUS master-slave communication data.
The technical solution adopted in the present invention is:A kind of TTL turns MBUS communicating terminals, and the TTL turns MBUS communicating terminals
Including TTL serial communication circuits, voltage transtation mission circuit, current receiving circuit, MBUS with monitoring switching circuit, MBUS monitoring circuits
With MBUS interfaces;The output terminal of the TTL serial communication circuits is connected with the input terminal of voltage transtation mission circuit, the current receiv
The output terminal of circuit, the output terminal of MBUS monitoring circuits are connected with the input terminal of TTL serial communication circuits, and the voltage sends electricity
The output terminal on road, the input terminal of current receiving circuit and MBUS are connected with monitoring switching circuit;The MBUS is with monitoring switching electricity
The output terminal on road is connected with the input terminal of MBUS monitoring circuits;The MBUS is connected with monitoring switching circuit and MBUS interfaces.
Further, the TTL turns MBUS communicating terminals and further includes electrical isolation circuit, the TTL serial communication circuits
Output terminal be connected by electrical isolation circuit with the input terminal of voltage transtation mission circuit, the output terminal of the current receiving circuit,
The output terminal of MBUS monitoring circuits is connected by electrical isolation circuit with the input terminal of TTL serial communication circuits.
Further, the electrical isolation circuit is optocoupler.
Further, the TTL serial communication circuits are RS485 communicating circuits or RS232 communicating circuits or USB communication electricity
Road.
Further, the voltage transtation mission circuit includes tri- pole of the first NPN triode, the second NPN triode and the first PNP
Pipe;The output terminal of the TTL serial communication circuits is connected with the base stage of the first NPN triode, the hair of first NPN triode
Emitter-base bandgap grading is connected with the collector of the first PNP triode, the emitter of the second NPN triode, the transmitting of first NPN triode
Pole is grounded;The collector of first NPN triode is connected with the base stage of the first PNP triode, first NPN triode
Base stage, the base stage of the first PNP triode, the emitter of the first PNP triode, the collector of the second NPN triode and power supply connect
It connects, the emitter and MBUS of second NPN triode are connected with monitoring switching circuit.
Further, the current receiving circuit includes first resistor, second resistance, 3rd resistor, the first diode, the
One polar capacitor and first comparator, the MBUS and one end of monitoring switching circuit and first resistor, the first diode are just
Pole connects, and the other end of the first resistor and the in-phase input end of first comparator connect, the cathode of first diode
It is connected with one end of second resistance, the other end of the second resistance and the inverting input of first comparator, 3rd resistor
One end, the anode connection of the first polar capacitor, the ground terminal of the first comparator, the cathode of the first polar capacitor, the 3rd electricity
The other end ground connection of resistance, the output terminal of the first comparator are connected with the input terminal of TTL serial communication circuits.
Further, the MBUS monitoring circuits include the 4th resistance, the 5th resistance, the 6th resistance, the second diode, the
Two polar capacitors and the second comparator, the MBUS and one end of monitoring switching circuit and the 4th resistance, the second diode are just
Pole connects, and the other end of the 4th resistance is connected with the in-phase input end of the second comparator, the cathode of second diode
It is connected with one end of the 5th resistance, the other end of the 5th resistance and the inverting input of the second comparator, the second polarity electricity
One end connection of the anode of appearance, the 6th resistance, the ground terminal of second comparator, the cathode of the second polar capacitor, the 6th electricity
The other end ground connection of resistance, the output terminal of second comparator are connected with the input terminal of TTL serial communication circuits.
Further, the MBUS includes the 3rd NPN triode, the 4th NPN triode, the 3rd pole with monitoring switching circuit
Property capacitance and dpdt relay, the base stage of the TTL serial communication circuits and the 3rd NPN triode, collector are connected, institute
The collector for stating the 3rd NPN triode is connected with power supply, the collector of the 3rd NPN triode and the 4th NPN triode
The anode connection of base stage, the 3rd polar capacitor, the cathode of the 3rd polar capacitor and the emitter of the 3rd NPN triode connect
It connects, the emitter of the 3rd NPN triode is connected with the emitter of the 4th NPN triode, the hair of the 3rd NPN triode
Emitter grounding, the collector of the 4th NPN triode and the first coil connecting pin of dpdt relay connect, described double
Second coil connecting terminal of dpdt double-pole double-throw (DPDT) relay is connected with power supply, the first normally-closed contact of the dpdt relay, first
Normally opened contact is grounded, and the first movable contact of the dpdt relay is connected with MBUS interfaces;The dpdt relay
The second normally-closed contact connected with the input terminal of MBUS monitoring circuits, the second normally opened contact of the dpdt relay and electricity
Press the input terminal connection of the output terminal of transtation mission circuit, current receiving circuit, the second movable contact of the dpdt relay with
MBUS interfaces connect.
The beneficial effects of the invention are as follows:
A kind of TTL of the present invention turns MBUS communicating terminals, including TTL serial communication circuits, voltage transtation mission circuit, current receiv
Circuit, MBUS are with monitoring switching circuit, MBUS monitoring circuits and MBUS interfaces;It realizes TTL-MBUS communications, and is sent out using voltage
Power transmission road, current receiving circuit realize compatible host voltage send with slave current receiv, using MBUS with monitor switching circuit,
MBUS monitoring circuits monitor MBUS master-slave communication data in real time.
Specific embodiment
It should be noted that in the case where there is no conflict, the feature in embodiment and embodiment in the application can phase
Mutually combination.
A kind of TTL turns MBUS communicating terminals, and TTL turns MBUS communicating terminals and is arranged between host equipment and slave devices,
TTL, which turns MBUS communicating terminals, includes TTL serial communication circuits, voltage transtation mission circuit, current receiving circuit, MBUS with monitoring switching
Circuit, MBUS monitoring circuits and MBUS interfaces;TTL serial communication circuits are connected with host equipment;TTL serial communication circuits it is defeated
Outlet is connected with the input terminal of voltage transtation mission circuit, the output terminal of current receiving circuit, the output terminal and TTL of MBUS monitoring circuits
The input terminal connection of serial communication circuit, the output terminal of voltage transtation mission circuit, the input terminal of current receiving circuit and MBUS and prison
Switching circuit is listened to connect;MBUS is connected with monitoring the output terminal of switching circuit with the input terminal of MBUS monitoring circuits;MBUS and prison
Switching circuit is listened to be connected with MBUS interfaces, MBUS interfaces are connected with slave devices.
The TTL-MBUS that the TTL of the present invention turns MBUS communicating terminals and realizes between principal and subordinate's machine equipment communicates, and utilizes electricity
Transtation mission circuit, current receiving circuit is pressed to realize compatible host voltage transmission and slave current receiv, is switched using MBUS with monitoring
Circuit, MBUS monitoring circuits monitor MBUS master-slave communication data in real time;Specifically, MBUS bus master-slave communications are monitored, are based on
MBUS protocol requirements, there are the more slave modes of a host on entire connection, the communication mode of host and slave processors equipment is different, host
It is sent using voltage system, slave is sent using current system.
As being further improved for technical solution, TTL serial communication circuits are RS485 communicating circuits or RS232 communication electricity
Road or USB communicating circuits.In the present invention, TTL serial communication circuits use RS485 communicating circuits.With reference to figure 1, Fig. 1 is the present invention
A kind of TTL turns a specific embodiment structure diagram of MBUS communicating terminals, and TTL turns MBUS communicating terminals and further includes power circuit,
Power circuit takes electricity from alternating current (220V/AC), and two-way power supply is exported through Switching Power Supply.Wherein, carried all the way for RS485 communicating circuits
Power supply source (5VDC) is all the way voltage transtation mission circuit, current receiving circuit, MBUS monitoring circuits, MBUS are with monitoring switching circuit
Power supply (36VDC) is provided.Using RS485 communicating circuits, since existing electric power acquisition platform hardware has RS485 interfaces, because
During this Reconstruction in field, only need to terminal and the electric power acquisition platform of the present invention be subjected to RS485 interfaces and docked, you can compatible water, warm up,
The metrical instruments communication need such as gas completes the transformation of " unification of four tables " hardware platform;RS485 communication interfaces are only needed, pass through the present invention
Terminal, you can copy reading have MBUS interfaces equipment.Communication apparatus by RS485 interfaces (as shown in Figure 1, in actual use,
RS485 interfaces, that is, RS485 communicating circuits are connected by RS485 buses with host equipment) extension host MBUS interfaces;MBUS interfaces
(as shown in Figure 1, in actual use, MBUS interfaces are connected by MBUS buses with slave devices) can 125 slave devices of carry
Node.It is that a kind of TTL of the present invention turns the TTL serial communication circuits of MBUS communicating terminals, voltage is sent with reference to figure 1 and Fig. 2, Fig. 2
Circuit, current receiving circuit, a specific embodiment circuit diagram of MBUS monitoring circuits, TTL serial communication circuits are RS485
Communicating circuit 1 has the function of to send and receive data, wherein, RS485 communicating circuits 1 using special RS485 chips U2 and its
Peripheral circuit, half duplex communication, chip U2 or by receiving circuit obtain RS485 buses data or pass through transtation mission circuit will
Data are sent to RS485 buses.
As being further improved for technical solution, with reference to figure 1, TTL turns MBUS communicating terminals and further includes electrical isolation circuit,
The output terminal of TTL serial communication circuits is connected by electrical isolation circuit with the input terminal of voltage transtation mission circuit, current receiv electricity
The output terminal on road, the output terminal of MBUS monitoring circuits are connected by electrical isolation circuit with the input terminal of TTL serial communication circuits.
With reference to figure 2, electrical isolation circuit is optocoupler, specifically, set two-way optocoupler for RS485 communicating circuits and voltage transtation mission circuit,
Electrical isolation is done between current receiving circuit, is respectively optocoupler U3 and optocoupler U5.Main isolation RS 485 communicating circuit is sent out with voltage
Power transmission road, the electrical connection of current receiving circuit, reduce between the two because external connecting equipment electrical differences bring it is a series of logical
News interference, improves entire terminal antijamming capability.Wherein, MBUS_RX is high level, and optocoupler U5 is not turned on, the 4th feet pair of optocoupler U5
Ground is high impedance, flows through that the electric current of resistance R10 is minimum, and the 4th foot voltages of optocoupler U5 are approximately equal to VCC_485, and PNP triode Q2 cannot
Conducting, the 2nd foot, the 3rd foot of RS485 chips U2 are low level, and RS485 chips U2 is reception pattern.MBUS_RX is low level,
Optocoupler U5 is turned on, and over the ground for Low ESR, the electric current for flowing through resistance R10 becomes larger the 4th feet of optocoupler U5, and the 4th foot voltages of optocoupler U5 are about etc.
Begun to turn in GND_485, PNP triode Q2, RS485 chip U2) the 2nd foot, the 3rd foot be high level, RS485 chips U2 for hair
Send pattern.
As being further improved for technical solution, with reference to figure 1 and Fig. 2, voltage transtation mission circuit 2 includes the first NPN triode
N1, the second NPN triode N2 and the first PNP triode Q1;The output terminal of TTL serial communication circuits 1 passes through electrical isolation circuit
(i.e. optocoupler) is connected with the base stage of the first NPN triode N1, the emitter of the first NPN triode N1 and the first PNP triode Q1
Collector, the second NPN triode N2 emitter connection, the first NPN triode N1 emitter ground connection;First NPN, tri- poles
The collector of pipe N1 is connected with the base stage of the first PNP triode Q1, the base stage of the first NPN triode N1, the first PNP triode Q1
Base stage, emitter, the collector of the second NPN triode N2 of the first PNP triode Q1 be connected with power supply, tri- poles of the 2nd NPN
The emitter and MBUS of pipe N2 is connected with monitoring switching circuit, and with reference to figure 3, Fig. 3 is that a kind of TTL of the present invention turns MBUS communicating terminals
MBUS with monitor switching circuit a specific embodiment circuit diagram, voltage transtation mission circuit 2 by main MBUS and MBUS with
Monitor switching circuit connection.
With reference to figure 1 and Fig. 2, voltage transtation mission circuit 2 is the electricity for being converted into TTL data-signals to meet MBUS bus requests
Pressure.When sending signal " 1 ", MBUS_TX is high level, driving the first NPN triode N1 conductings, the collection of the first NPN triode N1
Electrode C pole tensions are low level, and voltage VCC_MBUS drags down the first PNP triode Q1 base stages B after resistance R19, R22 partial pressure
Voltage, at this point, the first PNP triode Q1 is turned on, the voltage of the collector C of the first PNP triode Q1 is approximately equal to voltage 32V
(VCC_MBUS).First NPN triode N1 is fully on, and the voltage of emitter E is smaller 0.7V or so than the voltage of base stage B, about
31.3V(VCC_MBUS-0.7);
When sending signal " 0 ", MBUS_TX is low level, and the first NPN triode N1 ends, the collection of the first NPN triode N1
The voltage of electrode C is high level, the voltage of the first PNP triode Q1 base stages B is drawn high, at this point, the first PNP triode Q1 is cut completely
Only.Voltage (VCC_MBUS) generates 16V (VCC_MBUS/ after resistance R20, R8 partial pressure, in the first NPN triode N1 base stages B
2).First NPN triode N1 is fully on, and the voltage 0.7V smaller than the voltage of base stage B of the first NPN triode N1 emitter Es is left
The right side, about 15.3V ((VCC_MBUS)/2-0.7).
As being further improved for technical solution, with reference to figure 1 and Fig. 2, current receiving circuit 3 includes first resistor R1, the
Two resistance R2,3rd resistor R3, the first diode D1, the first polar capacitor C1 and first comparator U4A, with reference to figure 3, MBUS with
It monitors switching circuit to connect and (connect by main MBUS) with one end of first resistor R1, the anode of the first diode D1, first
The other end of resistance R1 is connected with the in-phase input end of first comparator U4A, cathode and the second resistance R2 of the first diode D1
One end connection, the other end of second resistance R2 and the inverting input of first comparator U4A, one end of 3rd resistor R3, the
The anode connection of one polar capacitor C1, the ground terminal of first comparator U4A, the cathode of the first polar capacitor C1,3rd resistor R3
Other end ground connection, the output terminal of first comparator U4A by electrical isolation circuit and TTL serial communication circuits 1 input terminal
Connection.To sum up, current receiving circuit 3 is realized using comparator detecting way.When normal, voltage V1 is through the first diode D1,
Two resistance R2,3rd resistor R3, in first comparator U4A the 2nd feet point to (V1-0.1) V.At this point, the 3rd of first comparator U4A the
Foot voltage V1, according to comparator principle, the in-phase end (the 3rd foot) of first comparator U4A than end of oppisite phase (i.e. the 2nd foot) greatly, first
The 1st foot of comparator U4A is high-impedance state, and first comparator U4A exports high level.When sending data from MBUS equipment, MBUS is total
Line the largest of about 20mA is lost.After sampled resistance R15, the voltage change of about 0.2V is generated, voltage V1 becomes V1-0.2V.At this point,
The 3rd foot voltage of first comparator U4A is V1-0.2V, and the 2nd foot voltage of first comparator U4A is V1-0.1V, according to comparing
Device principle, the in-phase end (the 3rd foot) of first comparator U4A is smaller than end of oppisite phase (the 2nd foot), the 1st foot output of first comparator U4A
Low level.
As being further improved for technical solution, include the 4th resistance R4, the with reference to figure 1 and Fig. 2, MBUS monitoring circuit 4
Five resistance R5, the 6th resistance R6, the second diode D2, the second polar capacitor C2 and the second comparator U7A, MBUS switch with monitoring
One end of circuit and the 4th resistance R4, the anode connection of the second diode D2, with reference to figure 3, MBUS passes through with monitoring switching circuit
MBUS with MBUS monitoring circuits are monitored to connect;The other end of 4th resistance R4 is connected with the in-phase input end of the second comparator U7A,
The cathode of second diode D2 is connected with one end of the 5th resistance R5, the other end of the 5th resistance R5 and the second comparator U7A's
One end connection of inverting input, the anode of the second polar capacitor C2, the 6th resistance R6, the ground terminal of the second comparator U7A, the
The cathode of two polar capacitor C2, the other end ground connection of the 6th resistance R6, the output terminal of the second comparator U7A is by electrical isolation electricity
Road is connected with the input terminal of TTL serial communication circuits 1.MBUS monitoring circuits 4 pass through electricity for detecting voltage, current data
Voltage, current data are uploaded to host equipment and carry out processing analysis by gas isolation circuit and TTL serial communication circuits 1, to complete
Monitoring to voltage, current data.MBUS monitoring circuits 4 use similar designs with current receiving circuit 3.
Data-signal " 1 " or slave MBUS not drain bus electricity are sent with reference to host MBUS on figure 1 and Fig. 2, MBUS bus
During stream, MBUS bus voltages are V2, through the second diode D2, the 5th resistance R5, the 6th resistance R6, the second comparator U7A's
2nd foot divides to (V2-0.1) V.At this point, the 3rd foot voltage of the second comparator U7A is V2, compared according to comparator principle, second
Than end of oppisite phase (the 2nd foot) greatly, the 1st foot of the second comparator U7A is high-impedance state to the in-phase end (the 3rd foot) of device U7A, the second comparator
U7A exports high level.When host MBUS sends data-signal " 0 " in MBUS buses, MBUS bus voltages are V2/2, through the 4th electricity
The 3rd foot for hindering R4 in the second comparator U7A divides to (V2/2) V.At this point, the reason for because of the second diode D2, the second comparator U7A
The 2nd foot voltage for V2, according to comparator principle, the in-phase end (the 3rd foot) of the second comparator U7A is smaller than end of oppisite phase (the 2nd foot),
The 1st foot of second comparator U7A is low resistance state, and the second comparator U7A exports low level.Slave MBUS consumption is total in MBUS buses
During line 20mA electric currents, after the sample resistance of MBUS buses, the voltage change of about 0.2V is generated, V2 voltages become V2-0.2V.This
When, the 2nd foot voltage V2-0.1V of the 3rd foot the voltage V2-0.2V, the second comparator U7A of the second comparator U7A, according to comparator
Principle, the in-phase end (the 3rd foot) of the second comparator U7A is smaller than end of oppisite phase (the 2nd foot), and the 1st foot output of the second comparator U7A is low
Level.
As being further improved for technical solution, include the 3rd with monitoring switching circuit with reference to figure 1, Fig. 2 and Fig. 3, MBUS
NPN triode N3, the 4th NPN triode N4, the 3rd polar capacitor C3 and dpdt relay U1, TTL serial communication circuit 1
The base stage of (i.e. RS485_RX) and the 3rd NPN triode N3, collector are connected, the collector and power supply of the 3rd NPN triode N3
Connection, the collector of the 3rd NPN triode N3 are connected with the base stage of the 4th NPN triode N4, the anode of the 3rd polar capacitor C3,
The cathode of 3rd polar capacitor C3 is connected with the emitter of the 3rd NPN triode N3, the emitter of the 3rd NPN triode N3 and
The emitter connection of four NPN triode N4, the emitter ground connection of the 3rd NPN triode N3, the collector of the 4th NPN triode N4
It is connected with the first coil connecting pin of dpdt relay U1, the second coil connecting terminal and power supply of dpdt relay U1
Connection, the first normally-closed contact of dpdt relay U1, the first normally opened contact ground connection, the first of dpdt relay U1 are dynamic
(i.e. bus MBUS-) is connected with MBUS interfaces for contact;The second normally-closed contact (monitoring MBUS) of dpdt relay U1 and
The input terminal connection of MBUS monitoring circuits 4, the second normally opened contact (i.e. main MBUS) and the voltage of dpdt relay U1 are sent
The input terminal connection of the output terminal, current receiving circuit of circuit 2, the second movable contact (i.e. bus of dpdt relay U1
MBUS+) it is connected with MBUS interfaces.
In the present embodiment, referring to figs. 1 to Fig. 3, MBUS is the receiving circuit when RS485 communicating circuits with monitoring switching circuit
Signal RS485_RX is triggered when becoming low level by high level.When RS485_RX is high level, through resistance R16, tri- poles of driving NPN
Pipe N3 is turned on, and the voltage of the collector C of NPN triode N3 is low level, at this point, NPN triode N4 ends, double-pole double throw relay
Device U1 is failure to actuate, at this time the 2nd foot and the 3rd foot short circuit of dpdt relay U1, the 6th foot and the 7th foot short circuit, monitors number of buses
According to communication.For RS485_RX after high level becomes low level, NPN triode N3 is completely switched off, the collector C of NPN triode N3
Voltage for high level, voltage (VCC_485) charges to the 3rd polar capacitor C3 through resistance R12, diode D4;At this point, NPN
Triode N4 is turned on, and dpdt relay U1 is caused to act, the 4th foot of dpdt relay U1 and the 3rd foot short circuit, and the 6th
Foot and the 5th foot short circuit carry out main MBUS communications.At this point, if RS485_RX becomes high level from low level, although tri- poles of NPN
Pipe N3 is completely switched off, but the 3rd polar capacitor C3 has been filled with electricity, can only be discharged by resistance R14, NPN triode N4, chooses and closes
Suitable resistance R14, the 3rd polar capacitor C3, allows the 3rd polar capacitor C3 in T (T>10) in time second, moreover it is possible to be maintained at 1V or so
Voltage, you can driving NPN triode N4 conductings completely allow terminal to be always held at main MBUS communications.
With reference to figure 1, when the receiving circuit of RS485 communicating circuits does not receive data, MBUS is in prison with monitoring switching circuit
State is listened, slave communication data in MBUS buses is monitored in real time, passes through the transmission of electrical isolation optocoupler, RS485 communicating circuits
Circuit is by the data sending listened to RS485 buses.
When the receiving circuit of RS485 communicating circuits receives data, MBUS is in main MBUS states with monitoring switching circuit,
By electrical isolation optocoupler, voltage transtation mission circuit, by the data penetration transmission received to MBUS buses, and pass through current receiv electricity
Road, by the return signal of MBUS slaves, it is total that the transtation mission circuit through electrical isolation optocoupler, RS485 communicating circuits is pass-through to RS485
Line.Meanwhile MBUS is maintained at T seconds time of main MBUS states, within this time, RS485 communicating circuits with monitoring switching circuit
Receiving circuit once receives data, and terminal will continue to, in this state, recalculate maintenance time, is more than up to holding time
T seconds, the receiving circuit of RS485 communicating circuits did not all receive any signal, just switches to listening mode.
The terminal of the present invention directly can be carried out data by RS485 and slave MBUS equipment and led to hosted MBUS equipment
News.Applied to there is MBUS communication need occasions.Device extension MBUS interfaces can be passed through.It may also listen for MBUS master-slave communication numbers
According to.Compatible host voltage is sent to be sent with slave electric current, grasps MBUS bus datas in real time, for live investigation problem, communication number
Facility is provided according to collecting.Terminal structure is simple, without particular communication agreement.Only it is only completed turn of level between RS485 and MBUS
It changes, no CPU is not required to program, strong antijamming capability.Without CPU main control chips, data transparency forwarding, no communications protocol requirement uses
Simply, it is simple and reliable.
The above are implementing to be illustrated to the preferable of the present invention, but the invention is not limited to the implementation
Example, those skilled in the art can also make a variety of equivalent variations on the premise of without prejudice to spirit of the invention or replace
It changes, these equivalent deformations or replacement are all contained in the application claim limited range.