4-channel BMS with daisychain bus

Topics concerning OEM and open source BMSes
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

Sorry, missed this. Attiny26 would be up to the job. Not stocked at JLCPCB, but still. Resolution drops because the cells are not measured independently. Rather channel 0 measures GND to cell1, ch 1 measures GND to cell 2 and so on. So the top most channel measures the sum of the respective number of cells. So while ch 0 only has to cover 0-4.2V ch 3 has to cover 0-16.8V with the same 10-bit resolution, or 12 bit with oversampling.

In the most interesting voltage range (3.1 to 3.4V for LFP) I mitigated this by using differential measurement. The divided voltage is compared to a 2.5V reference and the difference is multiplied with the internal 20x gain stage (attiny 26 offers 8x, 20x, 32x). For NMC with its steep voltage to SoC curve that is not even necessary though.

News
Today I played with the BMS a bit more after it has been resting all winter. The comm connectors were slightly corroded and I had to wiggle them quite a bit to get communication going again. I also found the voltage accuracy has suffered, probably also due to corrosion. So I will now lower the divider resistors by 5x. That adds about 40uA quiescent current on the bottom cell (30, 20, 10 on the others) which I think is still acceptable.

I also found that JLCPCB now offers to populate connectors. I will do a small run there and replace the boards on my test system with it. Can't make any more head units right now because all variants of the STM32F105 are now sold out :(
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

johu wrote: Mon May 03, 2021 6:58 pm
Today I played with the BMS a bit more after it has been resting all winter. The comm connectors were slightly corroded and I had to wiggle them quite a bit to get communication going again. I also found the voltage accuracy has suffered, probably also due to corrosion. So I will now lower the divider resistors by 5x. That adds about 40uA quiescent current on the bottom cell (30, 20, 10 on the others) which I think is still acceptable.
Hi, how badly has the voltage accuracy suffered? Would this resistor mod fix that? Is it possible to use any waterproof connectors or grease them somehow? Thanks
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

I will check systematically later. Problem is not the connectors but the meg-ohm resistors whos value is easily reduced. Conformal coating should help too. In Polo this didn't happen because the batteries were sealed off enough. But during winter inthe shed some condensation dripped off the roof and on the cell modules
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

johu wrote: Tue May 04, 2021 4:53 pm I will check systematically later. Problem is not the connectors but the meg-ohm resistors whos value is easily reduced.
Thanks that would be interesting to know if the voltage inaccuracy is significant. Would you be willing to share the new BOM with updated resistors and other parts? 😊
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

Hi, have you got a chance to test the BMS with new resistor values? Does everything look ok? 😊
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

Hi, would you be able to share an example or part number of connector X1 on the 5.3 slaves? I have no idea what it is as the part number in the bom is not possible to find anywhere. 😊
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: 4-channel BMS with daisychain bus

Post by LRBen »

I'm guessing these are probably still some way from being on sale in the shop so I started to do a test order with PCBway as JLCPCB don't have all the parts. I think I muddled my way through it but one question came up on the V2 CAN isolator files. Is the CAN Isolator a 2 layer or 4 layer pcb? I'm guessing a 2 layer PCB as I saw a post from Johannes that he doesn't work with 4 layers. But the Gerber file is coming up with 4 layers.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

It is 4 layers as it was designed by Andy (sonachan1) :)
Re connectors I'm struggeling with part numbers myself. Just find some 2mm connectors.

EDIT: you said X1. That is https://www.digikey.de/products/de?keyw ... 5003702996
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: 4-channel BMS with daisychain bus

Post by LRBen »

johu wrote: Mon Jun 28, 2021 7:42 am It is 4 layers as it was designed by Andy (sonachan1) :)
Ah got it. Thanks for the quick reply.
If they are going to be in the shop in the next couple of months I'm very happy to hold off and wait for that.
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

