System for converting battery charging and discharging data into Ethernet format
By combining a power module, a CAN message acquisition module, a microcontroller unit, and an Ethernet module, the problem of low efficiency in battery charging and discharging data format conversion is solved, achieving efficient and accurate data transmission and intelligent management, which is suitable for electric vehicle charging stations and energy storage systems.
Patent Information
- Application Number
- CN202511727069.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-13
AI Technical Summary
Existing battery charging and discharging data is inefficient and unstable when converted from CAN bus to Ethernet format, failing to meet the requirements of high bandwidth and remote transmission, thus limiting the intelligent development of battery management systems.
It adopts a combination of power supply module, multi-channel CAN message acquisition module, microcontroller (MCU) module and Ethernet module to acquire battery charging and discharging data through CAN bus and convert it into Ethernet format, including data parsing, format conversion and verification. It is processed and packaged using STM32 series microcontroller and W5500 chip.
It enables efficient and accurate conversion and transmission of battery charging and discharging data, supports remote monitoring and data analysis, improves the intelligence level of the battery management system, and is suitable for the management of electric vehicle charging stations and energy storage systems.
Smart Images

Figure CN121664903A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data acquisition and conversion technology, specifically a device that acquires battery charging and discharging data via CAN bus and intelligently converts it into Ethernet format. Background Technology
[0002] In modern battery management and charge / discharge monitoring systems, the CAN bus is widely used for data exchange between batteries and charging / discharging equipment and monitoring systems due to its high reliability, excellent anti-interference capabilities, and multi-node communication characteristics. For example, in the battery management system of electric vehicles, the CAN bus plays a crucial role in transmitting key data such as battery pack status information and charging / discharging parameters. However, with the rapid development of information technology and the rise of the Industrial Internet of Things (IIoT), data transmission has placed higher demands on bandwidth, ease of remote transmission, and compatibility with host computer systems and cloud platforms. Existing Ethernet technology, with its high bandwidth, ability to transmit large amounts of data quickly, and mature remote network communication technology, has become an ideal choice to meet these needs. However, the market currently lacks an efficient, stable, and highly intelligent device capable of accurately and quickly converting battery charging / discharging data transmitted via the CAN bus into Ethernet format. This situation hinders the transmission of battery charging / discharging data to host computer systems or cloud platforms for in-depth analysis, storage, and remote monitoring, limiting further performance improvements in battery management systems and the full utilization of relevant data, and failing to meet the growing demand for intelligent battery management. Therefore, developing a device that can acquire battery charging and discharging data via CAN bus and intelligently convert it into Ethernet format has significant practical implications and application value. Summary of the Invention
[0003] This invention addresses the shortcomings of existing technologies in efficiently transmitting and utilizing battery charging and discharging data due to format issues. Therefore, this invention adopts the following technical solution: This invention provides a device for acquiring battery charging and discharging data via a CAN bus and converting it into Ethernet format, comprising a power module, a multi-channel CAN message acquisition module, a microcontroller unit (MCU) module, and an Ethernet module. The power module converts external AC power into DC power to supply power to the various modules within the device. The multi-channel CAN message acquisition module has at least one CAN input interface for real-time acquisition of data transmitted via the CAN bus during battery charging and discharging. The MCU module is configured corresponding to each CAN message acquisition module, receiving and processing the acquired battery charging and discharging data. The Ethernet module is configured corresponding to each MCU module, converting the processed data into a format conforming to the Ethernet protocol and sending it out through an Ethernet output interface.
[0004] Furthermore, the power module includes an AC-DC conversion circuit, whose input port is connected to an AC power source, and whose output ports are connected to a multi-channel CAN message acquisition module, a microcontroller module, and an Ethernet module, respectively. The AC-DC conversion circuit converts AC power to DC power through a rectifier and filter circuit, and outputs multiple DC power levels (5V and 3.3V) through a voltage regulator circuit to meet the operating requirements of different modules. The power module also includes overvoltage protection and short-circuit protection circuits. When the input voltage exceeds a preset threshold or a short circuit occurs at the output, the protection circuits automatically cut off the power output to ensure the safe operation of the device.
[0005] Furthermore, the multi-channel CAN message acquisition module is equipped with multiple CAN input interfaces, typically four in practical applications. Each CAN input interface is connected to an independent CAN message acquisition circuit, which consists of a high-speed CAN transceiver chip. This circuit can read data signals from the CAN bus in real time and convert them into digital signals. The CAN message acquisition circuit acquires data frames transmitted on the CAN bus using differential signal reception and filters and amplifies the signals using a built-in signal conditioning circuit to improve signal quality. The acquired data covers key battery information, including real-time voltage, charging / discharging current, charging / discharging status, and battery temperature.
[0006] Furthermore, the microcontroller unit (MCU) module uses an STM32 series microcontroller as its core processor, which features a high-performance ARM Cortex-M core and supports multiple communication interface protocols. Each MCU is connected to a corresponding CAN message acquisition module, receiving and parsing the acquired raw data frames. The parsing process, based on the CAN bus protocol standard, separates the identifier and data fields in the data frame and extracts specific battery parameter information according to a preset mapping relationship. The MCU also performs format conversion on the parsed data, adjusting the data encoding to a format suitable for Ethernet module processing. In addition, the MCU has a built-in hardware verification module that performs cyclic redundancy check (CRC) on the received data; if an error is found, the data is re-requested, thereby ensuring the accuracy and integrity of the data.
[0007] Specifically, the Ethernet module employs a dedicated Ethernet communication chip, such as the W5500 chip, which supports the TCP / IP protocol stack and features hardware acceleration. Each Ethernet module connects to its corresponding microcontroller unit, receiving processed data and sending it out through the Ethernet output interface. During data encapsulation, the Ethernet module adds source IP address, destination IP address, MAC address, and checksum information to the data according to Ethernet protocol specifications, encapsulating the data into complete Ethernet data packets. After encapsulation, the data is output through a standard RJ45 interface, facilitating connection to a host computer system, switch, or cloud platform via Ethernet cable. The Ethernet module also includes a flow control unit, which automatically reduces the data transmission rate to prevent data loss when high network load is detected.
[0008] Furthermore, the overall workflow of the device is as follows: S1: The power module converts the external AC power into DC power to power the multi-channel CAN message acquisition module, microcontroller module and Ethernet module; S2: The multi-channel CAN message acquisition module acquires data transmitted via the CAN bus during the battery charging and discharging process in real time through the CAN input interface, and sends the acquired data to the corresponding microcontroller unit; S3: The microcontroller receives the collected data, parses it, converts its format, and performs verification processing to generate data that meets the processing requirements of the Ethernet module. S4: The Ethernet module receives the processed data, encapsulates it into a format that conforms to the Ethernet protocol, and sends it out through the Ethernet output interface; S5: The packaged data is transmitted to the host computer system or cloud platform via Ethernet cable for subsequent analysis and storage.
[0009] Furthermore, the device employs a dual-buffering mechanism during data transmission, namely, setting up two independent data buffers between the microcontroller module and the Ethernet module. While one buffer is used to store data sent by the microcontroller, the other buffer is simultaneously used by the Ethernet module to read data, thereby achieving continuous data transmission and avoiding delays caused by data waiting.
[0010] Specifically, the device also includes a status indicator module, which consists of multiple LED indicators to display the device's operating status. The status indicator module is connected to the microcontroller module. When the device is operating normally, the green LED indicator lights up; when a CAN bus communication abnormality or Ethernet transmission failure is detected, the red LED indicator flashes, prompting the user to troubleshoot the problem.
[0011] The beneficial effects of this invention are as follows: By setting up a multi-channel CAN message acquisition module, charging and discharging data from multiple battery packs or multiple charging and discharging devices can be collected simultaneously, significantly improving data acquisition efficiency and providing a richer and more accurate data foundation for the battery management system. The microcontroller module intelligently processes the acquired CAN bus data, including data parsing, format conversion, and verification operations, ensuring the accuracy and integrity of the data. The Ethernet module encapsulates the processed data into a format conforming to the Ethernet protocol, realizing reliable data transmission over Ethernet. The converted Ethernet format data is easily compatible with host computer systems or cloud platforms, supporting remote monitoring, data analysis, and storage, enhancing the utilization value and application scope of battery charging and discharging data. Furthermore, the device has a compact overall design, high modularity, and is easy to maintain and expand. It can be widely used in battery monitoring at electric vehicle charging stations, energy storage system management, and other scenarios requiring efficient data acquisition and transmission, contributing to more efficient and intelligent battery management. Attached Figure Description
[0012] Figure 1 The logical architecture diagram of this invention illustrates the connection relationships between the power module, the multi-channel CAN message acquisition module, the microcontroller unit (MCU) module, and the Ethernet module. Figure 2 The schematic diagram of the microcontroller (MCU) of this invention shows in detail the pin connections of the STM32 series microcontroller, including the communication pins connected to the CAN message acquisition module and the Ethernet module, as well as the microcontroller's clock circuit, reset circuit and other peripheral circuits. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] Specific implementation examples are given below.
[0015] This invention provides a device for acquiring battery charging and discharging data via a CAN bus and converting it into Ethernet format, in conjunction with an appendix. Figure 1 To be continued Figure 2 The specific implementation method is described in detail below. The device includes a power module, a multi-channel CAN message acquisition module, a microcontroller unit (MCU) module, and an Ethernet module. These modules are interconnected via circuitry to achieve functional collaboration. The specific structure and operating principle of the device are explained in detail below, in conjunction with practical application scenarios and the reference numerals in the accompanying drawings.
[0016] In the battery monitoring system of electric vehicle charging stations, this device is used to collect real-time charging and discharging data of multiple electric vehicle battery packs, convert this data into Ethernet format, and transmit it to a host computer system or cloud platform. The AC power interface connects to an external 220V AC mains power supply. The power module converts the AC power into a stable DC power supply through an AC-DC conversion circuit. The output ports are connected to a multi-channel CAN message acquisition module, a microcontroller module, and an Ethernet module, respectively. The AC-DC conversion circuit of the power module consists of a rectifier and filter circuit and a voltage regulator circuit. The rectifier and filter circuit uses a bridge rectifier and a large-capacity filter capacitor to convert the AC power into a initially stable DC power supply. The voltage regulator circuit outputs two voltage levels, 5V and 3.3V, through a linear voltage regulator chip and a switching voltage regulator chip to meet the operating requirements of different modules. In addition, the power module also includes an overvoltage protection circuit and a short-circuit protection circuit. When the input voltage exceeds a preset threshold or a short circuit occurs at the output, the protection circuit cuts off the power output through a relay to ensure the safe operation of the device.
[0017] The multi-channel CAN message acquisition module has four CAN input interfaces, each connected to an independent CAN message acquisition circuit. The CAN message acquisition circuit uses a high-speed CAN transceiver chip, such as the TJA1050, which supports the ISO 11898 standard and can read data signals on the CAN bus in real time and convert them into digital signals. Differential signal reception uses two signal lines, CAN_H and CAN_L, to acquire data frames transmitted on the CAN bus. The built-in signal conditioning circuit filters and amplifies the received signal to improve signal quality. The acquired data covers key battery information, including real-time voltage, charging / discharging current, charging / discharging status, and battery temperature. In practical applications, the CAN ports of the four DC charging guns are connected to the four CAN input interfaces via CAN lines. When the electric vehicle connects to the charging guns and begins charging, the battery management system sends relevant battery data through the CAN bus, which is then acquired in real time by the CAN message acquisition module.
[0018] The microcontroller unit (MCU) module uses an STM32 series microcontroller as its core processor. Each MCU is connected to a corresponding CAN message acquisition module to receive and parse the acquired raw data frames. The STM32 series microcontroller features a high-performance ARM Cortex-M core and supports multiple communication interface protocols. Its pin connections are shown in the attached figure. Figure 2As shown. The communication pin connected to the CAN message acquisition module is used to receive CAN data, and the communication pin connected to the Ethernet module is used to transmit the processed data. The parsing process separates the identifier and data field in the data frame according to the CAN bus protocol standard, and extracts the specific battery parameter information according to the preset mapping relationship. For example, the identifier 0x18FF50E5 corresponds to battery voltage data, the first two bytes of the data field represent the voltage value, and the last two bytes represent the unit information. The microcontroller unit also performs format conversion on the parsed data, adjusting the data encoding to a form suitable for Ethernet module processing. For example, the 11-bit identifier on the CAN bus is extended to a 29-bit identifier, or the byte order in the data field is adjusted to network byte order. In addition, the microcontroller unit has a built-in hardware verification module that performs cyclic redundancy check (CRC) on the received data. If an error is found, the data is re-requested, thereby ensuring the accuracy and integrity of the data.
[0019] The Ethernet module uses a dedicated Ethernet communication chip, such as the W5500 chip, which supports the TCP / IP protocol stack and has hardware acceleration capabilities. Each Ethernet module connects to a corresponding microcontroller unit, receives and processes data, and sends it out through the Ethernet output interface. During data encapsulation, the Ethernet module adds source IP address, destination IP address, MAC address, and checksum information to the data according to the Ethernet protocol, encapsulating the data into a complete Ethernet data packet. For example, the source IP address is set to 192.168.1.100, the destination IP address is set to 192.168.1.1, and the MAC address is set to 00:1A:2B:3C:4D:5E. After encapsulation, the data is output through a standard RJ45 interface, facilitating connection to a host computer system, switch, or cloud platform via Ethernet cable. The Ethernet module also includes a flow control unit, which automatically reduces the data transmission rate when high network load is detected to prevent data loss. For example, when network bandwidth utilization exceeds 80%, the flow control unit reduces the data transmission rate from 10Mbps to 1Mbps.
[0020] The overall workflow of the device is as follows: S1, the power module converts the external AC power into DC power to supply power to the multi-channel CAN message acquisition module, the microcontroller module, and the Ethernet module; S2, the multi-channel CAN message acquisition module acquires data transmitted via the CAN bus during battery charging and discharging in real time through the CAN input interface, and sends the acquired data to the corresponding microcontroller; S3, the microcontroller receives the acquired data, parses it, performs format conversion and verification processing, and generates data that meets the processing requirements of the Ethernet module; S4, the Ethernet module receives the processed data, encapsulates it into a format conforming to the Ethernet protocol, and sends it out through the Ethernet output interface; S5, the encapsulated data is transmitted to the host computer system or cloud platform via Ethernet cable for subsequent analysis and storage. Throughout the process, the device adopts a dual-buffering mechanism, that is, two independent data buffers are set up between the microcontroller module and the Ethernet module. When one buffer is used to store data sent by the microcontroller, the other buffer is simultaneously used for the Ethernet module to read data, thereby realizing continuous data transmission and avoiding delay problems caused by data waiting.
[0021] The device also includes a status indicator module, which consists of multiple LEDs to display the device's operating status. The status indicator module is connected to the microcontroller module. When the device is operating normally, the green LEDs are lit; when a CAN bus communication abnormality or Ethernet transmission failure is detected, the red LEDs flash, prompting the user to troubleshoot. For example, when CAN bus communication is interrupted, the microcontroller controls the red LEDs to flash at a frequency of 1Hz via GPIO pins; when the Ethernet module detects a data transmission failure, the red LEDs flash at a frequency of 2Hz.
[0022] In practical applications, this device is installed in the monitoring cabinet of an electric vehicle charging station. The AC power interface is located on the left side of the device panel, four CAN input interfaces are evenly distributed in the center of the panel, and the Ethernet output interface is located on the right side of the panel. The device has a compact overall design, a high degree of modularity, and is easy to maintain and expand. For example, when it is necessary to increase the number of CAN input interfaces, the number of CAN message acquisition modules can be increased by expanding the expansion board without replacing the entire device.
[0023] In summary, this invention achieves efficient acquisition of charging and discharging data from multiple battery packs or charging / discharging devices through a multi-channel CAN message acquisition module, significantly improving data acquisition efficiency. The microcontroller module intelligently processes the acquired CAN bus data, including data parsing, format conversion, and verification operations, ensuring data accuracy and integrity. The Ethernet module encapsulates the processed data into a format conforming to the Ethernet protocol, enabling reliable data transmission over Ethernet. The converted Ethernet format data is easily compatible with host computer systems or cloud platforms, supporting remote monitoring, data analysis, and storage, thus enhancing the utilization value and application scope of battery charging and discharging data. The device features a compact overall design, high modularity, and ease of maintenance and expansion. It can be widely applied in battery monitoring at electric vehicle charging stations, energy storage system management, and other scenarios requiring efficient data acquisition and transmission, contributing to more efficient and intelligent battery management.
[0024] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A device for acquiring battery charging and discharging data via a CAN bus and converting it into Ethernet format, characterized in that... The device includes a power module, a multi-channel CAN message acquisition module, a microcontroller module, and an Ethernet module. The power module converts external AC power into DC power to supply power to the various modules inside the device. The multi-channel CAN message acquisition module has at least one CAN input interface for real-time acquisition of data transmitted via the CAN bus during battery charging and discharging. The microcontroller module is configured corresponding to each CAN message acquisition module, receiving and processing the acquired battery charging and discharging data. The Ethernet module is configured corresponding to each microcontroller module, converting the processed data into a format conforming to the Ethernet protocol and sending it out through an Ethernet output interface.
2. The apparatus as described in claim 1, characterized in that... The power module includes an AC-DC conversion circuit, whose input port is connected to an AC power interface, and whose output ports are respectively connected to a multi-channel CAN message acquisition module, a microcontroller module, and an Ethernet module.
3. The apparatus as described in claim 2, characterized in that... The AC-DC conversion circuit converts AC power to DC power through a rectifier and filter circuit, and outputs DC power at multiple voltage levels, namely 5V and 3.3V, through a voltage regulator circuit.
4. The apparatus as described in claim 1, characterized in that... The multi-channel CAN message acquisition module is equipped with multiple CAN input interfaces. Each CAN input interface is connected to an independent CAN message acquisition circuit, which is composed of a high-speed CAN transceiver chip and can read the data signals on the CAN bus in real time and convert them into digital signal form.
5. The apparatus as described in claim 4, characterized in that... The CAN message acquisition circuit acquires data frames transmitted on the CAN bus through differential signal reception, and filters and amplifies the signals through the built-in signal conditioning circuit.
6. The apparatus as claimed in claim 1, characterized in that... The microcontroller module uses an STM32 series microcontroller as its core processor. Each microcontroller is connected to a corresponding CAN message acquisition module to receive and parse the acquired raw data frames.
7. The apparatus as claimed in claim 6, characterized in that... The microcontroller module performs cyclic redundancy check on the received data, and if an error is found, it requests the data again.
8. The apparatus as claimed in claim 1, characterized in that... The Ethernet module uses a dedicated Ethernet communication chip that supports the TCP / IP protocol stack and has hardware acceleration capabilities. Each Ethernet module is connected to a corresponding microcontroller module, receives processed data, and sends it out through the Ethernet output interface.
9. The apparatus as claimed in claim 8, characterized in that... During the data encapsulation process, the Ethernet module adds source IP address, destination IP address, MAC address, and checksum information to the data in accordance with the Ethernet protocol.
10. The apparatus as claimed in claim 1, characterized in that... The device also includes a status indicator module, which consists of multiple LED indicators for displaying the operating status of the device. The status indicator module is connected to the microcontroller module.