Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement the offset of the JK02_32S frame (software version 11) #326

Closed
sralus opened this issue May 7, 2023 · 1 comment
Closed
Labels
question Further information is requested

Comments

@sralus
Copy link

sralus commented May 7, 2023

Hello
I know that there is a slightly different protocol here, but maybe you can help me with these two values?
I got a new JKBMS:
(JK-BMS has the hardware ver V11.XW - software ver V11.26 and version V4.10.1)
and had to increase all receivedBytes_main by 32 so that I can read the values.

This works:

Average_Cell_Voltage = (((int)receivedBytes_main[91] << 8 | receivedBytes_main[90])*0.001);
//Average_Cell_Voltage = (((int)receivedBytes_main[59] << 8 | receivedBytes_main[58])*0.001);

all data are read except these two:
This not ?:

Delta_Cell_Voltage = (((int)receivedBytes_main[93] << 8 | receivedBytes_main[92])*0.001);
//Delta_Cell_Voltage = (((int)receivedBytes_main[61] << 8 | receivedBytes_main[60])*0.001);

and this does not work either:

//MOS_Temp = (((int)receivedBytes_main[135] << 8 | receivedBytes_main[134])*0.1);
if(receivedBytes_main[167] == 0xFF) {
MOS_Temp = ((0xFF << 24 | 0xFF << 16 | (int)receivedBytes_main[167] << 8 | (int)receivedBytes_main[166])*0.1);
}
else {
MOS_Temp = (((int)receivedBytes_main[167] << 8 | (int)receivedBytes_main[166])*0.1);
}

does one of you have an idea which values should I use for Delta_Cell_Voltage & MOS_Temp have to register?

Thank you in advance

@syssi
Copy link
Owner

syssi commented May 9, 2023

Power tube / mosfet temperature: https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_bms_ble/jk_bms_ble.cpp#LL555C1-L555C119

You should find the mosfet temperature starting at position 112 + 32 (2 bytes).

https://github.com/syssi/esphome-jk-bms/blob/main/components/jk_bms_ble/jk_bms_ble.cpp#L539

The delta cell voltage starts a position 60 + 16 (2 bytes).

@syssi syssi changed the title Increase receivedBytes_main by 32 How to implement the offset of the JK02_32S frame (software version 11) May 9, 2023
@syssi syssi added the question Further information is requested label May 9, 2023
@syssi syssi closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants