Learn MoreFAQsTutorials

12 posts / 0 new
Last post
dlo
Offline
Last seen:1 week 1 day ago
加入:2017-05-26 16:21
电池性能分析

I've looked into the UM-B-075 and how to profile a battery using the smartsnippet tools. However without having those equipment I'm not able to run the provided software to generate the LUTs.

I have a DL3021A load meter with battery profiling capabilities I've used to gather data.

In my case I'm using a 110mAh lithiuom ion battery. Am I correct in assuming that the LUT is generated using these principles?

100% = 0mAh discharged from battery

90% = 11mAh discharged from battery

80% = 22mAh discharged from battery

70% = 33mAh discharged from battery

60% = 44mAh discharged from battery

50% = 55mAh discharged from battery

40% = 66mAh discharged from battery

30% = 77mAh discharged from battery

20% = 88mAh discharged from battery

10% = 99mAh discharged from battery

0% = 110mAh discharged from battery

If so, I've generated the LUTs using 110mA load and 2mA load (1mA load was not achieved due to equipment accuracy).

静态常量int16_t vol_dis_low_0[的影响OC_LUT_SIZE] = {
3450, 3510, 3561, 3591, 3634, 3681, 3743, 3833, 3934, 4053, 4170
};
static const int16_t vol_dis_high_0[VOL2SOC_LUT_SIZE] = {
2900, 3193, 3291, 3346, 3392, 3443, 3509, 3595, 3694, 3802, 4021

Testing these tables, the reporting % seems to be off. I'm using a Joulescope current meter to verify against the reported values via BLE battery service as well as looking at the DEBUG_SOC UART output statesments.

For example, the unit (custom board) is plugged into a USB to charge, at full charge (90mAh charging rate), right after charging is disabled, the UART debug statement reports Soc of 875 and voltage of 4190. Shouldn't at end of charge the Soc be set to 1000 or close to 1000?

The voltage reporting seems to be accurately tracking the battery, but the Soc is fairly off.

Can you please confirm this is the correct way to create LUTs and if it is, why is the Soc reporting wrong values?

Thank you,

Device:
dlo
Offline
Last seen:1 week 1 day ago
加入:2017-05-26 16:21
/**
/** **************************************************************************************** * * @file custom_socf_battery_profile.h * * @brief a battery profile data for State Of Charge * * Copyright (C) 2016 Dialog Semiconductor. * This computer program includes Confidential, Proprietary Information * of Dialog Semiconductor. All Rights Reserved. * **************************************************************************************** */ #ifndef CUSTOM_SOCF_BATTERY_PROFILE_H_ #define CUSTOM_SOCF_BATTERY_PROFILE_H_ #define VOL2SOC_LUT_SIZE 11 /* Battery profile data for 110mA battery */ #define SOCF_BATT_LOW_CURRENT 2000 //2mA load #define SOCF_BATT_HIGH_CURRENT 110000 //110mA load #define SOCF_BATTERY_CAPACITANCE 110 //Battery capacity (110mAh) #define SOCF_CHARGING_CURRENT 90 static const int16_t vol_dis_low_0[VOL2SOC_LUT_SIZE] = { 3450, 3510, 3561, 3591, 3634, 3681, 3743, 3833, 3934, 4053, 4170 }; static const int16_t vol_dis_high_0[VOL2SOC_LUT_SIZE] = { 2900, 3193, 3291, 3346, 3392, 3443, 3509, 3595, 3694, 3802, 4021 }; static const int16_t vol_chg_0_0 = 3447; //90mA charging #endif /* CUSTOM_SOCF_BATTERY_PROFILE_H_ */

dlo
Offline
Last seen:1 week 1 day ago
加入:2017-05-26 16:21
I added calls to socf_get_avg

I added calls to socf_get_avg_current(active_count, active_period), and it seems to report correct values. If I take the returned value from socf_get_avg_current() and divide it by 0.277, I should get the result in uA, is this correct?

dlo
Offline
Last seen:1 week 1 day ago
加入:2017-05-26 16:21
I am using the PXP_Reporter

I am using the PXP_Reporter demo with the following modifications:
_ 32MHz crystal instead of 16MHz

_ updated the custom_socf_battery_profile.h with the code attached above.

dlo
Offline
Last seen:1 week 1 day ago
加入:2017-05-26 16:21
I figured out that this

I figured out that this
#define SOCF_BATT_CAPACITANCE_ADJ (1)

will set the capacity to 1000 after end of charge is detected.

The reported socf_soc still seems to be off by a lot. In my particular case after using 44mAh (60%), the socf_soc still reported 90% battery level.

PM_Dialog
Online
Last seen:1 min 27 sec ago
工作人员
加入:2018-02-08 11:03
Hi dlo,

Hi dlo,

Please let me check this and I'll get back to you.

Thanks, PM_Dialog

dlo
Offline
Last seen:1 week 1 day ago
加入:2017-05-26 16:21
1) Reverted the custom_socf

1) Reverted the custom_socf_battery_profile.h to default SDK

2) #define DEBUG_SOC

3) pm_set_sleep_mode(pm_mode_active)

in pxp_reporter and build debug option. Flashed the custom board and watched the terminal output.

The first read of the battery seems to report approximately correct SOC and the voltage reporting is accurate. However, as time go by, with a ~1.5mA constant drain on the battery (from running pxp_reporter, no additional load placed onto device), the SOC level goes up as voltage goes down. Log below:

[ 1 sec] DLG_SWFG SOC= 904 VOL=4104 ... [ 1000 sec] DLG_SWFG SOC= 908 VOL=4075

PM_Dialog
Online
Last seen:1 min 27 sec ago
工作人员
加入:2018-02-08 11:03
Hi dlo,

Hi dlo,

Apologies for the delay. What is the battery that are using? Can you please share the battery specs? It’s very important to characterize the battery correctly and use the a LUT with correct values. Are you using the pxp_reporter example of the SDK to test this?

Since it is a DA14683, the SS Studio v1.6.3 includes a Battery Profiler tools – you should need to use a source meter, voltage meter and shunt resistor with the tool. In section 6 Battery Profiler Tool, you will find all the available information you need for the battery profiling.

The tool is installed in C:\Program Files (x86)\Dialog Semiconductor\Battery Profiler for DA1468x windows path. Follow the procedure described in the document for the battery profiling.

Thanks, PM_Dialog

dlo
Offline
Last seen:1 week 1 day ago
加入:2017-05-26 16:21
The battery used is a 110mAh

The battery used is a 110mAh (https://www.digikey.com/en/products/detail/sparkfun-electronics/PRT-1385...)

Yes, using PXP_Reporter to test.

dlo
Offline
Last seen:1 week 1 day ago
加入:2017-05-26 16:21
Here's some finding from

Here's some finding from enabling #debug_soc:

Debug Count Average is the average count of the reported active_count used during socf_get_soc_active(void).

Debug Current Average is the average count divided by 1000 of the socf_get_avg_current from the active_count inside socf_get_soc_active(void).

Joulescope是measuring instrument's average current during that time period.

Delta is the differnce in reported value by the SOC and the Joulescope.

Notice the Delta is not linear, it increases as the current increases.

I believe it is obvious the Coulomb count is inaccurate.

Please setup a call with me to discuss this. It is urgent and it's affecting our development time. In particular I need to know where your formula are coming from and how we can fix these to get the correct results.

How is this number determined?

#define SOCF_MAX_COULOMB_COUNT_PER_MA_SEC 73584LL

Why are these two scenario needed?

if (count > 0) { offset_current = 500 - (250 * avg_current) / 5000; } else { offset_current = SOCF_DEFAULT_OFFSET_CURRENT - (avg_current * 50) / 1500; }

PM_Dialog
Online
Last seen:1 min 27 sec ago
工作人员
加入:2018-02-08 11:03
Hi dlo,

Hi dlo,

Apologies for the delay – probably I missed your last comment. Let me escalate this internally and I’ll get back to you shortly.

Thanks, PM_Dialog

PM_Dialog
Online
Last seen:1 min 27 sec ago
工作人员
加入:2018-02-08 11:03
Hi dlo,

Hi dlo,

We have taken this offline from the forum and will reach out to you directly.

Thanks, PM_Dialog