4-channel BMS with daisychain bus

Topics concerning OEM and open source BMSes
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: 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 😊
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: 4-channel BMS with daisychain bus

Post 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.
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'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?
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: 4-channel BMS with daisychain bus

Post by johu »

So far you could also run with the R8Tx and of course the larger ones.
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 »

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.
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 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
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 »

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.
User avatar
mpgMike
Posts: 8
Joined: Tue Nov 09, 2021 5:56 pm

Re: 4-channel BMS with daisychain bus

Post 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.
I'm betting on the future!
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: 4-channel BMS with daisychain bus

Post 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.
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 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?
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: 4-channel BMS with daisychain bus

Post 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)
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 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.
Attachments
20211206_214859_SparkVideo-3.gif
20211206_184042_SparkVideo.gif
20211206_184042_SparkVideo.gif (5.11 MiB) Viewed 6834 times
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 »

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
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: 4-channel BMS with daisychain bus

Post 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.
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 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?
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: 4-channel BMS with daisychain bus

Post 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.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
seric
Posts: 1
Joined: Sun Nov 15, 2020 7:41 am

Re: 4-channel BMS with daisychain bus

Post by seric »

How and with which program attiny44 is flashed . And whether there is a calibrator circuit.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 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
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 »

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
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 »

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
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 »

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
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 »

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
Attachments
Slave Base v1.stl
(505.75 KiB) Downloaded 159 times
OI BMS slave board 5-3 cover.f3d
(480.11 KiB) Downloaded 162 times
OI BMS slave board 5-3 cover.stl
(72.54 KiB) Downloaded 164 times
wacomg
Posts: 10
Joined: Mon Dec 21, 2020 12:27 pm
Has thanked: 1 time
Been thanked: 1 time

Re: 4-channel BMS with daisychain bus

Post 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 ??
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 »

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.
wacomg
Posts: 10
Joined: Mon Dec 21, 2020 12:27 pm
Has thanked: 1 time
Been thanked: 1 time

Re: 4-channel BMS with daisychain bus

Post 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 )
Post Reply