Meh, still suffering of STM32F105 shortage at JLCPCB. No promises just yet.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
LRBen
Posts: 471
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 42 times
Been thanked: 99 times

Re: 4-channel BMS with daisychain bus

Post by LRBen »

I'll get a small batch from PCBway for now then if they can do it. I might even learn something along the way.
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

Maybe Johannes or somebody who already got the BMS working share a bit simplified programming sequence in order? What is the first step? Should I upload firmware to master unit V2 first? Is it much the same as with openinverter boards with STlink? Which bootloader should I use? Is it the same bootloader as with openinverter firmware? Where are the fuses set? Thanks a lot 😊
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

johu wrote: Sat Mar 13, 2021 1:41 pm 5.3 has better "first board" selection I think. A jumper on what is otherwise the programming header.
Johannes has the programming header pinout changed in the 5.3 slaves and would you share what it is? I am not able to establish a connection to the attiny44a via programming header. How do you suggest to power the attiny for programming? I applied voltage to the pin5 on the J4 connector but I can see no LEDs light up. Thanks 😊😊
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

Hmm, no change... Mind the capacitor on the clock line. Try 10 kHz speed
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

johu wrote: Sun Jul 25, 2021 4:39 am Hmm, no change... Mind the capacitor on the clock line. Try 10 kHz speed
Johannes, so I flashed the firmware on the 5.3 slaves and also on the master unit. I can see BMS settings on web interface and slaves are flashing in sequence from LED 4 to LED 1 when connected to battery cells. However when I try to connect slaves to master unit I get no data at all and slaves keep flashing as they were. On the first slave (counting from the most negative cell) I did not put a jumper on the programming header but I put a jumper on the 2nd slave on the 4th pair of pins counting from the top (the only free pair not used for flashing). It is only a 2 slave board test setup. I tried to put the jumper on the same pin pair on the 1st board but no change. What could be wrong? How do we select first board (or not) on the 5.3 slaves? Thanks 😊
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

Still on holiday, it says it in the schematic. Pin 4-6 or something.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Ilia
Posts: 3
Joined: Tue Jun 08, 2021 9:07 am

Re: 4-channel BMS with daisychain bus

Post by Ilia »

How to buy the firmware of the wifi module for bms?
User avatar
arturk
Posts: 146
Joined: Wed Oct 02, 2019 3:58 am
Location: United States, MD
Has thanked: 1 time
Been thanked: 2 times

Re: 4-channel BMS with daisychain bus

Post by arturk »

1998 Jaguar XJR, GS450h drivetrain, 48kWh/96s BMW battery
Ilia
Posts: 3
Joined: Tue Jun 08, 2021 9:07 am

Re: 4-channel BMS with daisychain bus

Post by Ilia »

Спасибо!
Ilia
Posts: 3
Joined: Tue Jun 08, 2021 9:07 am

Re: 4-channel BMS with daisychain bus

Post by Ilia »

Thanks!!!
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

Johannes, the calibration process seems to get stuck on the last step - differential gains. If differential gains step is commented out from the code calibration completes and values are written to eeprom. I observed accuracy of ~10 mV. Otherwise with differential gains step included nothing ever gets written to eeprom. Would you have any suggestions? Could it be due to not stable enough voltage reference or?
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

Yes it could indeed loop forever if the voltage source is noisy because measured==expected is never hit
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
m.art.y
Posts: 550
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK
Has thanked: 24 times
Been thanked: 17 times

Re: 4-channel BMS with daisychain bus

Post by m.art.y »

Thanks Johannes. I also want to ask about balancing. When I had my test setup (2 slaves and a master) wired up the slaves were seeing voltage differences of over 200 mV between the cells but they did not try to balance? The only way I saw it balance was when cell voltage was higher than set shunt voltage. I wonder what your bms does when it sees 1 cell that is say 200-300 mV lower than the others? Thanks
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

So far there is no meaningful balancing algorithm. It just activates the shunts as you observed.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply