Page 8 of 10

Re: 4-channel BMS with daisychain bus

Posted: Mon Oct 04, 2021 7:21 pm
by m.art.y
johu wrote: Fri Mar 22, 2019 10:19 pm I also added a shunting script to the main unit. It takes all voltages and programs the minimum + 20mV as shunt voltage. So if the lowest cell voltage is 3300mV it programs a shunt voltage of 3320mV and thus all cells with a voltage higher than 3320mV will get the 20mA shunt current applied. If max-min > 50mV I do not shunting at all. I also plan to only activate shunting when there has been no current flow for x minutes. Otherwise the dielectric effects present a voltage that is not the "core" cell voltage.
Johannes, is this still true with your BMS? This is technically balancing isn't it? I did not notice this behaviour on my test setup however? Thanks 😊

Re: 4-channel BMS with daisychain bus

Posted: Tue Oct 05, 2021 8:46 am
by johu
m.art.y wrote: Mon Oct 04, 2021 7:21 pm Johannes, is this still true with your BMS? This is technically balancing isn't it? I did not notice this behaviour on my test setup however? Thanks 😊
No, currently it only takes a voltage command "shuntvtg". All cells above that voltage are shunted, the others are not. It is merely for testing but I will bring back the old behaviour.

Re: 4-channel BMS with daisychain bus

Posted: Sat Oct 09, 2021 10:15 pm
by LRBen
I'm on the hunt for the STM component of the isolator board. The BOM has STM32F105RBTx but I'm guessing any similar model will suffice as long as it has a big enough flash and ram size?

Re: 4-channel BMS with daisychain bus

Posted: Sun Oct 10, 2021 5:44 am
by johu
So far you could also run with the R8Tx and of course the larger ones.

Re: 4-channel BMS with daisychain bus

Posted: Sun Oct 10, 2021 11:29 am
by LRBen
Thanks for confirming. I'm starting to try and find out what products these chips are in, so I can find something relatively inexpensive that I can extract a chip from.

Re: 4-channel BMS with daisychain bus

Posted: Mon Nov 08, 2021 10:08 am
by m.art.y
johu wrote: Tue Sep 21, 2021 6:03 pm Yes it could indeed loop forever if the voltage source is noisy because measured==expected is never hit
Johannes I managed to complete full calibration process. I get cell voltages reported and LEDs on the slaves are blinking really fast in sequence. However when I refresh the web interface every time the reported voltages are changing slightly by a few mV or sometimes up to 10 mV. This is especially visible if I leave the web interface on auto refresh. Is this normal and if not what could be the clues to resolve it? Does the first board need to have different diode than the rest of the boards? Thanks

Re: 4-channel BMS with daisychain bus

Posted: Sun Nov 14, 2021 1:06 pm
by LRBen
Could it be the reference voltage not being stable enough? 10mV is pretty close to the 1mV accuracy aimed for on the first post though.

Re: 4-channel BMS with daisychain bus

Posted: Sun Nov 14, 2021 4:27 pm
by mpgMike
Just read through the entire thread. You mentioned using large value resistors for the resistor divider to keep parasitic losses to a minimum. A trick I use is to use a P-MOSFET (like a TP2104) to connect the battery to the high side of the resistor divider. Then I use much smaller resistor values. In the software, I trigger the P-MOSFET when I need to take an ADC reading, then disconnect. It takes 2 pins for each analog value, but it saves the energy. Just sharing.

Re: 4-channel BMS with daisychain bus

Posted: Sun Nov 14, 2021 6:27 pm
by johu
m.art.y wrote: Mon Nov 08, 2021 10:08 am Johannes I managed to complete full calibration process. I get cell voltages reported and LEDs on the slaves are blinking really fast in sequence. However when I refresh the web interface every time the reported voltages are changing slightly by a few mV or sometimes up to 10 mV. This is especially visible if I leave the web interface on auto refresh. Is this normal and if not what could be the clues to resolve it? Does the first board need to have different diode than the rest of the boards? Thanks
On the newest revision all boards have the same BOM. 10 mV is certainly too much fluctuation. Are you sampling just one board? If so, sampling itself distorts the readings and the problem would go away once you chain in more boards.
mpgMike wrote: Sun Nov 14, 2021 4:27 pm Just read through the entire thread. You mentioned using large value resistors for the resistor divider to keep parasitic losses to a minimum. A trick I use is to use a P-MOSFET (like a TP2104) to connect the battery to the high side of the resistor divider. Then I use much smaller resistor values. In the software, I trigger the P-MOSFET when I need to take an ADC reading, then disconnect. It takes 2 pins for each analog value, but it saves the energy. Just sharing.
Thanks, that's interesting. I'm already using PNP transistors for shunting, maybe they could be put to dual use somehow.

Re: 4-channel BMS with daisychain bus

Posted: Tue Nov 30, 2021 6:37 am
by m.art.y
johu wrote: Sun Nov 14, 2021 6:27 pm On the newest revision all boards have the same BOM. 10 mV is certainly too much fluctuation.
Hi, how much fluctuation are you seeing on your boards - how much is normal? Why would it be that one cell fluctuates more than others on a slave - I've seen it on all 3 of my slaves. Are the slaves sensitive to the wire lengths that connect to the cells?
Also how are you achieving stable voltage reference please?

Re: 4-channel BMS with daisychain bus

Posted: Sun Dec 05, 2021 10:19 pm
by johu
After watching this:


I wonder if the 3V / 2.5V reference for the differential range was a good choice... Maybe a shunt reference would make more sense? Can you check whether your 3V is stable? (IC3)

Re: 4-channel BMS with daisychain bus

