Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TI BQ769X0 Based Monitors - Project thread
Kewls. I haven't done CRC coding, so I'm not sure what help I can be in that area. I'll need to do that when I move everything over to the stm32/esp32 platform, though.

A lot of times the resistors are used to limit current to the IC. However, it is possible to limit too much current, and the chip won't function as intended. Not saying that's going on here, though.

Schematic is definitely a lot easier to read now Wink
You have a broken trace between BattConn's and near D2, the green trace. Not sure if that is mirrored on the pcb side or not.
Proceed with caution. Knowledge is Power! Literally! Cool 
Knowledge is Power; Absolute Knowledge is Absolutely Shocking!
Certified 18650 Cell Reclamation Technician

Please come join in general chit-chat and randomness at Discord Chat (channels: general, 3d-printing, linux&coding, 18650, humor, ...)
(this chat is not directly affiliated with SecondLifeStorage; VALID email req'd)
Holy handgrenades.

OK so I've merged the CRC ability of the mbed library into the arduino library. This is just for write ops, as the BQ chip requires a good CRC to write to the registers, but when you read from the chip, you get the data and CRC - I just have it ignore the CRC bit for now.
The mbed library has a snip of code that basically keeps doing read requests from the bq chip until the CRC code the chip sends is valid - this is the safest way to do it, but it has no provision for what to do if it just permanently sends garbage data. (could easily be done with a while statement that times out after ten failed attempts for example) but I don't care about that right now.

I've updated the github link with the library I'm using. It's chock-full of debugging stuff since I was trying to trace my issues, but at least it's there for all to make fun of.

Kori, the broken link was because I moved wires around in the schematic to make it easier to see. The board and schematic are the same - no functional changes have been made yet.

I'm going to tinker around a bit more with it and try and get the code cleaned up as best I can. When I get to that point, I'll spit out another update and upload to github. I really like the mbed library since it's way more advanced and just better overall, but it has so many functions that are ARM specific it's gonna be a nightmare to convert it into an arduino-friendly library.
What about using a ltc3300 for balancing?
The LTC is for active balancing circuits. The IC itself is more expensive than the BQ one, and then all the extra hardware to make the active balancing work will greatly increase the build cost.

Active balancing is only needed when using cells that regularly drift, or have a hard time staying in balance. If they only drift about 50mV or less during charging from highest to lowest, then active isn't needed.
Proceed with caution. Knowledge is Power! Literally! Cool 
Knowledge is Power; Absolute Knowledge is Absolutely Shocking!
Certified 18650 Cell Reclamation Technician

Please come join in general chit-chat and randomness at Discord Chat (channels: general, 3d-printing, linux&coding, 18650, humor, ...)
(this chat is not directly affiliated with SecondLifeStorage; VALID email req'd)
Well I guess that's a good point - what does the average powerwall user see as a current need in balancing?

That's the part I have no idea about. Would a normal powerwall user need the avg 50ma that most of the BMS are capable of, or will they need much higher currents? I assumed much much higher, hence why I want to take it off to another board and use 1W resistors .

And although active balancing is only needed for unbalanced packs - it's an interesting concept. I don't have the time to look into it right now since I have bigger fish to fry. And as Korishan says, there is a ton of supporting circuitry needed to make that chip do it's thing. Basically way way more complicated than passive, and shouldn't be needed.
hello everyone,
I'm also working on bq76920 bms.
after detecting the short circuit or overcurrent fault, what should be next logic. I'm thinking after short circuit or overcurrent is detected until we disconnect the load MCU won't turn on the MOSFET. is there any other method or logic for this ?. because if we connect this bms to some circuit and accidentally we short or overcurrent occurs we have to disconnect and connect again.
Personally - I'd go for a manual reset button. Last thing I'd want is for it to automatically reconnect power for short circuit or overcurrent and lead to a fire.
Is there any reason to use the chip for overcurrent protection? Why not use DC circuit breakers? I'd trust those any day over the built-in function.
Also, what current loads are you trying to switch via mosfet?
About darn time - I fixed the library for how it does voltage checks when it comes to CRC with the BQ chip.
Basically - the standard arduino library didn't support CRC - so when the library asked for the voltage readings, it was getting CRC data from the BQ chip and thinking it was actual voltage data and converting that into a reading. Ergo, the original library when used with a CRC chip was spitting out garbage readings and it had no idea.

I added CRC functionality so that it will only use actual voltage readings - and if the CRC is bad, it'll throw up a message for bad CRC and not update the voltage readings. for proper robust CRC implementation, it'll need some extra checks, but for now it's working to get readings.

Anyways, checkout the Github - I put in the latest library there.

I have 8 cells hooked up and here are the readings:
cell 1 voltage: 3937 Multimeter says: 3.95
cell 2 voltage: 3939 Multimeter says: 3.96
cell 3 voltage: 3939 Multimeter says: 3.96
cell 4 voltage: 45 Multimeter says: N/A
cell 5 voltage: 3934 Multimeter says: 3.96
cell 6 voltage: 3894 Multimeter says: 3.91
cell 7 voltage: 3895 Multimeter says: 3.92
cell 8 voltage: 3897 Multimeter says: 3.91
cell 9 voltage: 45 Multimeter says: n/a
cell 10 voltage: 3891 Multimeter says: 3.90
Batt voltage: 31334 Multimeter says: 31.3

So cell 4 and 9 are just jumpers - they are fake readings that we'll need to deal with later. But for now I have what I've been looking for .. for so darn long - something that'll just tell me what the friggin voltages are per cell/pack. Now that this is good, I can start looking at everything else.
Next it'll be fixing up some of the other library functions and making the library fit a bit better for powerwall needs.
Then Itll be setting it up for under / over voltage protection - then balancing. I'm realizing now that I don't have good data output to auto switch latching relays using just this board. Right now that info would have to be streamed and another board would have to switch relays etc - Not ideal, so I'll be working on that next.

Does anyone really even care about this project? I'm wondering if the effort I'm putting into sharing this is even worth the effort. My end desire is stated in my OP: open source arduino-based BMS for the powerwall community - a more DIY version than a battrium - but also much cheaper and more expandable for certain uses since everything is open.
My hope is that this would be a community based project. There are other aspects I know nothing about and will need help with to make this into a really cool full-featured system. Namely: I can trip my way through hardware, but when it comes to using a rpi to graph and display the data in a useable way - it would be way easier if someone with that existing knowledge pitched in. I just spent a week reverse engineering a bunch of code and learning a ton to just figure out how to implement CRC into i2c comms on arduino (which apparently not many people have done, and the other solutions I found didn't work for this chip) . When I work on the code, I'm putting in a ton of comments on what the sections do and how they work. Some people think this is bad form, but at least the next person working on it will understand why something is there and how it was supposed to work.

I started this because I saw a ton of people noticing the BMS gap and trying to startup a project all on their own. Well now there is code and a board and schematic and BOM that work - all with a pretty low cost.

Forgot to mention - Since I'm looking for collaborators:

Now that I have figured out the first step on this and what sort of updates I need to make to the board to make it more useful...
I will be ordering new boards and components for said boards.  

When I do, I will ship the boards / components at cost to anyone looking to collab on this.  I'm noticing that there are at least 2 other motivated people on this board working on BMS's - I don't see the point of everyone working on separate projects. What it ususally results in is 3 dead projects that never really went anywhere.   If nobody wants to collab, I might just join another BMS developer and try to help them
rev0 likes this post
I would love to collaborate but I don't have the ability. I'm happy to beta test! I have a 7s portable battery. Would be sweet to pull up some data on charge level and have an output relay to turn a victron bp-100 on and off. Not too worried about the balancing side as I have an active balancer already. But OVP, UVP that activates a BP-100 would be awesome! And be able to see cell level charge as well.

Good work so far!
Hi GPN, I don't really think beta testing would have any point right now considering how useless this system is at present. I'm going to be working on adding balancing and OV/UV protection first - and from there adding current monitoring. When those subsystems are in place is when I think it'd make more sense to look at shipping units.

What is nice to have now is input in how such a system would be used by people such as yourself. Even bringing up your desire for using it to switch the Victron BP-100 was helpful to see how I can make sure to keep that sort of stuff in mind as I move forward. I was looking at doing OV/UV protection by tripping a breaker that sinks 24V - which is different than how the BP series works - it shorts two wires. So one of them needs a relay/mosfet to send power to a breaker, the other can just use a relay/mosfet to close a switch and doesn't require extras for having a 24V source.

Forum Jump:

Users browsing this thread: 1 Guest(s)