Shop OBEX P1 Docs P2 Docs Learn Events
I want to build a multi voltage monitor for checking BMS balancing protection boards functionally — Parallax Forums

I want to build a multi voltage monitor for checking BMS balancing protection boards functionally

sam_sam_samsam_sam_sam Posts: 2,286
edited 2021-07-31 12:36 in General Discussion

What would like to do is build something that would allow you to monitor the voltage of each battery cell while on charge and discharge mode

Here is my dilemma I do not want to estimate the battery voltage of each battery cell I want to know the actual battery voltage because I find that a lot of BMS balancing protection boards that I have used do not balance the battery voltage to each other correctly and in some cases it turns off the charging cycle before the battery pack is fully charged

Also it very difficult to find batteries that are matching each other specifications for the charging curve and discharge curve because they are not always exactly the same from to cell to cell

So my theory is that if you could monitor the exact battery voltage on each cell you could in theory could match the battery cells easier

Or is my theory incorrect in conception of could be used to do want I would like to do
Or can a battery voltage monitoring system even be built this way in the first place

One note I would also like to be able to plot each battery cell on graph on a computer if possible

Now I do have a IMAX b6 battery tester however you can not just monitor the voltage of each battery cell with out using it with it own BMS balancing protection board that is in the tester but the issue with it is that it estimates the battery voltage for each because it uses a voltage divider circuit to do this function this is not what I am looking for unless there is a way to make monitor the battery voltage of each battery cell more accurate

I thought about modification to the IMAX b6 battery tester and just use the battery voltage monitoring however I would need some way of adjusting the battery voltage monitoring reporting correctly the actual battery voltage

But I do not have any experience in programming the micro controller that is used in this device

«1

