The 12 Volt + LVC + HVC + Balancer + PIC... Thread

safe

1 GW
Joined
Dec 22, 2006
Messages
5,681
The 12 Volt + LVC + HVC + Balancer + PIC... Thread

file.php


:arrow: The future very well might look like this. 8)

You can buy this type of thing right now, but it costs three times as much as the price of the cells alone, so this thread is dedicated to the idea of using a PIC (or not I suppose) in order to develop a self contained LVC (Low Voltage Cutoff), HVC (High Voltage Cutoff) and Balancer.

This is a "spin off" thread from the main "PIC based BMS" thread that exists. The original thread has no consensus on the shape of the result, but this one is more narrowly defined.

The main requirements are that:

:arrow: The battery is 12 volts.
:arrow: The battery is self contained.
:arrow: The battery does it's own balancing.
:arrow: The battery fits into an existing SLA dimension.
:arrow: The battery needs to protect against low voltage conditions.
:arrow: The battery needs to protect against high voltage conditions.


The idea is that in use these batteries will behave much like SLA cells and you will be able to assemble them in series without any special knowledge. Underneath they would be LiFePO4.

:idea: This is a "Circuit Design" thread for a 12 volt LiFePO4 battery.
 
Low Priced Comparators?

I've argued elsewhere for voltage dividers to measure the cell voltages, but, heck, if the reference to ground is the base of the battery ground, then the maximum voltage that you need to worry about is only 12 volts. That makes a lot of low priced comparators possible as components. Using the simple Difference Amplifier configuration (either bought or assembled manually) you could cheaply figure the true cell voltages. I'm still liking the idea of using a PIC and I still like the idea of the battery behaving either like a "Power" source or a "Wire". (in other words the battery is either "online" or "offline") I'm also still thinking that the PIC could output enough energy to sloooooowly balance the cells. As long as the job eventually gets done balancing can be slow. Some people are thinking of skipping balancing altogether, so choosing a slow balancer is better than nothing.
 
http://endless-sphere.com/forums/viewtopic.php?f=14&t=3357

This form factor exactly satisfies my requirement to replace the currie packs provided the AH 7 would work in lieux of 10ah sla's. At this point are they only available as 7ah or do they have 10 ah's. Would the 7 ah's work in the currie bikes with 450 amp kolmorgen motors? Where can we order these and How much are they?
 
chessir said:
Where can we order these and How much are they?
The demand for this sort of thing will be HUGE, but as I said before the prices and availability is really bad right now. This thread is going to be about building a "Homegrown" version of the same circuit for the time being until prices come down.

Thundersky sells car battery sized cells with their own BMS for about five times the equivalent "raw" cells:

http://www.thunder-sky.com/order_en.asp

...one day we will be able to buy this stuff, but nothing is affordable right now.
 
Getting Started

Despite talking about comparators as an idea, the old fashioned Voltage Divider is so cheap and easy to implement (as far as components if not software) that it seems hard to beat. This is the most minimal design to simply read the cell voltages. The software will need to do some work to make sense of it, but it is possible to do things this way.

As long as all references are based on the battery ground (in this diagram the battery ground is 30 volts) you have a maximum of only 12 volts for a common mode voltage. Some PIC's are capable of taking a 12 volt source voltage and so it's possible to drive the PIC off of the battery directly.
 

Attachments

  • 12 volt base diagram.gif
    12 volt base diagram.gif
    7.9 KB · Views: 2,320
The Math Is Missing

I don't think it's that hard (obviously simulation programs have no problems doing the math needed) but there needs to be a math model that explains WHY the output is what it is when you load up the base line with an extra "tuning" voltage. This problem is clearly solvable and probably pretty trivial once understood. Basically by looking at the way the output varies you can know how the overall system is behaving and then be able to set more accurate model parameters for when you want to measure the voltages.
 
The Math

Resistive_divider.png


415e91d513b35ad4092e9c5eb59980f0.png


So these circuits aren't going to be all the complicated :roll: ... in fact... while doing this by hand would be difficult it should be possible to set up a spreadsheet and be able to duplicate the results of the simulation program. Once that is done you could then start the math process of reduction of the equations down to the easiest possible form. The step after that would be to look at the way you do the multiplications or additions so as to be sure to never lose any precision as you execute the equation.
 
Not Rocket Science :roll:

I was thinking it was going to take me a long time to figure this out, but it was a real no brainer once you get it into a spreadsheet and look at it for a bit. What you are dealing with is different slopes for each cell depending on the resistor values. The base point for the line is the starting voltage. So all a PIC would need to do is solve a relatively simple "y = mx + b" kind of math problem using the base data point and the test voltage data point. This just isn't that hard. 8)

The chart is part of a spreadsheet and if I change any of the values then all the slopes change. So you have one monster equation for everything... it's not that bad... not mentally tough to handle, just long... and something that matrix calculation could deal with pretty well...

I don't think it's even necessary to know all the cell voltage values before you use this because you would be able to tell by the way things varied and the slopes exposed themselves that certain results are possible and others are not. There is only one unique solution that would satisfy these equations when the test voltage is applied. The data is sufficient to do this.
 
Drop To Ground

Probably an easier test would be to drop the voltage of the first wire to ground or as close as you can get it. Basically you do the opposite of flexing the slopes upwards and instead go downwards.

I suppose the ideal thing would be three data points per slope:

:arrow: Initial Voltage
:arrow: Initial Voltage + 4 Volts
:arrow: Initial Voltage Dropped to Ground (or close to it)

...then you solve the "y = mx + b" formula's with a total of 4 (cells) * 3 (data points) = 12 total data points.
 

Attachments

  • 12 volt PIC Test - Drop To Ground.gif
    12 volt PIC Test - Drop To Ground.gif
    14.4 KB · Views: 1,992
Corrections... as always...

This chart has been studied longer. The first one's had some errors, as you expect on anything first worked on. It's looking pretty good, just solve the formulas and backtrack. Everything is linear... no exponential equations, at least until you start to consider things like current. That's the wildcard, when you are evaluating constant voltages and resistance values it's pretty easy, but in order to actually perform the measurements the PIC will need to draw some current and that's something that might need attention before all is finalized. (it might be small)
 

Attachments

  • 12 volt PIC Test - Better Data.gif
    12 volt PIC Test - Better Data.gif
    18.4 KB · Views: 1,980
You would measure each tap with respect to ground (or apparently positive as you have drawn it) and calibrate from there. Once each tap is calibrated, then the individual cell voltages can be subtracted.

BTW: my internet connection is very constipated today, so I'm struggling to even read posts.
Can I upload some ExLax or something?
 
fechter said:
BTW: my internet connection is very constipated today, so I'm struggling to even read posts.
Can I upload some ExLax or something?
Netstipation...? Try BITLAX!

(image forthcoming) 8)

bitlax1.jpg
 
TylerDurden said:
fechter said:
BTW: my internet connection is very constipated today, so I'm struggling to even read posts.
Can I upload some ExLax or something?
Netstipation...? Try BITLAX!

(image forthcoming) 8)

:lol: !!!!!!!!
 
file.php


Improving Balancing Performance

:idea: I just had a great idea!

If you can sink 30mA per pin in a PIC how many amps can you sink with Two? Three? Four?

Some of these PIC's have many "extra" I/O pins that might not otherwise be used given that in this case there are only four cells to deal with, so:

:arrow: First Four Analog-to-Digital pins go to voltage measurement.

:arrow: All the rest of the pins are dedicated to balancing and divided evenly between them.


Four pins @ 30mA = 120mA 8)
 
:idea: Another Bright Lightbulb

:arrow: Sometimes the obvious is the hardest to see.

I just presented the idea that you can gang up with the pins and sink more than 30mA per cell because having more pins sinking means more sinking gets done.

Then it hit me.

When you want to test the voltages in order to calibrate the slopes (y = mx + b) you can use the pins you have wired for balancing as your way to get the grounding you need. Since the sink pins and the Analog-to-Digital pins are not one in the same (you've got plenty of I/O) then you can magnify your voltage variability flexing by combining the two. The more you can "wiggle" the voltage the better precision you can get in your result.

This PIC idea just seems to be getting better and better... 8)
 
file.php


Not Enough Current

After doing some modeling of the circuit and testing what a 120mA current can do to effect a "wiggle" I'm finding that it's just not enough to do it. There has to be some other way to ground a cell (ground to the battery ground, not real ground) without having the limitation of 120mA.

