Page 7 of 10

Re: 4-channel BMS with daisychain bus

Posted: Mon May 03, 2021 6:58 pm
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 :(

Re: 4-channel BMS with daisychain bus

Posted: Tue May 04, 2021 3:25 pm
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

Re: 4-channel BMS with daisychain bus

Posted: Tue May 04, 2021 4:53 pm
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

Re: 4-channel BMS with daisychain bus

Posted: Wed May 05, 2021 6:42 pm
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? 😊

Re: 4-channel BMS with daisychain bus

Posted: Wed May 05, 2021 7:02 pm
by johu

Re: 4-channel BMS with daisychain bus

Posted: Tue Jun 08, 2021 4:34 pm
by m.art.y
Hi, have you got a chance to test the BMS with new resistor values? Does everything look ok? 😊

Re: 4-channel BMS with daisychain bus

Posted: Fri Jun 18, 2021 6:03 am
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. 😊

Re: 4-channel BMS with daisychain bus

Posted: Mon Jun 28, 2021 7:37 am
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.

Re: 4-channel BMS with daisychain bus

Posted: Mon Jun 28, 2021 7:42 am
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

Re: 4-channel BMS with daisychain bus

Posted: Mon Jun 28, 2021 8:06 am
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.

Re: 4-channel BMS with daisychain bus

Posted: Mon Jun 28, 2021 8:12 am
by johu
Meh, still suffering of STM32F105 shortage at JLCPCB. No promises just yet.

Re: 4-channel BMS with daisychain bus

Posted: Mon Jun 28, 2021 8:23 am
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.

Re: 4-channel BMS with daisychain bus

Posted: Mon Jul 19, 2021 12:41 pm
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 😊

Re: 4-channel BMS with daisychain bus

Posted: Sat Jul 24, 2021 5:52 pm
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 😊😊

Re: 4-channel BMS with daisychain bus

Posted: Sun Jul 25, 2021 4:39 am
by johu
Hmm, no change... Mind the capacitor on the clock line. Try 10 kHz speed

Re: 4-channel BMS with daisychain bus

Posted: Thu Jul 29, 2021 4:48 pm
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 😊

Re: 4-channel BMS with daisychain bus

Posted: Thu Jul 29, 2021 5:23 pm
by johu
Still on holiday, it says it in the schematic. Pin 4-6 or something.

Re: 4-channel BMS with daisychain bus

Posted: Mon Sep 13, 2021 1:58 pm
by Ilia
How to buy the firmware of the wifi module for bms?

Re: 4-channel BMS with daisychain bus

Posted: Sat Sep 18, 2021 12:11 am
by arturk

Re: 4-channel BMS with daisychain bus

Posted: Tue Sep 21, 2021 9:09 am
by Ilia
Бпасибо!

Re: 4-channel BMS with daisychain bus

Posted: Tue Sep 21, 2021 9:10 am
by Ilia
Thanks!!!

Re: 4-channel BMS with daisychain bus

Posted: Tue Sep 21, 2021 5:28 pm
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?

Re: 4-channel BMS with daisychain bus

Posted: Tue Sep 21, 2021 6:03 pm
by johu
Yes it could indeed loop forever if the voltage source is noisy because measured==expected is never hit

Re: 4-channel BMS with daisychain bus

Posted: Fri Sep 24, 2021 7:10 am
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

Re: 4-channel BMS with daisychain bus

Posted: Fri Sep 24, 2021 7:29 pm
by johu
So far there is no meaningful balancing algorithm. It just activates the shunts as you observed.