A control method and control device for automatic identification of lithium battery communication protocol by a charger
By automatically identifying the CAN communication protocol of the lithium battery BMS, the problem of diverse communication protocols among lithium battery manufacturers of engineering machinery equipment is solved, enabling the charger software to adapt and achieve efficient communication protocol matching.
Patent Information
- Application Number
- CN202411327444.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-09-23
AI Technical Summary
The lack of a unified CAN communication protocol among lithium battery manufacturers of construction machinery equipment leads to the need for chargers to be compatible with different software versions from different manufacturers, increasing the difficulty of production control and the risk of errors.
The charger automatically identifies the communication protocol of the lithium battery BMS, uses the CAN communication protocol to group, configure mailboxes and handshake frames, and combines EEPROM to store baud rate and protocol number to achieve adaptive communication with different lithium battery BMS.
The charger software can automatically adapt to various lithium battery communication protocols without manual intervention, shortening communication setup time and reducing the complexity of software version management.
Smart Images

Figure CN119561876B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of engineering machinery electrification technology, and in particular relates to a control method and control device for automatic identification of lithium battery communication protocol by a charger. Background Technology
[0002] Currently, with the continuous development of new energy technologies, electric vehicles are being used more and more widely. Regarding the charging issue of electric vehicles, the State Grid Corporation of China has formulated a standard CAN communication charging protocol. Currently, the vast majority of charging pile manufacturers and lithium battery manufacturers use the State Grid's standard CAN communication charging protocol, which eliminates the need for either manufacturers to consider charging communication protocol compatibility issues, making it extremely convenient.
[0003] Currently, the conversion from gasoline to electric power is gaining momentum in the construction machinery industry. For commonly used equipment in this sector, such as forklifts, boom lifts, and scissor lifts, electric motors are gradually replacing internal combustion engines as their power source. Construction machinery typically has lower power output compared to electric vehicles; furthermore, the lithium batteries used in construction machinery usually have lower voltage specifications such as 48V or 80V, rather than the higher voltage range of 200V to 750V used in electric vehicles. Therefore, they are usually charged directly using a charger rather than through a charging station.
[0004] Currently, the CAN communication protocols used by lithium battery manufacturers for construction machinery equipment vary widely, and there is no standard communication protocol. This is partly because no manufacturer in the construction machinery industry has developed a widely accepted communication protocol like the one used by the State Grid Corporation of China; and partly because the State Grid's communication protocol is too complex for low-voltage lithium batteries, making it undesirable for lithium battery manufacturers in construction machinery equipment to use it.
[0005] This situation is currently a very troublesome issue 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 BMS. This results in many software versions for chargers, causing trouble for charger production control and potentially leading to errors during shipment. Summary of the Invention
[0006] The purpose of this invention is to optimize the charger software so that the charger's CAN communication can adapt to different baud rates and automatically identify the communication protocol of the lithium battery BMS. This allows a single charger to adapt to lithium battery BMSs with different communication protocols without requiring changes to the charger's software due to differences in the communication protocols of the lithium battery BMS.
[0007] The purpose of this invention is to provide a control method and control device for an automatic identification of lithium battery communication protocols by a charger, aiming to solve the technical problems existing in the prior art.
[0008] This invention is implemented as follows: a control method for a charger to automatically identify the communication protocol of a lithium battery, the control method comprising the following steps:
[0009] S1. Group the CAN communication protocol according to different baud rates in the communication protocol;
[0010] S2. Select specific handshake frames according to the CAN communication protocol grouped according to different baud rates and configure the sending mailbox and receiving mailbox respectively;
[0011] S3. Different sending mailboxes sequentially send handshake frames at a preset baud rate to the lithium battery BMS, 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 set of receiving mailboxes has received the communication protocol of the lithium battery BMS, the other sending mailboxes will stop sending handshake frames, and only the sending mailbox corresponding to the receiving lithium battery BMS handshake frame will send the handshake frame. If the receiving mailbox continuously receives the correct handshake frame sent by the lithium battery BMS, it is determined that the charger has locked the lithium battery BMS communication protocol, and the CAN communication protocol of the DSC is reconfigured. If no mailbox has received the handshake frame sent by the lithium battery BMS, the handshake frame after the baud rate is sent in step S3 is executed, and the receiving mailbox is synchronously detected as to whether it has received the handshake frame sent by the lithium battery BMS. If the polling is set and no feedback handshake frame is received from the lithium battery BMS, the next step is executed.
[0012] S4. If a communication failure occurs between the charger and the lithium battery BMS, the charger will display a CAN communication failure warning and require maintenance.
[0013] A further technical solution of the present invention is: step S3 further includes...
[0014] S31. The charger locks the communication protocol of the corresponding lithium battery BMS and stores the corresponding baud rate and communication protocol number in the EEPROM chip.
[0015] S32. When the charger is powered on again, first read the baud rate and communication protocol number from the EEPROM chip;
[0016] The initialization program of S33 and DSC directly matches the baud rate of the CAN communication protocol with the corresponding lithium battery BMS.
[0017] A further technical solution of the present invention is: the preset baud rate in step S3 is a handshake frame of 125kbps, 250kbps, or 500kbps.
[0018] A further technical solution of the present invention is: if no feedback handshake frame is received from the lithium battery BMS after three rounds of polling in step S3, then step S4 is executed.
[0019] A further technical solution of the present invention is that the communication protocol and corresponding baud rate in step S1 are numbered and stored in the EEPROM chip for different lithium battery BMS manufacturers.
[0020] A further technical solution of the present invention is as follows: When the charger replaces the 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 in the DSC initialization program cannot communicate with the lithium battery BMS. The charger re-searches for the baud rate and communication protocol. If the charger finds a new communication protocol, it re-stores the corresponding number and baud rate in the EEPROM chip.
[0021] A further technical solution of the present invention is: 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.
[0022] Another objective of this invention is to provide a control device for an automatic charger to identify the communication protocol of a lithium battery. 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.
[0023] A further technical solution of the present invention is: the storage module adopts an EEPROM chip, which is used to store the number and baud rate of the lithium battery BMS communication protocol.
[0024] A further technical solution of the present invention is: the DSC module is equipped with a CAN communication protocol, and the baud rate used by the CAN communication protocol is 125kbps, 250kbps, or 500kbps.
[0025] The present invention is implemented as follows: A control method for automatically identifying the communication protocol of a lithium battery in a charger is implemented as follows:
[0026] S1. Group the CAN communication protocol according to the different baud rates of different manufacturers' communication protocols;
[0027] S2. For CAN communication protocols 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 it as the sending mailbox and receiving mailbox respectively.
[0028] S3. Different sending mailboxes sequentially send different handshake frames with a baud rate of 125kbps to the lithium battery BMS, while the DSC synchronously detects whether the receiving mailbox has received the handshake frame sent by the lithium battery BMS.
[0029] S4. If it is found that only one set of receiving mailboxes has received the handshake frame sent by BMS and the content of the handshake frame is correct, the communication protocol of lithium battery BMS is initially identified. At this time, other sending mailboxes will stop sending handshake frames, and only the sending mailbox corresponding to the receiving BMS handshake frame will send the handshake frame.
[0030] S5. If the correct handshake frames sent by the BMS are received continuously, it is determined that the charger has locked the communication protocol of the lithium battery BMS. At this time, the CAN part software of the DSC is reconfigured.
[0031] S6. If no mailbox receives the correct handshake frame from the BMS during step S4, the DSC resends the handshake frame in step 3 and simultaneously detects whether the receiving mailbox receives the handshake frame from the lithium battery BMS. If no handshake frame is received from the lithium battery BMS after three rounds of sending polls, it is determined that the baud rate of the lithium battery BMS is not 125kbps.
[0032] S7. The sending mailbox sends handshake frames with a baud rate of 250kbps to the lithium battery BMS in sequence. At the same time, the DSC synchronously detects whether the receiving mailbox receives the handshake frames sent by the lithium battery BMS. Then repeat the operation of steps S4 to S6. If the correct handshake frames sent by the lithium battery BMS are not received, it means that the baud rate of the lithium battery BMS is not 250kbps.
[0033] S8. The sending mailbox sequentially sends handshake frames with a baud rate of 500kbps to the lithium battery BMS. At the same time, the DSC synchronously detects whether the receiving mailbox receives the handshake frames sent by the lithium battery BMS. Then, repeat steps S4 to S6. If the correct handshake frames are still not received from the lithium battery BMS, it indicates that the communication between the charger and the lithium battery BMS has failed. At this time, the charger will display a CAN communication fault alarm, and after-sales personnel need to perform maintenance.
[0034] A further technical solution of the present invention is as follows: after the charger locks the communication protocol of the corresponding lithium battery BMS, it stores the corresponding baud rate and communication protocol number in the EEPROM chip; when the charger is powered on again, it first reads the baud rate and communication protocol number in the EEPROM; then, in the DSC initialization program, it directly matches the CAN communication protocol and baud rate with the corresponding lithium battery BMS; in this way, the charger does not need to poll the handshake frames of different baud rates and different manufacturers' communication protocols again, which can save communication establishment time.
[0035] A further technical solution of the present invention is as follows: When the charger is switched to charge a lithium battery with a different communication protocol, the baud rate number and communication protocol number stored in the EEPROM chip do not correspond to the actual lithium battery BMS. 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 finds a new communication protocol, it will re-store the number and baud rate corresponding to the new communication protocol in the EEPROM chip.
[0036] The beneficial effects of this invention are: the charger software can adapt to lithium batteries with multiple communication protocols, eliminating the need to change the charger software for different communication protocol lithium batteries; the process of the charger software adapting to lithium batteries with multiple communication protocols is automatic, requiring no manual intervention for configuration; after the charger completes the lithium battery communication protocol matching, it stores the lithium battery communication protocol number and corresponding baud rate in the EEPROM chip; when the charger is powered on again, it will first read the communication protocol number and corresponding baud rate stored in the EEPROM chip, and will directly call the CAN communication software of the corresponding communication protocol to communicate with the lithium battery BMS according to this number, without needing to re-perform the communication protocol matching; when the charger communicates with the lithium battery BMS of a new communication protocol, it will search for the new communication protocol number and corresponding baud rate, and store them again in the EEPROM. Attached Figure Description
[0037] Figure 1 This is a software control flowchart provided in an embodiment of the present invention.
[0038] Figure 2 This is a software control flowchart for detecting the BMS communication protocol provided in an embodiment of the present invention.
[0039] Figure 3 This is a control device for automatically identifying the BMS communication protocol of the charger provided in this embodiment of the invention. Detailed Implementation
[0040] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0041] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0042] Terminology Explanation
[0043] 1) A Digital Signal Controller (DSC) is a hybrid microcontroller and digital signal processor (DSP) used to implement a dedicated controller. Like microcontrollers, DSCs feature fast interrupt response and provide control-oriented peripherals such as PWM, watchdog timers, and timers. DSCs have a wide range of applications, but the most common areas of use include motor control, power conversion, and sensor processing applications.
[0044] 2) CAN is an abbreviation for Controller Area Network, an ISO internationally standardized serial communication protocol. Originally developed by Bosch in Germany for automotive networks, CAN's high performance and reliability are now widely recognized and applied in industrial automation, marine, medical equipment, and other industrial applications. Chargers typically use the CAN communication protocol, and DSCs often include CAN peripherals.
[0045] 3) The CAN Mailbox includes a receive mailbox and a transmit mailbox. The CAN Mailbox is essentially RAM that stores messages. The transmit mailbox is used for sending data via the CAN bus. Different transmit mailboxes have different priorities; higher priority means the data within it will be sent first. The receive mailbox is used for receiving data via the CAN bus. At the receiving end, there is a filter preceding the receive mailbox. The filter is used to select identifiers; only messages with matching identifiers are placed in the receive mailbox. The DSC's CAN module contains 32 mailboxes, which can be configured as either transmit or receive mailboxes.
[0046] 4) The CAN bus ID refers to an identifier, which is the address or name of a CAN node, used to identify a node in the network. In CAN communication, the sender broadcasts messages to all receivers. When a node receives a message, it determines whether the software needs the message based on the identifier value; if needed, it copies it into RAM; if not needed, the message is discarded without software intervention.
[0047] 5) Baud rate refers to the modulation rate of a data signal on a carrier wave. It is expressed as the number of times the carrier modulation state changes per unit time. In an 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.
[0048] 6) BMS is short for Battery Management System. The main purpose of a Battery Management System (BMS) is to intelligently manage and maintain each battery cell, prevent overcharging and over-discharging, extend battery life, and monitor battery status. The BMS controls the entire charging process of the lithium battery; the charger's output voltage and current are both controlled by the BMS.
[0049] like Figure 1 As shown, the present invention provides a control method and control device for automatic identification of lithium battery communication protocol in a charger. The control device and control method have the advantages of no need for manual intervention, high degree of automation and short communication establishment time.
[0050] like Figure 1 As shown, the charger provided by the present invention has a control method and control device for automatically identifying the lithium battery BMS communication protocol, which are described in detail below:
[0051] In step S1, when the charger's main control DSC is initialized upon power-on, it reads the lithium battery BMS communication protocol number and the baud rate corresponding to the communication protocol stored in the EEPROM chip. The lithium battery BMS communication protocol number is a number assigned by the charger before leaving the factory for different lithium battery BMS manufacturers. Each communication protocol is represented by a number.
[0052] Step S2: After the DSC reads the correct lithium battery BMS communication protocol number and corresponding baud rate from the EEPROM chip, it will initialize and configure the CAN communication part of the DSC according to the communication protocol corresponding to this number, and prepare to establish communication with the lithium battery BMS.
[0053] Step S3: When the DSC does not read the correct lithium battery BMS communication protocol number and corresponding baud rate from the EEPROM chip, it will configure the CAN communication part of the DSC into baud rate scanning mode to scan and obtain the correct lithium battery BMS communication protocol.
[0054] After steps S4 and S2, once the charger and the lithium battery's BMS are communicating normally, the charger can charge the lithium battery according to the BMS's instructions.
[0055] After steps S2 and S4, if the communication between the charger and the lithium battery's BMS is abnormal, it indicates that the lithium battery to be charged may have been replaced. In this case, similar to step S3, the CAN communication part of the DSC is configured to communication protocol scanning mode to scan and obtain the correct lithium battery BMS communication protocol.
[0056] After steps S5 and S3, the correct lithium battery BMS communication protocol has been obtained by scanning. Then, as shown in step 2, the CAN communication part of the DSC program will be initialized and configured to prepare for communication with the lithium battery BMS. At the same time, the obtained correct lithium battery BMS communication protocol and corresponding baud rate will be written into the EEPROM chip.
[0057] After steps S3 and S6, if the correct lithium battery BMS communication protocol cannot be obtained through scanning, the charger will report a CAN communication failure. In this case, manual intervention is required to find the cause of the communication failure.
[0058] In this embodiment, the communication protocols for lithium battery BMS used in the field of engineering machinery are concentrated in three categories: 125kbps, 250kbps, and 500kbps. Currently, there are no other baud rate communication protocols. Among them, the 125kbps baud rate lithium battery BMS communication protocol is the most common, followed by the 250kbps protocol, and the 500kbps protocol is the least common. Therefore, the charger first scans the 125kbps lithium battery BMS communication protocol, then the 250kbps protocol, and finally the 500kbps protocol.
[0059] In commonly used DSCs, the CAN communication module typically has 32 mailboxes for communication. These 32 mailboxes can be configured as either sending or receiving mailboxes. The mailbox frame header contains an ID. Generally, the receiving mailbox only accepts data frames with correct IDs; data frames with incorrect IDs are typically discarded. During communication protocol scanning, the DSC's CAN communication mailboxes are first configured. For CAN communication protocols with the same baud rate, for each different CAN communication protocol, a specific ID frame data frame is selected as the handshake frame. Generally, the data frames selected as handshake frames in the communication protocol are those that are sent throughout the entire charging process, such as heartbeat frames.
[0060] like Figure 2 As shown, the CAN communication protocol scanning steps are as follows:
[0061] Step S1: Configure the CAN communication baud rate of the DSC to 125kbps. Then, configure the sending mailboxes T1, T2...Tn and receiving mailboxes R1, R2...Rn of the BMS communication protocols to be matched according to the ID of the handshake frame (assuming there are n communication protocols with a baud rate of 125kbps among the BMS communication protocols to be matched).
[0062] In step S2, the DSC's sending mailboxes T1, T2...Tn sequentially send the corresponding handshake frames (baud rate 125kbps) to the lithium battery BMS. At the same time, the DSC's receiving mailboxes R1~Rn synchronously detect whether they have received the handshake frames sent by the lithium battery BMS.
[0063] In step S3, if it is detected that only the receiving mailbox with the number Rm receives the handshake frame sent by the BMS, and the content of the handshake frame is completely correct based on the comparison of the handshake frame data, then it is initially determined that the communication protocol with the number m is the communication protocol of the lithium battery BMS. At this time, other mailboxes will stop sending handshake frames, and only the sending mailbox Tm will send handshake frames.
[0064] Step S4: If only the receiving mailbox numbered Rm in the DSC's receiving mailbox receives the correct handshake frame sent by the BMS, then the communication protocol numbered m is determined to be the lithium battery BMS's communication protocol. At this time, the charger will lock the lithium battery BMS communication protocol numbered m, with a baud rate of 125kbps, and reconfigure the DSC's CAN part software: the DSC's CAN communication part software will include all the content of the communication protocol numbered m, instead of just the handshake frame, and will delete the communication protocols with other numbers.
[0065] Step S5: If no mailbox receives the handshake frame sent by the BMS in step S3, the DSC resends the handshake frame sent in step S2 and synchronously detects whether the receiving mailbox receives the handshake frame sent by the lithium battery BMS. If no handshake frame is received from the lithium battery BMS, it means that the baud rate of the lithium battery BMS is not 125kbps.
[0066] Step S6: If multiple mailboxes receive handshake frames from 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 based on their data content, then repeat step S2; if the polling in step S2 is repeated 3 times and no correct handshake frame is received from the lithium battery BMS, then the baud rate of the lithium battery BMS is not 125kbps.
[0067] Step S7: Sending mailboxes T0, T1...Tn sequentially send handshake frames with a baud rate of 250kbps to the lithium battery BMS. At the same time, the DSC synchronously detects whether the receiving mailbox receives the handshake frames sent by the lithium battery BMS. Then repeat the operation of steps S3 to S6. If the correct handshake frame is not received from the lithium battery BMS, it means that the baud rate of the lithium battery BMS is not 250kbps.
[0068] In step S8, the sending mailboxes T0, T1...Tn sequentially send handshake frames with a baud rate of 500kbps to the lithium battery BMS. At the same time, the DSC synchronously detects whether the receiving mailbox has received the handshake frames sent by the lithium battery BMS. Then, the operation of steps S3 to S6 is repeated. If the correct handshake frames are still not received from the lithium battery BMS, it indicates that the communication between the charger and the lithium battery BMS has failed. At this time, the charger will display a CAN communication fault alarm, and after-sales personnel are required to perform maintenance.
[0069] The handshake frame content corresponding to the baud rates of 125kbps, 250kbps, and 500kbps is different. Different lithium battery BMS communication protocols only need to configure the handshake frame 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. The specific configuration depends on the actual situation.
[0070] This invention also discloses a control device for automatically identifying the communication protocol of a lithium battery in a charger, as shown in the attached diagram. 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. It contains a CAN communication module that can communicate with the BMS of the lithium battery. The control algorithm software for the charger to automatically identify the communication protocol of the lithium battery is implemented in the DSC chip. The EEPROM chip is used to store the number of the lithium battery BMS communication protocol and its baud rate.
[0071] In fact, this automatic identification control method and device for lithium battery communication protocols is not only applicable to chargers used in construction machinery, but also to other types of chargers. Furthermore, the CAN communication protocols included in this invention are not limited to 125kbps, 250kbps, and 500kbps; these three baud rates are simply the ones commonly used in the CAN communication protocols of construction machinery in this embodiment. Additionally, while the software control in this invention employs DSC control, it can also be implemented using microprocessors such as MCUs or ARM processors. The number and baud rate of the lithium battery BMS communication protocol can be stored using an EEPROM chip or other memory chips.
[0072] The charger's software is compatible with lithium batteries using various communication protocols, eliminating the need to change the charger's software for different protocols. This adaptation process is automatic and requires no manual configuration. After completing the lithium battery communication protocol matching, the charger stores the protocol number and corresponding baud rate in the EEPROM chip. Upon the next power-on, the charger first reads the communication protocol number and corresponding baud rate stored in the EEPROM chip and directly calls the corresponding CAN communication software to communicate with the lithium battery BMS, without needing to re-match the communication protocol. When communicating with a lithium battery BMS using a new communication protocol, the charger searches for the new protocol number and corresponding baud rate and stores them again in the EEPROM.
[0073] 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 within the protection scope of the present invention.
Claims
1. A control method for automatically identifying the communication protocol of a lithium battery in a charger, characterized in that, The control method includes the following steps: S1. Group the CAN communication protocol according to different baud rates in the communication protocol; S2. Select specific handshake frames according to the CAN communication protocol grouped according to different baud rates and configure the sending mailbox and receiving mailbox respectively; S3. Different sending mailboxes sequentially send handshake frames at a preset baud rate to the lithium battery BMS, 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 set of receiving mailboxes has received the communication protocol of the lithium battery BMS, the other sending mailboxes will stop sending handshake frames, and only the sending mailbox corresponding to the receiving lithium battery BMS handshake frame will send the handshake frame. If the receiving mailbox continuously receives the correct handshake frame sent by the lithium battery BMS, it is determined that the charger has locked the lithium battery BMS communication protocol, and the CAN communication protocol of the DSC is reconfigured. If no mailbox has received the handshake frame sent by the lithium battery BMS, the handshake frame after the baud rate is sent in step S3 is executed, and the receiving mailbox is synchronously detected as to whether it has received the handshake frame sent by the lithium battery BMS. If the polling is set and no feedback handshake frame is received from the lithium battery BMS, the next step is executed. S4. If a communication failure occurs between the charger and the lithium battery BMS, the charger will display a CAN communication failure warning and require maintenance.
2. The control method for automatically identifying the lithium battery communication protocol by the charger according to claim 1, characterized in that, Step S3 also includes: S31. The charger locks the communication protocol of the corresponding lithium battery BMS and stores the corresponding baud rate and communication protocol number in the EEPROM chip. S32. When the charger is powered on again, first read the baud rate and communication protocol number from the EEPROM chip; The initialization program of S33 and DSC directly matches the baud rate of the CAN communication protocol with the corresponding lithium battery BMS.
3. The control method for automatically identifying the lithium battery communication protocol by the charger according to claim 2, characterized in that, The preset baud rate in step S3 is either a 125kbps handshake frame, a 250kbps handshake frame, or a 500kbps handshake frame.
4. The control method for automatically identifying the lithium battery communication protocol by the charger according to claim 2, characterized in that, If no feedback handshake frame is received from the lithium battery BMS after three polling attempts in step S3, then step S4 is executed.
5. The control method for automatically identifying the lithium battery communication protocol by the charger according to claim 4, characterized in that, The communication protocol and corresponding baud rate in step S1 are numbered and stored in the EEPROM chip for different lithium battery BMS manufacturers.
6. The control method for automatically identifying the lithium battery communication protocol by the charger according to claim 5, characterized in that, When the charger replaces the 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 in 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 finds a new communication protocol, it stores the corresponding number and baud rate in the EEPROM chip again.
7. The control method for automatically identifying the lithium battery communication protocol by the charger according to claim 6, characterized in that, In the DSC CAN communication protocol, 32 mailboxes are configured for communication. These 32 mailboxes are configured as either sending mailboxes or receiving mailboxes. The mailbox frame header contains an ID. The receiving mailbox only accepts data frames with correct handshake frames and discards incorrect data frames.
8. A control device for automatically identifying the communication protocol of a lithium battery in a charger, characterized in that, The control unit 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 the charger according to claim 8, characterized in that, The storage module uses an EEPROM chip, which 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 the charger according to claim 9, characterized in that, The DSC module is equipped with a CAN communication protocol, which uses a baud rate of 125kbps, 250kbps, or 500kbps.
Citation Information
Patent Citations
Device for detecting communication protocol of charger
CN108494808A
CANoe-based test method for simulating communication between charger and BMS to realize charging process control
CN115002004A