Cheap DIY 12S balance charger idea

@deucesdown Thanks for the info. Have you played with the UART connection to the BMS? I wasn’t able to get it working with Arduino.

I’ve not had a go yet, as the janky apps work well enough for me (barely).

But hey I’ve been thinking about that link you sent to Luuke’s stuff, with the isolated ac-dc 5v buck converters and TP4056 modules. I ordered up a bunch of stuff. I’m thinking, per channel, put in a voltmeter, TP4056 and a 5v dc-dc converter.

voltmeter something like this (There are 2 wire and 3 wire versions, and versions with a calibration pot. Gotta find one that has the required voltage range and has 2 digits precision):

https://www.ebay.com/itm/DC-0-30V-Wires-LED-3-Digital-Mini-Voltmeter-Meter-Display-Voltage-Panel-Tester/173216068573

This scary isolated buck converter running off mains voltage

And TP4056 modules. There are 3amp versions, also scary! I think 3 TP4056 in parallel, how is termination handled? (shoutout to @Hummie I think you found these first)

Hm or this, TP5000, 2A, includes heat sink. More likely to work than the 3A one.

3 Likes

Oo three amps. Nice find. Unfortunately someone said hooking 12 of these up to the battery to charge and balance at the same time would cause a short. Damn I want to do that. Who can tell me that’s a bad idea again @Blasto. Who else knows electronics? Maybe could add something extra?

If all the cells are inside a pack, you’ll need an isolated power supply for each.

you made me go through my old shit, this is what i found lol

2 Likes

I linked the isolated power supplies, under $2 per piece.

Im getting conflicting answers. Maybe linear supply vs switching?

You’ve seen this?

Isolated ac-dc 5v supplies, one per TP4056 charger.

It’s been done. It’s just crazy :slight_smile: I want one too.

2 Likes

This guy used a separate supply for each module. Hoping @Blasto explains how his buddy uses one supply for multiple. Smaller cheaper.

The cells are individual, not in a “pack”

2 Likes

Aha. Of course. Bummer. So need a supply for each cell. As said

I turned out the problems I had were due to the B- not being connected. I thought it’s the same rail as the BC0, but apparently not. Now it works like a charm. I started to work on intercepting the communication between the PC module and the BMS. It turns out the data sent by the PC module is exactly as documented here and that’s exactly what I used in my last attempt to connect an Arduino. I must have done something wrong. Will try again.

BTW, when I connect the charger, the voltage on the first and the last cell increases quite a bit. Without the charger connected, I have all cells pretty much in balance, say around 4.10V. When I connect the charger, all voltages go up a little bit, maybe to 4.15V, but the first and the last cell go much higher, like 4.25V. Measured by both the BMS and multimeter. Is that normal?

1 Like

If you hook up the charger without bms, does it have the same behavior?

yes 10char

Woohoo, looks like I’m getting somewhere. :slight_smile:

image

image

6 Likes

Sounds like a problem with the pack? Not the bms. As if the resistance of the series connetions varies (a lot?). Or weak cells in the first and last groups but that seems unlikely.

Ooh so exciting. 2 input vega coming soon?

That was my first thought, too. However, if that was the case, wouldn’t the cells get out of balance when charging/discharging? I do not balance the cells. I merely monitor the voltages. I only have the battery pack shortly, but there were at least 3 discharge/charge cycles and the cells apparently discharge/charge evenly. The first cell is slightly (~0.02V) higher than the other cells, but it has been like that from the beginning and isn’t drifting away. All other cells are within 0.005V difference.

I just needed something with display and UART and realized I have a fair amount of such devices on hand. :smiley: There have already been requests for displaying individual cell voltages on Davega. I said no to that, but I’m rethinking now. The problem is that there’s only one UART on ATMEGA328 and also not many people use the LLT smart bms. Instead, I’m thinking of making a simple I2C cell voltage monitoring module that I could hook up with the Davega I2C pins, which are still unoccupied. The module could be just a voltage divider and three ADS1115 on the same I2C bus. These are 4-channel 16bit ADC modules, so by using three, up to 12S would be supported. The resolution would be more than enough with 16bit ADC. I’m not sure how accurate these ADS1115 are though. I’ll probably buy some and do some testing.

