Automatic coding system and method

By independently outputting voltages and setting detection modules on the output ports of each slave, the problems of poor anti-interference capability and lack of fault diagnosis in the prior art are solved, and the effect of high reliability and fast encoding is achieved.

CN111142042BActive Publication Date: 2025-04-08YANTAI CHUNGWAY NEW ENERGY TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010126710.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-28
Publication Date
2025-04-08
Estimated Expiration
2040-02-28

AI Technical Summary

Technical Problem

In the prior art, the automatic encoding method of the battery detection device has poor anti-interference ability and lacks fault diagnosis functions, resulting in encoding failure or errors, and the system reliability is not high.

Method used

Each slave independently outputs voltage to the next slave, instead of the traditional voltage-dividing series method, and a detection module is set up at the output port of the slave, and encoding and fault diagnosis is performed by detecting the output voltage.

Benefits of technology

It improves the anti-interference ability and reliability of the system, and realizes the fast, accurate and fault diagnosis functions of automatic encoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111142042B_ABST
    Figure CN111142042B_ABST
Patent Text Reader

Abstract

The present invention discloses an automatic encoding system and method. The system includes a host and several slaves, the host is connected to each slave through a communication bus; the host includes a power module; the slave includes a processing chip, an input port and an output port; the processing chip is used to control the output voltage of the output port according to the state of the input port; the slave is connected in series between the positive and negative poles of the power module through an encoding line; for adjacent slaves, the output port of the previous slave is connected to the input port of the next slave, the input port of the first slave is connected to the positive pole of the power module, and the output port of the last slave is connected to the negative pole of the power module. The present invention can automatically complete device encoding, automatically identify and end, has fast speed, strong anti-interference ability, high reliability, and also has a fault diagnosis function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an automatic coding system for electrical equipment and also to an automatic coding method. Background Art

[0002] New energy vehicles contain multiple sets of batteries, and multiple sets of detection equipment are required for safety monitoring. After multiple sets of detection equipment (hereinafter referred to as slaves) are connected in series into a loop, they need to be automatically encoded and fed back to the encoding device (hereinafter referred to as the host) to clarify the position of each detection device in the loop.

[0003] In the prior art, encoding is mainly achieved through series voltage division and voltage sorting. For example, the Chinese invention patent with publication number CN110531272A discloses an automatic encoding method for a battery thermal runaway detection system. Each slave device has a built-in resistor. Through series voltage division, each slave measures a different voltage and satisfies the relationship of V1>V2>Vn. Finally, the slaves are numbered by voltage sorting. Another example is the Chinese invention patent with publication number CN102821017B, which discloses a method and system for sequential identification of slave addresses in a master-slave field bus. By calculating the voltage difference between the host and each slave, the slot number to which the slave belongs is determined to achieve sequential identification.

[0004] The above method has the following defects: (1) By adopting the series voltage division method, the voltage allocated to each slave becomes smaller and smaller, and the anti-interference ability becomes worse and worse. When used on site, it is easy to fail or make errors in encoding, and the reliability is poor; (2) It does not have a fault diagnosis function. If the encoding fails, the system cannot automatically determine the fault type and fault location. Summary of the invention

[0005] The present invention proposes an automatic encoding system and method, the purposes of which are: (1) to improve the anti-interference capability of the system; and (2) to provide a fault diagnosis function.

[0006] The technical solution of the present invention is as follows:

[0007] An automatic encoding system includes a host and a plurality of slaves, wherein the host and the slaves are connected via a communication bus;

[0008] The host comprises a power module;

[0009] The slave includes a processing chip, an input port and an output port; the processing chip is used to control the output voltage of the output port according to the state of the input port;

[0010] The slave is connected in series between the positive and negative poles of the power module through a coding line; for adjacent slaves, the output port of the previous slave is connected to the input port of the next slave, the input port of the first slave is connected to the positive pole of the power module, and the output port of the last slave is connected to the negative pole of the power module.

[0011] As a further improvement of the system: the input port of the slave is connected to the input detection end of the processing chip through the input module, and the output port of the slave is connected to the output control end of the processing chip through the output module;

