Even Newer 4 to 24-cell Battery Management System (BMS)

amberwolf said:
Are those shunt resistors wirewound? (I assume they are) Because then they're inductors, too, and probably are reacting with capacitance somewhere in the layout to resonate at that particular frequency.

Ah! you may be on to something here. Those ceramic things probably are wirewound and the big blue ones we always used on the ver 2.x boards are metal film, which is non inductive. I just tried hanging a 10uf cap across the resistor and it stopped the oscillation. 1uf doesn't cut it. That's about the only place I didn't look yet.

If I take one of the blue ones and parallel it with the wirewound, it stops the oscillation too.

That's what I love about this forum. A second pair of eyes is always helpful.

Even after making that change there is still a bit of weird noise coming from the LM431, but it's orders of magnitude less. I makes a strange pulsing with about a 1hz rate. I suspect that's sort of 'normal'.
 
fechter said:
Ah! you may be on to something here. Those ceramic things probably are wirewound and the big blue ones we always used on the ver 2.x boards are metal film, which is non inductive. I just tried hanging a 10uf cap across the resistor and it stopped the oscillation. 1uf doesn't cut it. That's about the only place I didn't look yet.
10uF? That's a lot. What about a smaller cap than either of those, like .1 or .47? 1uF might just be at or close to a value that allows the resonance to continue....

I'm still going to bet that there's something going on with trace routing or parts placement that is contributing, if not causing, the oscillation. (not having seen schematics)

If I take one of the blue ones and parallel it with the wirewound, it stops the oscillation too.
Either becuase it's changing the inductance (with it's leads, rather than the resistor itself) to make it non-resonant, or because it's bypassing enough current thru it resistively to keep it from oscillating. ;)

That's what I love about this forum. A second pair of eyes is always helpful.
That's why I post some of my wierd ideas--they might actually end up being not so wierd, once someone else comes along and points out the broken parts so I can fix them. :)

Even after making that change there is still a bit of weird noise coming from the LM431, but it's orders of magnitude less. I makes a strange pulsing with about a 1hz rate. I suspect that's sort of 'normal'.
THe LM431 is just a zener shunt regulator, right? There shouldn't be any oscillation with such a thing AFAIK, unless you have a cycle of operations going on in the circuit it supplies or that supplies it. What frequency are the pulses themselves (I'm assuming they're a separate frequency that is then blipping on and off at the 1hz)?
 
ejonesss said:
it could be the tc54's they are more prone damage than the optos. (someone who knows more about electronics may correct me if i am wrong).

you may want to also check the lvc test wires. it may be possible that you could have shorted the lvc test wires and it is always on.

on mine 2.2 the lvc wires are in the beginning are 2 wires that stick up and are easily shorted.

now there is a plug connected to them to a switch so i dont have to pinch them together to test the lvc.

you may have a bad or low cell caused by you changing it out before you charged and a cell was left to go low.

you may want to check the lvc output from the bms to see if it is triggering something else to make sure that you are able to run the controller.


also check the connections between the controller,battery and motor.


if your battery is charged you may be able to disconnect the lvc from the controller to see that your system is working so you know it is not the ebike at fault.