Posted: Mon Dec 06, 2021 7:14 pm
by m.art.y
johu wrote: Sun Dec 05, 2021 10:19 pm Can you check whether your 3V is stable? (IC3)
Yes, the output looks stable and is ~2.5 V (slightly different on each board). This is what I get when I am sampling 3 slave boards. Actual voltages are between 3.932 and 3.930 V.

Re: 4-channel BMS with daisychain bus

Posted: Sat Dec 11, 2021 6:45 am
by m.art.y
So I tried to discharge my cells while keeping the BMS on and the reported cell voltages followed and remained within about the same fluctuating 'error'. Johannes could it be that this fluctuation is caused by not accurate enough calibration? Or still not enough slave modules on the chain - I've got 3 wired in. Thanks

Re: 4-channel BMS with daisychain bus

Posted: Sat Dec 11, 2021 10:03 am
by johu
No, calibration would only affect the absolute values, not the jitter. I can compile a software later that has a configurable round-trip time or so, see if that helps.

Re: 4-channel BMS with daisychain bus

Posted: Wed Jan 19, 2022 8:22 pm
by LRBen
I have my isolator and slave boards all here now thanks to Damien and Marty. Working on getting a small bench test so I can systematically test my VCU, this BMS and the ISA shunt.

I noticed on the isolator web interface there are some options for current sensors. Isa can 1 and 2 being options from memory. Are these setup for the ISA shunt canbus? If so is it mostly plug and play or does there need to be some setup or intermediary ECU to convert data?

Re: 4-channel BMS with daisychain bus

Posted: Thu Jan 20, 2022 8:25 am
by johu
The ISA shunt interface is plug&play. It seems to have a bug, it doesn't initialize properly. So for now you need to switch to analog and back to ISA to make it work. Will fix.

Re: 4-channel BMS with daisychain bus

Posted: Sat Jan 22, 2022 12:07 pm
by seric
How and with which program attiny44 is flashed . And whether there is a calibrator circuit.

Re: 4-channel BMS with daisychain bus

Posted: Sun Jan 23, 2022 7:06 pm
by johu

Re: 4-channel BMS with daisychain bus

Posted: Mon Jan 24, 2022 9:50 pm
by LRBen
Thanks for confirming on the ISA shunt. Hoping to get that setup this weekend.

I have a couple slave modules on the workbench at home at the moment, just trying to get some initial communication and confirm that setup is all working. Is this the right Layout of the pins for the slave boards in terms of data in/out and power? Also wanted to check if the jumper pin was correct for first board selection. For some reason Kicad likes the isolator files but doesn't want to open the slave board files so I can't check the layout on there.

At the moment I don't get any communication, as in addresses don't get set. But I did have the jumper on the other board, just realised as I took the photo this might be incorrect and changed it for testing tomorrow.
PXL_20220124_213828437.jpg

Re: 4-channel BMS with daisychain bus

Posted: Mon Jan 24, 2022 10:27 pm
by LRBen
Solved with the help of Marty.
For others, first board jumper needs to go here
PXL_20220124_222202103.jpg
All other boards need a jumper here
PXL_20220124_222156940.jpg

Re: 4-channel BMS with daisychain bus

Posted: Tue Feb 08, 2022 8:40 pm
by LRBen
Made up a slightly modified cover for the slave boards to make room for the jumper pins sticking up in the latest revision. I also moved the cell tap outputs as my connector there comes out on an angle so I just needed some space for the wires to come out.

I'll print out a couple to test and once it fits well I'll upload the .step and .stl for others to modify to suit their setup.
2022-02-08 20_35_01-Autodesk Fusion 360.png

Re: 4-channel BMS with daisychain bus

Posted: Wed Feb 09, 2022 9:13 pm
by LRBen
Second version seems to fit fine. Attached is the stl file for printing and fusion file if you wanted to change it a little. Forums wouldn't let me upload a .step file but I can send them if anyone wants them.

It's not super polished but it does fit the jumper pins now. Clips onto the slave base file that sonachan1 made up, also attached as I couldn't find them on the thread again.
PXL_20220209_210142200.jpg

Re: 4-channel BMS with daisychain bus

Posted: Sat Mar 26, 2022 3:17 pm
by wacomg
Hi guys!
I've made some main boards and some slave boards
I've flashed firmware to the main board and wifi adapter, so i can see smth
i've done all calibration

when i connect two slaves to main - main sees only first slave module
when i connect three slaves to main - main sees only first slave module
when i connect four slaves - main stops at getversion , but shows in interface 3 slave modules

please give me a hand
what to check ??

Re: 4-channel BMS with daisychain bus

Posted: Sat Mar 26, 2022 3:39 pm
by LRBen
wacomg wrote: Sat Mar 26, 2022 3:17 pm Hi guys!
I've made some main boards and some slave boards
I've flashed firmware to the main board and wifi adapter, so i can see smth
i've done all calibration

when i connect two slaves to main - main sees only first slave module
when i connect three slaves to main - main sees only first slave module
when i connect four slaves - main stops at getversion , but shows in interface 3 slave modules

please give me a hand
what to check ??
Double check the slave boards are hooked up the correct way around. The first slave boards needs to be on the most negative side of the battery from memory. Also try switching the polarity of the data and power lines from the slave boards to the main board. One of those is labelled incorrectly.

Re: 4-channel BMS with daisychain bus

Posted: Sat Mar 26, 2022 4:24 pm
by wacomg
LRBen wrote: Sat Mar 26, 2022 3:39 pm
Double check the slave boards are hooked up the correct way around. The first slave boards needs to be on the most negative side of the battery from memory. Also try switching the polarity of the data and power lines from the slave boards to the main board. One of those is labelled incorrectly.

1. will post pictures in 10-15 hours
2. i do not think it matters but will check it
3. I've switched the polarity of input on main board ( because without it it's not working at all )