PSAS/ AvionicsPowerSystemLv2Calibration

Calibrating the APS (2004/12/12)

Calibrating Battery Voltage

The PIC18F458 reads the battery voltage and NOT the avionics system bus voltage, which switches between the battery and shore power. It reads an onboard 10bit ADC which is connected to the battery via a resistive voltage divider, which in turn is turned on by a ZXMN2A01F N-channel MOSFET. The divider is R1 = 115K, R2 = 20K which gives a theoretical divide by factor of 0.14815. Thus Vb should be 5/1024/0.14815*(raw ADC). Since the resistors are only 1%, and the MOSFET adds it's own resistance, we'll simply modify the voltage divider constant (0.14815).

So, Keith wrote a Nickle script to take the CAN message from the APS (APS_REPORT_VOLTAGE) and display it on the screen in a nice format (a voltage value). We also connected a Fluke 84 DMM (in high accuracy mode) to the battery directly at the pack via some clip leads.

This gives a new constant of 0.14592. Trying again:

A bit low... whooops! went the wrong way, should be more like 484.3 not 484.7. Keith added some exponential filtering to the raw data: exp(-1/30).

This gives a new constant of 0.14581.

I'll take it! Now we'll try and charge the voltage the voltage and see what happens.

One LSB of the 10bit ADC is 5/1024/0.14581 = 33.5 mV... so the 40mV difference between the Fluke and APS is ~ 1 LSB

And that's well within error of 1 LSB... ship it!

APS Battery Voltage Constant 5/1024/0.14581 = 0.0334875

Calibrating Battery Current

From the LTC4150 datasheet:

one interrupt = 1/(Gvf*Rsense) Coulombs = 1/(32.55 Hz/V * 10 mOhm) Coulombs = 3.072197 Coulombs


Amps = dC/dT = 3.072197/T where T is the period between interrupts.

If we divide the period T into ticks of 4ms (250 Hz) as it is in the APS, then we get:

Amps = 3.072197/(ticks*4ms) = 768.049155/ticks

For example,

Current Time Ticks
5.0 A 614 ms 154
2.5 A 1.229 s 307
1.0 A 3.072 s 768
0.5 A 6.144 s 1536
0.1 A 30.722 s 7681
0.03 A 102.407 s 25602

Measurements with a Fluke 88 DMM on mA mode, with the battery charging

Now we'll try it with outgoing current (FC on, CAN bus on):

Now we'll do it at close to zero current:


Calibrating Battery Charge

The battery charge is given in an accumulation of ticks from the LTC4150. Each tick equals = 3.072197 Coulombs. We arbitrarily cut off the maximum and minimum of the charge - since we obviously can't go beyond the capacity of the battery.