Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

In-development: Inexpensive Custom BMS for Tesla Battery Modules

This site may earn commission on affiliate links.
I still want to see your PV setup and the bench. Good excuse for a road trip.

Come on down!

I see this leading to PowerWall 2.0! Being able to repurpose Tesla Battery Modules will greatly increase their usefulness.

What voltage do you intend to bring each cell to? 4.10 Volts? adjustable?

Thanks for pursuing this.

Well, these aren't really involved too much in charging. For my solar setup I max out the cells at 4.05V, but that's configured on the charger not the BMS. The BMS just keeps it honest, so to speak.

I assume the dotted line is isolation indicator. What are you using to isolate the SPI bus? That LTC6802 looks like a neat chip. What would the world do without Linear Technology?

Correct. I'm using the SI8641 (has the dashed line running under it) to isolate the SPI. It uses RF isolation, so it's very low power. The LTC6802 has a regulated 5V output that's powerful enough to run it directly without any additional regulator. The AVR MCU in the corner will handle the daisy chaining of the boards and communication with the master control board.
 
Those things are fast! What clock frequency are you running through them? The latest seismic digitizer system I'm working on uses the Analog Devices ADuM1440 series isolators. Not nearly as fast, but much lower power.

Only about 1MHz max.

Finished build of all 12 prototype PCBs I have. My wife even helped me put a bunch of the resistors and diodes in place for me to solder. (She's awesome.)

wkbmbv2.04-proto2-batch.jpg


Definitely way too much work to make these by hand. Next prototype is going to be mostly professional pick-and-place assembled SMT. I plan to still use these boards for my battery rack, though.... but I need 24 more. :)
 
The new Model S module board is much smaller. Want me to send one?

Btw, my oscilloscope is now Tesla Powered :D I'm predicting about 20 hour battery life with a 85% charge :D
Pack will mount nicely on the back with some Velcro once I shorten the leads and wrap them.
qUdG6az.jpg


EoeI8xk.jpg
 
The new Model S module board is much smaller. Want me to send one?

Btw, my oscilloscope is now Tesla Powered :D I'm predicting about 20 hour battery life with a 85% charge :D
Pack will mount nicely on the back with some Velcro once I shorten the leads and wrap them.
View attachment 113474

View attachment 113475

Cool! I hadn't seen one of these... two cell connection plugs... figures they'd change it. Would maybe be worth figuring out what those are if you can spare one, but none of my modules have the new cell connections, so, not a huge deal to me. AFAIK no one has actually gotten these boards to work loose outside the pack, myself included, which is partly why I'm making my own.
 
Cool! I hadn't seen one of these... two cell connection plugs... figures they'd change it. Would maybe be worth figuring out what those are if you can spare one, but none of my modules have the new cell connections, so, not a huge deal to me. AFAIK no one has actually gotten these boards to work loose outside the pack, myself included, which is partly why I'm making my own.

Yes, the new modules use a flexible PCB instead of wires for the voltage taps. Then they use the same cell bond wires to connect bus bars to the pcb. The pcb just plugs right into the module board.
I'd really like to get the module boards working. I have so many of them, they would be great for general purpose BMS use, even with a custom host to control them
 
The new Model S module board is much smaller. Want me to send one?

Btw, my oscilloscope is now Tesla Powered :D I'm predicting about 20 hour battery life with a 85% charge :D
Pack will mount nicely on the back with some Velcro once I shorten the leads and wrap them.

DS1054Z master race! :D

Are you running it off DC voltage? I tried to run my DS1054Z to test ignition timing in my car, but couldn't get my inverter to power it, as Rigol don't have an inrush limiter on the power supply board (though, the input capacitance is quite low so they can probably get away with it) and the cig-lighter has too much series impedance and only 7.5A rating. I need a better inverter.

- - - Updated - - -

I assume the dotted line is isolation indicator. What are you using to isolate the SPI bus? That LTC6802 looks like a neat chip. What would the world do without Linear Technology?
I love LT chips but often they are so expensive so they get designed out pretty quickly. Consumer electronics is a bitch for pricing.
 
Well, I've got some of the new prototypes on my actual battery bank now for testing.

Something that I overlooked about this setup with my battery bank is the fact that activating a bleed resistor on a cell group in my pack will have the effect of other cells in the module (well, in the same pair of modules) to accept current from the rest of the pack that is in parallel, effectively charging the cells that are not being bled.

I did up a crude simulation of this here: http://skie.net/uploads/packbalancesim.php (can click the switch symbols to enable/disable balancers)

So, going to have to account for this in software. An interesting side effect is that theoretically I could *raise* the voltage of one or two cells in a module by activating the bleeders on the other cells.
 
Well, I've got some of the new prototypes on my actual battery bank now for testing.

Something that I overlooked about this setup with my battery bank is the fact that activating a bleed resistor on a cell group in my pack will have the effect of other cells in the module (well, in the same pair of modules) to accept current from the rest of the pack that is in parallel, effectively charging the cells that are not being bled.

I did up a crude simulation of this here: http://skie.net/uploads/packbalancesim.php (can click the switch symbols to enable/disable balancers)

So, going to have to account for this in software. An interesting side effect is that theoretically I could *raise* the voltage of one or two cells in a module by activating the bleeders on the other cells.

Scratching head.:confused:
I looked at the simulator but I'm confused as to why you would have any current flowing through the other cells in a module when the bleeders are activated.
 
Scratching head.:confused:
I looked at the simulator but I'm confused as to why you would have any current flowing through the other cells in a module when the bleeders are activated.

My home pack is setup as pairs of Tesla modules in series (12 cells in series) with 18 of these pairs in parallel. In the simulation I have 17 of the pairs as one big group at the top, and one pair fully broken down at the bottom. If I activate the bleeder on one cell group of one module, then that will cause a slight voltage drop across that cell. Since there's a voltage drop across that cell, there is a voltage drop across that whole 12s voltage. Since there's a voltage drop across the whole 12s voltage for that pair, the rest of the parallel pairs will try to self-balance it by trying to balance out the voltage drop. This will then feed current to the full 12s pair that has the one balancer active to compensate for the voltage drop. The effect is that the cell under balance is being discharged by ~120mA while the whole brick is being charged by about ~10mA (less after wiring losses). So the rest of the cells get charged by ~10mA and the one cell under balance gets discharged by ~110 mA (slightly more due to wiring losses).
 
My home pack is setup as pairs of Tesla modules in series (12 cells in series) with 18 of these pairs in parallel. In the simulation I have 17 of the pairs as one big group at the top, and one pair fully broken down at the bottom. If I activate the bleeder on one cell group of one module, then that will cause a slight voltage drop across that cell. Since there's a voltage drop across that cell, there is a voltage drop across that whole 12s voltage. Since there's a voltage drop across the whole 12s voltage for that pair, the rest of the parallel pairs will try to self-balance it by trying to balance out the voltage drop. This will then feed current to the full 12s pair that has the one balancer active to compensate for the voltage drop. The effect is that the cell under balance is being discharged by ~120mA while the whole brick is being charged by about ~10mA (less after wiring losses). So the rest of the cells get charged by ~10mA and the one cell under balance gets discharged by ~110 mA (slightly more due to wiring losses).

OK, so Tesla's pack doesn't have this issue because they don't have any groups in parallel. So if you fix this with firmware (not sure how - bleed the other cell groups periodically?) then how will you keep the design flexible for people who might not use the same series-parallel-48v configuration? Maybe it's not as hard as I think.
 
OK, so Tesla's pack doesn't have this issue because they don't have any groups in parallel. So if you fix this with firmware (not sure how - bleed the other cell groups periodically?) then how will you keep the design flexible for people who might not use the same series-parallel-48v configuration? Maybe it's not as hard as I think.

Basically these boards won't be able to operate in a group without a master controller, just like Tesla's. The controller side of the board, which is isolated from the voltage sense side, will need power and external commands. The master controller would be programmed with the pack's physical configuration. From there it should be able to determine the estimated charge and discharge current of every cell group based on the balancers that are active, and make determinations on what to do about it.

Initially, I'll probably just compensate for groups that are being charged by periodically cycling other balancers on for a short period, individually. I should be able to track the estimated delta Ah for balancing for every cell group, and compensate accordingly.

Eventually I may leverage the fact that the balancers in a parallel setup like mine can be used to soft of shuffle power around crudely, but probably more complicated than it's worth.

I'm considering placing a few jumpers on the board (probably permanent solderable jumpers) to allow it to work to balance individual modules all by itself by jumping the isolation to run the control side from the module power. But this won't work in a multi-module setup since what's balanced for one module might not be the same as another.
 
Well, got all 12 of the prototypes functioning and mounted to modules on the top of my battery rack. :)