There's an argument for simply doing a one time measurement of the resistors before you burn in the software and just live with whatever precision your multimeter allows. It's a much more hands on way to do it, but it certainly makes the software easier.

If you did that then it's a simple matter of:

:arrow: Loading the resistor values in the software when you burn in your PIC.
:arrow: Balancing is done with multiple I/O pins that sink excess energy at 30mA each.
:arrow: The internal calculations would be very simple... it's just a voltage divider after all.

There is certainly an argument for the simpler approach, at least for a first version. The first version would be pretty darn easy to do. 8)
 
New Strategy

There is constant theme that seems to crop up whenever you try to deal with cells in series and that is the issue of the "common mode voltage" or more simply where the ground voltage is located. So many times you find yourself in corner boxed in to a design that has no exit. So in order to try to break free of the "box" you have to try something new.

The idea here is that you set up a situation where you have wires that come from either side of the resistor but at the same base voltage level. Then when you create a voltage across that span it's not fighting the cells of the battery... you only care about the resistor, so that's all you should test.

Looking at the diagram what I've done is straddled the resistor with wires on both sides. When you introduce a voltage difference across that span you get a reaction which should tell you the resistor value. Since these pins could also be used for things like balancing they could do double duty.

Anyway... still not sure if it would work (how do you create the voltage difference within the PIC) but it's a new strategy to think about... :idea:

At least current restrictions are not a problem with this concept. :)

The whole idea for all of this is to automate the measurement of the resistors to get more precise results. The EASY WAY is to just measure once before you burn the software... but hey... if these were being mass produced in the millions you wouldn't want to deal with that...
 

Attachments

  • 12 volt Test of Resistor Chart.gif
    12 volt Test of Resistor Chart.gif
    9.5 KB · Views: 1,802
Watts = Volts * Amps

MOSFET's are rated in terms of total power dissipation. The price seems to be roughly the same if you buy several smaller MOSFET's verses one of the higher rated ones.

:idea: So it got me thinking.... :?

If the goal is to isolate cells that are outside their voltage range (either low voltage or high voltage) we need to use MOSFET's (or some other way) to switch the cell online or offline. When you calculate for power dissipation the formula for that is Watts = Volts * Amps, so if you switch at 12 volts that means more power to dissipate. If instead you switch at only 3 volts (the individual cell voltage) it drops the MOSFET power dissipation in an equivalent manner.

http://digikey.com/scripts/DkSearch/dksus.dll?Detail?name=IPB080N06NGINTR-ND

At that point I searched Digikey and found a MOSFET that if bought in volume (1000 units) would only cost $0.96 cents each. For a 4 cell battery that means 2 MOSFET's per cell or a total of 8 MOSFET's:

:arrow: Cell Voltage (4.0V) * Max Current (50A) = 200W Power Dissipation


So for a lousy $8 bucks you could switch the 12V battery. Why even bother with balancing when you can switch the cell off or on right at the root! :)
 

Attachments

  • MOSFET - IPBIPP080N06N.gif
    MOSFET - IPBIPP080N06N.gif
    31.1 KB · Views: 1,784
You don't want the FETs to dissipate any power. When they are fully on, the dissipation will be I^2 R, where R is the on resistance of the FET, which is milliohms. You can pump 1,000 watts through the FET and it will only be dissipating a few watts if you size it properly.
 
fechter said:
You don't want the FETs to dissipate any power. When they are fully on, the dissipation will be I^2 R, where R is the on resistance of the FET, which is milliohms. You can pump 1,000 watts through the FET and it will only be dissipating a few watts if you size it properly.
True.

I'm more interested in the economic aspects of doing this. Do you see how by connecting the FET's to cells themselves that lowers the bar as far as power dissipation problems and that in turn lowers the price. If each cell has two matching FET's to toggle between "Power" and "Wire" modes then you eliminate the need for balancing. The PIC simply needs to:

:arrow: Scan for Low Voltage Conditions (discharging)
:arrow: Scan for High Voltage Conditions (charging)
:arrow: React to "out of range" Conditions with "Wire" mode
:arrow: React to "in range" Conditions with "Power" mode
:arrow: Do this for each Cell individually

...if the FET's are only $0.96 cents each then each cell is controlled by $2 worth of FET's. That's economical enough to make it work. I still like the idea of doing this at the level of the 12 volt battery because it's backwardly compatible and the PIC doesn't have all the "common mode voltage" problems that trying to span the full spectrum would entail. In a scenario where no "balancing" is required all that really matters is controlling the FET's to do their job.


The smaller the voltage difference across the FET the lower the total power that goes through the FET (assuming it's fully opened of course). Less power equals less price.

:arrow: So a "one cell to two FET" relationship could work and might be economical.
 
Theft Alert

I've effectively stolen this from Tomv over on the other thread. I just want to give credit where credit is due. I'll develop my own circuit diagram later.

Placing the FET's behind the resistors reduces costs and makes the whole thing act like a MUX. A really brilliant idea I've got to admit. :)


file.php
 
I don't know of any $.96 FETs that can handle 100 amps. A pair of IRFB4110's would be more like it.

The general arrangement with the FETs for voltage monitoring is essentially the same as the original MUX arrangement I proposed only without the differential amp. The MUX uses FETs inside. Just handier to have 16 channels worth in one package.
MUX front end.jpg
 
fechter said:
I don't know of any $.96 FETs that can handle 100 amps.
Actually you might want to investigate this further. It's "watts" that matter... most of the FET's have wide ranges of either volts or amps that they can handle, but it's the combined value that determines the heat. If you only have a 4 volt difference between source and drain then a 50 amp current can be handled with only a 200 watt rated FET. (which really CAN be bought for $0.96 cents)

However, you do raise a good point which is that someone might try to draw more than 50 amps. If they did that and the circuit was not designed with a current limiter you could conceiveably overheat your FET's.

But that's SUPPOSED to be handled by the controller... the controller normally has a limit of something like 40 amps.


Fig1Hexfet.jpg


2.2. Making the choice
Power and heat
The power that the MOSFET will have to contend with is one of the major deciding factors. The power dissipated in a MOSFET is the voltage across it times the current going through it. Even though it is switching large amounts of power, this should be fairly small because either the voltage across it is very small (switch is closed - MOSFET is on), or the current going through it is very small (switch is open - MOSFET is off). The voltage across the MOSFET when it is on will be the resistance of the MOSFET, Rds(on) times the current going thorough it. This resistance, RDSon, for good power MOSFETs will be less than 0.02 Ohms. Then the power dissipated in the MOSFET is:


Image13.gif


http://homepages.which.net/~paul.hills/SpeedControl/MosfetBody.html

:arrow: For our resistance calculation we would get:

Power = (50 amps) * (50 amps) * (0.02 Ohms) = 50 watts

...so the real "heat" comes from the "Volts times Amps" equation and not the simple resistance. Unless they combine somehow... hmmmm...
 
POWER & WIRE Question?

Wow, seems like everything has a "glitch" to it... :?

I finally got around to modeling what I thought could be the simple POWER and WIRE switch configuration using FET's. As you can see in the diagram the two FET's are arranged so that going from left to right you are going from negative to positive. While the WIRE segment does a good job of allowing the series current to bypass the cell when it's outside of it's voltage range (either the cell is too low or the cell is too high) it does a lousy job when the POWER FET is on. The problem is that when the POWER is on the FET leaks in the backwards direction and accidentally acts like a sort of balancing shunt. In a bit of irony the WIRE FET actually balances when you don't want it to... or shunts at least... when you don't want it to.

:arrow: So the question becomes:

"What's the best way to get the WIRE FET side of the circuit to stop leaking?"

You could place a diode in there and warp things a little, but that just doesn't seem the right thing to do.

:idea: Any ideas?

I want the WIRE segment to flow in only one direction... am I just not getting the right diode in place? What diode would work best? Or other idea?
 

Attachments

  • POWER and WIRE.gif
    POWER and WIRE.gif
    2.5 KB · Views: 1,674
Video Card Went Out...

Well... this old computer is really dying on me. The video card went out and so now I'm back to plain vanilla VGA. I really don't want to deal with getting another computer at the moment, but it's getting so I have little choice.

So if I don't post as much here that's why.
 
Back
Top