• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Adjustable Current Sense Resistor

Status
Not open for further replies.

dknguyen

Well-Known Member
Most Helpful Member
So here's the scenario. There'a a battery charging IC whose charge current is limited to 10A if a a 10mohm current sense resistor is used. But I want to make this charge current adjustable from ~0A to 20A.

To me, the only way I can come up with is to have have ten 50ohm current sense resistors in parallel that can be switched in. This would allow 2 to 20A in 2A increments.

To have kelvin connections on a bunch of switchable, parallel current sense resistors might be a problem both electrically and for routing on a PCB unless I took up a lot of space on a second layer. But I figure that just a kelvin connection sense across only one resistor that will always be connected should be good enough- the other resistors should be sharing the same current anyways so the voltage drops should be the same. In that case only 9 switches would be used.

But anyways, its pretty cumbersome with all the switches and expensive at $1 per current sense resistor. Any alternative approaches would be appreciated (there is a resistive divider on the IC that sets current sense voltage that must be seen to limit charge current. I lose a lot of sensitivity though with this method since the one current sense resistor used must be the smallest value to support the highest level of current.

There's also the issue of switching all the paralle resistors. A switch per resistor is kind of a major PITA especially since it's so redundant- any n-resistors can be switched in to set a particular current level. It doesn't matter which resistors as long as n of them have been switched into the circuit. All methods to enable the use of only one switch either require a rather odd high current switches, or a relay bank with the associated drive transistors, 10 pole switch, and a strange control IC similar to a one-hot input priority encoder (rather than a typical binary input priority encoder). It's a crapload of parts though to reduce things down to a single switch.
 
Last edited:

dknguyen

Well-Known Member
Most Helpful Member
Well, I figured out a way to wire add PMOS's into the circuit for each relay coil and it's NMOS driver to chain relays together so that each relay in a chain can be activated individually, but activating a relay will also activate all relays that came before it in a chain. All without using the primary terminals of the relays which would distort the current readings. This would allow a SPxT switch to be used.

Still a lot of parts though which could be replaced by a single strange switch.
 
Last edited:

Roff

Well-Known Member
Well, I figured out a way to wire add PMOS's into the circuit for each relay coil and it's NMOS driver to chain relays together so that each relay in a chain can be activated individually, but activating a relay will also activate all relays that came before it in a chain. All without using the primary terminals of the relays which would distort the current readings. This would allow a SPxT switch to be used.

Still a lot of parts though which could be replaced by a single strange switch.
I didn't try to understand your circuit, but your PMOS sources and drains are swapped.
You also need to add diodes across the relay coils.
 

JimB

Super Moderator
Most Helpful Member
All these resistors and relays sound like a really complex and expensive way of doing things.
What is wrong with using an opamp or two to amplify the voltage from the current sense resistor?
You dont state which battery charger IC you are considering, knowing the IC would be useful in trying to think of an alternative solution.

JimB
 

dknguyen

Well-Known Member
Most Helpful Member
Ah, yeah the PMOS drains are swapped. Yeah i know you need diodes. I just quickly drew this up to show the method than the actual implementation.

The IC is the BQ24600 whose datasheet I have attached. I don't think I can just increase the current sense amplfication. The IC has a x20 amp already and a limit of 2V for the input voltage to set the current level. So the current sense voltage going into the IC (whatever it may be, amplified or not) can't be higher than 100mV. The IC datasheet says the current sensing is 3-4% accurate between 40 to 20mV, but drops to 25% for 5mV. So I'm trying to keep the current sense voltage that enters the IC at 100mV to 20mV. That's half the dynamic range requiredfor 2-20A. I actually wanted to try and keep the sensing voltage at a minimum of 50mV though just to be conservative which limits the dynamic range to 1:2.

Using a 2,3, or 4 switchable current sense resistors as a crude adjustment and the current set voltage divider as a fine adjustment would simplify things, but would still requires a fair number of parts to get the single-switching control I want.

It must have been late last night. I just realized that instead of switching more and more of the same value resistors into the circuit, I could use different value resistors and only switch the circuit between individual resistors so that only a SPnT switch would be required. But the switch is still really expensive ($100) and I need one for each charger. I do meet the minimum order quantity though for that reason...but yeah...no too much $$$.
 

Attachments

Last edited:

Roff

Well-Known Member
Ah, yeah the PMOS drains are swapped. Yeah i know you need diodes. I just quickly drew this up to show the method than the actual implementation.
I figured as much. I just worry about some NOOB copying your design and ... Well, you know the rest.
 

dknguyen

Well-Known Member
Most Helpful Member
Heh, yah, well I'll remove it since it seems like its not going to go anywhere anyways.

I might just have to suck it up and use a single 5mohm current sense resistor and adjust current soley through the current divider...

>20mV current sense voltage for all currents above 4A which is an accuracy of better than 4%. The accuracy is more important in the higher currents anyways. Even at 2A the current sense voltage is 10mV which means the accuracy is better than 25%. So the current limiting during heat llimiting during the charging CC mode should be okay. But I'm rather concerned though about the accuracy at the low levels of currents that are going to be encountered near the end of the charge that are going to be used to determine charge termination.

For a 5mohm resistor, any charge rate setting below 10A will result in an error of 25% or worse for the charge termination currents, worse than 40% for currents less than 3A.
 
Last edited:

JimB

Super Moderator
Most Helpful Member
Have a look at the bottom of page 12 of the datasheet.

The charge current is determined by:
The charge current sense resistor, and, the voltage on terminal Viset.

The Viset can be between 0 and 2 volts, thus allowing a wide range of adjustment of the charge current.

JimB
 

MrAl

Well-Known Member
Most Helpful Member
Hi there dk,


So this is what you are going to use after the transformer for your chargers?

Did you consider yet using a simple voltage divider for the current sense? That would give you easier control over changing the feedback so you can switch currents a little easier. Taking it to the extreme, if it works, it could make it a LOT easier.

The idea is to use (say) a 0.1 ohm resistor as the current sense. A voltage divider built around this resistor cuts the voltage down to 0.1 volt when 10 amps flows to the output. If you want to match the resistance of the 0.1 ohm, you would use a 0.08 ohm in series with a 0.02 ohm and take the left hand side current sense lead from the junction of these two. This way when 10 amps flows to the output 5 amps goes through the 0.1 ohm and 5 amps through the 0.08 in series with the 0.02, which puts again 0.1 volts across the 0.02 resistor so the current feedback sense gets the same voltage as before.
Taking this to the extreme, we might get away with using (say) a 0.1 ohm resistor and even possibly 90 ohms and 10 ohms, taking the left current sense lead from the junction again and the right current sense lead from the right side of the 10 ohm resistor. This way when 10 amps flows to the output almost the entire 10 amps flows through the 0.1 ohm resistor yet the differential current sense voltage is still around 0.1 volts.


Whether this works or not partly depends on how the internal current sense it really built up. From the data sheet it looks like a true differential current sense and if it really is then this would definitely work.

After you get it working (perhaps with the 0.08 and 0.02 first) you can proceed to figure out how to adjust the output current, which should come out much easier than having to switch in or out a bunch of resistors.

The required network is constructed quite easily:
Draw a square, replacing all the sides with a resistor except the right hand side, leaving that a short. Take the left hand side current sense lead from the lower left corner, take the right hand side current sense lead from the lower right hand corner. The top side gets the 0.1 ohm resistor, the left side the 0.08 ohm, and the bottom the 0.02 ohm. Do a quick analysis to make sure the voltage across the 0.02 is 0.1 volts when 10 amps flows to the output.

Because you want to go up to 20 amps output, you may wish to make the main resistor 0.05 instead of 0.1 ohms. The other part of the network doesnt change too much when you use high value resistors like 90 and 10 or maybe even 900 and 100, but if you use very low resistor values of course you'll have to use 80 percent of 0.05 (0.04) and 20 percent of 0.05 (0.01 ohms).

The only caution here is that the introduction of more resistance lowers the frequency of the equivalent RC network made up of the sense resistor and C11. Since this could cause instability, the value of C11 may have to be reduced to keep the same frequency.
Thus, if we raise the equivalent resistance by a factor of 10 we may have to decrease C11 by a factor of 10. That's only if in current limit it becomes unstable.

As JimB mentioned, you might be able to change the Iset voltage. I had assumed that you had already looked for the really simple changes and didnt find any.

Please let us know how this works out. Also, how are you dealing with the small package size?
 
Last edited:

dknguyen

Well-Known Member
Most Helpful Member
Have a look at the bottom of page 12 of the datasheet.

The charge current is determined by:
The charge current sense resistor, and, the voltage on terminal Viset.

The Viset can be between 0 and 2 volts, thus allowing a wide range of adjustment of the charge current.

JimB
Yes, I'm aware of that and have been going through the numbers to see if varying the threshold while using a single current sense accuracy will be of sufficient with a single current sense resistor. But please see my previous post about my concerns.

Hi there dk,


So this is what you are going to use after the transformer for your chargers?

Did you consider yet using a simple voltage divider for the current sense? That would give you easier control over changing the feedback so you can switch currents a little easier. Taking it to the extreme, if it works, it could make it a LOT easier.

The idea is to use (say) a 0.1 ohm resistor as the current sense. A voltage divider built around this resistor cuts the voltage down to 0.1 volt when 10 amps flows to the output. If you want to match the resistance of the 0.1 ohm, you would use a 0.08 ohm in series with a 0.02 ohm and take the left hand side current sense lead from the junction of these two. This way when 10 amps flows to the output 5 amps goes through the 0.1 ohm and 5 amps through the 0.08 in series with the 0.02, which puts again 0.1 volts across the 0.02 resistor so the current feedback sense gets the same voltage as before.
Taking this to the extreme, we might get away with using (say) a 0.1 ohm resistor and even possibly 90 ohms and 10 ohms, taking the left current sense lead from the junction again and the right current sense lead from the right side of the 10 ohm resistor. This way when 10 amps flows to the output almost the entire 10 amps flows through the 0.1 ohm resistor yet the differential current sense voltage is still around 0.1 volts.


Whether this works or not partly depends on how the internal current sense it really built up. From the data sheet it looks like a true differential current sense and if it really is then this would definitely work.

After you get it working (perhaps with the 0.08 and 0.02 first) you can proceed to figure out how to adjust the output current, which should come out much easier than having to switch in or out a bunch of resistors.
Yeah, looks like it. THere is already current sense threshold input to set the charge current sense voltage so a voltage divider isn't needed. The main concern is the accuracy of the current sensing depending on the current sense voltage:
3% at 40mV
4% at 20mV
25% at 5mV
40% at 1.5mV
maximum of 100mV

I'm trying to find a way to keep the accuracy above 5% which is proving to be especially a PITA for the current levels just before charge termination in CV mode (which are 1/10th the charge rate currents). The CC charge accuracy during the is actually okay for the most part with an accuracy of 4% for rates of 4A or higher. It's only 25% for 2A but I can live with that. The bigger problem is the 25-40% termination accuracy for charge rates set to 10A or less.

The QFN lead-design (or lack thereof) is going to be more of a problem than actual package size. But the dimensions of the sides of the chip are no smaller than 0805 and I have stuff that can work with chips smaller than that (though I've never actually tried). Maybe I'm overestimating the size of the chips because I just have calipers in front of me and not the actual chip itself. But either way, it doesn't much change the drag solder approach, just it's reliability for success. As long as I can get at the pins, there is a way (not like BGAs). At $8 an IC though, and a minimum of 6 boards are needed, it's probably cheapest not to mess-up.

EDIT: Oh wait, I think I see what you are saying...use an "unusually high value" current sense resistor to produce a big current sense voltage and step that voltage down for diff amp with a divider.
 
Last edited:

MrAl

Well-Known Member
Most Helpful Member
Hi again,


Ok, so one of your goals then is to keep the current sense voltage near say 50mv then?

One other thing i forgot to mention...
I didnt find anything that stated input voltage minimum for a given output like say 4.2v which is what you are after i think. It may take at least 10 or 12 volts input because they are using a high side switch made from an N channel MOSFET. I didnt check the gate voltage requirements though, so you may want to take a quick look at this as the chip needs a certain min voltage to drive a MOSFET with a given gate voltage requirement (for lowest Ron). They could be using an internal bootstrap method but it's not clear to me so you may want to check that out.
If it's not on the data sheet then you might confirm that the drive for the upper MOSFET can go above Vcc (or not).

Their reference design shows 5 cells in series which comes out to 21 volts and they are using a 28 volt supply, so i suspect they require a 7 volt overhead. This would mean for a 4.2 volt output at least 11.2 volts input. That means the transformer would have to be a step up type to get at least 12vdc (prefer higher though) with a 6v input for the input transformer.
I guess it cant hurt to go a little higher in voltage, like say 15v just to be sure.

I cant wait to see how this all turns out now :)
 
Last edited:

dknguyen

Well-Known Member
Most Helpful Member
Hmmm, it seems to get the voltage levels I need (>4% accuracy at all termination charge currents) I need to to use a whopping 40W, 100mohm resistor. My target is providing a power output of 84W per cell with 70% efficiency which works out to 120W input and a loss of 36W. That 40W current sense resistor basically eats all of that up. 10W 25 mohm resistor if I accept 25% error on the lower half range of charge currents- but that covers all the most often used charge currents.

Forget about the 6V requirement. 12V and higher is good enough.

The IC uses a bootstraped high side driver capable of 99.5% duty cycle and reuqires a minimum input voltage of 5V. So the IC itself isn't the limiting factor here to work on a 6V input. The real problem is that I can't find transistors that can switch the higher current levels involved at the frequencies required. Plus, getting the design to work at such low dropout means I need to start watching things like the voltage drops here and there, including the current sense resistor (which incidentally I want to be high for high accuracy).

Actually, just typing that out I realized I forgot to check the synchronous NMOS's power dissipation (I've only been checking the dissipation using input currents that have been scaled down proportionally because the input voltage is higher than the output voltage which only applies for the high-side FET. Yeah, there's a heat problem there...that alone may limit my charge current to 10A which solves the current sense resistor problem lol. Both the gate charge and gate resistance are pretty much as low as they can go. I'm very pleased with the combination actually from comparisons with other FETs...but not enough...it's already heatsinked and I don't like to assume aircooling though I'm going to do it anyway. The heatsink thermal graph indicates 600ft/min aircooling would be required for a junction temperature of 107 degrees at an ambient temperature of 40C which I think is quite reasonable at maximum power.

I have to look into that synchronous NMOS heat issue more...it would be a lot easier just to say "Max charge current, 10A! All heat problems and current sense problems gone!" That extra 10A is realy just for the futureproofing anyways...and the balance wiring on the batteries are still the real limiting factor they certainly don't work at these current levels but I'm sort of relying on the charging current between adjacent cells cancelling each other out by a large amount in the balance wiring. The resultant current ends up flowing mostly through the primary terminals anyways.

That said...this whole "individual cell charger that can be seried or paralleled for battery packs" might not work altogether. Someone else ran into this problem and I don't know why it is happening:
THeir project:
WattFlyer RC Electric Flight Forums - Discuss radio control eflight - View Single Post - A123 Balancer Project
Their discovery of a problem:
WattFlyer RC Electric Flight Forums - Discuss radio control eflight - View Single Post - A123 Balancer Project

I can't explain the accumulation of current flow on the lower cells. My understanding was that the charging currents flowing in the charge loop for the individual cells would cancel out by a large amount in the balance wiring and the resultant current would mostly end up flowing from the top of the pack to the bottom. It sounds like his charger isn't behaving like a bunch of parallell isolated chargers despite the isolated supplies. It is behaving more like each lower cell in the pack (and it's associated charger) is nested into the charge loop of the cell that came before it.
 
Last edited:

MrAl

Well-Known Member
Most Helpful Member
Hello again,


I was just saying 0.1 ohm to make the example simpler. You can use whatever resistor works for your app, although from your other comments it is starting to sound like another design may work out better for your app. Basically you push everything as far as it can go and then if you reach a point where you still havent met the spec's then you have to look for something else or accept the new spec's.
It might also be possible to override the built in current sense too, with your own home made amplifier and very small sense resistor. With a low offset op amp this would get better accuracy, although we'd have to work out a way to fool the chip and also hope that the response is fast enough. This could take some time to get working right, or it could work out the first time.

If someone else built something like this and it didnt work solely because of channel interaction, then something else must have been wrong. If all channels are isolated then the current path can only go from the output of the charger and back again, through one cell. It's the only way.
If you are unsure, you can build two of them and test it out thoroughly before proceeding, but if you can channel interaction then something else would have to be wrong. Perhaps he was using outputs all from the same transformer and that was causing interaction, but all the possible things that could be wrong with his design are too numerous to list here.

BTW, what happened with the Iset voltage, possibly changing that, is that where if you set it too high the sense resistor becomes too large, or what else happened?
 
Last edited:

dknguyen

Well-Known Member
Most Helpful Member
Yeah, I thought it might have been maybe because he used a single multi-output transformer (though I don't see how since it's supposed to isolated) and it connecting it to series cells turned it into a multi-tap transformer instead which cause something to happen. But he also ran simulations on separate transformers (or so he says) and got the same result.

Yeah, if the resistance is high enough to provide an accurate current sense voltage and the Iset voltage is set accordingly, the resistor dissipates too much power as well as being beyond the max current sense voltage of the IC. Adjustable divider-scaling would be needed like you suggested in which case it's somewhat redundant behaving more like a coarse control and a fine control. (I didn't use the 100mohm from your example, I sat down and calculated it out and that's what is required.

The only feasible ways right now to maintain such accuracy appears to be a 100mohm 40W resistor using a potentiometer to scale the input current sense voltage to the IC. The current sense voltage would be fixed to it's maximum value, or be used as a fine current setting control to the voltage divider.

The other one is the way you just mentioned- instead of a potentiomter for voltage scaling, build a external diff current amp that can support the high common mode voltage but scales it down to still be within the accurate range of the IC, and use Iset as an adjustment. It still has the same 100mohm 40W resistor though.

One of the things that is so attractive about this project for me is it doesn't require any processing and from the looks of it going any further would require one. Something realy attractive about this IC to me is all the compensation is handled internally. Other than the additional parts (processor/FPGA, ADCs, DACs, comparators, etc), the control theory is still beyond my grasp (namely the frequency compensation and ramp compensation and everything connected to it).

The distinct impression I have gotten from the high power chargers in RC hobby is that they do not use ASICs. It's a MCU directly controlling the charger built out of discrete components. The current sense sensitivities of this IC indicate it was designed for a single charge current only for which the resistor can be optimized to have maximum accuracy Even then, the termination charge current accuracy can only ever be at best somewhere between around ~15% due to the 10:1 ratio between CC-mode charge current and CV-mode termination current but the current sense accuracy decreasing exponentially. I'm realy not sure what termination charge currents accuracies are standard.
 
Last edited:

dknguyen

Well-Known Member
Most Helpful Member
How much easier it would be if there were a current sense potentiometer out there (especially one that accomodated for those Kelving connections)?
 

MrAl

Well-Known Member
Most Helpful Member
Hello again,


As you probably know from some of my other posts, i have been using and charging Li-ion cells since at least the year 2001, and all of the chargers that i use i had designed myself so i am quite a bit familiar with the charger current vs termination current issue, and this has led me down some interesting roads too. For example, i found that the offset on the LM358 although as low as 2mv, still wasnt good enough to sense current with. I turned to very low offset op amps (microvolt range) and now i can get the ratios required without any trouble at all.

One thing to keep in mind here if you havent already though, is that when you set the charge current higher that's usually for a larger cell with higher capacity, and that means the termination current is higher too. That makes it a little easier, but for some applications that dont use a low offset op amp you'll have to swap resistors. I have a charger built like this too, that uses one resistor for my smaller cell (300ma) and a resistor in parallel to get a higher charge current (1 amp). It only takes one heavy current switch and that's it, and it uses a transistor instead of op amp to regulate current.
Another thing to keep in mind that might help is that the charge current accuracy does not have to be that good. It does not even really have to be regulated, it just has to be held below the max value for that type of cell. For example, a 1 amp charge current can vary from 0.5 amp or even lower to 1 amp or 1.1 amp even, as long as it doesnt go too high. This makes the circuit a little simpler too.
Another idea is that you can create the charger using the max current setting, then use a separate circuit to terminate. That gives you more flexibility in both arenas. Yes the terminating circuit is an extra piece of hardware, but when you are after accuracy with many types of circuits that's the price that has to be paid.
Very low offset op amps are a lot cheaper than they used to be too, which is nice. The microvolt ones are the coolest i think, where you can get 10uv offset accuracy pretty easy.

Maybe we should talk about what current levels you really want and what termination currents go with them. For the example i gave above, i used the following:
300ma charge, 30ma termination
1000ma charge, 100ma termination
(however i dont always terminate at exactly those values either).

Are these the values you are using, or do you need to charge at a higher rate too like 3 amps and 300ma termination?
I guess a good thing to know is what your complete range has to be. I think you said up to 20 amps but that sounds kind of high, and even 10 amps sounds a bit high so what kind of cells are you planning to charge, very large ones?
 

dknguyen

Well-Known Member
Most Helpful Member
Yeah it occured to me a while back that the termination current can be quite high! THe charger has termination current it set to 1/10th of the max charge current. So for a 10A charge rate, that's 1A. Quite a bit and for smaller batteries being fast charged I do wonder how much of the battery capacity is being filled with that termination current and accuracy. I know the charge accuracy doesnt have to be that great. My issues arise fromt he following two concerns:

-heat dissipation (which isn't realy a problem since higher currents means higher current sense accuracy)
-fully topping off the battery (which is the larger concern since termination currents are so small and the resistor is sized for max charge current)

Hmmmm...yes...a separate termination circuit with a separate high value termination resistor would solve a lot of problems.

I was aiming for adjustable charge currents between 2A to 20A (and the charger has termination current set to 1/10th of that which I Have no control over). 10A and under is the most commonly used rates though 10-20A is only for ridiculously fast charger rates which might damage the cells or for reasonable charge rates for very large (5Ah) cells.

I am charging A123s and Lithium Polymers. THe fast charge rate is mainly for A123s which from reports...seem to be tolerable of charge rates of 5C without damage. These A123s are only available in 2.3Ah cells so far and are routinely charged at 3-4C, hence the 10A charge rate.
 
Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top