Karolis said:
I think I burned my BMS v2.5. Until that it worked ok, I used it only for charging my pack 20s5p A123. But after making a box for it and mounting on the bike it just now allways shows ebrake signal. Before first try on bike, I rechecked all it's functions and all worked perfectly, but after connecting it to ebrake line and powering the controller the bike just didn't move. After that the BMS always shows ebrake signal even if the pack is removed from BMS. I think it is optos :(


I think it is optos, because in diode testing function it shows in both ways conductivity. I am 100% sure that it isn't lvc wire short, because tester always beeps if it sees a short. I don't think it is TC54, because BMS ebrake shows conductivity even without a battery (cells). Could this happend because of controller's capicators? Because i don't have precharge resistor before I connect the main power. Ofcorse I always have a huge spark connecting controler to the battery. Bike is working normaly as always without BMS, before and after BMS failure. One other think I always get channels leds a little bit lit if I twist a throttle, but only in the begining of twist. I am afraid of that if I repair it, that might happen again. So I have to find a cause whay that happend.
 
The noise coming off the LM431 is pretty small and runs at 100khz sort of. I'll see if I can get a scope shot of it. It really only shows up when using a darlington stage after it, which amplifies the noise by the gain of the darlington, which is huge. With a regular bipolar transistor, it's pretty small. Still weird though.

Here's a schematic. We've gone through dozens and dozens of schematic variations to try to minimize the parts count and still make it work. This one is pretty simple. All the stuff on the right side seems to work OK. It's just the 431 and Q101 part that seems to want to oscillate.

P cell circuit schematic.jpg

When the cell voltage reaches 4.15v (or whatever the divider is set for) the 431 cathode starts to pull down. This turns on Q101 and starts current flowing through the shunt resistors (R104 and R105). These are just two resistors in parallel instead of one big one to save space and cost. Once the voltage across the resistors reaches about 2.0v, the LED starts to light up. When the voltage across the resistors reaches about 2.6v, Q102 starts to turn on and activates the optocoupler that starts throttling the charge current. Once the throttling kicks in, the voltage across the shunt resistor will hold steady at 2.6v. With the resistor values shown, this works out to around 800ma at throttling.

If oscillations are present in the system, the trigger points get thrown off, not to mention the thing probably turns into a radio transmitter. I have a 350MHz scope, and I haven't seen anything happening above about 1MHz, which is good.
 
So is the oscillation is due to:
1. Q101 turn shunt resistors on
2. Small internal resistance + reactance in circuit and battery pull voltage down
3. Q101 turns off.
4. Voltage goes higher then step 1. again
right?

Somebody with better knowledge of control and stability than me would probably be able to figure out how to ensure passivity (ie over a wide range of component tolerances any oscillation energy will be damped out.)

My primitive idea was how about introducing a deadband for Q101? Ie so it will turn on at say 4.15V, but only turns off at 4.10 or some suitable lower voltage. That may be low enough that the shunt current does not draw down the circuit below that right away.
 
Did you already try a capacitor on the base of Q101? If that brings the osc freq down to very low, maybe it doesn't disturb the other function of the circuit, and effectively you have just a PWM modulation of sorts on the shunt. This as you mentioned could give lower heat dissipation.
 
not to mention the thing probably turns into a radio transmitter.

that's probably not a problem now that everything is going digital tv being the big one unless the bms decides to take out the emergency radios like the police,fire or paramedics (true harmful interference).

a little noise on someone's tv or fm radio can be lived with?


fechter said:
The noise coming off the LM431 is pretty small and runs at 100khz sort of. I'll see if I can get a scope shot of it. It really only shows up when using a darlington stage after it, which amplifies the noise by the gain of the darlington, which is huge. With a regular bipolar transistor, it's pretty small. Still weird though.

Here's a schematic. We've gone through dozens and dozens of schematic variations to try to minimize the parts count and still make it work. This one is pretty simple. All the stuff on the right side seems to work OK. It's just the 431 and Q101 part that seems to want to oscillate.



When the cell voltage reaches 4.15v (or whatever the divider is set for) the 431 cathode starts to pull down. This turns on Q101 and starts current flowing through the shunt resistors (R104 and R105). These are just two resistors in parallel instead of one big one to save space and cost. Once the voltage across the resistors reaches about 2.0v, the LED starts to light up. When the voltage across the resistors reaches about 2.6v, Q102 starts to turn on and activates the optocoupler that starts throttling the charge current. Once the throttling kicks in, the voltage across the shunt resistor will hold steady at 2.6v. With the resistor values shown, this works out to around 800ma at throttling.

If oscillations are present in the system, the trigger points get thrown off, not to mention the thing probably turns into a radio transmitter. I have a 350MHz scope, and I haven't seen anything happening above about 1MHz, which is good.
 
I'm wondering if you might be hitting the Imax limt on the 431? The hfe varation on those transistors is quite wide and once it conducts, there is only a vbe 0.7v betwen the supply and the 431, the 220r resistor becomes irrelevant.

Have you thought about using an FET instead of that PNP transistor? That way, the 431 would then only 'see' a resistive load (plus a bit of gate capacitance) rather than a dynamically changing base/emitter junction - and that junction's characteristics will change quite dramatically as the transistor moves toward saturation. (I'm thinking about a sort of bastard offspring of the Miller Effect here).