[0012] The input module is a voltage division detection circuit;

[0013] The output module includes a control circuit and an output resistor. The power supply end of the slave is connected to the output port through the control circuit and the output resistor in sequence, and the control circuit is connected to the output control end.

[0014] As a further improvement of the system: the slave device further comprises a detection module, the detection module is used to detect the output voltage of the output port, and the output detection terminal of the processing chip is connected to the output port through the detection module.

[0015] As a further improvement of the system: the detection module is a voltage division detection circuit.

[0016] The present invention also provides an automatic encoding method, the steps of which are:

[0017] S1. Connect several slaves in series between the positive and negative poles of the power module of the host through the encoding line; for adjacent slaves, the output port of the previous slave is connected to the input port of the next slave; the input port of the first slave is connected to the positive pole of the power module, and the output port of the last slave is connected to the negative pole of the power module; the host and each slave also communicate through the communication bus;

[0018] S2, the host sends an automatic encoding start command through the communication bus;

[0019] S3. After all slaves receive the automatic encoding start command, they detect the voltage of the input port. The slaves that have not completed the encoding and whose input port voltage is valid automatically encode to the next code in sequence, and then control the output voltage of the output port of the local machine, and send the local encoding completion command;

[0020] S4, after receiving the encoding completion command from the slave, the host updates the encoded sequence number; the host and other slaves return to step S3 to continue encoding;

[0021] At the same time, the slave that has just completed encoding in step S3 makes a judgment based on the status of its output port:

[0022] Case a: If the output port is normally connected to the next slave, the encoding work of this machine is finished;

[0023] Case b: If the output port is connected to the host, a coding end command is issued. After receiving the coding end command, the host ends the coding and the coding is successful.

[0024] Case c: If the output port is suspended, a subsequent stage suspended alarm command is issued. After receiving the subsequent stage suspended alarm command, the host stops encoding and the encoding fails.

[0025] As a further improvement of the above method: the slave detects the voltage of the input port through a voltage-dividing detection circuit; the power supply end of the slave is connected to the output port through a control circuit and an output resistor in turn, and the on-off between the power supply end and the output resistor is controlled by the control circuit;

[0026] The method for judging the state of the output port in step S4 is: if the output voltage is within the preset valid range, it is judged as situation a; if the output voltage is 0V, it is judged as situation b; if the output voltage is the power supply terminal voltage, it is judged as situation c.

[0027] As a further improvement of the above method: in step S4, if the result of the slave machine's judgment based on the status of its output port is situation a, then before the local encoding work is completed, it is monitored whether the encoding completion command of the next slave machine is issued by timeout, and if it times out, a subsequent-stage no response alarm command is issued. After receiving the subsequent-stage no response alarm command, the host determines that a subsequent-stage no response alarm fault occurs, and records the code of the slave machine that issued the alarm command for locating the fault, and the encoding fails.

[0028] As a further improvement of the above method: after the host sends an automatic encoding start command, if it still does not receive an encoding completion command from the first slave after a preset period of time, it is determined that a fault occurs in the connection between the host and the first slave and the encoding fails.

[0029] Compared with the prior art, the present invention has the following positive effects: (1) Each slave machine independently outputs voltage to the next slave machine, replacing the traditional voltage division series connection method. The voltage signal received by each slave machine is equal. The encoding is completed through mutual communication and time sequence. There is no need to preset the encoding in advance. The unique encoding can be automatically assigned to the slave device. The encoding speed is fast, the anti-interference ability is strong, and the reliability is high. (2) A detection module is provided at the output port of the slave machine. By detecting the output voltage, it can not only automatically determine whether the encoding is completed, but also determine whether there is a fault in the encoding line, thereby realizing fault diagnosis and feedback, and providing a reliable basis for fault troubleshooting and locating. (3) A timeout response alarm mechanism is also provided, which expands the scope of fault diagnosis and troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a schematic diagram of the structure of this coding system.

[0031] Figure 2 This is a schematic diagram of the structure of the slave.

[0032] Figure 3 Flowchart of the logic running for the host.

[0033] Figure 4 This is a flowchart of the slave machine's operating logic. DETAILED DESCRIPTION

[0034] The technical solution of the present invention is described in detail below with reference to the accompanying drawings:

[0035] like Figure 1 , an automatic encoding system, comprising a host 1 and a plurality of slaves 2, wherein the host 1 is connected to each of the slaves 2 via a communication bus 3 and a power supply line. The host 1 comprises a power module 1-1.

[0036] like Figure 1 and 2 The slave 2 includes a processing chip 2-1, an input port 2-5 and an output port 2-6; the processing chip 2-1 is used to control the output voltage of the output port 2-6 according to the state of the input port 2-5.

[0037] like Figure 1 The slave 2 is connected in series between the positive and negative poles of the power module 1-1 through a coding line: for adjacent slaves 2, the output port 2-6 of the previous slave 2 is connected to the input port 2-5 of the next slave 2, the input port 2-5 of the first slave 2 is connected to the positive pole of the power module 1-1, and the output port 2-6 of the last slave 2 is connected to the negative pole of the power module 1-1.

[0038] Further, such as Figure 2 The input port 2-5 of the slave 2 is connected to the input detection terminal 2-1-1 of the processing chip 2-1 through the input module 2-4, and the output port 2-6 of the slave 2 is connected to the output control terminal 2-1-2 of the processing chip 2-1 through the output module 2-2.

[0039] The input module 2-4 is a voltage division detection circuit, including resistors R1 and R2 connected in series between the input port 2-5 and the ground terminal, and resistors R3 and R4 connected in series between the connection point between R1 and R2 and the ground terminal. The input detection terminal 2-1-1 is connected to the connection point between resistors R3 and R4. Among them, R1 and R2 complete the voltage distribution of the input terminal (2 / 3 voltage division of the power supply voltage), and R3, R4 and the input voltage detection of the processing chip complete the measurement. If the voltage of the encoding line is 24V, after the R7 of the previous slave and the R1 and R2 of the current slave are connected in series, the voltage at the middle connection point between R1 and R2 is 8V, which exceeds the withstand voltage of the processing chip, so the voltage sampling circuit of R3 and R4 is added, and its role is: 1. The voltage value is reduced by 1 / 11 times, so that the processing chip can withstand the voltage division of R1 and R2; 2. The added resistance values ​​of R3 and R4 are much larger than R1 and R2, and the influence on the voltage division of R1 and R2 can be ignored. The ultimate goal is to enable the processing chip to collect voltage normally. The processing chip 2-1 determines whether the input is valid by detecting the input voltage. In addition, the system can measure continuously changing input voltage values ​​and adapt to different voltage levels.

[0040] The output module 2-2 includes a control circuit and an output resistor. The power supply end of the slave 2 is connected to the output port 2-6 through the control circuit and the output resistor in turn, and the control circuit is connected to the output control terminal 2-1-2. The processing chip 2-1 controls the output of a high level 24V / 0V through the control circuit. Specifically, the processing chip 2-1 controls the switch of the transistor Q2 and then controls the switch of the transistor Q1 to achieve output voltage control. When the output control terminal 2-1-2 of the processing chip 2-1 is at a low level, Q2 is turned off, Q1 is turned off, and the output port 2-6 outputs 0V; when the output control terminal 2-1-2 of the processing chip 2-1 is at a high level, Q2 is turned on, Q1 is turned on, and the output port 2-6 outputs 24V.

[0041] The slave 2 further includes a detection module 2-3, which is used to detect the output voltage of the output port 2-6. The output detection terminal 2-1-3 of the processing chip 2-1 is connected to the output port 2-6 through the detection module 2-3.

[0042] The detection module 2-3 is a voltage-dividing detection circuit, including resistors R9 and R10 connected in series between the output port 2-6 and the ground terminal, and the output detection terminal 2-1-3 is connected to the connection point between the resistors R9 and R10 to measure the output voltage value. If the measured voltage is within the valid range (calculated based on the output resistor R7 and the resistance value and voltage-dividing condition of the next-level input module 2-4), it means that the next slave 2 is connected normally; if the measured voltage is 0V, it means that the negative pole of the power module 1-1 of the host 1 is connected. Based on this characteristic, it can be judged whether the numbering is completed; if the measured voltage is 24V, it means that the output is suspended and a short line is connected. Based on this characteristic, a fault judgment can be made.

[0043] like Figure 3 and 4 , the automatic encoding method based on the above system, the steps are:

[0044] S1. Connect several slaves 2 in series between the positive and negative poles of the power module 1-1 of the host 1 through a coding line; for adjacent slaves 2, the output port 2-6 of the previous slave 2 is connected to the input port 2-5 of the next slave 2; the input port 2-5 of the first slave 2 is connected to the positive pole of the power module 1-1, and the output port 2-6 of the last slave 2 is connected to the negative pole of the power module 1-1; the host 1 and each slave 2 also communicate through the communication bus 3.

[0045] S2. The host 1 sends an automatic encoding start command through the communication bus 3.

[0046] S3. After all slaves 2 receive the automatic encoding start command, they detect the voltage of input port 2-5. The slaves 2 that have not completed encoding and whose input port 2-5 voltage is valid automatically encode to the next code in sequence, store the code, and then control the output voltage of the output port 2-6 of the local machine, and send the local encoding completion command.

[0047] For the encoding of the first slave 2, if the host 1 still does not receive the encoding completion command from the first slave 2 after the preset time, it is determined that the connection between the host 1 and the first slave 2 is faulty and the encoding fails. In this case, the possible faults are: (1) the encoding line from the host to the position 1 slave is broken; (2) the power supply line of the position 1 slave is faulty; (3) the communication line of the position 1 slave is faulty; (4) the device operation of the position 1 slave is faulty.

[0048] S4, after receiving the encoding completion command from the slave 2, the host 1 updates the encoded sequence number; the host 1 and other slaves 2 return to step S3 to continue encoding;

[0049] At the same time, slave 2 which has just completed encoding in step S3 makes a judgment based on the status of its output ports 2-6:

[0050] Case a: If the output voltage is within the preset effective range, it means that the output port 2-6 is normally connected to the next slave 2. Continue to monitor whether the encoding completion command of the next slave 2 is issued overtime. If it is not issued overtime, the encoding work of this machine is completed. If it is issued overtime, the next stage no response alarm command is issued. After receiving the next stage no response alarm command, the host 1 determines that the next stage no response alarm fault occurs, and records the code of the slave 2 that issued the alarm command for fault location. The encoding fails. The reasons for no response are: (1) the power supply line of the next stage is faulty; (2) the communication line of the next stage is faulty; (3) the operation of the next stage equipment is faulty.

[0051] Case b: If the output voltage is 0V, it means that the output port 2-6 is connected to the negative pole of the power module 1-1 of the host 1, and then the encoding end command is issued. After receiving the encoding end command, the host 1 ends the encoding and the encoding is successful.

[0052] Case c: If the output voltage is 24V, it means that the output port 2-6 is suspended, and the subsequent stage suspended alarm command is issued. After receiving the subsequent stage suspended alarm command, the host 1 stops encoding and the encoding fails. In this case, the possible fault is: the encoding line connected to the subsequent stage is broken.

Claims

