Wiznet makers

jaden

Published July 27, 2026 ©

138 UCC

18 WCC

59 VAR

0 Contests

0 Followers

0 Following

Original Link

Railway vehicle lithium battery management system

Railway vehicle lithium battery management system

COMPONENTS
PROJECT DESCRIPTION

How to Add Isolated Ethernet Monitoring with W5500 to an STM32 Railway Battery Management System?

Summary

This railway-vehicle battery management architecture uses an STM32F407ZET6 to collect cell voltage, temperature, pack current, and total voltage data, while coordinating fault protection and state-of-charge estimation under FreeRTOS. A WIZnet W5500 connects to the STM32 over SPI and provides the hardware TCP/IP Ethernet interface, with a signal transformer providing electrical isolation between the battery-management electronics and the external wired network. (구글 특허)

What the Project Does

Patent CN121964892A describes a distributed lithium battery management system intended for railway vehicles. The architecture separates the system into one battery cluster management unit and multiple battery pack management units. Each pack unit uses an LTC6804 battery-monitoring device to measure individual cell voltages and thermistor-based temperatures. The pack units send measurements to the cluster controller through an isolated daisy-chain communication path. (구글 특허)

The battery cluster management unit uses an STM32F407ZET6 and receives:

Individual cell voltage and temperature data through the isolated daisy chain

Total battery current and total voltage through ADC-connected measurement circuits

Vehicle and subsystem data through CAN and RS-485

Remote network requests through the W5500 Ethernet interface

Discrete field inputs and outputs through electrically isolated circuits

The STM32 performs ampere-hour-based state-of-charge estimation and multilevel fault diagnosis. Depending on the detected condition, the controller can issue an alarm, limit current, or disconnect the charge-discharge circuit. The patent also assigns voltage acquisition, current acquisition, temperature acquisition, fault diagnosis, and state-of-charge estimation to separate FreeRTOS tasks. (구글 특허)

The proposed data flow is:

Battery cells and thermistors
        ↓
LTC6804 battery-monitoring devices
        ↓
Isolated daisy-chain communication
        ↓
STM32F407ZET6 cluster controller
        ├── Fault diagnosis and protection outputs
        ├── CAN and RS-485 vehicle communication
        └── SPI
             ↓
          W5500
             ↓
      Isolation transformer
             ↓
      External Ethernet network

Comparison with Related WIZnet Maker Projects

ProjectWhat Is SimilarWhat Is Different
Railway Vehicle Lithium Battery Management System — CN121964892AUses an STM32, W5500, SPI Ethernet, wired remote monitoring, isolated field interfaces, and an RTOS-based embedded architecture.It is a safety-oriented railway BMS with cell-level voltage and temperature monitoring, SOC estimation, daisy-chained battery front ends, redundant communications, and charge-discharge protection.
DEYE GE-F128 ESS W5500 DiagnosticsBoth place W5500 inside a high-voltage battery or energy-storage communication subsystem. Both expose Ethernet alongside CAN, RS-485, and Modbus-related communication paths.The DEYE article derives W5500 usage from a commercial product manual and fault codes. The railway patent provides a more explicit circuit-level description of the STM32-to-W5500 SPI path and Ethernet isolation, but does not publish production firmware. (WIZnet Makers)
W5500-Based Partial-Discharge Monitoring SystemBoth apply W5500 to safety monitoring around high-voltage electrical infrastructure and transmit diagnostic data to an upper-level monitoring system.The partial-discharge project detects ultrasonic evidence of insulation degradation in switchgear. The railway BMS directly measures battery cells, temperatures, pack current, and total voltage and can actively disconnect the battery circuit. (WIZnet Makers)
W5500 + FreeRTOS 8-Channel Industrial Input ModuleBoth combine STM32, FreeRTOS, isolated field signals, W5500, and serial industrial communication. In both cases, W5500 allows the MCU to prioritize acquisition and control tasks instead of implementing the full TCP/IP stack in software.The industrial input module reads eight binary field contacts and exposes them through Modbus TCP. The railway system processes analog battery measurements, runs SOC and fault algorithms, and manages safety-critical protection outputs. (WIZnet Makers)

The closest functional comparison is the DEYE GE-F128 article because both systems concern high-voltage battery equipment and place W5500 in the Ethernet communication subsystem. The patent, however, documents a railway-specific monitoring and protection architecture rather than a commercial stationary energy-storage cabinet. (WIZnet Makers)

Where WIZnet Fits

The exact WIZnet product identified in the patent is the W5500. The patent states that the MCU connects to the W5500 through SPI, after which the W5500 converts the controller-side SPI communication into an Ethernet differential signal. A signal transformer is then used to provide electrical isolation. (구글 특허)

In this architecture, the W5500 serves four functions:

Hardware TCP/IP processing
TCP/IP socket handling is implemented in the Ethernet controller rather than as a large software stack running on the STM32.

SPI-to-Ethernet interface
The STM32 exchanges control and payload data with the W5500 through SPI while the W5500 handles the Ethernet-side protocol and physical-interface path.

Remote BMS data transport
Battery measurements, operating state, alarms, and diagnostic information can be exposed to an external maintenance or supervisory system.

Separation from real-time protection tasks
The STM32 must run acquisition, SOC estimation, fault diagnosis, task synchronization, and protection logic. Offloading TCP/IP processing avoids adding a software network stack to those time-sensitive workloads.

This division is useful because the system already has several deterministic responsibilities. The patent specifies cell-voltage acquisition rounds every 3 ms, total-current sampling at no less than 20 kHz, and multiple FreeRTOS tasks with different real-time priorities. Network processing should therefore remain separated from the most critical acquisition and protection paths. (구글 특허)

The W5500 provides eight hardware sockets and 32 KB of internal TX/RX buffer memory. These resources allow the MCU to maintain several network services without allocating equivalent packet buffering inside its own RAM. The actual socket allocation, application protocol, and buffer partitioning are not disclosed in the patent.

Implementation Notes

The source is a patent document rather than a public firmware repository. It confirms the W5500 hardware architecture, but it does not provide compilable W5500 initialization code, network settings, socket assignments, or an application-layer protocol. No production code should therefore be inferred from the document.

The patent gives the following direct architectural description:

“MCU is connected with W5500 through SPI interface.”

It then explains that the W5500 produces the Ethernet differential signal and that a signal transformer provides electrical isolation. This passage establishes that the W5500 is not merely an optional external gateway; it is part of the battery cluster management unit’s Ethernet interface circuit. (구글 특허)

A practical implementation would require these blocks:

STM32 SPI driver
    ↓
WIZnet ioLibrary driver callbacks
    ↓
W5500 reset and initialization
    ↓
Per-socket TX/RX buffer allocation
    ↓
Static IP or DHCP configuration
    ↓
Application protocol
    ↓
Supervisory server, maintenance tool, or vehicle gateway

The application protocol is not specified. Depending on the railway system requirements, it could be a custom TCP protocol, Modbus TCP, a diagnostic service, or a gateway protocol implemented above the W5500 socket API. Any such selection would be an engineering addition rather than a verified feature of the patent.

The Ethernet service should also remain logically separated from the protection path. A lost TCP connection must not delay cell acquisition, fault evaluation, contactor control, or emergency shutdown. Network tasks should consume copied or queued BMS data instead of locking the live protection data structures for long periods.

Practical Tips / Pitfalls

Place the W5500, magnetics, and RJ45 connector according to controlled-impedance and return-path requirements. The isolation transformer does not compensate for poor Ethernet PCB routing.

Assign the Ethernet task a lower priority than voltage acquisition, current acquisition, fault diagnosis, and protection-output tasks.

Use a queue or double-buffered snapshot for network telemetry so that socket transmission cannot block measurement updates.

Monitor the W5500 SPI path, PHY link state, socket state, and network-session state separately. This makes it possible to distinguish a local controller-interface fault from a disconnected cable or remote-server failure.

Select static addressing when the vehicle network requires fixed maintenance endpoints. Use DHCP only when the network architecture includes a controlled and redundant DHCP service.

Allocate W5500 socket buffers according to actual traffic. A diagnostic server, telemetry stream, configuration channel, and maintenance connection may require different RX/TX priorities.

Validate transformer isolation, surge protection, ESD protection, common-mode noise, grounding, and cable shielding against the railway equipment’s electrical and EMC requirements.

FAQ

Why is the W5500 suitable for this railway BMS?

The STM32 is responsible for frequent acquisition, SOC calculation, fault diagnosis, and protection control. The W5500 performs TCP/IP socket processing in hardware, allowing the MCU to exchange Ethernet data without running a full software TCP/IP stack alongside the safety-related tasks. Its internal socket buffers also reduce the amount of MCU RAM required for network packet storage.

How does the W5500 connect to the STM32F407ZET6?

The patent specifies an SPI connection between the STM32 and W5500. A complete design also requires chip select, reset, power, ground, and optionally an interrupt signal. On the network side, the patent places a signal transformer after the W5500 to provide electrical isolation before the external Ethernet connection. (구글 특허)

What does the W5500 do in this specific battery-management system?

It provides the Ethernet interface for the battery cluster management unit. The STM32 collects and processes battery data, while the W5500 transports selected measurements, status information, alarms, and diagnostic data to an external wired network. It does not perform cell measurement, SOC estimation, fault diagnosis, or contactor control.

Can beginners reproduce this design?

The networking portion is approachable for developers familiar with STM32 SPI peripherals and the WIZnet ioLibrary. Reproducing the complete system is an advanced task because it also involves high-voltage measurement, galvanic isolation, battery protection, FreeRTOS scheduling, EMC design, functional safety, and railway qualification. Development should begin with a low-voltage W5500 evaluation board and simulated BMS data rather than a live railway battery pack.

How does W5500 compare with LwIP on the STM32?

LwIP implements the network stack in STM32 firmware and therefore consumes MCU processing time, RAM, timer resources, and integration effort. W5500 moves TCP/IP socket processing and packet buffering into a dedicated Ethernet controller. LwIP offers greater flexibility for unusual protocols and low-level packet access, while W5500 provides a simpler separation between deterministic BMS tasks and Ethernet communication. For this architecture, that separation is more important than protocol-stack customization.

Source

Original Patent: CN121964892A, Railway Vehicle Lithium Battery Management System, published May 1, 2026. The application is listed as pending. Google Patents notes that its legal-status information is not a legal conclusion. (구글 특허)

Related WIZnet Maker Content:

How Does DEYE GE-F128 ESS Expose W5500 for TCP/IP Diagnostics? (WIZnet Makers)

From Ethernet Chip to Power Infrastructure Safety: W5500 in PD Monitoring Systems (WIZnet Makers)

W5500 + FreeRTOS-Based 8-Channel Industrial Digital Input Acquisition Module (WIZnet Makers)

License: No open-source software or hardware license is stated in the patent record. Patent publication does not grant permission to reproduce a protected commercial implementation.

Tags

#W5500 #STM32F407 #RailwayBMS #BatteryManagementSystem #FreeRTOS #IndustrialEthernet #LithiumBattery #EmbeddedSystems #RailTransit #SafetyMonitoring

 

Documents
Comments Write