If you reduce the shunt resistance, do you still get oscillation?

In a design I've been playing with, I'm using some dual micropower opamps to condition the outputs from both a 431 and TC54 - that way, I can throw in some hysteresis as required, but that increases the component count a bit.

dermot
 
fechter said:
The noise coming off the LM431 is pretty small and runs at 100khz sort of. I'll see if I can get a scope shot of it. It really only shows up when using a darlington stage after it, which amplifies the noise by the gain of the darlington, which is huge. With a regular bipolar transistor, it's pretty small. Still weird though.
There's nothing obvious or specific I see in the data sheets for the 431 or Q101 that show any parasitic capacitance that should equal a 100khz frequency when combined with any of the resistances in that part of the circuit, so it is wierd. I strongly suspect inductance of those shunt resistors combined with parasitic capacitance in one of those parts and the cell is causing it.

Assuming you can't just replace the wirewound shunts with film shunts to solve it, what about those pads under the shunts--are they grounded? If not, what happens if you ground them? If grounded, what happens if you isolate them? Or hook them to B+ instead of ground? Does it oscillate on a breadboard?



All the stuff on the right side seems to work OK. It's just the 431 and Q101 part that seems to want to oscillate.

Do they oscillate all the time, or just after (or before) the cell is at a certain voltage (beyond what it takes to start the shunting process, which I assume is necessary to be oscillating at all)?

Do they oscillate only when using a cell for testing, or also when using a cap or a variable power supply?

If you change the overall value of R101/R102 divider so it's higher but still the same ratio, does the frequency change?

What happens if you take the LED101 temporarily out of the circuit to disconnect Q101 from the rest of the circuit after that point?


I know this sounds wierd because there isn't a rational reason it would cause it (just a feeling), but (assuming taking LED101 out stops the oscillation) what does the oscillation do if you remove the cap at C101? Or alternately, add a similar cap (ceramic disc rather than electrolytic) at the base of Q101 to it's emitter? (more rational)


EDIT (added): Dermot may be right about the B-E junction variability vs R103's drop, etc. (his post wasn't there when I started writing mine ;) )
 
Thanks guys.
With the wirewound resistors out of there, I don't get any oscillation, but Gary is still having issues with a slightly different layout.

The LM431 would normally stop pulling down the base of Q101 as soon as throttling kicks in, keeping Q101 out of saturation. Even if it saturates, the 431 has an internal current limiter at around 100ma so it is protected.

I tried putting capacitors just about everywhere, but you need to run the thing with cells etc. to properly test all operating conditions.

I tried grounding the pads under the resistors, but saw no effect.

Gary's trying to build up a board with the same layout I'm using so we'll see how that goes.
 
looking at the schematic it looks like you are re using the opto for both the lvc and hvc?



fechter said:
The noise coming off the LM431 is pretty small and runs at 100khz sort of. I'll see if I can get a scope shot of it. It really only shows up when using a darlington stage after it, which amplifies the noise by the gain of the darlington, which is huge. With a regular bipolar transistor, it's pretty small. Still weird though.

Here's a schematic. We've gone through dozens and dozens of schematic variations to try to minimize the parts count and still make it work. This one is pretty simple. All the stuff on the right side seems to work OK. It's just the 431 and Q101 part that seems to want to oscillate.