1. An automatic encoding system, comprising a host (1) and a plurality of slaves (2), characterized in that: The host (1) and each slave (2) are connected via a communication bus (3); The host (1) comprises a power module (1-1); The slave (2) comprises a processing chip (2-1), an input port (2-5) and an output port (2-6); the processing chip (2-1) is used to control the output voltage of the output port (2-6) according to the state of the input port (2-5); The slaves (2) are connected in series between the positive and negative poles of the power module (1-1) via a coding line; for adjacent slaves (2), the output port (2-6) of the previous slave (2) is connected to the input port (2-5) of the next slave (2), the input port (2-5) of the first slave (2) is connected to the positive pole of the power module (1-1), and the output port (2-6) of the last slave (2) is connected to the negative pole of the power module (1-1); The input port (2-5) of the slave (2) is connected to the input detection end (2-1-1) of the processing chip (2-1) through the input module (2-4), and the output port (2-6) of the slave (2) is connected to the output control end (2-1-2) of the processing chip (2-1) through the output module (2-2); The input module (2-4) is a voltage division detection circuit; The output module (2-2) comprises a control circuit and an output resistor, the power supply end of the slave (2) is connected to the output port (2-6) via the control circuit and the output resistor in sequence, and the control circuit is connected to the output control end (2-1-2); the control circuit comprises a triode; The slave (2) further comprises a detection module (2-3), wherein the detection module (2-3) is used to detect the output voltage of the output port (2-6), and the output detection terminal (2-1-3) of the processing chip (2-1) is connected to the output port (2-6) via the detection module (2-3); the output voltages of the output ports (2-6) of all slaves (2) are equal; The encoding steps are: S1, connecting a plurality of slaves (2) in series between the positive and negative poles of a power module (1-1) of a host (1) through a coding line; for adjacent slaves (2), the output port (2-6) of the previous slave (2) is connected to the input port (2-5) of the next slave (2); the input port (2-5) of the first slave (2) is connected to the positive pole of the power module (1-1), and the output port (2-6) of the last slave (2) is connected to the negative pole of the power module (1-1); the host (1) and each slave (2) also communicate through a communication bus (3); S2, the host (1) issues an automatic encoding start command via the communication bus (3); S3. After receiving the automatic encoding start command, all slaves (2) detect the voltage of the input port (2-5). The slaves (2) that have not completed the encoding and whose input port (2-5) voltage is valid will automatically encode to the next code in sequence, and then control the output voltage of the output port (2-6) of the local machine, and send the local encoding completion command; S4, after receiving the encoding completion command from the slave (2), the host (1) updates the encoded sequence number; the host (1) and other slaves (2) return to step S3 to continue encoding; At the same time, the slave (2) that has just completed encoding in step S3 makes a judgment based on the status of its output port (2-6): Case a: If the output port (2-6) is normally connected to the next slave (2), the encoding work of this machine is completed; Case b: If the output port (2-6) is connected to the host (1), an encoding end command is issued. After receiving the encoding end command, the host (1) ends the encoding and the encoding is successful. Case c: If the output port (2-6) is suspended, a subsequent stage suspended alarm command is issued, and the host (1) stops encoding after receiving the subsequent stage suspended alarm command, and the encoding fails; The method for judging the state of the output port (2-6) in step S4 is: if the output voltage is within a preset valid range, it is judged as situation a; If the output voltage is 0V, it is determined as case b; if the output voltage is the power supply terminal voltage, it is determined as case c.

2. The automatic encoding system according to claim 1, characterized in that: The detection module (2-3) is a voltage division detection circuit.

3. The automatic encoding system according to claim 1, characterized in that: In step S4, if the result of the judgment made by the slave (2) based on the state of its output port (2-6) is situation a, then before the encoding work of the local machine is completed, it is monitored whether the encoding completion command of the next slave (2) is issued by timeout. If it is issued by timeout, a subsequent stage no response alarm command is issued. After receiving the subsequent stage no response alarm command, the host (1) determines that a subsequent stage no response alarm fault has occurred, and records the code of the slave (2) that issued the alarm command for locating the fault, and the encoding fails.

4. The automatic encoding system according to claim 1, characterized in that: After the host (1) issues an automatic encoding start command, if it still does not receive an encoding completion command from the first slave (2) after a preset time, it is determined that a fault occurs in the connection between the host (1) and the first slave (2), and encoding fails.

Citation Information

Patent Citations

  • Method and system for slave address sequence identification in master-slave fieldbus

    CN102821017B

  • Automatic encoding method for battery thermal runaway detection system

    CN110531272A

  • Method and system for sequentially identifying slave addresses from master-slave field bus

    CN102821017A

  • Automatic coding system

    CN211826420U

  • Id provision system and id provision method

    JP2013109628A