DIY Guide: 300A | 80V Smart Shunt for Measuring My 28kWh Battery SOC

by Steve Willson Kujur in Circuits > Electronics

1160 Views, 6 Favorites, 0 Comments

DIY Guide: 300A | 80V Smart Shunt for Measuring My 28kWh Battery SOC

DCPM_3.1.4 edit.jpg
Untitled_4.1.2.jpg

Battery management can be a challenge, especially when you rely on built-in systems like the JK BMS (Battery Management System). While they provide essential features, I found their State of Charge (SOC) calculations and current readings to be frustratingly inaccurate. Accurate monitoring is crucial for efficient battery usage and system reliability, so I decided to take matters into my own hands.

This project showcases the development of a 300A 80V Smart Shunt designed to provide precise current and SOC readings for a battery pack. By leveraging ESPHome and integrating it seamlessly with Home Assistant, this shunt offers real-time monitoring and a powerful, user-friendly interface for tracking battery performance. Whether you're into DIY solar setups, EV systems, or other battery-powered applications, this project is for anyone seeking enhanced battery management without compromises.

Supplies

Real-World Application

20241121_141257.jpg
DCPM_3.1.4 edit.jpg
DCPM_3.1.1.jpg

To put my 300A 80V Smart Shunt to the test, I integrated it into my 10kW inverter setup, powered by a robust 28kWh LiFePO4 battery bank. The system features two independent 5kW inverters, each operating separately. These inverters draw power from 280Ah battery packs, 32 cells in a 2 16s configuration. For individual cell monitoring and safety, each pack is equipped with its own JK BMS.

By using the smart shunt, I’ve achieved significantly improved accuracy in current and SOC tracking, which is crucial for managing this powerful system effectively. The data integrates seamlessly with Home Assistant, providing real-time monitoring and actionable insights to enhance overall system performance.

This setup demonstrates how the smart shunt can be utilized in high-capacity, independent inverter systems, making it a valuable tool for anyone managing large battery systems.

Analyzing the Data

Screenshot (48).png
Screenshot (45).png
Screenshot (46).png
Screenshot (47).png

With the 300A 80V Smart Shunt integrated into my setup, I began monitoring the data through Home Assistant. Comparing the SOC readings from the JK BMS with the Smart Shunt, it quickly became clear how much the BMS SOC drifts over time, leading to inconsistent and unreliable data.

In contrast, the Smart Shunt provides rock-solid and precise measurements, ensuring accurate current tracking and SOC calculations. This reliability has made a significant difference in managing my system, giving me confidence in the data and enabling better decision-making for battery use and performance optimization.


Note: The Smart Shunt combines the SOC data from both battery packs, providing a unified view of the system.



Viewing Attributes in Home Assistant

Screenshot (42).png

Once the 300A 80V Smart Shunt was integrated into Home Assistant, I could easily monitor key metrics such as current, voltage, and the combined SOC of my battery packs. These attributes are available directly within Home Assistant's entity states and can be visualized through dashboards.

PCB Design and Layout

PCB_PCB_XIAO-ESP32C6-100A-80V-Shunt_2024-11-25 (1).png
Schematic_XIAO-ESP32C6-100A-80V-Shunt-V1.3_2024-11-25.png

To bring the 300A 80V Smart Shunt to life, I utilized EasyEDA for designing the PCB. This intuitive tool allowed me to create a precise circuit schematic and convert it into a fully functional PCB layout.

After finalizing the design, I generated the Gerber files, which are essential for PCB manufacturing. These files ensure that the board is fabricated accurately according to the design specifications.

For those interested in replicating or customizing this project, I’ve included the Gerber files in the attachments. Feel free to download them and use them to manufacture your own PCB or as a reference for your design modifications.

Gerber Files

Receiving the Fully Assembled PCB

DCPM_3.1.2.jpg

After finalizing the PCB design in EasyEDA and generating the Gerber files, I sent them to Seeed Fusion for manufacturing and assembly. Seeed Fusion’s service made the process seamless, from PCB fabrication to component assembly.

When I received the fully assembled PCB, I carefully inspected it to ensure the components were placed correctly and there were no visible issues with soldering or alignment. The quality and precision of the assembly met my expectations, making it ready for testing and integration

Attaching the 300A Shunt to the PCB

Untitled_4.1.1.jpg
Untitled_4.1.2.jpg
Untitled_4.1.3.jpg

With the fully assembled PCB in hand, the next step was to securely attach the 300A shunt. The design was made with simplicity and efficiency in mind—there’s a direct connection between the shunt and the PCB, eliminating the need for additional wires.