Comments

  • ErNaErNa Posts: 1,738

    Battery charging is definitely a holy gral. So you only might come close to a solution. The efficiency of charging is depending on the charging level. The cell voltage rises fast if the battery is already fully charged when you try to continue charging. As the energy supplied is not stored, the battery heats up or gas is developed, both is bad.
    Indeed, balancing is done the way that serialy connected cells are monitored and if the voltage raises above a certain value, those cells are switched out of the path to prevent overlaoding.
    As said: proper charging serially connected cells is the key point for every car manufacturer and so not published to educate the competitors. What is known in the public might be ok, or not.

  • @ErNa said:
    Battery charging is definitely a holy gral. So you only might come close to a solution. The efficiency of charging is depending on the charging level. The cell voltage rises fast if the battery is already fully charged when you try to continue charging. As the energy supplied is not stored, the battery heats up or gas is developed, both is bad.
    Indeed, balancing is done the way that serialy connected cells are monitored and if the voltage raises above a certain value, those cells are switched out of the path to prevent overlaoding.
    As said: proper charging serially connected cells is the key point for every car manufacturer and so not published to educate the competitors. What is known in the public might be ok, or not.

    So is there a solution to this problem

  • The issue with these is what I describe earlier in that if the battery cells are not exactly the same charging and discharging curve these units do not completely charge or discharge them completely

  • ErNaErNa Posts: 1,738

    It's about charging. It makes no sense to balance a battery during discharging. The same current flows through every cell, every cell has an individual voltage due to internal losses. But the amount of chemical reaction, that is, the number of molecules changing state, only depends on current.
    While during charging not every current particle (electron) successfully can be stored. So in the end the weaker cells are less charged. If you try to charge them completely the other cells in the row may be overcharges. The controller I pointed to seems to deviate a small part of the charging current around the good cells, so the weaker cells get more current and in the end they all are completely loaded, but maybe to a different amount of energy. So, as I said: perfect charging is always defined by your goal and there has to be a compromise.

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2021-08-01 10:04

    The goal is to be able to match battery to the BMS balancing protection board to get the most out of the batteries in the battery pack and there is no easy way to do this I have a battery testing machine that I can plot the charging and discharging curves and this works for the most part but it is not the ideal solution because the balancing protection board does it’s own way of deciding what is fully charged and what not what I want to do is to look at what the BMS balancing protection board is doing so I better match the correct batteries for the BMS balancing protection board that I am using

    I have a battery operated soldering iron that the BMS balancing protection board is extremely picky about what batteries you put on it -it has indicator led light that shows you when the battery voltage reaches 4.00 volts and begins to turn on but not all of the indicator light come it has two banks of three cells if one bank reaches 4.00 on each or very close to 4.00 it shuts down the charging controller to the other bank of three batteries even though they have not reached the 4.00 volts

    This what I was referring to earlier about being able to monitor the battery voltage on all cells at the same exact time so I can better match battery cells to the BMS balancing protection board

    Because it also does the same exact thing when you are discharging the battery pack if one bank of batteries reaches about 3 volts it turns off the battery pack even though the other battery bank has not even come close to the 3 volt cutoff voltage

    So you only have about 60% of useable battery life and this is with new brand name brand batteries from Japan not Chinese made batteries

    So I have had to use a battery pack from a power tool to power this battery operated soldering iron but this not a permanent solution to this issue I want to use the BMS balancing protection board that was made for this battery pack because it all fit in a metal case for the soldering iron station and would make it very portable which is why I bought it in the first place

    One note you can not use just any BMS board because of the way the BMS balancing protection board has cutouts for the battery to set on top of each other and its made so this board slides on metal rail for the batteries/BMS balancing protection fits in the metal case if you want to post a picture of the board I will

    One other note is that the battery power tool does a better job of balancing the voltage between battery cells and giving about 90% of capacity for this battery pack so I know that it can be done because I have replaced batteries in this battery pack before just using my battery testing machine to match batteries for it but it’s not extremely picky about what batteries you use but they do have to be very close to each other for best results

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2021-08-04 01:17

    How would I go about using a 12 bit DAC to measure the battery voltage on each battery cell and be able to correct the battery voltage that is reporting from each cell and display all of the results on one screen something similar to how a IMAX b6 battery tester does it

    I would like to able to do at least 6 battery cells at a time —>8 battery cells would be pefered if possible

    I just not sure how you would do the voltage divider circuit and be able to adjust the voltage being reported by each battery cell I would prefer not to correct the value of the results in programming

  • @sam_sam_sam said:
    How would I go about using a 12 bit DAC to measure the battery voltage on each battery cell and be able to correct the battery voltage that is reporting from each cell and display all of the results on one screen something similar to how a IMAX b6 battery tester does it

    Do you intend to use DACs as a reference voltage sources ? Or do you mean ADCs ?

    I would like to able to do at least 6 battery cells at a time —>8 battery cells would be pefered if possible

    Eight cells are definitely possible. The P2 has enough pins to do that.

    I just not sure how you would do the voltage divider circuit and be able to adjust the voltage being reported by each battery cell I would prefer not to correct the value of the results in programming

    I do not understand what exactly do you mean by what you said. Please, elaborate.

    At the beginning of your first post you say you:

    ..build something that would allow you to monitor the voltage of each battery cell while on charge and discharge mode

    which is just plain monitoring yet in the last post you say:

    ..to measure the battery voltage on each battery cell and be able to correct the battery voltage ..

    but this implies some charging as well.

    So I'm confused as to what exactly you are trying to build - a battery balancing charger with ability to display the measured parameters or a measurement instrument that will allow you to select the battery cells that match closely to each other ?

    These devices might both use the P2 as their "brains" but will differ significantly in functionality and additional hardware (like the power mosfet stages for charging to name the most important one).

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2021-08-04 18:17

    You are correct about it being ADC and this what mend to say

    All I want to do is just monitor the battery voltage that the BMS balancing protection board is seeing but I want to use a Fluke meter as the calibration reference so I can be sure of what voltages that the ADC is reporting from each battery cell is correct and if it is not then make the corrections in the voltage divider circuit not in the software

    The reason I am wanting to go this route is because if correct it in software that would affect all of the reading not just ones that are little bit off

    If you correct it in voltage divider circuit then you can adjust the resistance in the voltage divider circuit I could be completely wrong in my thinking about this

    When I have played with a ADC before and you would take a meter and measure the voltage and compare to ADC circuit is reporting it is not the exact same results what i am wanting is the results of ADC circuit matches the Fluke meter as close as possible for comparison purpose only

    ( if so then if there is a better way I would open to it please explain how it would work and if there any down side to do it a different way )

    I hope I have cleared up some of the confusion about what I am wanting to do in this project

    How I would do this is put 4 volts on each input and make sure that each individual input is reporting 4 volts and if you take each input and adjust the voltage to a different value does it report correctly the right voltage on that input

  • OK, so you are building a measurement instrument that: has to have 8 independent voltage measurement channels, all calibrated against some Fluke voltmeter with as high precision as only possible with a range slightly higher than 4V. This device has to also display the eight measured voltages on a built in display. The purpose of the device is SOLELY for measurement during battery charge and discharge cycles, but it is NOT intended to be a charger/discharger.

    Have I captured your idea correctly or is something missing or afoul in my description ?

    What is the accuracy of that Fluke meter (or what model is it exactly) ? Do you consider also thermal parameters to be somehow measured by this instrument or just the battery cell voltage ?

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2021-08-04 21:56

    3000FC Fluke Multimeter

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2021-08-04 22:01

    @Maciek said:
    OK, so you are building a measurement instrument that: has to have 8 independent voltage measurement channels, all calibrated against some Fluke voltmeter with as high precision as only possible with a range slightly higher than 4V. This device has to also display the eight measured voltages on a built in display. The purpose of the device is SOLELY for measurement during battery charge and discharge cycles, but it is NOT intended to be a charger/discharger.

    Have I captured your idea correctly or is something missing or afoul in my description ?

    Yes this is correct

    @Maciek said:

    item 1 What is the accuracy of that Fluke meter (or what model is it exactly) ?
    item 2 Do you consider also thermal parameters to be somehow measured by this instrument or just the battery cell voltage ?

    Yes I would consider this very much so item 2 but could this be done for each battery cell
    And to end the charging current if out of the parameters that are set

    See in the above post for item 1

  • I am not sure if i am right here, but if you want to measure the voltage of individual cells connected in series, you need different ground references to the ADC for each cell. You also have the problem of cross-feeding from one cell to the next one.

    The best solution would be to electrically disconnect each cell for measuring and charging and then reconnect them.

    But this is complicated, especially if you do not build the battery packs by yourself.

    One common procedure used is to discharge the pack and then recharge it to balance, but that is quite time consuming and wasteful. We also go brute force with them used/damaged LEAF batteries, dismantle the packs, throw (literally) the bad cells in one corner, the better ones in the other corner and the good ones in the third. Then charge them, match them and reassemble the whole pack again, leaving out the bad ones.

    Very time consuming and wasteful. But usually we can fix about 8-9 LEAF packs when using 10 to dismantle. Just a lot of work.

    I am all ear here if we could find a solution.

    Mike

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2021-08-05 00:56

    @msrobots said:
    I am all ear here if we could find a solution.
    Mike

    This is also my issue I am trying to figure out how the best way to do this

    I kind-a like what and how the IMAX b6 battery tester does it they use a voltage divider circuit however what I do not like about how they do it is that there is no way to make a voltage correction if one or battery cells do not report correctly one or battery cells I would settle for this approach if I could first disable the charging and discharging function and just use the voltage monitoring feature however I have read that they software protection fuses and you can not modify there software

    And It is very brick the device so it will not function correctly and more

    But I found several different circuits and it looks like they have a bunch of 10k ohm resistors in series for the voltage divider circuit

  • I am not really sure what you mean by voltage divider circuit. Could yo give a short schematic of how those 10k ohm resistors are connected to say 8 cells (or 4) just to show the idea?

    I work with electric bikes and 3-wheelers and some old conversion cars, decades build before Tesla-Hype.

    That makes a lot of variants of Voltages and batteries used, now I replace them with equivalent sized LEAF batteries. Or just get them running nice again.

    But all BMS systems I met are - sorry - simply shitty. They do there job somehow, somehow. But basically they are not doing a good job at it.

    I can't talk about new electric cars I have no clue about how and what they do but what you can buy on the market to rebuild/convert old cars is - hmm - working, but not as good as it should.

    This goes for monitoring and charging as well as for motor controller. Yes they do their job, more or less, but I am quite confident that a motor controller using @ErNa's Ideas might be way more efficient, energy-wise.

    But I am not a EE, I am just a CodeMonkey, so I hope that our Forumistas help to find some solutions where a P2 can shine.

    curious,

    Mike

  • Why do you need to measure independent cell voltages? Why not just measure the aggregate voltages at eight different taps, and subtract adjacent readings to get the cell voltages? That way, you can use a common ground for all measurements. This can be accomplished with eight ADCs or an 8:1 analog mux and one ADC.

    -Phil

  • Hi @"Phil Pilgrim (PhiPi)",

    That was my next question, analog mux. I am used to those digital shift muxes(?) what part would you use to switch one ADC thru several analog signals?

    My idea of independent voltages would be to be able to also charge each cell individually, somehow. Maybe stupid, but if I had a cell-based ground I could measure each cell and also charge it quite easy, as long as the pack is not connected to anything.

    But the ground for the ADC would change for each measurement. And that does not sound good for Propeller Pins.

    I try to explain. Say 8 cells in serial configuration nothing connected to either end.

    With a Multimeter I can easy measure each cell by touching both ends, no interference from other cells. I also can charge that cell individually as long as nothing is connected to the rest of the cells.

    But if I would do that with a P2 and say switch ground and value to the ADC from one cell to the next, what would happen?

    Would the switch of ground from one cell to the next create spikes or even destroy pins/chips?

    Could I smooth the transition with some capacitor? As I said I am not a EE, but if I could switch once per second from cell to cell and treat it for a moment the whole balancing thing gets quite easy just handling one cell at a time.

    And, sure I can also measure the charging current w/o problem.

    But what about switching the ground of the Propeller from the negative side of one cell to the next where there is a different voltage potential, or am I wrong?

    confused,

    Mike

  • The 74HC4051 (or CD4051) is an 8:1 analog multiplixer. Here's a datasheet for the CD4051:

    https://www.ti.com/lit/ds/symlink/cd4051b.pdf

    -Phil

  • @sam_sam_sam , do you happen to have a schematic for that IMAX b6 ? That would answer a lot questions.

    I understand the firmware on this device is closed source but we do not need that since you do not want to replicate it's functionality. Do not fiddle with it if you want your IMAX b6 to be still in service :).
    But the schematic could help a lot. Or maybe you have already reverse engineered the connections on the pcb since you seem to have some insight on the internals of this IMAX b6 device ? If you do, could you post it here ?

    Remember, you are going to build your own device with the functionality you want. It can be done, but we haven't figured it out how to do it. Not just yet.

  • @Maciek said:
    @sam_sam_sam , do you happen to have a schematic for that IMAX b6 ? That would answer a lot questions.

    I understand the firmware on this device is closed source but we do not need that since you do not want to replicate it's functionality. Do not fiddle with it if you want your IMAX b6 to be still in service :).
    But the schematic could help a lot. Or maybe you have already reverse engineered the connections on the pcb since you seem to have some insight on the internals of this IMAX b6 device ? If you do, could you post it here ?

    Remember, you are going to build your own device with the functionality you want. It can be done, but we haven't figured it out how to do it. Not just yet.

    Here is where you can find a circuit diagram of one version of it

    https://gr33nonline.wordpress.com/2016/10/17/b6-based-chargers/

  • @"Phil Pilgrim (PhiPi)" said:
    The 74HC4051 (or CD4051) is an 8:1 analog multiplixer. Here's a datasheet for the CD4051:

    https://www.ti.com/lit/ds/symlink/cd4051b.pdf

    -Phil

    Oh, thank you very much. This looks exactly like what I need.

    Any thoughts of my plan to switch ground from the Propeller from cell to cell?

    To measure/treat one cell I would just connect - and + of that cell via CD4051's to GND and P2 ADC PIN.

    And then switch from cell to cell. Any objections/hints/advice?

    Mike

  • You mean via two 4051, one for + and, say ADC pin and the other one for - and GND, fed with the corresponding addresses ?

    How do you compensate for these separate chip's resistances that might differ slightly per each channel ?
    Another thing to consider would be to maximize the resolution of the measurement. And another one is that you don't want to connect ~4V to the prop, right ? So some carefully selected resistive voltage divider would be needed either before or after the 4051.

    Is that what you had in mind ?

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2021-08-05 23:44

    This is beyond what I know about all of this but I am very interested in what you can come up with and I appreciate the interest in this project and I will definitely learn something more about what can be done with micro controller in general

    Thank you all for your input on this project

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2021-08-06 02:38

    Here's a circuit that might give you something to think about:

    I'm definitely not saying it will work without modification. When dealing with batteries, a lot of things can go wrong, so beware!

    Anyway, the three logic inputs select the cell to be measured. The upper mux sends AOUT to the ADC; the lower, to logic ground. The batteries, the power supply for the CD4051, and the Prop's power supply should all be isolated from each other. That isolation is compromised a bit by the high-value resistor between analog and digital grounds. I'm not entirely sure it's necessary, though.

    The divider on AOUT and the Zener diode ensure that the ADC's input does not go out of bounds.

    What I do not know is how the circuit will behave during transitions from one cell to the next. This is where bad things could happen.

    I'm offering it as-is with no guarantees. And I invite other forumistas to offer their comments and critiques. Good luck!

    -Phil

  • @Maciek said:
    You mean via two 4051, one for + and, say ADC pin and the other one for - and GND, fed with the corresponding addresses ?

    How do you compensate for these separate chip's resistances that might differ slightly per each channel ?
    Another thing to consider would be to maximize the resolution of the measurement. And another one is that you don't want to connect ~4V to the prop, right ? So some carefully selected resistive voltage divider would be needed either before or after the 4051.

    Is that what you had in mind ?

    Yes, basically. They promise break before close and can also disable all channels. so if the batterie pack is floating and nothing connected switching Propeller GND (and ADC) one cell further should work.

    will order some and find out.

    Mike

  • YanomaniYanomani Posts: 1,524
    edited 2021-08-06 14:10

    I can be wrong (as usual), but, as for voltage supply (VDD - VSS) and input signals, isn't the CD4051B (the highest voltage span version I was able to find) limited to 20 V?

    Having all the eight batteries combined in series, it would give up to 32 V (perhaps a little more, when fully charged).

    Texas Instruments MUX508 provides the same functionality (including break-before-make), and is able to withstand 36 V (in its recommended operating conditions; 40 V absolute maximum).

    Other parameters, like on resistances and their matching under biased conditions seems to be appropriate, but I didn't studied it thoroughly.

    Unfortunatelly, only SMT versions available.

    There exist many other muxes able to withstand such voltage differentials, but many of them don't seem to be available ATM, due to supply-chain shortages.

    https://ti.com/lit/ds/symlink/mux508.pdf

    Hope it helps

    Henrique

    P.S. Studying Phil's circuit a little more reveals that each mux is "only" connected to seven cells in the series arrangement, which represents a total of 28 V (pending any overcharging), but still above the original muxes limiting voltage levels. Sorry about the initial misinterpretation.

  • @Yanomani said:
    ...Studying Phil's circuit a little more reveals that each mux is "only" connected to seven cells in the series arrangement, which represents a total of 28 V (pending any overcharging), but still above the original muxes limiting voltage levels. Sorry about the initial misinterpretation.

    Actually, as I understand the above schematic that represents @msrobots idea, the muxes are connected to eight cells, but in such a way that P2 would measure only one cell at a time. Please note that the output of the lower mux is grounded.
    Also, I think the power supply rails for the muxes and the P2 should be separated completely, while the above schematic shows a, possibly weak, link from one to another via the lowest right resistor between...well, I'm not sure which one: GND (that would be it) or +3.3V (that I do not understand), because the schematic at the muxes' side does use exactly the same arrows, which seems kind of misleading.

  • Christof Eb.Christof Eb. Posts: 1,087
    edited 2021-08-06 17:03

    The sigma delta adc method with external resistors and capacitors, that was used for P1, can measure any higher DC voltage. It needs 2 pins per channel.
    https://www.parallax.com/package/an008-sigma-delta-analog-to-digital-conversion/
    This can be done with P2 and pure software too. ( I don't know, if it has the same counter modes.)
    As there are plenty of pins, no high voltage mux is needed. (Perhaps a common feedback pin will do.)
    Precision resistors will be needed, as for each cell the difference of voltages must be evaluated.

  • @sam_sam_sam said:

    ....

    But I do not have any experience in programming the micro controller that is used in this device

    I would recommend to start measuring of the voltage of the single cell, that is connected to GND on its lower side.
    These cells are typically charged in 3 steps.
    1. apply a constant current
    2. if a certain voltage is reached reduce current
    3. apply a constant voltage to the cell ( current will drop )

    So for a complete measurement you will need to measure current too!

    If you want to experiment: NiMH cells have lower voltages, the principle of charging is very similar, but they have the great advantages, that they will burn less easily.

  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2021-08-06 19:48

    Like I said earlier the BMS balancing protection board will take of the charging and discharging all I am interested in doing is just monitoring the voltage from each cell and if only 7 battery cells can be tested at a time this would be perfectly fine with me I want to keep it as simple as possible and if these are ic through hole devices the better easier to solder

    I have no experience programming a Propeller 2 micro controller I can learn but I have very little extra time on my hands right now I work nights 4 to 5 nights a week I loose 1/2 day on the 4 day and the start of the week I loose 1/2 night so I only really have two full days off and if I work 5 days I loose another 1/2 day so then I only 1 1/2 days off the 1/ 2 days I am sleeping

    I do have some experience programming a Basic Stamp 2 but it has been a very long time scent I done anything with this controller

    If someone was interested in doing this project what would it cost me for someone would do the programming for me if someone is interested please PM

Sign In or Register to comment.