Utility model content
Embodiment of the present utility model provides a kind of protection circuit and telecommunication circuit of RS485 chip, in order to carry out available protecting to RS485 chip, improves the antijamming capability of RS485 network.
For achieving the above object, embodiment of the present utility model adopts following technical scheme:
First aspect, the utility model embodiment provides a kind of protection circuit of RS485 chip, comprise communication bus, described communication bus comprises the first order wire be connected with the first communication port of described RS485 chip and the second communication line be connected with the second communication port of described RS485 chip, it is characterized in that, described protection circuit also comprises: voltage holding unit, flow-restriction, transient state suppress unit, surge protection unit;
Described flow-restriction and described surge protection unit are connected on described communication bus successively; described voltage holding unit is connected with the communication bus between described RS485 chip and described flow-restriction, and described transient state suppresses unit to be connected with the communication bus between described flow-restriction with described surge protection unit.
Second aspect, the utility model embodiment still provides a kind of telecommunication circuit of RS485 chip, comprising: the protection circuit of microcontroller and the RS485 chip described in first aspect;
Wherein, the receiving port of described RS485 chip is connected with the reception FPDP of described microcontroller, the transmit port of described RS485 chip is connected with the transmission FPDP of described microcontroller, the reception enable port of described RS485 chip exports I/O port with the universal input of described microcontroller respectively with transmission enable port and is connected, the power port of described RS485 chip is connected with described power supply, the grounding ports ground connection of described RS485 chip.
The third aspect, the utility model embodiment still provides a kind of telecommunication circuit of RS485 chip, comprising: host circuit and at least one from dynamo-electric road; Described host circuit and at least one each telecommunication circuit all adopting the RS485 chip described in second aspect from dynamo-electric road from dynamo-electric road described; Described host circuit and describedly eachly pass through twisted pair line connection from dynamo-electric road.
The protection circuit of a kind of RS485 chip that the utility model embodiment provides and telecommunication circuit, wherein, the protection circuit of RS485 chip not only comprises communication bus, communication bus comprises the first order wire be connected with the first communication port of RS485 chip and the second communication line be connected with the second communication port of RS485 chip, also comprises voltage holding unit, flow-restriction, transient state suppression unit, surge protection unit; Flow-restriction and surge protection unit are connected on communication bus successively, and voltage holding unit is connected with the communication bus between RS485 chip and flow-restriction, and transient state suppresses the flow-restriction of unit to be connected with the communication bus between surge protection unit.Voltage holding unit can avoid the state labile of RS485 communication bus; easily be subject to the problem of external disturbance; flow-restriction, transient state suppress unit and surge protection unit that RS485 chip can be avoided to be subject to the superpotential damages such as thunderbolt, surge; effectively to carry out available protecting to RS485 chip, improve the antijamming capability of RS485 network.
Embodiment
Below in conjunction with the accompanying drawing in the utility model embodiment, be clearly and completely described the technical scheme in the utility model embodiment, obviously, described embodiment is only the utility model part embodiment, instead of whole embodiments.Based on the embodiment in the utility model, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all belong to the scope of the utility model protection.
The utility model embodiment provides a kind of protection circuit of RS485 chip; as shown in Figure 1; the protection circuit of this RS485 chip comprises communication bus; communication bus comprises the first order wire be connected with the first communication port A of RS485 chip and the second communication line be connected with the second communication port B of RS485 chip; further, the protection circuit of this RS485 chip also comprises: voltage holding unit 10, flow-restriction 20, transient state suppress unit 30, surge protection unit 40.
Wherein, flow-restriction 20 and surge protection unit 40 are connected on communication bus successively; voltage holding unit 10 is connected with the communication bus between RS485 chip and flow-restriction 20, and transient state suppresses unit 30 flow-restriction 20 to be connected with the communication bus between surge protection unit 40.
Concrete, as shown in Figure 2, voltage holding unit 10 comprises: pull-up resistor R1 and pull down resistor R2; One end of pull-up resistor R1 is connected with the first communication port A of RS485 chip, and the other end is connected with power supply VCC; One end of pull down resistor R2 is connected with the second communication port B of RS485 chip, other end ground connection.One of effect of pull-up resistor R1 and pull down resistor R2 is adopted to be when no signal sends on RS485 communication bus, bus state is in by keeping RS485 communication bus during pull-up resistor R1 and pull down resistor R2, the state avoiding RS485 communication bus is uncertain, is easily subject to the problem of external disturbance.
Further, as shown in Figure 2, flow-restriction 20 comprises: the second current-limiting resistance R4 being connected on the first current-limiting resistance R3 on the first order wire and being connected on secondary signal line.Wherein, first current-limiting resistance R3 and the second current-limiting resistance R4 is playing metering function to the electric current flowing through the first order wire and second communication line, simultaneously, first current-limiting resistance R3 and pull-up resistor R1 forms the parallel resistance being connected to the first communication port A of RS485 chip, second current-limiting resistance R4 and pull down resistor R2 forms the parallel resistance of the second communication port B being connected to RS485 chip, thus the standing wave of signal of communication can be suppressed to reflect.
Preferably, the resistance of the first current-limiting resistance R3 and the second current-limiting resistance R4 is more than or equal to 10 ohm, and is less than the resistance of pull-up resistor R1, pull down resistor R2.Because within the scope of this, the first current-limiting resistance R3 and the second current-limiting resistance R4 can current limliting preferably, effectively can absorb again standing wave reflection.
Further, as shown in Figure 2, surge protection unit 40 comprises: the second thermistor RT2 being connected on the first thermistor RT1 on the first order wire and being connected on second communication line.Wherein, first thermistor RT1 and the second thermistor RT2 all adopts posistor (Positive Temperature Coefficient, be called for short PTC), like this, when order wire arbitrary in the first order wire and second communication line accesses high voltage (as 220V alternating current), thermistor (RT1/RT2) generates heat because of the increase of electric current, the resistance of thermistor also will increase, and avoid because of the artificial or impaired problem waiting the high voltage of introducing to cause RS485 wafer damage of circuit.
Further, as shown in Figure 2, transient state suppresses unit 30 to comprise the first Transient Suppression Diode (Transient Voltage Suppressor, be called for short TVS) V1 and the second Transient Suppression Diode V2, wherein, one end of first Transient Suppression Diode V1 is connected with the first order wire, other end ground connection; One end of second Transient Suppression Diode V2 is connected with second communication line, other end ground connection.
Like this, when the high voltage in the external world is applied to any one order wire in the first order wire of RS485 chip and second communication line, because the Thermal protection of thermistor (RT1/RT2) needs 0.01 ~ 3 second actuation time, and the response time of Transient Suppression Diode (V1/V2) needs about 1ns, therefore, when thermistor (RT1/RT2) does not also play a protective role, Transient Suppression Diode (V1/V2) reverse-conducting, by the voltage clamping of RS485 input end in the voltage range that RS485 chip can bear, thus reach the object of protection RS485 chip.In addition; when the external world high voltage because of external factor to be connected across on the first order wire simultaneously and on second communication line time; extraneous high voltage, thermistor, Transient Suppression Diode form a loop; transient state suppresses the reverse turn-on voltages of diode to only have tens volts; forward conduction voltage is negligible; because of overcurrent, resistance increases thermistor, is equivalent to disconnect, thus plays the object of protection RS485 chip.Wherein, suppose that the operating voltage of RS485 chip is Vd, so, suppression magnitude of voltage (or being called clamp voltage) Vt of Transient Suppression Diode V1 and V2 is more than or equal to 1.5 times of Vd, is less than or equal to 2 times of Vd, i.e. 1.5Vd≤Vt≤2Vd.Because when Vt is less than 1.5Vd, the quiescent current of Transient Suppression Diode is comparatively large, causes Transient Suppression Diode to generate heat large, time serious, causes circuit cisco unity malfunction; And when Vt is greater than 2Vd, during Transient Suppression Diode surge protection, the voltage that Transient Suppression Diode is two sections can raise; when higher than RS485 chip communication port answer allow voltage time; RS485 chip will be damaged, therefore, Vt is arranged between 1.5Vd ~ 2Vd.
The protection circuit of a kind of RS485 chip that the utility model embodiment provides, the protection circuit of RS485 chip not only comprises communication bus, communication bus comprises the first order wire be connected with the first communication port of RS485 chip and the second communication line be connected with the second communication port of RS485 chip, also comprises voltage holding unit 10, flow-restriction 20, transient state suppression unit 30, surge protection unit 40; Flow-restriction 20 and surge protection unit 40 are connected on communication bus successively; voltage holding unit 10 is connected with the communication bus between RS485 chip and flow-restriction 20, and transient state suppresses unit 30 to be connected with the communication bus between flow-restriction 20 with surge protection unit 40.Voltage holding unit 10 can avoid the state labile of RS485 communication bus; easily be subject to the problem of external disturbance; flow-restriction 20, transient state suppress unit 30 and surge protection unit 40 that RS485 chip can be avoided to be subject to the superpotential damages such as thunderbolt, surge; effectively to carry out available protecting to RS485 chip, improve the antijamming capability of RS485 network.
The utility model embodiment still provides a kind of RS485 chip communication circuit, as shown in Figure 3, comprises the protection circuit of microcontroller (Microcontroller Unit is called for short MCU) and the RS485 chip described in Fig. 2.
Wherein, the receiving port R of RS485 chip and the reception data (ReceiveDate of microcontroller, be called for short RxD) port connection, the transmit port D of RS485 chip and transmission data (the Transmit Date of microcontroller, be called for short TxD) port connection, first enable port/the RE of RS485 chip and the second enable port DE exports (Input/Output with the universal input of microcontroller respectively, be called for short I/O) port connection, the power port VCC of RS485 chip is connected with power supply VCC, the grounding ports GND ground connection of RS485 chip; Connection for the first communication port A of RS485 chip and second communication port B with reference to shown in above-described embodiment and Fig. 2, can not repeat them here.
Further, as shown in Figure 4, in order to easy to connect, this RS485 telecommunication circuit also comprises connection terminal P, after connection terminal P is connected on the first thermistor PTC1 and the second thermistor PTC2.
Further, as shown in Figure 5-Figure 7, the utility model embodiment still provides a kind of telecommunication circuit of RS485 chip, comprise: host circuit and at least one from dynamo-electric road, host circuit and at least one eachly from dynamo-electric road all adopt the RS485 telecommunication circuit shown in Fig. 3 or Fig. 4 from dynamo-electric road, host circuit and eachly pass through twisted pair line connection from dynamo-electric road.
Concrete, as shown in Figure 5-Figure 7, host circuit comprises microcontroller D1, RS485 chip D3, pull-up resistor R1, pull down resistor R2, current-limiting resistance R3, current-limiting resistance R4, Transient Suppression Diode V1, Transient Suppression Diode V2, thermistor RT1, thermistor RT2, connection terminal P1; Eachly comprise microcontroller D2, RS485 chip D4, pull-up resistor R5, pull down resistor R6, current-limiting resistance R7, current-limiting resistance R8, Transient Suppression Diode V3, Transient Suppression Diode V4, thermistor RT3, thermistor RT4, connection terminal P2 from dynamo-electric road, concrete connected mode with reference to the description to Fig. 2 and Fig. 3, can not repeat them here.
For the RS485 telecommunication circuit shown in Fig. 5-Fig. 7, when communicating, arranging the enable port/RE of RS485 chip D3 and enable port DE by the I/O port of microcontroller D1 is high level, now main frame is in transmission state, simultaneously, arranging the enable port/RE of RS485 chip D2 and enable port DE by the I/O port of microcontroller D4 is low level, is in accepting state from machine.During communication, information complete for one frame sends to after machine by main frame, arranging the enable port/RE of the RS485 chip D3 in host circuit and enable port DE by the I/O port of microcontroller D1 is low level, main frame is in accepting state, from machine after the information receiving main frame transmission completely, by the I/O port of microcontroller D2 arrange from the enable port/RE of the RS485 chip D4 dynamo-electric road and enable port DE be high level, transmission state is in from machine, from machine, acknowledgement frame is sent to main frame, accepting state is returned to after response, after main frame receives correct acknowledgement frame, revert to transmission state, once communicate.
When host circuit and each connected mode just connect adopted from dynamo-electric road as shown in Figure 5, namely in host circuit, the first order wire is connected from the first order wire dynamo-electric road with each, second communication line in host circuit is connected from the second communication line dynamo-electric road with each, be A-A in brief, during B-B, shown in reference table 1 and table 2, wherein, table 1 is when host circuit sends data, the RS485 chip D3 in host circuit and the logic level from each port of RS485 chip D4 dynamo-electric road; Table 2 for when from dynamo-electric road generation acknowledgement frame, the logic level of each port of RS485 chip D3 from dynamo-electric road in RS485 chip D4 and host circuit.
Table 1
Table 2
But, when adopting the connected mode just connect shown in Fig. 4, must be noted that the order of connection of each order wire in connection terminal, if the order of connection is made mistakes, easily causing garble.In order to avoid the problems referred to above, RS485 chip in host circuit can adopt the RS485 chip of polarity, eachly can adopt non-polar RS485 chip from the RS485 chip dynamo-electric road, automatically polarity correction can be carried out from the RS485 chip dynamo-electric road due to each, therefore, host circuit and eachly both can adopt the connected mode just connect from dynamo-electric road, also the connected mode of reversal connection can be adopted, the connected mode of so-called reversal connection is that in host circuit, the first order wire is connected from the second communication line dynamo-electric road with each, second communication line in host circuit is connected from the first order wire dynamo-electric road with each, i.e. A-B, B-A.
If host circuit and eachly adopt the connected mode just connect from dynamo-electric road, host circuit and during RS485 chip communication, the logic level of each port can shown in reference table 1 and table 2 from dynamo-electric road; If host circuit and each connected mode adopting reversal connection from dynamo-electric road, host circuit and during RS485 chip communication, the logic level of each port can shown in reference table 3 and table 4 from dynamo-electric road, wherein, table 3 is when host circuit sends data, the RS485 chip D3 in host circuit and the logic level from each port of RS485 chip D4 dynamo-electric road; Table 4 for when from dynamo-electric road generation acknowledgement frame, the logic level of each port of RS485 chip D3 from dynamo-electric road in RS485 chip D4 and host circuit.
Table 3
Table 4
Wherein, Fig. 5 and Fig. 6 for comprise a host circuit and one be described from dynamo-electric road; Fig. 7 is for comprising a host circuit and multiple from dynamo-electric road, and host circuit can adopt the mode shown in Fig. 5 or Fig. 6 to be connected with each from dynamo-electric road, and the carrying out shown in reference table 1-table 4 communicates, and does not repeat them here.In order to compatibility is multiple from impedance matching during machine circuit working, the resistance of the pull-up resistor R1 in host circuit is much smaller than the resistance from the pull-up resistor R5 in dynamo-electric road, the resistance of the pull down resistor R2 in host circuit is much smaller than the resistance from the pull down resistor R6 in dynamo-electric road, simultaneously, the resistance of current-limiting resistance R3 and R4 in host circuit with hinder from electromechanics in the resistance of current-limiting resistance R7 and R8 equal, and much smaller than the resistance of pull-up resistor R1 and pull down resistor R2.
RS485 chip communication circuit described above can be applied in communicating of indoor apparatus of air conditioner and off-premises station, can promote reliability and the antijamming capability of long haul communication, realizes the large data transmission of air-conditioning products.
It should be noted that, pull-up unit described in the utility model embodiment, drop-down unit, the first thermistor, the second thermistor, the first current-limiting resistance, the second current-limiting resistance can be that the combination of one or more device realizes, namely at least one resistance can be comprised, when comprising at least two resistance in above-mentioned arbitrary resistance unit, resistance in described resistance unit can be in parallel, also can be series connection, and the size of described resistance can be fixing, also can be change.
Last it is noted that above embodiment is only in order to illustrate the technical solution of the utility model, be not intended to limit; Although be described in detail the utility model with reference to previous embodiment, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of each embodiment technical scheme of the utility model.