1 Like

I’ve been wanting per cell monitoring pretty bad, bad enough to at least attempt to put smartbms in every board.

From ignorantly googling around, voltage divider for something like 12s will have stacking error, and resistors have quite a bit of variability?

ASD1115, looks like it has 4 16bit ADC, but that’s in single ended mode (common ground). In differential mode there are only ADC.

I think a BMS chip (maybe from TI, maybe same family as smartbms or diebms?) will have all the voltmeters in one easy to use package, and probably cost less than rigging a bunch of ADC and voltage dividers?

1 Like

I have actually played with it a few months back. Here’s what I have done on a perfboard with two ATTINY84 chips (I had to use two to get enough ADC pins) and a bunch of resistors.

It kinda works, but the ADC pins on ATTINY84 are only 10bit and they are not very accurate, so especially the voltage reading on the last cell is ±0.1V, which is pretty bad.

There’s not really a stacking error. You measure the voltage on the last cell by measuring the 11S voltage and the 12S voltage and substract the values. The problem is that the resolution decreases with each cell. You get a usable resolution on the first cell, but the resolution on the last cell is 12 times worse (on 12S battery) and that’s unusable if measured with 10bit ADC. However, with a 16bit ADC, you would still get a pretty good resolution even on the last cell.

The variability in the resistors is not a problem. You don’t need exactly 1/2, 1/3, 1/4, etc dividers as long as you know the exact ratios of the dividers, which is a matter of simply measuring the exact resistance of the used resistors. You then adjust the measured voltage correctly in software.

Sure, that’s why you need the voltage divider. You don’t measure individual cells. Rather, you measure the first cell, first two, first three, etc. Like this.

The main problem I see with the voltage divider is that the cells get constantly discharged over the resistors. Even worse, the discharge is uneven. The first cell gets discharged most while the last gets discharged least. Even though the current flow can be kept low by using high enough resistors, this would get the cells out of balance eventually, especially should the measuring module be connected to the battery all the time. There’s no easy way to turn it off.

I don’t think it would cost less. Three ASD1115 would be around $5 and resistors cost almost nothing. I agree that a BMS chip would be a more elegant and generally better solution though. It just seems terribly complicated. I read through the datasheet of the TI bq76940 that the LLT Smart BMS uses and there were too many things I didn’t understand at all. Plus, it doesn’t seem you can use the chip alone. The datasheet contains a schematics of circuits to be used with the BMS chip and there’s a bunch of other components. You can probably exclude many if you only want to measure the cell voltage. Still, it didn’t seem at all easy to figure out, at least for a hobbyist like myself. A voltage divider, on the other hand, is simple and straightforward.

2 Likes

Very nice!

I have a similar BMS and don’t understand the power routing. So I know left side is B- and right side is C-/P-. In the App I can activate and deactivate charging and discharging which both works like set in the app (when I power down the discharge mosfet, the ESC doesnt work anymore, when I power down the charge mosfet the charger doenst charge anymore, when I power down the discharge and charge is still on: I can still charge but not discharge, never tried discharge:on charge:off and charge then).

So now I am thinking about how this works, I got a clue but that makes no sense: since the B- is on the left side, does that mean the current is flowing from B- through the little shunts/fueses to and through the first row of mosfets to the middle and then through second row of mosfets to right?

And how does charging from the C-/P- work if the discharge fet is powered off?

Since you have your BMS opened, did you check for this? Mine is currently in use in a batterypack 150km away from me… :confused:

I believe that if the charge MOSFET is enabled, it connects the B- and C-. If the discharge MOSFET is enabled, it connects the B- and P-. That is, the MOSFETs simply close the charge/discharge circuits.

1 Like