Control method and control device for charger to automatically identify communication protocol of lithium battery

By optimizing the charger software, it can adapt to CAN communication protocols with different baud rates and automatically identify the communication protocols of lithium battery BMS, the problem of existing chargers needing to diversify software versions for multiple communication protocols is solved, automatic identification and adaptation is achieved, production process is simplified and communication efficiency is improved.

CN119561876AActive Publication Date: 2025-03-04SHENZHEN HUARUI NEW ENERGY TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411327444.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-03-04
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

Existing chargers need to diversify software versions for multiple communication protocols for lithium battery BMS of different engineering machinery equipment, resulting in complex production control and possible delivery errors.

Method used

By optimizing the charger software, it can adapt to CAN communication protocols with different baud rates and automatically identify the communication protocols of the lithium battery BMS, so that the charger software is not necessary to adapt to different communication protocols.

Benefits of technology

It realizes that the charger can automatically identify and adapt to a variety of lithium battery BMS communication protocols, simplifies the production process, reduces the diversity of software versions, and improves the efficiency and accuracy of communication establishment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561876A_ABST
    Figure CN119561876A_ABST
Patent Text Reader

Abstract

The invention provides a control method and device for a charger to automatically identify a lithium battery communication protocol, and the method comprises the steps: enabling the charger to transmit different handshake frames, and detecting a lithium battery BMS communication protocol; a communication protocol of the lithium battery BMS is obtained and locked, CAN communication is reconfigured, and communication with the lithium battery BMS is established; the charger stores the number of the locked communication protocol and the baud rate in an EEPROM (Electrically Erasable Programmable Read Only Memory) chip; when the charger is powered on again next time, the communication protocol number and the baud rate stored in the EEPROM chip are read, CAN communication is reconfigured, normal communication with the lithium battery BMS is established, and the lithium battery BMS communication protocol is not actively detected any more; if the charger is replaced to charge other lithium batteries with different communication protocols, the communication protocol of the lithium battery BMS can be actively detected again, and the number of a new communication protocol and the baud rate of the new communication protocol can be stored in the EEPROM chip. According to the invention, the charger can adapt to the lithium battery BMS of different communication protocols, and the whole process is automatically realized without manual intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of engineering machinery electrification, and in particular relates to a control method and a control device for a charger to automatically identify a lithium battery communication protocol. Background Art

[0002] At present, with the continuous development of new energy technology, electric vehicles are also being used more and more widely. For the problem of electric vehicle charging, the State Grid has formulated a standard CAN communication charging protocol. At present, the vast majority of charging pile manufacturers and lithium battery manufacturers use the State Grid's standard CAN communication charging protocol, which makes it very convenient for both charging pile manufacturers and lithium battery manufacturers to not have to consider the compatibility of charging communication protocols.

[0003] At present, in the field of construction machinery, the conversion from oil to electricity is also in full swing. At present, for forklifts, boom trucks, scissors and other equipment commonly used in the field of construction machinery, their power sources are gradually replaced by electric motors instead of internal combustion engines. The power of construction machinery equipment is usually smaller than that of electric vehicles; in addition, the voltage of lithium batteries in construction machinery equipment is usually low voltage with specifications such as 48V and 80V, instead of high voltage in the range of 200V~750V like electric vehicles. Therefore, they are usually charged directly with a charger instead of charging through a charging pile.

[0004] At present, the CAN communication protocols of lithium battery manufacturers for construction machinery equipment are also varied, and there is no standard communication protocol. The reason is that on the one hand, there is no manufacturer in the construction machinery field that has developed a communication protocol that is widely recognized like the State Grid; on the other hand, the State Grid communication protocol is too complicated for low-voltage lithium batteries, and lithium battery manufacturers for construction machinery equipment are unwilling to use it.

[0005] The current situation is very troublesome for charger manufacturers: in order to adapt to the communication protocols of different construction machinery manufacturers, chargers must prepare different software programs for different lithium battery BMSs. This will result in many software versions for chargers, causing trouble for the production control of chargers and may also cause errors during delivery. Summary of the invention

[0006] The purpose of the present invention is to optimize the charger software so that the CAN communication of the charger can adapt to different baud rates and automatically identify the communication protocol of the lithium battery BMS, so that a charger can adapt to lithium battery BMS with different communication protocols, without the need to change the charger software due to the different communication protocols of the lithium battery BMS.