To install:

  1. The shunt was carefully aligned and screwed directly onto the PCB.
  2. A direct connection ensures minimal resistance and maximizes accuracy for current measurements.
  3. For final integration, only the positive wire needs to be connected, simplifying the setup further.

This straightforward design not only enhances reliability but also makes the assembly process incredibly user-friendly, especially for those who appreciate a clean and efficient build.

Installing ESPHome Firmware on the Xiao ESP32-C6

Untitled_4.1.1.jpg

With the hardware setup complete, the next step was to prepare the Xiao ESP32-C6 for operation. This compact, powerful microcontroller serves as the brain of the Smart Shunt system, running the ESPHome firmware for seamless integration with Home Assistant.

To set it up:

  1. Connect via USB:
  2. Plug the Xiao ESP32-C6 into your computer using a USB cable. No additional wiring is required at this stage.
  3. Install ESPHome Firmware:
  4. Using ESPhome to compile the YAML file and upload it

YAML File


Protecting the PCB With a Clear Heat Shrink Tube

Untitled_4.1.1.jpg
Untitled_4.1.2.jpg

To ensure the durability and safety of the PCB, I encased it in a clear heat shrink tube. This provides effective protection against dust, moisture, and accidental short circuits while keeping the board's components visible for easy inspection.

The process:

  1. Cut a piece of clear heat shrink tubing to fit the PCB, ensuring enough length to cover the entire board securely.
  2. Slide the tubing over the board, making sure all components and connections are neatly enclosed.
  3. Use a heat gun to shrink the tubing evenly around the PCB, creating a snug and durable seal.

This added layer of protection ensures the PCB remains safe during operation, especially in environments prone to dust or mechanical stress. The clear material also allows for quick visual checks without needing to remove the covering.

Installing the Shunt on the Busbar

Untitled_4.1.4.jpg
Untitled_4.1.5.jpg
Untitled_5.5.1.jpg

With the 300A Smart Shunt fully prepared, the next task was to install it onto the busbar of my inverter setup, specifically on the negative side, and provide power to the board. This ensures accurate measurement of all current flowing through the system.

Installation Process:

  1. Positioning the Shunt:
  2. The shunt was carefully aligned with the busbar on the negative side for a secure and stable connection.
  3. Its direct connection design eliminates the need for extra wiring, streamlining the setup.
  4. Securing the Shunt:
  5. Using appropriate screws and washers, the shunt was firmly attached to the busbar to ensure reliable contact and minimize resistance.
  6. Connecting the Positive Wire:
  7. A positive wire was connected from the board to the busbar to provide power to the PCB. This connection is essential for powering the shunt's measurement and communication systems.
  8. Final Check:
  9. After installation, I verified all connections to ensure the shunt was securely mounted, the positive wire was properly connected, and there were no loose or misaligned components.


Bringing It All Together

With the 300A 80V Smart Shunt fully installed and operational, my inverter and battery monitoring setup is now complete. Here's a summary of the key steps that brought this project to life:

  1. Design and Fabrication:
  2. Designed the PCB using EasyEDA, finalized the layout, and sent the design to Seeed Fusion for fabrication and assembly.
  3. Hardware Preparation:
  4. Protected the PCB with a clear heat shrink tube for durability.
  5. Attached the 300A shunt directly to the PCB for a clean and efficient connection.
  6. Firmware Installation:
  7. Flashed the Xiao ESP32-C6 with ESPHome firmware, enabling seamless integration with Home Assistant.
  8. System Installation:
  9. Mounted the shunt on the negative busbar of my inverter setup and connected the positive wire to power the board.
  10. Testing and Validation:
  11. Verified accurate current and SOC readings in Home Assistant, comparing them against the drifting JK BMS data. The Smart Shunt delivered rock-solid, reliable results.

The Result:

This Smart Shunt provides highly accurate, real-time data on current, voltage, and SOC, transforming the reliability of my inverter system. With its integration into Home Assistant, I can monitor and optimize my 10kW inverter and 28kWh battery setup effortlessly.

This project demonstrates how DIY innovation and accessible tools like ESPHome and Home Assistant can improve battery management systems significantly. The design is scalable and can be adapted for various setups, making it a valuable addition for anyone looking to enhance their energy systems.

What’s Next?

Future improvements could include adding more automation in Home Assistant, enhancing visual dashboards, or even exploring advanced integrations with solar systems. The possibilities are endless!