diy solar

diy solar

Anyone working with the Overkill Solar Arduino lib?

I found a partly solution I think but I am not happy with it?.
In the file : bms2_options.h I changed #define BMS_TIMEOUT from 500 to 90. Then the number of empty reads goes much down. Further I have put a check in the ino which only calls the print commands if bms.get_cell_voltage is not zero. So I am hiding a lot off "empty" reads.
Not nice but it works for now.

Does anybody who use this library wth an esp32 or esp8266 have had the same problem? If yes is there a better solution? Maybe there is an example that fetches the data of the bms by "bms.debug()" without this many "empty" reads?
 
I managed to get the overkill bms to work with an Arduino Mega R3 and a Nextion display with four batteries at one time.
Tips:
Use BMS2 instead of the original BMS as linked by Overkill. https://github.com/FurTrader/Overkill-Solar-BMS_2-Arduino-Library
The Nextion display uses Serial 1. I used Serial 2 and 3 for two of the batteries, SoftwareSerial (included as a standard Arduino library) for the 3rd (pins 12/13 on the Mega) and AltSoftSerial (pins 46/48 on the Mega - https://github.com/PaulStoffregen/AltSoftSerial) for the 4th, leaving Serial (TX0/RX0) to display the Serial Monitor in Arduino. I could not get SoftwareSerial to work with more than one BMS.
Use EasyNex to communicate with the Nextion. Plenty of instructions and examples by Seithan at: https://github.com/Seithan/EasyNextionLibrary
 
Just found this thread.

The Overkill is the same as the JBD BMS. I'm running ESP32's on each JBD sending data via MQTT to an Influx DB on a Pi4/SSD with Grafana charting. There a couple of threads for the JBD stuff
 
In case it helps anyone, I built an Arduino app for Adafruit nrf52 series devices to communicate with an Overkill Solar BMS over bluetooth. I kept the code very straightforward, and it reads data for commands 0x03 and 0x04 (cell voltages 1..N, overall pack voltage, current, temperatures... and more) and Serial.Prints everything in human readable form. It holds a connection pretty well and should be easy to adapt for whatever uses people have.

More here: https://github.com/neilsheps/overkill-xiaoxiang-jbd-bms-ble-reader
 
Hi
I am trying to use the bms library of furtrader ( https://github.com/FurTrader/Overkill-Solar-BMS_2-Arduino-Library) but get a problem. When I run one of the examples for instance to get the pack voltage it is not consequent. ...

This is my code:

....
void loop() {
// bms.main_task(true);
bms.query_0x03_basic_info();
float voltage= bms.get_voltage();
delay(100);
Serial.print("voltage pack :");
Serial.println(voltage);
// delay(100);
bms.query_0x04_cell_voltages();
delay(600);
for (int i = 0; i <= 3; i++) {
float cellvoltage=(bms.get_cell_voltage(i) *1000);
if (cellvoltage > 0){
Serial.print(i);
Serial.print(" :");
Serial.print((bms.get_cell_voltage(i) *1000), 0);
Serial.println(" :");
cellvoltage=0;
} else {
Serial.println(" * ");
}
}
delay(100);
// bms.debug();
}

After a quick glance, I'd say the problem is that you are not calling "bms.main_task(true);" in your loop, as that line (I highlighted in red above) has been commented out.

bms.main_task(true); needs to be called each time around your main loop in order to process the serial data from the Overkill BMS.

Also, remove all the delay() functions within your main loops as that will interact negatively with the bms library. If you need to do something infrequently (like print to serial) then add a non-blocking timer code. Also, once you call "bms.main_task(true); " you no longer need to call bms.query_0x03_basic_info(); or bms.query_0x04_cell_voltages() - those functions are called within the main_task().

Do check out the sample code for overkill bms version 2.0 library and do something like this...


unsigned long lastmillisBMSthread;
void loop()
{
while (1)
{
bms.main_task(true); //call the BMS library every loop.

if ((millis() - lastmillisBMSthread) > 1000)
{
// do stuff every 1000ms

Serial.print("BMS thread 1s tick: voltage=");
Serial.println(bms.get_voltage());
lastmillisBMSthread = millis();
}
}
}

HTH
 
Back
Top