Intelligent UPS Control: Reverse Engineering and Software Development for a 16KW System

Category :

Hardware Design, Firmware Development, Cloud & IoT Integration

Client :

Vitro Technology Corporation

The Challenge

Building a Unified Controller for a High-Power UPS

We partnered with Vitro Technology Corporation to develop a sophisticated controller for a high-power UPS system up to 16KW. The core of the system was a parallel configuration of four Huawei RG4850G rectifiers, each with a 4KW peak output. A major challenge was the lack of available documentation for the rectifiers' communication protocol. This required us to reverse engineer the protocol from scratch, a task that demanded significant time and expertise. Furthermore, the final system needed to integrate the rectifiers with a custom control board, external DC current sensors, and various switches, all while providing an intelligent application layer for battery charging, system configuration, and cloud-based remote control

A view of the addressed rectifier

View of the complete product.

Back side with required connections of the rectifier.

Our Solution

A Comprehensive C++ Driver and Modular Application

We delivered a complete software solution built on MBED OS 6.16 that transformed the disparate components into a unified, intelligent UPS controller. Our process began with a deep-dive into the rectifier's communication bus. Over 1.5 months, we successfully reverse engineered the Huawei rectifier's proprietary CANbus protocol.

Using this newly acquired knowledge, we developed a robust C++ driver that provided a comprehensive interface to the rectifiers. This driver enabled:
• Real-time control of output voltage, current, and protection limits.
• The ability to read spontaneous status messages from the rectifiers.
• Forced on/off states and LED control.
• Unique ID identification and detection of hot disconnections from the power bus.

Building on this foundational driver, we then developed a modular application that integrated the customer's custom hardware and external sensors. Key modules of this application included:
• Installer Configuration Module: A user-friendly configuration layer accessible via RS232, allowing installers to define critical system parameters such as the number of connected rectifiers, maximum output voltage, safety thresholds, battery string count, and maximum charging current.
• Smart Battery Charging Module: We implemented a sophisticated constant current, constant voltage (CC-CV) charging algorithm. Using DC current transducers connected to each output, the system could read the instantaneous current absorbed by the load and the current flowing to the batteries. This allowed the controller to dynamically adjust the rectifier's output voltage in real-time to respect battery charging limits while always ensuring sufficient power for the connected load.

Finally, we integrated the entire system with the cloud using the MQTT protocol over Ethernet. This provided a custom cloud service for monitoring the system's state, as well as remote control capabilities for onboard relays, LEDs, and the triggering of specific measurements.

Results

A Highly Customizable and Remotely Managed UPS System

The project's success is defined by the delivery of a fully functional, highly customizable, and intelligent UPS controller. By successfully reverse engineering the CANbus protocol, we enabled complete control over a critical OEM component, a capability that was not previously available. The resulting system not only provides robust and reliable power management but also offers flexibility through its installer-configurable parameters. The integration of a CC-CV charging algorithm ensures optimal battery health and performance. The seamless cloud connectivity provides the client with a powerful platform for remote monitoring and control, demonstrating our expertise in complex protocol analysis, embedded software development, and scalable IoT integration. This project exemplifies our capability to provide sophisticated software solutions that fully leverage complex hardware systems.

What’s involved: CAN bus, Reverse Engineering, C++, Driver Development, Analog Sensing

Prev Project
UNICT
Next Project
Senior Safety