Calibrating the Prius Battery Current Sensor

This sidebar explains how I calibrated the Prius battery current sensor.  To display the battery current in amps on an LCD panel meter, I needed to know what is the output voltage of the sensor per amp.  I assumed that the sensor would be linear, that is that the voltage would increase by the same amount for each amp, and this proved to be true as far as I can tell.  I settled on a figure of 0.027 volts (27 mV) per amp.

The first step was to obtain a reference current meter.  I bought an "as-new" clamp-on DC current probe on eBay for $75.  This produced an ouput of 10 mV per amp (on the 100 amp range).  Having clamped this on to the battery cable, the obvious next step would be to read off the current with a digital multimeter and compare it to the reading on my panel meter.  For example, if the multimeter read 0.234 V, the current would be 23.4 amps.  If my panel meter read 25.7, then the calibration constant would be high by a factor of 257 / 234 and I could adjust it and try again.  The problem with this is that the battery current doesn't stay steady for very long and it is hard to safely note readings on two meters before it changes.  Using this method and an observer (or someone else driving), I doubt if I could have got closer than 5 or 10% to the real figure.

I decided I needed an electronic observer that could look at the voltages from the clamp-on probe and the built-in sensor simultaneously.  In other words, I needed a data acquisition unit with analog inputs.  Back to the Internet, I was actually surprised to find that someone made exactly what I needed and I snapped up a LabJack for about $100.  This palm sized box connects to a computer using USB and comes with several software applications, one of which continuously collects data samples at up to 300 per second.  It has four analog inputs with full-scale sensitivity from ± 1V to ± 20V plus an analog output and digital input/output that I don't need (yet!).  I set it up to save the samples to a file and soon had a ballpark figure of 0.025 V per amp, which was in rough agreement with an independent figure of 0.026 V per amp from Wayne Brown.

However, the samples did not line up exactly, or even near enough to satisfy me.  I was transferring the samples to an Excel™ spreadsheet and plotting them on top of each other.  The samples from the built-in sensor were scaled (in Excel) by the calibration factor (about 0.025) and moved by a small offset to account for zeroing error.  What I was looking for was one plot disappearing behind the other.  I had three problems.  First, at 300 Hz I was collecting a lot of samples and this took time to process in Excel.  Second, there was a lot of sample-to-sample jitter which differed for the probe and the sensor which made it difficult to line them up.  Third, even when lined up as best I could, the probe's samples would sometimes stick out from behind the sensor's samples for distinct portions of the trace.  It seemed as if after a high current value in one direction, the probe lagged behind the sensor when the current decreased until a large current flowed in the other direction.

The first two problems required quite a bit more work to solve.  I reasoned that there were high frequency components in the battery current and that sampling at 300 Hz was not high enough to follow them.  This is not unexpected, as from other experiments I know that the current in MG2's widings has a strong component at 12 times the spin rate.  At 30 m.p.h., MG2 spins at about 30 revolutions per second, so there would be a 360 Hz component in the current waveform.  Since the LabJack software wouldn't sample faster and, in any case, too many samples was the first problem, I needed to get rid of the high frequency components.  Dropping another $20 or so at Radio Shack, I put together a two-channel low-pass filter and passed the signals from the probe and the sensor through before entering the LabJack.  For those who understand the terms, I used a second-order Butterworth active filter based on a dual bifet op-amp.  The corner frequency was 25 Hz, which allowed me to reduce the sampling rate to 100 Hz to address problem one.  When I captured new data, problem two was much better, although not completely solved.  The calibration constant seemed to be 0.026 to 0.0265, agreeing quite well with Wayne.

What could be causing the apparent lag of the probe signal (problem three)?  At first, I had the probe clamped around a part of the battery cable that was shielded.  The metal shield is intended to improve durability and safety and possibly reduce the transmission of electrical interference, but if it is made of steel wire it could be interfering with the magnetic field that the current probe picks up.  With some difficulty, I moved the probe to a tiny section of cable up close to the System Main Relay that is not shielded.  The lag (hysteresis) effect was somewhat improved, but not completely gone.  However, I found that the calibration constant was now slightly larger at 0.027.  It would be nice to conclude that the cable shield both absorbed some of the magnetic field, preventing it from registering in the probe, and held on to some of the field, causing the lag.  Unfortunately, if the shield absorbed some of the field, moving the probe onto an unshielded part of the cable would reduce the calibration constant, not increase it.  At this point I figured I was as close as I was going to get and decided to accept 0.027 volts per amp as the sensitivity of the built-in current sensor and to calibrate my current meter accordingly.  I feel I am within a few percent of the truth, unless something is going on I really don't understand.

I should mention that I took bursts of samples from the probe and sensor at several points along my regular commute on several days.  I tried to get both large positive (charge) and negative (discharge) currents in the same sample set, which required a bit of planning.  My favorite sample sets were taken as I left for work in the morning.  Before the catalytic comverter is warm, MG2 provides motive power and I could get discharge currents of 70 amps accelerating along the short road on which I live.  At the end, some fierce braking would give me charge currents of 50 amps.  Analyzing these sets always gave a calibration factor a few percent on the low side.  Sets taken later on in my journey, driving in battery-only mode and then braking, would give the value I finally decided on.  One day, setting off from work, the car was extremely hot and I got a value a few percent high.  Tentatively, then, I concluded that either the probe or the sensor was succeptable to temperature change and it would be useless for me to attempt greater accuracy without better equipment.  I was time to stop experimenting and publish!

Last edited September 11, 2002.  All material Copyright ©  2002 Graham Davies.  No liability accepted.