When the cell voltage reaches 4.15v (or whatever the divider is set for) the 431 cathode starts to pull down. This turns on Q101 and starts current flowing through the shunt resistors (R104 and R105). These are just two resistors in parallel instead of one big one to save space and cost. Once the voltage across the resistors reaches about 2.0v, the LED starts to light up. When the voltage across the resistors reaches about 2.6v, Q102 starts to turn on and activates the optocoupler that starts throttling the charge current. Once the throttling kicks in, the voltage across the shunt resistor will hold steady at 2.6v. With the resistor values shown, this works out to around 800ma at throttling.

If oscillations are present in the system, the trigger points get thrown off, not to mention the thing probably turns into a radio transmitter. I have a 350MHz scope, and I haven't seen anything happening above about 1MHz, which is good.
 
ejonesss said:
looking at the schematic it looks like you are re using the opto for both the lvc and hvc?

Yes, on the shunt boards, the LVC and HVC signals share the same opto. On the control board, the LVC signal is isolated, with another optocoupler, so that it can be completely independent from charge control logic.

Good news on the layout front. I finally figured out why my test boards were acting differently from what Richard was seeing, even though we were using the same circuit version. the boards I'm using were a later version, where I had added separate traces on the top of the board for the LM431 divider resistors. It turns out this was a major contributor to the oscillations, which was skewing the LM431 set points, the exact thing the extra traces were supposed to help fix. I guess these top traces were interacting with the bottom traces, or the KSA473 tabs, which are very close, or both. I ended up joining the top and bottom traces on both ends, and beefed up the bottom traces with some extra solder, and bingo, the oscillations were gone. :) I then tried charging a 6s-5000 pack that was a bit out-of-balance, and it finished with a delta between the highest and lowest cells of only 12mV, about as good as it gets with 1% resistors.

What we have to decide now is what to do about the current layout, which uses 6 channels per board. The space each channel uses needs to be wider, so that I can fit wider traces, top and bottom, with a bunch of vias between them to add surface area. If I keep it to 6 channels per board, they will be too wide for the Hammond boxes I like to use, but it wouldn't really affect the "stacked" configuration setup, other than being about 3/8" wider. I could keep the board size the same, and cut the number of channels down to 4, which still goes into evenly the number of channels for most common setups (i.e. -- 12, 16, 20 and 24...), but then I lose the one card per 6s LiPo pack relationship. On the other hand, Hobby City is selling 8s-5800 packs now, and I think these will become quite popular with our crowd, and two 4s boards would work nicely with these.

I may end up having to do multiple board sizes, but not initially, so I need to pick one, to start. The next run will also include the latest control board updates, which include the new adjustable charge current limiter, so that any old inexpensive power supply can be used, even if all it has for current overload protection is a hiccup mode.

-- Gary
 
that kind of defeats the purpose of sharing the opto.

my idea of sharing the opto is to have only 1 opto greatly reducing the costs because you only need 6 single opto's or 3 dual opto's for a 6s pack.

unless you are paralleling all the shared ones to drive 1 separate opto in the control section.

without a full schematic of the bms it is hard ro know.

On the control board, the LVC signal is isolated, with another optocoupler


GGoodrum said:
ejonesss said:
looking at the schematic it looks like you are re using the opto for both the lvc and hvc?

Yes, on the shunt boards, the LVC and HVC signals share the same opto. On the control board, the LVC signal is isolated, with another optocoupler, so that it can be completely independent from charge control logic.

Good news on the layout front. I finally figured out why my test boards were acting differently from what Richard was seeing, even though we were using the same circuit version. the boards I'm using were a later version, where I had added separate traces on the top of the board for the LM431 divider resistors. It turns out this was a major contributor to the oscillations, which was skewing the LM431 set points, the exact thing the extra traces were supposed to help fix. I guess these top traces were interacting with the bottom traces, or the KSA473 tabs, which are very close, or both. I ended up joining the top and bottom traces on both ends, and beefed up the bottom traces with some extra solder, and bingo, the oscillations were gone. :) I then tried charging a 6s-5000 pack that was a bit out-of-balance, and it finished with a delta between the highest and lowest cells of only 12mV, about as good as it gets with 1% resistors.

