Communication module control circuit and communication system
By designing the communication module control circuit in the RS-485 communication system, the level pull-down module and charging module are used to place the driver output enable pin of the abnormal slave device in a high resistance or off state, the abnormal device occupies the bus. Resource issues simplify the overhaul process and reduce costs.
Patent Information
- Application Number
- CN202420511984.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2034-03-15
AI Technical Summary
In the RS-485 communication system, if the slave device has an abnormality, it will occupy bus resources, affect the normal operation of other slave devices, causing the entire system to be paralyzed, and the maintenance process is cumbersome and costly.
A communication module control circuit is designed, including a level pull-down module and a charging module. By connecting the control end of the level pull-down module to the charging module, the level pull-down module is used to control the level pull-down module to run, and abnormal slaves are transferred. The device's communication module driver output enable pin is placed in a high resistance or off state to avoid affecting other devices.
It effectively reduces the impact of abnormal slave equipment on the RS-485 communication system, simplifies the maintenance process, reduces the maintenance cost, and realizes control functions through common components, ensuring the comprehensive performance of the product.
Smart Images

Figure CN221948192U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of communication, in particular to a communication module control circuit and a communication system. Background Art
[0002] RS-485 is a low-cost and reliable communication specification that can be used in applications such as the networking of electric meter systems. The RS-485 communication system in the prior art consists of an RS-485 host and multiple slave devices, which communicate with each other through a bus (A line and B line) and can transmit data through differential signals. It not only has strong anti-interference ability and long transmission distance, but also can support a large number of sub-devices, and therefore has been widely used.
[0003] However, when there are multiple slave devices, if a slave device fails, it will occupy bus resources and affect the normal operation of other slave devices in the RS-485 communication system, thus paralyzing the entire RS-485 communication system. Utility Model Content
[0004] The purpose of the embodiment of the utility model is to provide a communication module control circuit and a communication system to reduce the impact of abnormal slave devices on the RS-485 communication system. The specific technical solution is as follows:
[0005] In a first aspect of an embodiment of the present utility model, a communication module control circuit is provided, the circuit comprising:
[0006] Charging module and level-lowering module;
[0007] The first end of the level-lowering module is used to connect the driver output enable pin of the communication module and the output enable pin of the control module;
[0008] The second end of the level-lowering module is grounded;
[0009] The control end of the level-lowering module is connected to the first end of the charging module;
[0010] The second end of the charging module is used to connect to the output enable pin of the control module;
[0011] The third terminal of the charging module is connected to the first voltage terminal, and the fourth terminal of the charging module is grounded.
[0012] In a possible implementation, the level-lowering module includes a first transistor.
[0013] The emitter of the first transistor is grounded;
[0014] The base of the first transistor is connected to the first end of the charging module;
[0015] The collector of the first transistor is used to connect the driver output enable pin of the communication module and the output enable pin of the control module.
[0016] In a possible implementation, the charging module includes a sixth resistor, a seventh resistor, a second capacitor and a third diode.
[0017] The first end of the sixth resistor is connected to the first voltage end, the second end of the sixth resistor is respectively connected to the first end of the second capacitor, the first end of the seventh resistor, and the control end of the level-lowering module; the second end of the second capacitor is grounded;
[0018] The second end of the seventh resistor is connected to the anode of the third diode, and the cathode of the third diode is used to connect to the output enable pin of the control module.
[0019] In a possible implementation, the charging module also includes a second diode, and the second end of the sixth resistor is connected to the control end of the level-lowering module through the second diode; wherein the anode of the second diode is connected to the second end of the sixth resistor, and the cathode of the second diode is connected to the control end of the level-lowering module.
[0020] In a possible implementation, the circuit also includes a fifth resistor, a first end of the fifth resistor being used to connect to a driver output enable pin of the communication module, and a second end of the fifth resistor being used to connect to an output enable pin of the control module; wherein the first end of the level pull-down module is connected to the output enable pin of the control module through the fifth resistor.
[0021] In a second aspect of the embodiments of the present utility model, a communication system is provided, the system comprising a communication module, a control module and the communication module control circuit as described in any one of the first aspects of the embodiments of the present utility model.
[0022] In a possible implementation, the system further includes a receiver output circuit, the communication module further includes a receiver output pin; the control module further includes a receiving pin, wherein the receiver output circuit includes a first resistor and a first diode;
[0023] A first end of the first resistor is connected to a receiver output pin of the communication module, and a second end of the first resistor is connected to a cathode of the first diode;
[0024] The anode of the first diode is connected to the receiving pin of the control module.
[0025] In a possible implementation, the system further includes a receiver output enable circuit, the communication module further includes a receiver output enable pin; the control module further includes a receive enable pin, wherein the receiver output enable circuit includes a second resistor and a third resistor;
[0026] The first end of the second resistor is connected to the receiver output enable pin of the communication module and the first end of the third resistor, and the second end of the second resistor is grounded;
[0027] The first end of the third resistor is connected to the first end of the second resistor and the receiver output enable pin of the communication module, and the second end of the third resistor is connected to the receive enable pin of the control module.
[0028] In a possible implementation, the system further includes a driver input circuit, the communication module further includes a driver input pin; the control module further includes an output pin, wherein the driver input circuit includes a fourth resistor;
[0029] A first end of the fourth resistor is connected to a driver input pin of the communication module;
[0030] The second end of the fourth resistor is connected to the output pin of the control module.
[0031] In a possible implementation, the system further includes a power supply circuit, and the communication module further includes a ground pin and a power supply pin, wherein the power supply circuit includes a first capacitor,
[0032] The first end of the first capacitor is connected to the power pin and the second voltage end of the communication module;
[0033] The second end of the first capacitor is connected to the ground pin of the communication module and the ground respectively.
[0034] The communication module control circuit and communication system provided by the embodiment of the utility model can connect the first end of the level-lowering module to the driver output enable pin of the communication module, ground the third end of the level-lowering module, and connect the control end of the level-lowering module to the first end of the charging module, so that when an abnormality occurs in the slave device, the charging module controls the operation of the level-lowering module, thereby pulling down the level at the driver output enable pin of the communication module corresponding to the slave device, so that the slave device is in a high-impedance or disconnected state without affecting the operation of the entire communication system, thereby reducing the impact of the abnormal slave device on the RS-485 communication system. Of course, any product implementing the utility model does not necessarily need to achieve all the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the utility model or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the utility model. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0036] Figure 1 A schematic diagram of connecting a host device and a slave device of an RS-485 communication system in the related art;
[0037] Figure 2 A first connection diagram of a communication module control circuit provided in an embodiment of the utility model;
[0038] Figure 3 A second connection diagram of the communication module control circuit provided in an embodiment of the utility model;
[0039] Figure 4 A third connection diagram of the communication module control circuit provided by an embodiment of the utility model;
[0040] Figure 5 A fourth connection diagram of the communication module control circuit provided by an embodiment of the utility model;
[0041] Figure 6 A fifth connection diagram of the communication module control circuit provided in an embodiment of the utility model;
[0042] Figure 7 A connection diagram of a communication system provided by an embodiment of the utility model;
[0043] Figure 8 A schematic diagram of the connection relationship between a communication module and a communication module control circuit in a communication system provided by an embodiment of the utility model. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the utility model to clearly and completely describe the technical solutions in the embodiments of the utility model. Obviously, the described embodiments are only part of the embodiments of the utility model, not all of the embodiments. Based on the embodiments in the utility model, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the utility model.
[0045] In the related art, for RS-485 communication systems, there is generally one host device and multiple slave devices, and the master and slave devices are connected in parallel through a 485 bus, such as Figure 1In the RS-485 communication system shown, there are 1 host and N slaves, each slave is a device, and the host and slaves (device 1, device 2, ... device N-1, device N) are connected in parallel through the AB bus. If one of the slave devices is abnormal, it will occupy the bus resources, affecting the normal operation of other slave devices in the RS-485 communication system, causing the entire RS-485 communication system to be paralyzed. In addition, after the RS-485 communication system is paralyzed, the relevant technicians also need to judge the slave devices one by one when repairing it. The operation is not only cumbersome, but also accompanied by high maintenance costs.
[0046] In order to solve at least one of the above technical problems, the first aspect of the embodiment of the utility model provides a communication module control circuit, the circuit includes a charging module 201 and a level lowering module 202, such as Figure 2 As shown,
[0047] The first end of the level-pulling-down module is used to connect the driver output enable pin of the communication module and the output enable pin of the control module;
[0048] The second end of the level-pulling-down module is grounded;
[0049] The control end of the level-lowering module is connected to the first end of the charging module;
[0050] The second end of the charging module is used to connect to the output enable pin of the control module;
[0051] The third terminal of the charging module is connected to the first voltage terminal, and the fourth terminal of the charging module is grounded.
[0052] In an embodiment of the present application, a communication module refers to a slave device (e.g., a 485 chip, etc.) that can communicate through a bus (e.g., a 485 bus, etc.), and the communication module includes a driver output enable pin, and the level signal received by the driver output enable pin can control the enabling of the communication module. In one example, when the driver output enable pin receives a high level signal, the communication module is in an enabled state and can output a driver signal; when the driver output enable pin receives a low level signal, the communication module is in a non-enabled state and cannot output a signal, that is, it cannot occupy the bus. The control module is a controller unit that manages and controls external devices for slave devices, and can be an MCU (Microcontroller Unit) or an FPGA (Field Programmable Gate Array), etc., and can be used to provide a high level signal for the driver output enable pin of the communication module.
[0053] The charging module can be used to control the conduction state of the level-lowering module by connecting to the control end of the level-lowering module. When the preset condition is reached, the level-lowering module is controlled to operate to lower the level of the driver output enable pin in the communication module. In one example, for a certain communication module, when it is the turn of the communication module to communicate, the output enable pin of the control module outputs a high level, the driver output enable pin of the communication module receives a high level signal, and the communication module enters the enabled state, thereby occupying the bus for communication. The charging module starts charging under the action of the high level of the output enable pin. During the charging process, the voltage at the first end of the charging module is gradually pulled up. When the start-up voltage of the level-lowering module is reached, the level-lowering module is turned on under the control of the charging module, and the driver output enable pin of the communication module is grounded, thereby lowering the level of the driver output enable pin of the communication module. Among them, the preset conditions can be determined according to actual needs. For example, if in actual applications, a communication module of a slave device can complete data communication within 200ms, then the preset condition can be set to control the level-lowering module to operate and lower the level of the driver output enable pin in the communication module if the working time of the communication module meets 200ms. In one example, circuit components of different specifications can be set in the charging module. For example, components such as resistors and capacitors can be set to enable the conduction of the level-lowering module after 200ms. At the same time, diodes, transistors and other similar components can be set in the level-lowering module so that the level-lowering module can only operate when certain conditions are met. In one example, by setting the type and number of transistors and diodes, the voltage at the control end of the level-lowering module is turned on when it is a preset voltage.
[0054] By applying the embodiment of the utility model, the first end of the level-lowering module can be connected to the driver output enable pin of the communication module, the third end of the level-lowering module can be grounded, the control end of the level-lowering module can be connected to the first end of the charging module, and the level-lowering module can be controlled to operate through the charging module, thereby pulling down the level at the driver output enable pin of the communication module corresponding to the slave device, so that even when an abnormality occurs in the slave device, the slave device can be in a high-impedance or disconnected state without affecting the operation of other slave devices on the bus, thereby reducing the impact of the abnormal slave device on the RS-485 communication system. And when the relevant technicians are overhauling it, they only need to overhaul the abnormal slave device, and avoid checking other slave devices in the RS-485 communication system one by one, thereby reducing the overhaul cost. In addition, the communication control circuit of the embodiment of the utility model can realize the control function through a few common components, and will not affect the timing control of the software; while the cost is low, the comprehensive performance of the product can be guaranteed.
[0055] In a possible implementation manner, the level-lowering module includes a first transistor.
[0056] The emitter of the first transistor is grounded;
[0057] The base of the first transistor is connected to the first end of the charging module;
[0058] The collector of the first transistor is used to connect the driver output enable pin of the communication module and the output enable pin of the control module.
[0059] The first transistor is a bipolar transistor, a field effect transistor or other types of transistors. In one example, Figure 3 As shown, the first transistor Q1 is a bipolar transistor, and the first end of the charging module is connected to the base of the first transistor. When the preset condition is reached and the level of the driver output enable pin needs to be pulled down, the charging module discharges and applies a voltage to the base of the first transistor. When the base voltage of the first transistor meets the turn-on condition, the first transistor is turned on. Since the emitter of the first transistor is grounded and the collector of the first transistor is connected to the driver output enable pin of the communication module, the level of the driver output enable pin becomes a low level.
[0060] In the circuit of the embodiment of the utility model, the level-lowering module includes a first transistor, and the emitter of the first transistor is grounded, and the base is connected to the first end of the charging module, so that the operation of the level-lowering module can be controlled by the charging module to pull down the level at the driver output enable pin of the communication module corresponding to the slave device, so that the slave device is in a high-impedance or disconnected state without affecting the operation of other slave devices on the bus, thereby reducing the impact of abnormal slave devices on the RS-485 communication system.
[0061] In a possible implementation, the charging module includes a sixth resistor, a seventh resistor, a second capacitor and a third diode.
[0062] The first end of the sixth resistor is connected to the first voltage end, the second end of the sixth resistor is respectively connected to the first end of the second capacitor, the first end of the seventh resistor, and the control end of the level-lowering module; the second end of the second capacitor is grounded;
[0063] The second end of the seventh resistor is connected to the anode of the third diode, and the cathode of the third diode is used to connect to the output enable pin of the control module.
[0064] Among them, the timing function of the charging module can be realized by setting the resistance of the sixth resistor, the seventh resistor and the capacitance of the second capacitor. In an example, if the slave device takes 100ms or 200ms to complete the communication work, the charging module can be set to realize the timing of 100ms or 200ms. For example, if the charging module is set to be able to realize the operation of the control level lowering module after 200ms, the first voltage end can be set to a 3.3V DC power supply, the sixth resistor resistance value is in the range of 10kΩ-100kΩ, the capacitance of the second capacitor is 4.7μF or 10μF, and the seventh resistor resistance value is in the range of 10Ω-100Ω.
[0065] Among them, the first voltage terminal is mainly used to charge the second capacitor. When the voltage of the second capacitor reaches a certain threshold, it can discharge to achieve the conduction of the first transistor or the conduction of the third diode in the level-lowering module. It should be noted that the conduction voltage drop of the level-lowering module must be greater than the conduction voltage drop of the third diode. In an example, the output enable pin of the control module is at a low level. Since there is a seventh resistor to limit the current, and the seventh resistor is smaller than the sixth resistor, its resistance can be ignored; the voltage stored in the second capacitor flows to the third diode first for discharge, thereby clamping the voltage on the second capacitor at a lower value to avoid turning on the first transistor.
[0066] When the output enable pin of the control module is at a high level, the cathode potential of the third diode is higher than the positive potential, and the third diode cannot be turned on, so the second capacitor is charged. When the voltage of the second capacitor reaches the voltage required for the level-lowering module to start working, the second capacitor discharges to the level-lowering module, so that the level-lowering module works, thereby changing the driver output enable pin of the communication module to a low level.
[0067] In one example, the first voltage terminal is 3.3V, the resistance of the sixth resistor R6 is 100kΩ, the resistance of the seventh resistor R7 is 100Ω, the capacitance of the second resistor C2 is 10μF, the conduction voltage drop of the third diode D3 is 0.3V, and the level-pull-down module includes a first transistor Q1, and the turn-on voltage V be is 0.7V. Figure 4 As shown, the first end of the sixth resistor R6 is connected to the first voltage end 3.3V, and the second end of R6 is respectively connected to the first end of the second capacitor C2, the first end of the seventh resistor R7, and the base of Q1; the second end of C2 is grounded; the second end of R7 is connected to the positive electrode of the third diode D3, and the negative electrode of D3 is used to connect to the output enable pin of the control module.
[0068] When the output enable pin of the control module is at a low level, the current at the first voltage terminal flows through R6 to the second capacitor C2 for charging. When the voltage of C2 reaches the conduction voltage drop of D3, 0.3V, C2 discharges, and the current flows to D3 through R7, so that the voltage of C2 is clamped at about 0.3V. When the output enable pin of the control module is at a high level, D3 cannot be turned on, and C2 is charged. When the voltage of C2 reaches the turn-on voltage of Q1, 0.7V, C2 discharges, Q1 is turned on, and the driver output enable pin of the communication module becomes a low level.
[0069] By applying the circuit of the embodiment of the utility model, a charging module is set up including components such as a sixth resistor, a seventh resistor, and a second capacitor, so that the second capacitor can be timed. After a certain period of time, the second capacitor is discharged to realize the operation of the level lowering module, thereby lowering the level at the driver output enable pin of the communication module corresponding to the slave device, so that the slave device is in a high-impedance or disconnected state without affecting the operation of other slave devices on the bus, thereby reducing the impact of abnormal slave devices on the RS-485 communication system.
[0070] In a possible implementation, the charging module also includes a second diode, and the second end of the sixth resistor is connected to the control end of the level-lowering module through the second diode; wherein the anode of the second diode is connected to the second end of the sixth resistor, and the cathode of the second diode is connected to the control end of the level-lowering module.
[0071] In practical applications, the number of transistors or diodes can also be increased to ensure that the voltage required when the level-pulling module is turned on is higher than the turn-on voltage of the third diode. Figure 5 As shown, in Figure 4 In the communication module control circuit, the charging module also includes a second diode D2, the second end of R6 is connected to the positive electrode of D2, and the negative electrode of D2 is connected to the control end of the level-lowering module, that is, the base of Q1.
[0072] exist Figure 5 In the example, if the conduction voltage drop Vf of D2 is 0.3V, when the output enable pin of the control module is at a high level, D3 cannot be turned on, and C2 is charged. When the voltage of C2 reaches the sum of the turn-on voltage of Q1 0.7V and the conduction voltage drop of D2 0.3V, that is, when the voltage of C2 reaches 1V, D2 and Q1 are turned on, and the driver output enable pin of the communication module becomes a low level.
[0073] By applying the circuit of the embodiment of the utility model, setting the charging module to include a second diode can ensure that the voltage drop required when the circuit in the direction of the level-lowering module is turned on is higher than the turn-on voltage of the third diode, so that when the voltage drop of the second capacitor reaches a certain condition, the circuit in the direction of the level-lowering module is discharged and turned on, and the level-lowering module is controlled to operate, thereby lowering the level at the driver output enable pin of the communication module corresponding to the slave device, so that the slave device is in a high-impedance or disconnected state without affecting the operation of other slave devices on the bus, thereby reducing the impact of abnormal slave devices on the RS-485 communication system.
[0074] In a possible implementation manner, the communication module control circuit further includes a fifth resistor, such as Figure 6 As shown, the first end of the fifth resistor R5 is connected to the driver output enable pin of the communication module, and the second end is connected to the output enable pin of the control module. The first end of the level-lowering module is connected to the output enable pin of the control module through the fifth resistor.
[0075] Among them, R5 is mainly used for current limiting, which reduces the current by increasing the total resistance of the load to avoid excessive current between the communication module and the control module. Directly connecting the two may burn components or electronic equipment due to excessive current.
[0076] By using the circuit of the embodiment of the utility model, a current limiting resistor is added between the control module and the communication module to avoid the situation where components or electronic devices are burned due to excessive current when the communication module and the control module are directly connected.
[0077] In a second aspect of the embodiment of the present utility model, a communication system is also provided, wherein the communication system includes: Figure 7 The structure shown includes a communication module 701, a control module 702 and a communication module control circuit 703 as described in any one of the first aspects of the embodiments of the utility model.
[0078] In actual applications, the communication module is an RS-485 unit, which is a half-duplex communication mode. Both parties can communicate, but cannot receive and send at the same time. Figure 8 The figure is a schematic diagram of the connection relationship between the communication module and the communication module control circuit in the communication system, wherein the communication module is an RS-485 communication unit, the control module is an MCU (Microcontroller Unit) processor, and the RS-485 unit includes a receiver output pin RO and a receiver output enable pin (Low level is valid), driver output enable pin DE (high level is valid), driver input pin DI, ground pin GND, power pin VCC, driver output / receiver input in-phase pin A, driver output / receiver input inverting pin B. The control module includes a receiving pin RX (i.e. MCU-RX), a receiving enable pin RE (i.e. MCU-RE), an output pin TX (i.e. MCU-TX), and an output enable pin DE (i.e. MCU-DE).
[0079] The control module controls the receiver output enable pin in the communication module The switch of the driver output enable pin DE realizes the reception or transmission of the slave device. When the RS-485 unit is in the receiving stage, The pin is at low level, and the communication module sends data to the control module (when AB≥-50mV, the output is 1; when AB≤-200mV, the output is 0). The truth table of the RS-485 unit in the receiving stage is shown in Table 1 below:
[0080] Table 1
[0081]
[0082] Among them, 1 represents high level; 0 represents low level; X represents any value; "receive" means that the communication module is in the data receiving stage; "I input" represents the receiver input of the RS-485 unit; "output" represents the receiver output of the RS-485 unit; Indicates the receiver output enable pin of the RS-485 unit. When the pin is at a low level, the RS-485 unit can realize the data receiving function; DE represents the driver output enable pin of the RS-485 unit. When the DE pin is at a high level, the RS-485 unit can realize the data sending function; "AB" represents the voltage difference between the AB buses of the RS-485 unit; "Open / shorted" means open circuit or short circuit; RO represents the receiver output pin of the RS-485 unit.
[0083] The MCU-DE pin of the control module is low by default. When the RS-485 unit needs to send data, the MCU-DE pin controls the DE pin of the communication module to become high, and the communication module starts to send data. When the communication module completes data transmission, the control module controls the DE pin to become low through the MCU-DE pin. When an abnormality occurs in the slave device, when the communication module completes its work, the control module cannot change the DE pin to a low level. Therefore, the slave device is always in the transmission stage, occupying the bus resources of the communication system. When the communication module is in the transmission stage, its truth table is shown in Table 2:
[0084] Table 2
[0085]
[0086] Among them, 1 represents high level; 0 represents low level; X represents any value; "transmit" means that the communication module is in the data sending stage; "input" means the driver input of the RS-485 unit; "output" means the driver output of the RS-485 unit; Indicates the receiver output enable pin of the RS-485 unit. When the pin is at a low level, the RS-485 unit can realize the data receiving function; DE represents the driver output enable pin of the RS-485 unit. When the DE pin is at a high level, the RS-485 unit can realize the data sending function; DI represents the driver input pin of the RS-485 unit; B represents the driver reverse output pin; A represents the driver in-phase output pin.
[0087] As can be seen from Table 2, when the DE pin of the communication module is at a low level, the slave device will present a high impedance or shutdown state, thereby disconnecting the abnormal slave device from the communication system. Therefore, the communication module control circuit of the first aspect of the embodiment of the utility model is connected to the driver output enable pin of the communication module and the output enable pin of the control module, and when an abnormality occurs in the slave device, the DE pin of the communication module is forced to be pulled low, thereby shutting down the slave device.
[0088] The communication system using the embodiment of the utility model can, when an abnormality occurs in a slave device and the control module is unable to shut down the communication module, force the driver output enable pin of the communication module to be pulled low through the communication module control circuit, thereby shutting down the slave device to avoid affecting the operation of other slave devices and the entire communication system, thereby reducing the impact of the abnormal slave device on the RS-485 communication system.
[0089] In a possible implementation, the communication system further includes a receiver output circuit, the communication module further includes a receiver output pin; the control module further includes a receiving pin, wherein the receiver output circuit includes a first resistor and a first diode;
[0090] A first end of the first resistor is connected to a receiver output pin of the communication module, and a second end of the first resistor is connected to a cathode of the first diode;
[0091] The anode of the first diode is connected to the receiving pin of the control module.
[0092] In a possible implementation, the communication system further includes a receiver output enable circuit, the communication module further includes a receiver output enable pin; the control module further includes a receive enable pin, wherein the receiver output enable circuit includes a second resistor and a third resistor;
[0093] A first end of the second resistor is connected to a receiver output enable pin of the communication module and a first end of a third resistor, and a second end of the second resistor is grounded;
[0094] A first end of the third resistor is connected to a first end of the second resistor and a receiver output enable pin of the communication module, and a second end of the third resistor is connected to a receive enable pin of the control module.
[0095] In a possible implementation, the communication system further includes a driver input circuit, the communication module further includes a driver input pin; the control module further includes an output pin, wherein the driver input circuit includes a fourth resistor;
[0096] A first end of the fourth resistor is connected to a driver input pin of the communication module;
[0097] The second end of the fourth resistor is connected to the output pin of the control module.
[0098] In a possible implementation, the communication system further includes a power supply circuit, and the communication module further includes a ground pin and a power supply pin, wherein the power supply circuit includes a first capacitor,
[0099] A first end of the first capacitor is connected to a power pin and a second voltage end of the communication module;
[0100] The second end of the first capacitor is connected to the ground pin of the communication module and the ground respectively.
[0101] like Figure 8 In the communication system shown in the figure, the first resistor R1 and the first diode D1 together constitute a receiver output circuit, the first end of R1 is connected to the RO pin, the second end of R1 is connected to the negative electrode of D1, and the positive electrode of D1 is connected to the MCU-RX pin; the second resistor R2 and the third resistor R3 constitute a receiver output enable circuit, the first end of R2 is connected to the The second end of R2 is grounded, and the first end of R3 is connected to the first end of R2 and The first end of R3 is connected to the MCU-RE pin, and the second end of R4 is connected to the MCU-TX pin; the fourth resistor R4 constitutes a driver input circuit, the first end of R4 is connected to the DI pin, and the second end of R4 is connected to the MCU-TX pin; the second voltage end and the first capacitor C1 constitute a power supply circuit, the second voltage end is a 5V DC power supply, the capacitance of the first capacitor C1 is 100nF, the first end of C1 is connected to the second voltage end and the VCC pin, and the second end of C1 is connected to the ground and the GND pin.
[0102] When the receiver output enable circuit outputs control When the pin is at a low level, the receiver output circuit starts working and sends the data received from the external device to the control module; when the DE pin is at a high level, the communication module enters the sending state, obtains information from the control module through the driver input circuit, and sends it to the external device through the driver output circuit.
[0103] The communication system using the embodiment of the utility model can, when an abnormality occurs in a slave device and the control module is unable to shut down the communication module, force the driver output enable pin of the communication module to be pulled low through the communication module control circuit, thereby shutting down the slave device to avoid affecting the operation of other slave devices and the entire communication system, thereby reducing the impact of the abnormal slave device on the RS-485 communication system.
[0104] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A communication module control circuit, It is characterized in that The circuit comprises: Charging module and level-lowering module; The first end of the level-lowering module is used to connect the driver output enable pin of the communication module and the output enable pin of the control module; The second end of the level-lowering module is grounded; The control end of the level-lowering module is connected to the first end of the charging module; The second end of the charging module is used to connect to the output enable pin of the control module; The third terminal of the charging module is connected to the first voltage terminal, and the fourth terminal of the charging module is grounded.
2. The circuit according to claim 1, It is characterized in that The level-lowering module comprises a first transistor, The emitter of the first transistor is grounded; The base of the first transistor is connected to the first end of the charging module; The collector of the first transistor is used to connect the driver output enable pin of the communication module and the output enable pin of the control module.
3. The circuit according to claim 1, It is characterized in that The charging module includes a sixth resistor, a seventh resistor, a second capacitor and a third diode. The first end of the sixth resistor is connected to the first voltage end, the second end of the sixth resistor is respectively connected to the first end of the second capacitor, the first end of the seventh resistor, and the control end of the level-lowering module; the second end of the second capacitor is grounded; The second end of the seventh resistor is connected to the anode of the third diode, and the cathode of the third diode is used to connect to the output enable pin of the control module.
4. The circuit according to claim 3, It is characterized in that The charging module also includes a second diode, and the second end of the sixth resistor is connected to the control end of the level-lowering module through the second diode; wherein the anode of the second diode is connected to the second end of the sixth resistor, and the cathode of the second diode is connected to the control end of the level-lowering module.
5. The circuit according to claim 1, It is characterized in that The circuit also includes a fifth resistor, a first end of the fifth resistor is used to connect to the driver output enable pin of the communication module, and a second end of the fifth resistor is used to connect to the output enable pin of the control module; wherein the first end of the level pull-down module is connected to the output enable pin of the control module through the fifth resistor.
6. A communication system, It is characterized in that The system comprises a communication module, a control module and the communication module control circuit according to any one of claims 1-5.
7. The system according to claim 6, It is characterized in that The system further comprises a receiver output circuit, the communication module further comprises a receiver output pin; the control module further comprises a receiving pin, wherein the receiver output circuit comprises a first resistor and a first diode; A first end of the first resistor is connected to a receiver output pin of the communication module, and a second end of the first resistor is connected to a cathode of the first diode; The anode of the first diode is connected to the receiving pin of the control module.
8. The system according to claim 6, It is characterized in that The system further comprises a receiver output enable circuit, the communication module further comprises a receiver output enable pin; the control module further comprises a receive enable pin, wherein the receiver output enable circuit comprises a second resistor and a third resistor; The first end of the second resistor is connected to the receiver output enable pin of the communication module and the first end of the third resistor, and the second end of the second resistor is grounded; The first end of the third resistor is connected to the first end of the second resistor and the receiver output enable pin of the communication module, and the second end of the third resistor is connected to the receive enable pin of the control module.
9. The system according to claim 6, It is characterized in that The system further comprises a driver input circuit, the communication module further comprises a driver input pin; the control module further comprises an output pin, wherein the driver input circuit comprises a fourth resistor; A first end of the fourth resistor is connected to a driver input pin of the communication module; The second end of the fourth resistor is connected to the output pin of the control module.
10. The system according to claim 6, It is characterized in that The system further includes a power supply circuit, and the communication module further includes a ground pin and a power supply pin, wherein the power supply circuit includes a first capacitor, The first end of the first capacitor is connected to the power pin and the second voltage end of the communication module; The second end of the first capacitor is connected to the ground pin of the communication module and the ground respectively.
