Update hardware and firmware documentation for new modules and features
- Removed outdated TODOs and legacy references in hardware documentation. - Added details on the new CH32V203-based Sensor Module for CAN bus soil moisture sensors. - Documented updates to the Battery Management System (CH32V203-based) replacing the older bq34z100 design. - Refined sensor, pump, and power module descriptions with updated specifications. - Expanded firmware documentation to include Rust-based ESP32-C6 platform details, new OTA procedure, and MQTT telemetry topics. - Simplified toolchain setup and compilation process with updated scripts and instructions.
This commit is contained in:
@@ -3,39 +3,55 @@ title: "BatteryManagement"
|
||||
date: 2025-01-27
|
||||
draft: false
|
||||
description: "a description"
|
||||
tags: ["battery", "bq34z100"]
|
||||
tags: ["battery", "bms"]
|
||||
---
|
||||
# Battery Management Module
|
||||
The project contains an additional companion board (Fuel Gauge), with a bq34z100 battery management IC.
|
||||
|
||||
It allows to track the health and charge for an external battery and is supposed to be soldered directly to the battery.
|
||||
The MainBoard contains a connector for power, and additionally a two-pin I2C bus to communicate with the Battery Management module.
|
||||
The PlantCtrl system uses an external **Battery Management System (BMS)** board that connects to the MainBoard. This module monitors battery voltage, current, and health metrics and communicates with the ESP32-C6 via I2C.
|
||||
|
||||
<!-- TODO: Add photo of the new modular Battery Management board -->
|
||||
|
||||
# Setup
|
||||
{{< alert >}}
|
||||
A protected Battery is required. There is only a very simplistic output voltage adjustment for the MPPT system and no charge termination. It is expected that the battery itself protects against overcharging and deep discharges!
|
||||
The open-bms is a custom battery management board designed for this project. It uses a CH32V203 microcontroller to handle battery monitoring and protection. The older bq34z100-based battery management board is deprecated and located in the `__Legay_Unused` folder.
|
||||
{{< /alert >}}
|
||||
* BatteryManagement is purely optional, but recommended for solar power.
|
||||
* If available it will be used for an extended low power deep sleep in case of critical charge.
|
||||
* If available it will also be used, to reduce the nightlight, if the charge drops to a predefined level, so the nightlight cannot drain to much battery
|
||||
* If available, all relevant battery metrics will be published via mqtt
|
||||
|
||||
Currently the setup requires a custom Ev2400 flasher and the properitary windows software from texas instruments.
|
||||
{{< alert >}}
|
||||
Before soldering to the battery
|
||||
{{< /alert >}}
|
||||
1. The voltage devider high side must be bridged, while being connected to the computer and being supplied with around 4.2 V from the battery solder leads.
|
||||
2. Then the data/register for low voltage flash write protection should be set to 0V, as else with the voltage divider and no further configuration, the IC will refuse all write requests.
|
||||
3. After this the supplied golden image can be used, it will setup the battery for 6Ah and a 4S lifepo. Different values can be adjusted after this to the users liking.
|
||||
## Hardware
|
||||
|
||||
The Battery Management Board features:
|
||||
* CH32V203 RISC-V microcontroller for battery monitoring
|
||||
* I2C interface for communication with the MainBoard
|
||||
* Battery voltage and current sensing
|
||||
|
||||
{{< alert >}}
|
||||
The main board, does not care or process any of the charge discharge limits that can be set. Ensure that the battery can supply enough current as well as accept a 2.4A charging current from the MPPT system.
|
||||
The open-bms board does not use the bq34z100 fuel gauge IC. That component was used in an older legacy design now located in the `__Legay_Unused` folder.
|
||||
{{< /alert >}}
|
||||
|
||||
The golden image sets the statups led up, to be in blinky mode. one very long interval means, that the battery is pretty much full. A few very short flashes mean that the battery is nearly empty. No light means, that the battery is in discharge protection and shut down.
|
||||
## Integration with MainBoard
|
||||
|
||||
If the red error led lights, something is wrong with the battery. This can be abnormal voltages or a very low health state.
|
||||
The battery management board:
|
||||
* Connects to the MainBoard via a two-pin I2C bus
|
||||
* Provides power connection to the battery
|
||||
* Reports battery metrics via MQTT (if configured)
|
||||
|
||||
# Todo?
|
||||
If the battery reports that no discharging should occure, report this and then shutdown without using pumps
|
||||
## Usage
|
||||
|
||||
* If available, the system will use battery metrics for deep sleep management when charge is critical
|
||||
* The nightlight can be automatically disabled if battery level drops below a predefined threshold
|
||||
* All battery metrics are published via MQTT when configured
|
||||
* The system includes safety mechanisms to prevent overcharging and deep discharges through the battery's built-in protection circuitry
|
||||
|
||||
## Safety Notes
|
||||
|
||||
{{< alert >}}
|
||||
The system requires a battery with built-in protection circuitry. The MPPT system does not include charge termination or overcharge protection - the battery itself must provide these safety features.
|
||||
{{< /alert >}}
|
||||
|
||||
The CH32V203-based BMS monitors battery health and provides status information but does not control the charge/discharge limits. Ensure your battery can handle the maximum charging current from the MPPT system (up to 2.4A).
|
||||
|
||||
## Setup
|
||||
|
||||
1. **Connect Battery:** Connect your protected battery to the BMS board
|
||||
2. **_connect MainBoard:** Connect the Battery Management Board to the MainBoard via the I2C bus connector
|
||||
3. **Power On:** Power on the system and verify communication via MQTT
|
||||
|
||||
## Status Indicators
|
||||
|
||||
The BMS board includes status LEDs, they behave like every normal powerbank (1-5 lights, animted if charging)
|
||||
Reference in New Issue
Block a user