Ticket #1181 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Battery temperature is incorrect [patch]

Reported by: andrew.paulsen@… Owned by: willie_chen@…
Priority: high Milestone:
Component: kernel Version: 2007.2
Severity: normal Keywords:
Cc: buglog@…, werner@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

The battery temperature measurement currently does not work since it incorrectly
assumes that there is a 10k resistor in parallel with the thermistor. The
attached patch should fix it.

I also recalculated the look-up table so it rounds correctly. e.g. 24.7C would
have been rounded down to 24C before and is now 25C.

Attachments

gta01-ntc.patch (2.6 KB) - added by andrew.paulsen@… 11 years ago.
Modifies NTC LUT & resistance calculations
gta01-ntc.2.patch (2.6 KB) - added by andrew.paulsen@… 11 years ago.
Patch: Modified LUT, measurement equation, & sane error value
ntc_moko.sci (529 bytes) - added by andrew.paulsen@… 11 years ago.
Scilab script for LUT calculation
ntc_moko.2.sci (529 bytes) - added by andrew.paulsen@… 11 years ago.
Scilab script: updated with correct B value

Change History

comment:1 Changed 11 years ago by werner@…

  • Cc werner@… added

The resistor situation is as follows:

  • in the GTA01, BATTEMP to GND: 10k 1%
  • in the GTA01, NTCSW to BATTEMP: 10k 1%
  • in the battery: Thermistor to GND: 10k 5% at 25C, B=3370K 3%

B is defined as B = (1/(25+273.15)-1/(50+273.15))-1 * ln(R25/R50)
where R25 = zero-power resistance at 25C, R50 = at 50C
(Nominal: R20 = 12070, R30 = 8320, R40 = 5839, R50 = 4171, R100 = 983)

Is the patch still correct given this information ?

comment:2 Changed 11 years ago by andrew.paulsen@…

I guessed B=3380 instead of 3370 so there is a tiny amount of error. I can
regenerate the table if you want, it's only one line in the scilab script.

Changed 11 years ago by andrew.paulsen@…

Modifies NTC LUT & resistance calculations

comment:3 Changed 11 years ago by andrew.paulsen@…

  • attachments.isobsolete changed from 0 to 1

Changed 11 years ago by andrew.paulsen@…

Scilab script: updated with correct B value

comment:4 Changed 11 years ago by andrew.paulsen@…

  • attachments.isobsolete changed from 0 to 1

comment:5 Changed 11 years ago by andrew.paulsen@…

  • attachments.description changed from Updated with correct B value to Scilab script: updated with correct B value

comment:6 Changed 11 years ago by andrew.paulsen@…

  • attachments.description changed from Modified lookup table to match actual thermistor to Patch: Modified LUT, measurement equation, & sane error value

comment:7 Changed 11 years ago by andrew.paulsen@…

  • attachments.ispatch changed from 1 to 0

comment:8 Changed 11 years ago by andrew.paulsen@…

  • Summary changed from Battery temperature is incorrect (fix) to Battery temperature is incorrect [patch]

comment:9 Changed 11 years ago by andy

  • Status changed from new to closed
  • Resolution set to fixed

I believe we took this patch on the kernel list some months ago.

Note: See TracTickets for help on using tickets.