Skip to content

Battery measurement on BK7238T (SoM: T1-U-HL) #1886

@mjm987

Description

@mjm987

Describe the bug
Exact battery measurement is not possible because the ADC Pin drains too much current on BK7238T. Further, the SoM Pin5 is mapped on P23 instead of P20 as defined in T1-U-HL.

Firmware:

  • Version: OpenBK7238_QIO_1.18.224.bin
  • Device: T1-U-HL (Water Alarm Sensor SQ400B 2nd release)
  • Chip/model: BK7238T
  • Device config:
    There is a voltage divider 2:1 (both R=100k) connected as follows to the T1-U-HL SoM:
    CR123A Battery <--> 100k <--> Pin5 of SoM <--> 100k <--> Pin3 of SoM the battery ()
    The SoM is always powered by a DC-DC converter, even on DeepSleep.

To Reproduce
Test 1: Measuring voltage on Pin3 by defining this Pin as ADC input

  • Experiments showed that the SoM Pin5 is mapped to P23 which I defined as ADC input. According the T1-U-HL datasheet it should be P20. (Pin3 is left unconfigured for this test).
  • Problem: as soon as the device is active, the ADC input drains current an thus Voltage on Pin5 drops from 3V to about 0.75V. The Problem is not Pin3 which does not drain current.
  • Possible Cause: A internal pull-down resistor is getting active or the Sample&Hold circuit of the ADC is permanently connected to the internal ADC resistor ladder (not only a few us during measurement).
  • This causes a bad linearity and thus the error can't be corrected by adapting the Battery_Setup parameters.
  • Same problem when defining this Pin5 as BAT_ADC instead of ADC.

Test 2: Using Pin3 as BAT_Relay and Pin5 as ADC_BAT_ADC

  • Problem: this can't be defined because the actual firmware release maps both Pins on P23! (Pin3 is correctly mapped to P23 and Pin5 is mapped wrong in the firmware at P23 instaead of P20.
  • as workaround I defined BAT_Relay to on unused Pin4 (which is mapped to Pin 22) and soldered Pin3 together with Pin4.
  • Same Problem as on Test 1. The only difference is that the measured voltage is about 10% lower (not 50% as expected). And same non-linearity as on Test 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsolved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions