Designing a battery tester (Ah + internal resistance)

Lestraveled

Joined May 19, 2014
1,946
I don't have a "widget" that I built to measure the internal resistance of a battery. If I need to measure the IR of a battery, I pull out a Mosfet switch assembly, hook it up to my pulse generator, assemble the right load resistors and measure the IR. A very hands on approach from a very hands on kind of guy. (Give me some flint, sulfur, a wire tie, and a oscilloscope and I can discover the meaning of the universe..... it's 42, by the way.)

I realized from the conversations with nsaspook and Julia, that in the data processing world, you do not need to measure precisely at certain points in the transition to determine IR, you just have to make a good educated guess. What do I mean by this?
The micro controller decides when A/D samples are taken and when the second load is applied. So, take several samples before the load is applied to determine the slope. Apply the second load then take samples (throwing away the samples affected by inductance) and determine the new slope. Take the data from before the transition and interpolate a line forward. From the data after the transition, interpolate a line backwards. At the time when the load was applied, derive a delta between the two projected voltages and you have the data required for an accurate IR measurement. A problem I see with this method is the inaccuracy of using a big contactor as to when it actually closes. A Mosfet switch would eliminate this issue and would require less to control.

Anyway, remember, the internal resistance of a battery is independent of the current the measurement is taken at. If you take two IR measurements at significantly different current levels and they agree, then you have done it right.
 

nsaspook

Joined Aug 27, 2009
13,086
A good educated guess is about as good as it gets in the real world. My system logs all battery condition data every 30 seconds into a SDCARD so I have tons of data but the problem is how to you translate it into a simple gas gauge type number.
I use battery internal resistance/load testing to get a rough idea of SOC when the condition of the battery is unknown when the BMS program starts. It's also used as a sanity check to verify the dynamic SOC tracking of a battery at the beginning and end of a charge cycle. It's not as useful when the battery is also providing power to loads (like a inverter) while being checked but I have several other methods that the program uses to estimate/track SOC under those conditions.
 

Thread Starter

Julia C

Joined Oct 15, 2014
9
Update:

All my parts have arrived (as you can see in the photo below) and I'll be putting them all together tomorrow. I need to design a mechanical enclosure for the resistors and electronics, wire it all up, and hit go.

IMG_20141023_131310.jpg

I purchased a USB relay control board from CanaKIT that I've been using as the controller, and I wrote a C# application that sits on the computer and actually does all the logic and processing.

The control board has 4 USB controlled relays (that I'll be using to drive the contactors), as well as 6 IO pins - just the amount I need! I'll be allocating them to analog voltage, amperage (future expansion) and BMS readings, 2 for temperature sensors, and one to power an annoying beeper.

The program I wrote is about 1000 lines of code so far. You can see a screenshot of the UI below:

UI.png

The left panel is what you use to setup the test, the middle panel displays all your values (just simulated numbers for now), and the right panel I'm just using to debug for now. I've never interfaced with such a simple and easy-to-use controller before. The only challenge I encountered was how to speed up the communication over COM because it really lagged up my processing (1 'second' lasted 4 seconds) and I need things to be precise as I'm measuring Ah using the program simply by integrating A over time. The solution was using another fella's code that worked beautifully.

One question:

I haven't been able to find a cheap voltmeter that I could interface with the computer, so I've decided to try and make my own. The easiest way to do so is via a voltage divider as follows:

20120307151629!Voltage_divider_schematic.png

With R1 and R2 having resistance values in the 10s of KOhms. This should theoretically draw almost no current (as the remainder of my circuit has a resistance of 0.01 - 0.04 Ohms), but I am still wondering if my board would be at risk if this voltmeter circuit is connected in parallel to my battery (3V, 200Ah). Any help would be greatly appreciated.

Thank you!

Julia
 

Lestraveled

Joined May 19, 2014
1,946
Julia, EXCELLENT!!! Looks like you are getting ready to dissipate some power.

Windows is a non-deterministic operating system. You "ask" it to activate a relay and it will take its damn sweet time before it does so. Your mouse has a higher priority then I/O functions. You will have no idea when I/O events really occur through the normal windows operating system. There are some real time extension/drivers out there, (good luck). I built data collection systems with a windows users interface that controlled a digital signal processor board that handled the real time I/O. If you are interested look at http://www.bittware.com. They have piggy back I/O and A/D cards for their DSP cards. Easy to use, good support, their stuff works.

Right now you are probably dealing with putting hardware together.

Due to the extremely high DC currents you are dealing with, I would like to suggest using non-contact hall effect current sensors instead of voltage sensing. Connection resistance will be your constant enemy. A hall effect current sensor will tell you the truth no matter what the load resistance. I suggest the HAL series of sensors from LEM (Digi-key). Just a suggestion if other methods are not successful.

Looks like a fun project.
 
Last edited:

Thread Starter

Julia C

Joined Oct 15, 2014
9
Found of these being taken off a vehicle just now :)

But I still need some voltage sensing on the tester, any advice if you guys say that my circuit won't be reliable? I would like voltage to the 2 decimal point accuracy.

Julia
 

Lestraveled

Joined May 19, 2014
1,946
What are you going to use to digitize/interface your voltage and current measurements into your computer? How many bits? Format? Differential inputs? Voltage range?

Current sensor
The output of the 600 amp Tamura current sensor is scaled at 0.002 volts per amp with a Vcc/2, (+-0.030 volt) offset. At zero amps and a Vcc of 5 volts, the sensors output will be +2.500 volts. At 600 amps the output would be +4.000 volts.
Assume 1.5-2 LSBs per amp, and 5 volt max A/D input. A 12 or 13 bit A to D converter would be required.
The 0.002 volt/amp scaling implies you will need shielded cables, differential inputs to your A/D, very clean power supply.
In other words, this sensor will work well for large currents, but may not perform well when measuring single digit amps.

Note: A HAL 200s sensor would give you 0.020 volts/amp (10 times that of the Tamura), 600 amp range and 1% accuracy (<200Amp)


Voltage sensor/input.
The current sensor will drive your A/D requirements. Anything that works for your current measurement will give more than enough range for your voltage measurement.

Instrumentation connections
You have extremely high currents and are measuring very low voltages.
Some suggestions:
- The device under test and your instrumentation system must be connected (ground) at a single point only.
- Cabling and analog interfaces should be shielded differential pairs when ever possible.
- If resistor scaling is required, place your scaling resistors right at the input to your A/Ds and not at the signal source. In other words, keep your signal voltages as high as you can through your cabling.
- Learn about correct shield connections. In some cases the shield of a cable, connected at both ends, can induce more noise than if it is connected at only one end.

Protection
You will need to keep your sample speed up so RC filtering is out. I suggest that you look for "self protection" as a feature in your A/D selection.
 

Lestraveled

Joined May 19, 2014
1,946
Julia
I was looking around and found a site that seems to have pretty good selection of differential and isolated input data acquisition modules. They also have front end assemblies where you install input modules that are completely isolated, protected, and scaled. They are called 8B input amplifiers. They are not that expensive and might work for your application.

http://www.dataq.com/data-acquisition/voltage/

This looks like a good simple module you might be interested in.

http://www.dataq.com/products/di-155/
 
Last edited:

wayneh

Joined Sep 9, 2010
17,496
When I was shopping around for data acquisition, I went with a LabJack U3HV. (The Dataq gear is not as Mac friendly). A bit costly but very versatile and easy to use with any programming language you like. In my case, I import data directly into Excel using programming in Excel's Visual Basic.
 

Lestraveled

Joined May 19, 2014
1,946
................ Our 2 fans are not keeping up............
I am assuming you mean the two fans that cool the load resistors in the picture. I suggest you punch holes, or slots, in the far chassis wall, and then mount fans on a plate in the foreground (referenced to the picture). This way you will pull air directly across the load resistors and out of the chassis. This also will keep from heating the components on the left side of the assembly.

Think directed air flow.

Another way would be fans mounted to the top and bottom of the chassis, (referenced to the picture). Fans on one side would push air and fans on the other side would pull air. You would need more air flow than the (above) front to back method because of the aspect of the resistors.

Looks like a good first cut, just a little light on the air flow.
 
Last edited:

Lestraveled

Joined May 19, 2014
1,946
Julia
OK, so the bulk of your cooling fans are on the chassis cover not shown in your last picture. Where are the exhaust vents? Look again at the space heater and my load bank picture. High velocity air is flowed over the resistive elements and leaves the chassis. I don't see, in your picture, how the air leaves your chassis. Going to a different resistor will not solve your problem. The challenge is to pull the heat off of the resistors and exhaust it out of the chassis.

Another way of looking at it is, the cheap space heater is made of plastic, is .2 cubic feet in volume, and dissipates 1500 watts continuously. It is the high velocity air flow that keeps it from melting down.

A different resistor will dissipate the same heat as the old one. If you do nothing to increase the air flow, your problem will not go away.

Julia, I have a lot of experience at this kind of design. Do an experiment before you start ripping things apart. Pull one (or more) resistor(s) out of your load and put a fan directly on it. You will be amazed at the temperature drop you get.
 

Thread Starter

Julia C

Joined Oct 15, 2014
9
I've ordered 6 resistors of the other kind, to see what the difference will be. We have a number of heatsinks lying around that I can use. These other resistors are being used on a few other jigs, although running only at 10W each (of rated 25W) and they are cool to the touch.

We're getting more fans to test out on the current setup. There are two fans on the bottom of the jig (seen in the photo) and two will be sucking air out of the jig from the top lip.

Thanks Les,

Julia
 

Lestraveled

Joined May 19, 2014
1,946
I spent all of 20 minutes doing the following experiment:

I took two 0.5 ohm, 40 watt resistors, in series and I adjusted the power across them until they stabilized at about 125 Deg C. at room temp with no air flow.



I then took a 12 volt, 2.4 watt fan, and set it to blow across the resistors.



The fan has a 40 CFM air flow and resulted in a 45 Deg C temperature drop on the resistors.

It is all about air flow across the resistors.
 

Attachments

Top