Skip to content
/ jk-esp32 Public

Polished ESP32 web server for JK-BMS using UART-TTL instead of BLE.

License

Notifications You must be signed in to change notification settings

shvmm/jk-esp32

Repository files navigation

Clean/Polished ESPHome Web server for monitoring JK-BMS via UART instead of BLE.

This project is a fork of excellent JK-BMS monitoring project from https://github.com/syssi/esphome-jk-bms This project also contains a polished CANBUS implementation from https://github.com/Sleeper85/esphome-jk-bms-can The filename is esp32-jk-bms-can.yaml

I have only simpliefied things for a very particular 'plug and play' use case.

Demo Picure

Tested on: JK-BD6A24S10P (but should work on any JK BMS). Read main project ESPHome JK BMS for more details. ESPHome version: 2023.10.3, Windows 11

1. Requirements:

  1. Any cheaply available ESP32 board
  2. GPIO ribbon connectors
  3. JST 1.25mm 4 pin connector for JK-BMS

You can easily prepare the BMS and GPIO cable accordingly if you want!

Preparation collage

There are three Steps involved:

a. Configuring the code for your particular setup.

b. Preparing your ESP32 board by compiling and flashing the code.

c. Connecting the configured ESP32 to your BMS UART-TTL port and using the web-server IP for monitoring.

┌──────────┐                ┌─────────┐
│          │<----- RX ----->│         │
│  JK-BMS  │<----- TX ----->│ ESP32/  │
│          │<----- GND ---->│         │<---- USB Power Supply
└──────────┘                └─────────┘

# UART-TTL socket (4 Pin, JST 1.25mm pitch)
┌─── ─────── ────┐
│                │
│ O   O   O   O  │
│GND  RX  TX VBAT│
└────────────────┘
  │   │   │
  │   │   └─── GPIO16 (`RX2_pin`)
  │   └─────── GPIO17 (`TX2_pin`)
  └─────────── GND

Just swap the RX and TX pins, if BMS is undetected.

2. Configuring the code for your setup:

  1. Install CP210x Universal Windows Driver https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads

  2. Download and install python from https://www.python.org/downloads/ Remember to tick all boxed during installation for path name limit and environment variables for ease of use.

  3. Open CMD and run

    pip3 install esphome
    
  4. You can check whether esphome is installed by running

    esphome version
    
  5. Download the release and extract it to a folder. Open secrets.yaml file in the main directory to edit your WIFI SSID and password.

  6. Comment and uncomment needed/unneeded sensors in the configuration file. If you have a newer BMS, you may need to change to a newer protocol.

  7. Right click -> choose Open in Terminal Enter the command

    esphome run .\esp32-example.yaml
    
  8. After compilation is finished, you may be asked to enter the COM port of your ESP32 board. Press 1 to confirm

  9. Make the connection between the BMS and ESP32 and connect a USB power supply.

  10. The IP for the webserver will be displayed in ESP32 serial log after successful connection to WIFI has been made.

About

Polished ESP32 web server for JK-BMS using UART-TTL instead of BLE.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published