What we have to decide now is what to do about the current layout, which uses 6 channels per board. The space each channel uses needs to be wider, so that I can fit wider traces, top and bottom, with a bunch of vias between them to add surface area. If I keep it to 6 channels per board, they will be too wide for the Hammond boxes I like to use, but it wouldn't really affect the "stacked" configuration setup, other than being about 3/8" wider. I could keep the board size the same, and cut the number of channels down to 4, which still goes into evenly the number of channels for most common setups (i.e. -- 12, 16, 20 and 24...), but then I lose the one card per 6s LiPo pack relationship. On the other hand, Hobby City is selling 8s-5800 packs now, and I think these will become quite popular with our crowd, and two 4s boards would work nicely with these.

I may end up having to do multiple board sizes, but not initially, so I need to pick one, to start. The next run will also include the latest control board updates, which include the new adjustable charge current limiter, so that any old inexpensive power supply can be used, even if all it has for current overload protection is a hiccup mode.

-- Gary
 
GGoodrum said:
ejonesss said:
looking at the schematic it looks like you are re using the opto for both the lvc and hvc?

Yes, on the shunt boards, the LVC and HVC signals share the same opto. On the control board, the LVC signal is isolated, with another optocoupler, so that it can be completely independent from charge control logic.

Good news on the layout front. I finally figured out why my test boards were acting differently from what Richard was seeing, even though we were using the same circuit version. the boards I'm using were a later version, where I had added separate traces on the top of the board for the LM431 divider resistors. It turns out this was a major contributor to the oscillations, which was skewing the LM431 set points, the exact thing the extra traces were supposed to help fix. I guess these top traces were interacting with the bottom traces, or the KSA473 tabs, which are very close, or both. I ended up joining the top and bottom traces on both ends, and beefed up the bottom traces with some extra solder, and bingo, the oscillations were gone. :) I then tried charging a 6s-5000 pack that was a bit out-of-balance, and it finished with a delta between the highest and lowest cells of only 12mV, about as good as it gets with 1% resistors.

What we have to decide now is what to do about the current layout, which uses 6 channels per board. The space each channel uses needs to be wider, so that I can fit wider traces, top and bottom, with a bunch of vias between them to add surface area. If I keep it to 6 channels per board, they will be too wide for the Hammond boxes I like to use, but it wouldn't really affect the "stacked" configuration setup, other than being about 3/8" wider. I could keep the board size the same, and cut the number of channels down to 4, which still goes into evenly the number of channels for most common setups (i.e. -- 12, 16, 20 and 24...), but then I lose the one card per 6s LiPo pack relationship. On the other hand, Hobby City is selling 8s-5800 packs now, and I think these will become quite popular with our crowd, and two 4s boards would work nicely with these.

I may end up having to do multiple board sizes, but not initially, so I need to pick one, to start. The next run will also include the latest control board updates, which include the new adjustable charge current limiter, so that any old inexpensive power supply can be used, even if all it has for current overload protection is a hiccup mode.

-- Gary

4s would be perfect for me, since I do 8 12 or 16 in my packs.

Another related question: I sometimes charge my bike while driving someplace in my VW bus. I have an inverter, but stepping up then down is inefficient (and the charger gets hot from the square wave)

I had wondered if I can just take a 8, 12 or 16s pack, disconnect power leads between each 4s section, then parallel the 4s sections and charge from a car alternator with output voltage adjusted up a bit to 15V or so.
If control logic runs at 15V then I couldn't see why not.
 
Here's another clue in the oscillation problem:
LM431 stability graph.jpg

Though interpreting what this amounts to in our exact configuration is hard to say exactly, but clearly the LM431 will become unstable under certain operating conditions and we should be able to design the circuit to stay outside of the unstable zone.
 
I'm a little bit late, but I had an idea.

You mentioned using 12 separate lifep04 chargers. It seems like a good cheap way to keep them all balanced. My only problem with that is it won't fit in my bag (and the cost!).

My solution is a one cell charger, and a circuit that switches which cell it's charging. Initially I thought the it could switch when it reaches the full voltage, but I then i realized you'd have to check every cell to see if charging was complete.

My idea is to have the charger switch what cell it's charging every thirty seconds. This way if you have to use the battery pack before it is fully charged the cells would be mostly even.

The advantage to this system is that you only need one charger, and that given a full charging cycle every cell will be individually balanced.

Perhaps thirty seconds could be reduced to 15 seconds, and maybe they're could be 4 chargers. Basically I'm wondering how easy it would be to make such a system.
 
Hi,

auraslip said:
My solution is a one cell charger, and a circuit that switches which cell it's charging. Initially I thought the it could switch when it reaches the full voltage, but I then i realized you'd have to check every cell to see if charging was complete.

My idea is to have the charger switch what cell it's charging every thirty seconds. This way if you have to use the battery pack before it is fully charged the cells would be mostly even.
Too complicated and it would take forever to charge.
auraslip said:
You mentioned using 12 separate lifep04 chargers. It seems like a good cheap way to keep them all balanced. My only problem with that is it won't fit in my bag (and the cost!).
The Voltphreaks cost about $10 each and don't take up that much room. Only 2a though so pretty slow:
http://endless-sphere.com/forums/viewtopic.php?f=14&t=2563&p=35303
Gary said:
What I did was use ten of the chargers ypedal found at VoltPhreaks, and then wired them into two standard RC-type balancer plugs:
10-cell%20a123%20Charger-Balancer.jpg

Each of these charger outputs are wired in series, but each junction between the positive of one and the negative of the next one, is connected to each cell junction, so the end result is that each cell is independently charged to about 3.7V.

-- Gary
 
GGoodrum said:
The next run will also include the latest control board updates, which include the new adjustable charge current limiter, so that any old inexpensive power supply can be used, even if all it has for current overload protection is a hiccup mode.

That sounds great I bought 2 SP320's and am wishing I hadnt, this gives me some hope though:)
I would also be in favor of a 4s board as long as 5s packs can be used(5x4 for a 20s pack) If its easier with a 6s board then I would prefer that, or why not a 5s board? that would be ideal... for me... :lol:
 
...why not a 5s board? that would be ideal... for me...

I second that request 8)
 
4 channels suits me. (16s pack). I guess that should work for most people.

Well done all on getting to the bottom of the mysterious instabilities. Doncha just love analogue design? No wonder everyone does digital these days.
 
Yeah, 4 channels per board sounds ideal for me too since I'm looking to build them into self contained multi purpose 4 cell 12v modules (you know, lump the bms, a power supply, and a dc to dc converter all together in a box with 4 thundersky cells that I can remove from the bike and tote around).
 
just my 2 cents..
4-channel boards should be ideal for most e-bikes.
12s, 16s, 20s, 24s is most popular configuration.
it is also much easier to find the power supply for this configurations as far as current limitin option will be available.
and as far as all poards would be cuttable, there would be opportunity for creating 8s boards for new 8s packs from hobbyking
http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=10870&aff=221230 and
http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=10895&aff=221230
 
i would be careful with lithium batteries from china i have heard of some horror stories of batteries exploding and catching fire


andreym said:
just my 2 cents..
4-channel boards should be ideal for most e-bikes.
12s, 16s, 20s, 24s is most popular configuration.
it is also much easier to find the power supply for this configurations as far as current limitin option will be available.
and as far as all poards would be cuttable, there would be opportunity for creating 8s boards for new 8s packs from hobbyking
http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=10870&aff=221230 and
http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=10895&aff=221230
 
Back
Top