[0007] The purpose of the present invention is to provide a control method and a control device for a charger to automatically identify a lithium battery communication protocol, aiming to solve the technical problems existing in the prior art.

[0008] The present invention is implemented as follows: a control method for a charger to automatically identify a lithium battery communication protocol, the control method comprising the following steps: S1. Grouping the CAN communication protocols according to different baud rates in the communication protocols; S2, select a specific handshake frame according to the CAN communication protocol grouped by different baud rates to configure the sending mailbox and the receiving mailbox respectively; S3, different sending mailboxes send handshake frames of preset baud rate to the lithium battery BMS in turn, and the DSC synchronously detects whether the receiving mailbox receives the handshake frame fed back by the lithium battery BMS. If it is found that only one group of receiving mailboxes receives the communication protocol of the lithium battery BMS, other sending mailboxes will stop sending handshake frames, and only the sending mailbox corresponding to the received handshake frame of the lithium battery BMS will send handshake frames. If the receiving mailbox continuously receives the correct handshake frames sent by the lithium battery BMS, it is judged that the charger has locked the lithium battery BMS communication protocol, and the CAN communication protocol of the DSC is reconfigured. If no mailbox receives the handshake frame sent by the lithium battery BMS, the step S3 of sending the handshake frame with the modified baud rate is executed, and the receiving mailbox is synchronously detected to see whether it receives the handshake frame sent by the lithium battery BMS. If the sending polling is set and still no feedback handshake frame sent by the lithium battery BMS is received, the next step is executed; S4: It is determined that the communication between the charger and the lithium battery BMS fails, and the charger displays a CAN communication failure warning that maintenance is required.

[0009] A further technical solution of the present invention is: the step S3 also includes S31, the charger locks the communication protocol corresponding to the lithium battery BMS, and stores the corresponding baud rate and communication protocol number in the EEPROM chip; S32, when the charger is powered on next time, first read the baud rate and communication protocol number in the EEPROM chip; S33. In the initialization procedure of DSC, the baud rate of the communication protocol in CAN is directly matched with the corresponding lithium battery BMS.

[0010] A further technical solution of the present invention is: the preset baud rate in step S3 is a handshake frame of 125 kbps, a handshake frame of 250 kbps, or a handshake frame of 500 kbps.

[0011] A further technical solution of the present invention is: in step S3, if no feedback handshake frame is received from the lithium battery BMS after three pollings, step S4 is executed.

[0012] A further technical solution of the present invention is that the communication protocol and the corresponding baud rate in step S1 are numbered and stored in an EEPROM chip for different lithium battery BMS manufacturers.

[0013] A further technical solution of the present invention is: when the charger replaces a lithium battery BMS with a different communication protocol, the baud rate and communication protocol stored in the EEPROM chip do not match the actual lithium battery BMS, the CAN communication protocol configured by the DSC initialization program cannot communicate with the lithium battery BMS, and the charger searches for the baud rate and communication protocol again. If the charger searches for a new communication protocol, the corresponding number and baud rate are stored in the EEPROM chip again.

[0014] A further technical solution of the present invention is: 32 mailboxes are configured in the CAN communication protocol in the DSC for communication, the 32 mailboxes are configured as sending mailboxes or receiving mailboxes, the mailbox frame header contains an ID, the receiving mailbox only receives the correct data frame of the handshake frame, and discards the wrong data frame.

[0015] Another object of the present invention is to provide a control device for a charger to automatically identify a lithium battery communication protocol, the control device comprising a storage module, a DSC module, a drive module and a lithium battery BMS, the storage module is communicatively connected to the DSC module, the DSC module is communicatively connected to the drive module, and the drive module is communicatively connected to the lithium battery BMS.

[0016] A further technical solution of the present invention is: the storage module adopts an EEPROM chip, and the EEPROM chip is used to store the number and baud rate of the lithium battery BMS communication protocol.

[0017] A further technical solution of the present invention is: a CAN communication protocol is provided in the DSC module, and the baud rate used by the CAN communication protocol is 125 kbps, 250 kbps or 500 kbps.

[0018] The present invention is implemented in this way. The implementation scheme of a control method for a charger to automatically identify a lithium battery communication protocol is as follows: S1. Group the CAN communication protocols according to the different baud rates of the communication protocols of different manufacturers; S2. For the selected CAN communication protocol with the same baud rate, for each different CAN communication protocol, select a specific ID frame (usually a handshake frame) in the communication protocol and configure them as a sending mailbox and a receiving mailbox respectively; S3, different sending mailboxes send different handshake frames with a baud rate of 125kbps to the lithium battery BMS in turn, and the DSC synchronously detects whether the receiving mailbox has received the handshake frame sent by the lithium battery BMS; S4. If it is found that only one group of receiving mailboxes has received the handshake frame sent by the BMS, and the content of the handshake frame is correct, the communication protocol of the lithium battery BMS is preliminarily identified. At this moment, other sending mailboxes will stop sending handshake frames, and only the sending mailbox corresponding to the receiving handshake frame sent by the BMS will send handshake frames; S5. If the correct handshake frames sent by the BMS are continuously received, it is determined that the charger has locked the communication protocol of the lithium battery BMS. At this time, the CAN part of the DSC software is reconfigured; S6. If no mailbox receives the correct handshake frame sent by the BMS in step S4, the DSC re-sends the handshake frame sent in step 3, and synchronously detects whether the receiving mailbox receives the handshake frame sent by the lithium battery BMS; if the handshake frame sent by the lithium battery BMS is still not received after three sending polls, it is determined that the baud rate of the lithium battery BMS is not 125kbps; S7, the sending mailbox sends handshake frames with a baud rate of 250kbps to the lithium battery BMS in turn, and the DSC synchronously detects whether the receiving mailbox has received the handshake frame sent by the lithium battery BMS; then repeat the operations of steps S4 to S6; if the correct handshake frame sent by the lithium battery BMS is not received, it means that the baud rate of the lithium battery BMS is not 250kbps; S8. The sending mailbox sends handshake frames with a baud rate of 500kbps to the lithium battery BMS in turn. At the same time, the DSC synchronously detects whether the receiving mailbox has received the handshake frames sent by the lithium battery BMS; then repeat the operations of steps S4 to S6; if the correct handshake frames sent by the lithium battery BMS are still not received, it means that the communication between the charger and the lithium battery BMS fails. At this time, the charger will display a CAN communication failure alarm and requires after-sales personnel to repair.

[0019] A further technical solution of the present invention is: after the charger locks the communication protocol corresponding to the lithium battery BMS, the corresponding baud rate and communication protocol number are stored in the EEPROM chip; when the charger is powered on next time, the baud rate and communication protocol number in the EEPROM are first read; then the communication protocol and baud rate of the CAN communication are directly matched with the corresponding lithium battery BMS in the initialization program of the DSC; in this way, the charger does not need to re-pollating the handshake frames of different baud rates and communication protocols of different manufacturers, which can save the time of establishing communication.

[0020] A further technical solution of the present invention is: when the charger is replaced to charge a lithium battery with a different communication protocol, the baud rate number and the communication protocol number stored in the EEPROM chip do not correspond to the actual lithium battery BMS, and the CAN communication protocol configured in the DSC initialization program described in the previous section cannot communicate with the lithium battery BMS; then, the charger will restart the baud rate and communication protocol search function; if the charger searches for a new communication protocol, the number and baud rate corresponding to the new communication protocol will be re-stored in the EEPROM chip.

[0021] The beneficial effects of the present invention are as follows: the software of the charger can adapt to lithium batteries of various communication protocols, and there is no need to replace the software of the charger for lithium batteries of different communication protocols; the process of the charger software adapting to lithium batteries of various communication protocols is automatically realized, and no manual intervention is required for configuration; after the charger completes the lithium battery communication protocol matching work, the number and corresponding baud rate of the lithium battery communication protocol will be stored in the EEPROM chip; when the charger is powered on next time, the communication protocol number and corresponding baud rate stored in the EEPROM chip will be read first, and the CAN communication software of the corresponding communication protocol will be directly called according to the number to communicate with the lithium battery BMS, without the need to re-match the communication protocol; when the charger communicates with the lithium battery BMS of the new communication protocol, the new communication protocol number and corresponding baud rate will be searched and re-stored in the EEPROM. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a software control flow chart provided by an embodiment of the present invention.

[0023] Figure 2 It is a software control flow chart for detecting the BMS communication protocol provided by an embodiment of the present invention.

[0024] Figure 3 A control device for automatically identifying a BMS communication protocol for a charger provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0026] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0027] Explanation of terms 1) A digital signal controller (DSC) is a hybrid microcontroller and digital signal processor (DSP) to implement a dedicated controller. Like a microcontroller, a digital signal controller has a fast interrupt response and also provides control-oriented peripherals such as PWM, watchdog, and timer. The application range of digital signal controllers is wide, but the most widely used areas include motor control, power conversion, and sensor processing applications.

[0028] 2) CAN is the abbreviation of Controller Area Network, which is an ISO internationally standardized serial communication protocol. The CAN communication protocol was first developed by Bosch in Germany for automotive networks. At present, the high performance and reliability of CAN have been recognized and it is widely used in industrial automation, ships, medical equipment, industrial equipment, etc. The communication protocol of the charger usually uses the CAN communication protocol, and DSC usually contains CAN peripherals.

[0029] 3) CAN mailboxes include receiving mailboxes and sending mailboxes. CAN mailboxes are RAMs that store messages. The sending mailbox is used to send CAN bus data. Different sending mailboxes have different priorities. The higher the priority, the data in it will be sent first. The receiving mailbox is used to receive CAN bus data. There will be a filter in front of the receiving mailbox at the receiving end. The filter is used to select identifiers. Only messages with matching identifiers will be placed in the receiving mailbox. The DSC CAN module contains 32 mailboxes, which can be configured as sending mailboxes or receiving mailboxes.

[0030] 4) The ID of the CAN bus refers to the identifier, which is the address or name of a CAN node, and is used to identify the information of a certain node in the network. In CAN communication, the sender sends the message to all receivers in the form of broadcast. When the node receives the message, it determines whether the software needs the message based on the value of the identifier; if it does, it copies it to the RAM; if it does not, the message is discarded without software intervention.

[0031] 5) Baud rate refers to the modulation rate of the data signal on the carrier, which is expressed by the number of times the carrier modulation state changes per unit time; in the information transmission channel, the signal unit carrying data information is called a symbol, and the number of symbols transmitted through the channel per second is called the symbol transmission rate, or baud rate for short. Common baud rates for CAN communication include 125kbps, 250kbps, and 500kbps.

[0032] 6) BMS is the abbreviation of Battery Management System. The main function of the battery management system (BMS) is to intelligently manage and maintain each battery unit, prevent overcharging and overdischarging of the battery, extend the battery life, and monitor the battery status. BMS controls the entire process of the charger charging the lithium battery. The output voltage and output current of the charger are controlled by BMS.

[0033] like Figure 1 As shown, the control method and control device for automatically identifying the lithium battery communication protocol of the charger provided by the present invention have the advantages of no need for manual intervention, high degree of automation and short communication establishment time.

[0034] like Figure 1 As shown, the charger provided by the present invention has a control method and a control device for automatically identifying the lithium battery BMS communication protocol, which are described in detail as follows: Step S1, when the main control DSC of the charger is powered on and initialized, it will read the number of the lithium battery BMS communication protocol and the baud rate corresponding to the communication protocol stored in the EEPROM chip; the number of the lithium battery BMS communication protocol is a number corresponding to the communication protocol formulated by the charger for different lithium battery BMS manufacturers before leaving the factory, and each communication protocol is represented by a number.

[0035] Step S2, when the DSC reads the correct lithium battery BMS communication protocol number and the corresponding baud rate from the EEPROM chip, it will initialize the CAN communication part of the DSC program according to the communication protocol corresponding to this number, and prepare to establish communication with the lithium battery BMS. Step S3, when the DSC fails to read the correct number and corresponding baud rate of the lithium battery BMS communication protocol from the EEPROM chip, the CAN communication part of the DSC will be configured into a baud rate scanning mode to scan and obtain the correct lithium battery BMS communication protocol.

[0036] Step S4, after step S2, when the charger communicates normally with the BMS of the lithium battery, the charger can charge the lithium battery according to the instruction of the BMS.

[0037] Step S4, after step S2, when the communication between the charger and the BMS of the lithium battery is abnormal, it means that the lithium battery to be charged may have been replaced. At this time, as in step S3, the CAN communication part of the DSC is configured into a communication protocol scanning mode to scan and obtain the correct lithium battery BMS communication protocol.

[0038] Step S5, after step S3, the correct lithium battery BMS communication protocol has been obtained through scanning, then the CAN communication part program of the DSC will be initialized and configured as shown in step 2, and prepare to establish communication with the lithium battery BMS; at the same time, the correct lithium battery BMS communication protocol and the corresponding baud rate will be written into the EEPROM chip.

[0039] Step S6: After step S3, if the correct lithium battery BMS communication protocol cannot be obtained through scanning, the charger will report a CAN communication failure. At this time, manual intervention is required to find the cause of the failure to communicate.

[0040] In this embodiment, the lithium battery BMS communication protocol used in the field of engineering machinery, the communication protocols of different manufacturers are concentrated in the three categories of 125kbps, 250kbps and 500kbps, and there are currently no communication protocols with other baud rates; among them, the lithium battery BMS communication protocol with a baud rate of 125kbps is the most, the lithium battery BMS communication protocol with a baud rate of 250kbps is the second, and the lithium battery BMS communication protocol with a baud rate of 500kbps is the least. Therefore, the charger first scans the lithium battery BMS communication protocol with a baud rate of 125kbps, then scans the lithium battery BMS communication protocol with a baud rate of 250kbps, and finally scans the lithium battery BMS communication protocol with a baud rate of 500kbps.

[0041] In commonly used DSCs, the CAN communication module generally has 32 mailboxes for communication, and these 32 mailboxes can be configured as sending mailboxes or receiving mailboxes. The frame header of the mailbox contains an ID. Generally speaking, the receiving mailbox only receives data frames with correct IDs. For data frames with incorrect IDs, the general method is to discard them. When performing a communication protocol scan, first configure the CAN communication mailbox of the DSC. For the selected CAN communication protocol with the same baud rate, for each different CAN communication protocol, select a specific ID frame data frame in the communication protocol as a handshake frame. Generally speaking, the data frame selected as a handshake frame in the communication protocol is generally a data frame that will be sent during the entire charging process, such as a heartbeat frame.

[0042] like Figure 2 As shown, the CAN communication protocol scanning steps are as follows: Step S1, configure the CAN communication baud rate of the DSC to 125kbps, and then configure the BMS communication protocol to be matched as the sending mailboxes T1, T2...Tn and the receiving mailboxes R1, R2...Rn according to the ID of the handshake frame (assuming that there are n communication protocols with a baud rate of 125kbps in the BMS communication protocol to be matched); Step S2, the sending mailboxes T1, T2...Tn of the DSC send corresponding handshake frames (baud rate is 125kbps) to the lithium battery BMS in turn, and at the same time, the receiving mailboxes R1~Rn of the DSC synchronously detect whether the handshake frames sent by the lithium battery BMS are received; Step S3: In step S2, if it is detected that only the receiving mailbox numbered Rm receives the handshake frame sent by the BMS, and based on the comparison of the handshake frame data, it is judged that the content of the handshake frame is completely correct, then it is preliminarily judged that the communication protocol numbered m is the communication protocol of the lithium battery BMS. At this moment, other mailboxes will stop sending handshake frames, and only the sending mailbox Tm will send handshake frames; Step S4, if there is still only the receiving mailbox numbered Rm in the receiving mailbox of the DSC that receives the correct handshake frame sent by the BMS, it is determined that the communication protocol numbered m is the communication protocol of the lithium battery BMS. At this time, the charger will lock the lithium battery BMS communication protocol numbered m, with a baud rate of 125kbps, and reconfigure the CAN part software of the DSC: the CAN communication part software of the DSC will include all the contents of the communication protocol numbered m, instead of only the handshake frame, and will delete the communication protocols with other numbers; Step S5, if no mailbox receives the handshake frame sent by the BMS in step S3, the DSC re-sends the handshake frame sent by step S2, and synchronously detects whether the receiving mailbox receives the handshake frame sent by the lithium battery BMS. If the handshake frame sent by the lithium battery BMS is still not received, it means that the baud rate of the lithium battery BMS is not 125kbps; Step S6, if multiple mailboxes receive the handshake frame sent by the BMS in step S3, but only the handshake frame received by the Rm mailbox is correct, then repeat step S4; if all the handshake frames received from the BMS are incorrect according to their data content, repeat step S2; if the correct handshake frame sent by the lithium battery BMS is still not received after repeating the polling and sending times of S2 for 3 times, it means that the baud rate of the lithium battery BMS is not 125kbps; Step S7, sending mailboxes T0, T1...Tn send handshake frames with a baud rate of 250kbps to the lithium battery BMS in turn, and the DSC synchronously detects whether the receiving mailbox has received the handshake frame sent by the lithium battery BMS; then repeat the operations of steps S3~S6; if the correct handshake frame sent by the lithium battery BMS is not received, it means that the baud rate of the lithium battery BMS is not 250kbps; Step S8, sending mailboxes T0, T1...Tn send handshake frames with a baud rate of 500kbps to the lithium battery BMS in turn, and the DSC synchronously detects whether the receiving mailbox has received the handshake frame sent by the lithium battery BMS; then repeat the operations of steps S3~S6; if the correct handshake frame sent by the lithium battery BMS is still not received, it means that the communication between the charger and the lithium battery BMS fails. At this time, the charger will display a CAN communication failure alarm and requires after-sales personnel to repair.

