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

Setting SoC #19

Open
sebdehne opened this issue Dec 13, 2022 · 4 comments
Open

Setting SoC #19

sebdehne opened this issue Dec 13, 2022 · 4 comments
Assignees

Comments

@sebdehne
Copy link

sebdehne commented Dec 13, 2022

It is also possible to set SoC with the 0x21 command (RTC is also writted at the same time):

A5 40 21 08 - the usual header
160C0D151D27 - 6 bytes for the date/time. YY-MM-DD HH:MM:SS. This example 12/13/2022 9:29:39
01 2C - SoC: 300/10 = 30%)
C3 - checksum as usual

@softwarecrash
Copy link
Contributor

thanks, i have found the 21 command for months and implement it, but dont know about the time, not sure that the bms need a time. take a look at my PR, i think thats all correct for setting SOC

@maland16
Copy link
Owner

I'm gonna try and pull that PR in soon

@maland16 maland16 self-assigned this May 15, 2023
@197Fabian
Copy link

Hi,

I also want to set the SOC of the DALY BMS with the esp32, But I don’t know how.
Could you please help me?
Do you have any example how I must Realize that??

@nschermer
Copy link

Changing the SOC is fairly simple:

uint16_t socScaled = soc * 10; // soc is a number between 0 and 100
this->my_txBuffer[10] = highByte(socScaled);
this->my_txBuffer[11] = lowByte(socScaled);
this->sendCommand(0x21);

// Clear the buffer for further use
this->my_txBuffer[10] = 0x00;
this->my_txBuffer[11] = 0x00;

All the registers before 10 are for a date/time format, not really interesting and if you keep them 0 the daly works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants