diy solar

diy solar

Anyone working with the Overkill Solar Arduino lib?

Today I got all the code tied together and publishing to AWS IoT Core (MQTT). I'll update more tomorrow. The sketch is now only sending parameter updates when they change. ..WIth the exception of individual cells which I'll get to.
 
Looks like the checksum is not the XOR of the bytes. It's just the 2's complement of the arithmetic sum (16 bits) of the command (to the BMS) or the status (from the BMS), the length byte, and the data bytes. Doing a bitwise inversion and adding 1 is 2-s complement.

A simplified code snippet is (match up the Serial.println statements to the original code):

Serial.println("----------------------");
Serial.println("Sending read request for basic info and status");
HWSerial.write(0xDD); // Start byte
HWSerial.write(0xA5); // Read command
HWSerial.write(0x03); // Basic info register(s)
HWSerial.write(0x00); // No data bytes
HWSerial.write(0xFF); // Checksum high byte
HWSerial.write(0xFD); // Checksum low byte
HWSerial.write(0x77); // Stop byte

Serial.println("delaying read....");

That doesn't explain why it's not working ... seems like yours is just echoing back what you sent, or something in the Arduino code is doing a loopback.


The last couple issues were that I had the rx and tx params swapped and I had forgotten to connect the ground from the esp32 to the bms.

The former explains the mysterious loopback.
 
The last couple issues were that I had the rx and tx params swapped and I had forgotten to connect the ground from the esp32 to the bms.

The former explains the mysterious loopback.
Glad you got it working! I was considering taking 4 of the cells from the 16 I'm using to build a pack and connecting to the 4s BMS I just got for testing the code, LoL.

It would be useful to calculate the checksum on the received data if you want to discard or retry to eliminate data corrupted by errors in the transmission. It should be rare, but if you're accumulating data, one error can mess up the totals.
 
I was considering taking 4 of the cells from the 16 I'm using to build a pack and connecting to the 4s BMS I just got for testing the code, LoL.

This brings up a good point that I've been wanting an answer to: is there an accepted way to run/test a BMS in a controlled setting without involving cells of the relevant chemistry? e.g. somehow with a bench power supply or something...
 
This brings up a good point that I've been wanting an answer to: is there an accepted way to run/test a BMS in a controlled setting without involving cells of the relevant chemistry? e.g. somehow with a bench power supply or something...
Just off the top of my head you could just set a bench psu to some voltage between 2.5 and 3.65 volts and put the negative sense lead to negative and all the positive leads to positive.
Would that show as 1 cell with voltage and 3 cells at 0 volts?
 
Just off the top of my head you could just set a bench psu to some voltage between 2.5 and 3.65 volts and put the negative sense lead to negative and all the positive leads to positive.
Would that show as 1 cell with voltage and 3 cells at 0 volts?

That's my gut feeling too... has anyone tried this?
 
This brings up a good point that I've been wanting an answer to: is there an accepted way to run/test a BMS in a controlled setting without involving cells of the relevant chemistry? e.g. somehow with a bench power supply or something...
I'm not sure. But, the last 48v 16s I bought from overkill (a couple weeks ago) had a thermal paper test print out taped to it. I imagine they have a set up like that.
 
Last edited:
Looks like the json is all uglified... It can't be parsed into dynamodb. I left the retreat today and it'll be a few days before I can do a real fix and update.

The good news is that both batteries are online and reporting changes in values. I can see them periodically on the mqtt client dashboard on aws
 

Attachments

  • IMG_20210928_144058.jpg
    IMG_20210928_144058.jpg
    291.9 KB · Views: 28
  • IMG_20210928_144104.jpg
    IMG_20210928_144104.jpg
    150.8 KB · Views: 28
  • IMG_20210928_144145.jpg
    IMG_20210928_144145.jpg
    488.9 KB · Views: 28
Just off the top of my head you could just set a bench psu to some voltage between 2.5 and 3.65 volts and put the negative sense lead to negative and all the positive leads to positive.
Would that show as 1 cell with voltage and 3 cells at 0 volts?

It didn't work at ~3 volts. (BMS remained unpowered) I assume the internal electronics need higher voltage between the positive BC8 sense lead and negative.

Warning: I have to idea how safe this is for the BMS. Copying anything I'm doing here is obviously at your own risk. :)

What did seem to "work" (at least partially) was to leave the white sense leads BC1 thru BC7 disconnected, tie the black sense lead to B- and supply 22 volts across BC8 and B-. (I'm testing with a JBD-SP10S009)

This produced some bizarre cell voltage numbers since the cell sense leads were all floating, but did at least allow the BMS to come online and be reachable via the bluetooth module.

2021_09_29_bms_testing.png
 
Putting a ladder of high value resistors might fix the bizarre cell readings. Something like 100K ohm resistors would drain off noise and space out the readings close to evenly. Then connect the sense leads between the resistors in sequence.
 
It didn't work at ~3 volts. (BMS remained unpowered) I assume the internal electronics need higher voltage between the positive BC8 sense lead and negative.

Warning: I have to idea how safe this is for the BMS. Copying anything I'm doing here is obviously at your own risk. :)

What did seem to "work" (at least partially) was to leave the white sense leads BC1 thru BC7 disconnected, tie the black sense lead to B- and supply 22 volts across BC8 and B-. (I'm testing with a JBD-SP10S009)

This produced some bizarre cell voltage numbers since the cell sense leads were all floating, but did at least allow the BMS to come online and be reachable via the bluetooth module.

View attachment 66943
Maybe Steve from overkill would tell you... though that might be proprietary thing he wants to keep within the company
 
Putting a ladder of high value resistors might fix the bizarre cell readings. Something like 100K ohm resistors would drain off noise and space out the readings close to evenly. Then connect the sense leads between the resistors in sequence.

Sounds like a voltage divider to me. I guess the resistors would just need to be large enough that the balance current can't overheat them...

Maybe Steve from overkill would tell you... though that might be proprietary thing he wants to keep within the company

I'd definitely be curious whether @OverkillSolar has a recommended bench testing proceedure for those without spare cells to hand!
 
Sounds like a voltage divider to me. I guess the resistors would just need to be large enough that the balance current can't overheat them...



I'd definitely be curious whether @OverkillSolar has a recommended bench testing proceedure for those without spare cells to hand!
My guess is that you would not be drawing much if any balancing current, because the impedance of the balancing circuit is very low compared to the 100K resistor it's driving current into. If your resistors are well matched, there should be zero balancing current because the BMS thinks the "cells" are at exactly the same voltage. It only requires 1 micro ampere to offset an 0.1v difference across a 100K ohm resistor. If the balancing current is fixed, rather than proportional to the voltage difference, then it could oscillate because you're dumping a relatively large amount of current across a large resistance.
 
This brings up a good point that I've been wanting an answer to: is there an accepted way to run/test a BMS in a controlled setting without involving cells of the relevant chemistry? e.g. somehow with a bench power supply or something...
I built an 8Ah pack with JBD. Before you laugh, they are 3x headway hp 38120 in series. ? So they can deliver the BMS rated current.

This is my "test pack" that is a "training wheels" version of the frey 100Ah pack w/ JBD that I'm planning.

I don't know how to do it without cells so I made a small pack.
 
A "simulation mode" would be valuable for any BMS. Put it into "simulation mode" and it will disconnect the MOSFETs, and then receive measurement data and send its "reaction" in the form of the normal stuff like whether balancing is engaged or whether charge/discharge mosfet are active, while not doing anything other than sending the "simulated" reality back over serial data.
 
Wow, that is really odd. But I think it might have to do with what I wrote about the fixed current amount it's trying to drive into each resistor to "balance" it. Seems to be oscillating as a result. Thanks for putting it together and testing it. What size resistors did you use?
 
Back
Top