[0043] The handshake frame contents corresponding to the above-mentioned 125kbps, 250kbps and 500kbps baud rates are different. Different lithium battery BMS communication protocols only need to configure handshake frames under their corresponding baud rate conditions. In addition, considering that the communication protocols of each lithium battery BMS manufacturer are different, the sending and receiving mailboxes of the handshake frame may occupy more than one each, which depends on the actual situation.

[0044] The present invention also discloses a control device for automatically identifying the communication protocol of a lithium battery. Figure 3 As shown. Figure 3As shown, the control device includes a DSC chip and an EEPROM chip; the DSC chip is the main control chip of the control device, which contains a CAN communication module inside, which can communicate with the BMS of the lithium battery, and the control algorithm software for the charger to automatically identify the lithium battery communication protocol is implemented in the DSC chip; the EEPROM chip is used to store the number and baud rate of the lithium battery BMS communication protocol.

[0045] In fact, this control method and control device for automatically identifying the communication protocol of lithium batteries are not only applicable to chargers used in engineering machinery, but also to other types of chargers. In addition, the CAN communication protocols included in the present invention are not limited to 125kbps, 250kbps and 500kbps, but the CAN communication protocols used in engineering machinery in the embodiments usually use these three baud rates. In addition, the software control implementation in the present invention adopts DSC control, but it can also be controlled by microprocessors such as MCU and ARM; the number and baud rate of the lithium battery BMS communication protocol can be stored in an EEPROM chip or other storage chips.

[0046] The charger software can adapt to lithium batteries with multiple communication protocols, and there is no need to replace the charger software for lithium batteries with different communication protocols; the process of the charger software adapting to lithium batteries with multiple communication protocols is automatically implemented, and no manual intervention is required for configuration; after the charger completes the lithium battery communication protocol matching work, it will store the lithium battery communication protocol number and the corresponding baud rate in the EEPROM chip; when the charger is powered on next time, it will first read the communication protocol number and the corresponding baud rate stored in the EEPROM chip, and will directly call the CAN communication software of the corresponding communication protocol and communicate with the lithium battery BMS according to this number, without the need to re-match the communication protocol; when the charger communicates with the lithium battery BMS of the new communication protocol, it will search for the new communication protocol number and the corresponding baud rate, and store them again in the EEPROM.

[0047] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A control method for a charger to automatically identify a lithium battery communication protocol, characterized in that: The control method comprises the following steps: S1. Grouping the CAN communication protocols according to different baud rates in the communication protocols; S2, select a specific handshake frame according to the CAN communication protocol grouped by different baud rates to configure the sending mailbox and the receiving mailbox respectively; S3, different sending mailboxes send handshake frames of preset baud rate to the lithium battery BMS in turn, and the DSC synchronously detects whether the receiving mailbox receives the handshake frame fed back by the lithium battery BMS. If it is found that only one group of receiving mailboxes receives the communication protocol of the lithium battery BMS, other sending mailboxes will stop sending handshake frames, and only the sending mailbox corresponding to the received handshake frame of the lithium battery BMS will send handshake frames. If the receiving mailbox continuously receives the correct handshake frames sent by the lithium battery BMS, it is judged that the charger has locked the lithium battery BMS communication protocol, and the CAN communication protocol of the DSC is reconfigured. If no mailbox receives the handshake frame sent by the lithium battery BMS, the step S3 of sending the handshake frame with the modified baud rate is executed, and the receiving mailbox is synchronously detected to see whether it receives the handshake frame sent by the lithium battery BMS. If the sending polling is set and still no feedback handshake frame sent by the lithium battery BMS is received, the next step is executed; S4: It is determined that the communication between the charger and the lithium battery BMS fails, and the charger displays a CAN communication failure warning that maintenance is required.

2. The control method for automatically identifying the lithium battery communication protocol of a charger according to claim 1, characterized in that: The step S3 also includes: S31, the charger locks the communication protocol corresponding to the lithium battery BMS, and stores the corresponding baud rate and communication protocol number in the EEPROM chip; S32, when the charger is powered on next time, first read the baud rate and communication protocol number in the EEPROM chip; S33. In the initialization procedure of DSC, the baud rate of the communication protocol in CAN is directly matched with the corresponding lithium battery BMS.

3. The control method for automatically identifying the lithium battery communication protocol of a charger according to claim 2, characterized in that: The preset baud rate in step S3 is a handshake frame of 125 kbps, a handshake frame of 250 kbps, or a handshake frame of 500 kbps.

4. The control method for automatically identifying the lithium battery communication protocol of a charger according to claim 2, characterized in that: In the step S3, if the feedback handshake frame sent by the lithium battery BMS is still not received after three pollings, step S4 is executed.

5. The control method for automatically identifying the lithium battery communication protocol of a charger according to claim 4, characterized in that: The communication protocol and the corresponding baud rate in step S1 are numbered and stored in the EEPROM chip according to different lithium battery BMS manufacturers.

6. The control method for automatically identifying the lithium battery communication protocol of a charger according to claim 5, characterized in that: When the charger replaces a lithium battery BMS with a different communication protocol, the baud rate and communication protocol stored in the EEPROM chip do not match the actual lithium battery BMS, and the CAN communication protocol configured by the DSC initialization program cannot communicate with the lithium battery BMS. The charger searches for the baud rate and communication protocol again. If the charger searches for a new communication protocol, the corresponding number and baud rate are stored in the EEPROM chip again.

7. The control method for automatically identifying the lithium battery communication protocol of a charger according to claim 6, characterized in that: In the CAN communication protocol of DSC, 32 mailboxes are configured for communication. The 32 mailboxes are configured as sending mailboxes or receiving mailboxes. The mailbox frame header contains an ID. The receiving mailbox only receives data frames with correct handshake frames and discards incorrect data frames.

8. A control device for automatically identifying a lithium battery communication protocol for a charger, characterized in that: The control device includes a storage module, a DSC module, a drive module and a lithium battery BMS. The storage module is communicatively connected to the DSC module, the DSC module is communicatively connected to the drive module, and the drive module is communicatively connected to the lithium battery BMS.

9. The control device for automatically identifying the lithium battery communication protocol of a charger according to claim 8, characterized in that: The storage module adopts an EEPROM chip, and the EEPROM chip is used to store the number and baud rate of the lithium battery BMS communication protocol.

10. The control device for automatically identifying the lithium battery communication protocol of a charger according to claim 9, characterized in that: The DSC module is provided with a CAN communication protocol, and the baud rate used by the CAN communication protocol is 125 kbps, 250 kbps or 500 kbps.

Citation Information

Patent Citations

  • Electric car BMS communication protocol version identification method and device

    CN106740168A

  • Device for detecting communication protocol of charger

    CN108494808A

  • Method and system for self-adaption of multiple communication protocols of energy storage system

    CN111385300A

  • Electric meter communication protocol automatic identification method, device and system and readable storage medium

    CN112468368A

  • CANoe-based test method for simulating communication between charger and BMS to realize charging process control

    CN115002004A