gropi75 / SEM32

SEM32 (Solar Energy Manager 32) based on ESP32 for Soyosource Inverter, Huawei r4850g2 power supply and 48V battery
MIT License
11 stars 3 forks source link
esp32 jk-bms r4850g2 soyosource

Solar Energy Manager for ESP32 (SEM.32)

GitHub Repo stars GitHub watchers GitHub forks Release

SEM.32 (Solar Energy Manager 32) based on ESP32 controller, Soyosource Inverter, Huawei r4850g2 power supply, JK-BMS and 48V battery. It helps You to maximize the usage of self generated solar power.

Main features:

Web GUI

Summary page

Info page

Settings page

Hardware components:

External connectors:

USB upper:

Pin 2 (RXD/D-) Output A Max 485 USB Driver for inverter, Inverter Input A+

Pin 3 (TXD/D+) Output B Max 485 USB Driver for inverter, Inverter Input B-

USB Lower:

Pin 2 (RXD/D-) CAN L

Pin 3 (TXD/D+) CAN H

RJ45:

Pin 1 (Pair 3) Output A Max 485 USB Driver for BMS, BMS Input A+

Pin 2 (Pair 3) Output B Max 485 USB Driver for BMS, BMS Input B-

6 pin connector:

Pin1 GPIO26 Temp Sensor

Pin2 Ground

Pin3 +3V3

Pin4 NC

Pin5 NC

Pin6 NC

Pinning Controller

GPIO Function Application Driver
GPIO00 Boot Push Burron 1
GPIO01
GPIO02
GPIO03
GPIO04 CAN RX Charger SN65HVD230
GPIO05 CAN TX Charger SN65HVD230
GPIO06
GPIO07
GPIO08
GPIO09
GPIO10
GPIO11
GPIO12 LED Blue, Charging
GPIO13 LED Green, Discharging
GPIO14 LED Yellow, Standby
GPIO15 LED Red, ERROR
GPIO16 U2RXD Inverter Max485 CSA
GPIO17 U2TxD Inverter Max485 CSA
GPIO18 RS485_EN Chip enable, Inverter Max485 CSA
GPIO19
GPIO21 I2C SDA1 Display SSD1306 Address: 0x3C
GPIO22 I2C SLC1 Display SSD1306 Address: 0x3C
GPIO23
GPIO25
GPIO26 DAT Temp. Sensors DS18B20; inc. 4K7 pull up
GPIO27
GPIO32 RS485 RxD BMS Max485 CSA
GPIO33 RS485 TxD BMS Max485 CSA
GPIO34 RS485_EN BMS Max485 CSA
GPIO35 Dig_input Push Button 3
GPIO36 Dig_input Push Button 2
GPIO39 LED auxiliary

Information:

Power Equation for the whole house: $\ ActGridPower + ActBatPower + SolProd = Used Power$

JSON help: https://arduinojson.org/v6/assistant/#/step1

ESP32 infos: https://www.upesy.com/blogs/tutorials/how-to-connect-wifi-acces-point-with-esp32

BSC (Battery Safety Controller) homepage: https://github.com/shining-man/bsc_fw

JK-BMS Protocol: https://github.com/jblance/mpp-solar/issues/112#issuecomment-850585642

JK-BMS collection of NEEY: https://github.com/NEEY-electronic/JK/tree/JK-BMS

Known issues:

Solution for Littlefs error: pio pkg update -g -p espressif32