first-12-prototypes-mounted.jpg


And here's the output of my debugging/dev mode on the master controller (WIP):

Code:
> CHN
INFO: Got first board in chain notify
INFO: Handed out address 01 
INFO: Handed out address 02 
INFO: Handed out address 03 
INFO: Handed out address 04 
INFO: Handed out address 05 
INFO: Handed out address 06 
INFO: Handed out address 07 
INFO: Handed out address 08 
INFO: Handed out address 09 
INFO: Handed out address 0A 
INFO: Handed out address 0B 
INFO: Number of boards in chain: 0C 
OK
> VLR 00 0C
VREAD: 00: 3681,3678,3676,3673,3675,3679
VREAD: 01: 3646,3645,3643,3640,3642,3643
VREAD: 02: 3631,3630,3634,3642,3648,3670
VREAD: 03: 3679,3678,3676,3673,3676,3678
VREAD: 04: 3660,3661,3661,3660,3660,3658
VREAD: 05: 3658,3660,3663,3661,3661,3660
VREAD: 06: 3660,3660,3661,3658,3661,3658
VREAD: 07: 3658,3655,3655,3660,3663,3663
VREAD: 08: 3660,3657,3657,3660,3663,3663
VREAD: 09: 3658,3658,3663,3664,3664,3663
VREAD: 0A: 3657,3655,3660,3661,3663,3660
VREAD: 0B: 3663,3664,3664,3663,3663,3660
OK
> THR 00 0C
THMREAD: 00: 19.43 19.37 (6FF4 6FC4)
THMREAD: 01: 19.44 19.23 (6FFC 6F5C)
THMREAD: 02: 19.44 19.28 (6FF8 6F84)
THMREAD: 03: 18.91 19.30 (6E6C 6F90)
THMREAD: 04: 18.55 19.08 (6D64 6EEC)
THMREAD: 05: 19.46 19.33 (7004 6FA8)
THMREAD: 06: 19.47 19.11 (700C 6F04)
THMREAD: 07: 18.57 18.77 (6D70 6E04)
THMREAD: 08: 18.42 18.89 (6D04 6E60)
THMREAD: 09: 19.25 18.85 (6F68 6E40)
THMREAD: 0A: 18.86 18.69 (6E4C 6DC8)
THMREAD: 0B: 18.32 18.99 (6CB4 6EAC)
OK
>

Voltages in mV, temps in C. Temps are probably off, since I haven't done a calibration of one of Tesla's thermistors to see what the appropriate β coefficient is for them. I just guesstimated around 3.9k with a 25C center at 10kΩ for now.

But, at least everything seems to function, hardware wise. Now it's software and hardware tweaks for a final version. :) I need 24 more of these for my rack, too.
 
> VLR 00 0C VREAD: 00: 3681,3678,3676,3673,3675,3679 VREAD: 01: 3646,3645,3643,3640,3642,3643 VREAD: 02: 3631,3630,3634,3642,3648,3670 VREAD: 03: 3679,3678,3676,3673,3676,3678 VREAD: 04: 3660,3661,3661,3660,3660,3658 VREAD: 05: 3658,3660,3663,3661,3661,3660 VREAD: 06: 3660,3660,3661,3658,3661,3658 VREAD: 07: 3658,3655,3655,3660,3663,3663 VREAD: 08: 3660,3657,3657,3660,3663,3663 VREAD: 09: 3658,3658,3663,3664,3664,3663 VREAD: 0A: 3657,3655,3660,3661,3663,3660 VREAD: 0B: 3663,3664,3664,3663,3663,3660 OK
can you please explain the debug output a bit? how come you have 4 values for each board?
 
Main tasks will be voltage monitoring (via the analog->digital converters on the two sub-MCUs) and balancing in an easily expandable network of BMBs. In this case I set things up so that I should be able to daisy chain them using basic CAT5 patch cables with RJ45 connectors and have them auto calculate their position in the chain.

Hi wk057, I helped develop a custom BMS using LTC6803 IC's, similar idea to what you've got here. This is an awesome thread, your work looks good! I had a 1p36s ultracapacitor module, so used 1 master controller with 3 IC's connected through their built-in daisy-chain SPI interface.

I'm most interested in how you've interfaced your boards together, and specifically how they auto-calculate their position in the chain? I thought initially LIN, but then I see you've got more than 16 nodes, so is that still possible?