Battery_Level on discharge does not update on API or Dashboard

Running firmware 0.3.3 and software 0.3.0.
Charging the battery voltage of 3.552 is 98%. Discharging 98% is 3.171 and 3.183. Reset mcu and did a charge cycle and started discharge and still not tracking Battery level correctly.

Charging is just as bad. 32% level listed at 3.992 v. Will hook up external volt meter to battery to determine if the battery voltage reading is bad. Just jumped from 33% at 4.2 volts to 100% at 4.201 volts. Understand now why the max charge was originally set to 85%.

Found that I didn’t have a lithium with the 3.7 v specification. I got one and ran discharge and charge cycles and now it doesn’t seem to lock up or jump on the battery level percentage. The Battery health didn’t reset with a new battery. Below is a percentage vs voltage and current of battery.

Blockquote
% , Volts, Amps
90, 4.193, 0.838
89, 4.044, -0.885
88, 4.028, -0.889
87, 4.02, -0.893
86, 4.017, -0.902
85, 4.004, -0.97
84, 4.009, -0.876
83, 4.001, -0.898
82, 4.004, -0.879
81, 3.994, -0.908
80, 3.996, -0.879
79, 3.988, -0.896
78, 3.973, -0.915
77, 3.964, -0.92
76, 3.968, -0.89
75, 3.963, -0.893
74, 3.953, -0.898
73, 3.945, -0.918
72, 3.939, -0.897
71, 3.93, -0.926
70, 3.927, -0.904
69, 3.92, -0.911
68, 3.907, -0.965
67, 3.897, -0.924
66, 3.894, -0.931
65, 3.876, -0.94
64, 3.871, -0.94
63, 3.863, -0.931
62, 3.87, -0.913
61, 3.866, -0.921
60, 3.859, -0.913
59, 3.837, -0.951
58, 3.838, -0.944
57, 3.841, -0.923
56, 3.835, -0.918
55, 3.824, -0.952
54, 3.823, -0.924
53, 3.812, -0.951
52, 3.808, -0.93
51, 3.803, -0.937
50, 3.792, -1.008
49, 3.792, -0.927
48, 3.782, -0.954
47, 3.775, -0.942
46, 3.768, -0.964
45, 3.759, -0.962
45, 3.755, -0.955
45, 3.755, -0.955
44, 3.755, -0.944
43, 3.748, -0.956
42, 3.739, -0.977
41, 3.729, -0.983
40, 3.725, -0.964
39, 3.717, -0.953
38, 3.697, -0.991
37, 3.698, -0.983
36, 3.689, -0.987
35, 3.677, -0.994
34, 3.66, -0.999
33, 3.668, -0.98
32, 3.66, -0.971
31, 3.653, -0.989
30, 3.645, -0.981
29, 3.638, -0.983
28, 3.62, -1.009
27, 3.626, -0.998
26, 3.618, -1.012
25, 3.611, -0.993
24, 3.606, -1.017
23, 3.599, -0.993
22, 3.595, -0.985
23, 3.77, 1.036
24, 3.779, 1.038
25, 3.786, 1.038
26, 3.792, 1.039
27, 3.798, 1.039
28, 3.803, 1.039
29, 3.809, 1.039
30, 3.815, 1.039
31, 3.82, 1.038
32, 3.826, 1.039
33, 3.831, 1.039
34, 3.837, 1.038
35, 3.843, 1.038
36, 3.849, 1.038
37, 3.856, 1.039
38, 3.861, 1.039
39, 3.869, 1.039
40, 3.876, 1.039
41, 3.883, 1.038
42, 3.89, 1.038
43, 3.896, 1.039
44, 3.903, 1.039
45, 3.909, 1.038
46, 3.914, 1.039
47, 3.92, 1.039
48, 3.925, 1.039
49, 3.93, 1.039
50, 3.935, 1.04
51, 3.94, 1.039
52, 3.944, 1.039
53, 3.949, 1.04
54, 3.953, 1.04
55, 3.957, 1.039
56, 3.961, 1.039
57, 3.965, 1.04
58, 3.969, 1.039
59, 3.973, 1.04
60, 3.977, 1.039
61, 3.98, 1.039
62, 3.984, 1.039
63, 3.988, 1.039
64, 3.992, 1.039
65, 3.996, 1.039
66, 3.999, 1.04
67, 4.003, 1.039
68, 4.006, 1.04
69, 4.01, 1.039
70, 4.013, 1.039
71, 4.017, 1.04
72, 4.02, 1.04
72, 4.022, 1.04
72, 4.022, 1.04
73, 4.024, 1.04
74, 4.027, 1.039
75, 4.03, 1.039
76, 4.034, 1.04
77, 4.038, 1.04
78, 4.042, 1.04
79, 4.045, 1.04
80, 4.049, 1.04
81, 4.053, 1.039
82, 4.057, 1.04
83, 4.06, 1.039
84, 4.064, 1.039
85, 4.068, 1.04
86, 4.072, 1.04
87, 4.076, 1.04
88, 4.08, 1.04
89, 4.084, 1.039
90, 4.088, 1.039
91, 4.09, 1.039
90, 4.09, 1.039
91, 4.091, 1.039
92, 4.103, 1.039
93, 4.114, 1.04
94, 4.125, 1.039
93, 4.125, 1.04
94, 4.125, 1.04
94, 4.126, 1.04
95, 4.135, 1.04
96, 4.145, 1.04
97, 4.155, 1.041
96, 3.98, -0.902
95, 3.974, -0.886
94, 3.962, -0.911
93, 3.957, -0.895
92, 3.947, -0.919
91, 3.948, -0.898
90, 3.94, -0.915
89, 3.935, -0.906
88, 3.921, -0.912
87, 3.922, -0.92
86, 3.919, -0.902
85, 3.916, -0.9
84, 3.905, -0.929
83, 3.906, -0.9
82, 3.885, -0.925
81, 3.893, -0.906
80, 3.882, -0.937
79, 3.883, -0.91
78, 3.873, -0.939
77, 3.873, -0.911
76, 3.855, -0.956
75, 3.864, -0.914
74, 3.85, -0.945
73, 3.855, -0.915
72, 3.841, -0.937
71, 3.847, -0.926
70, 3.827, -0.94
69, 3.84, -0.919
68, 3.829, -0.951
67, 3.831, -0.919
66, 3.821, -0.988
65, 3.817, -0.956
64, 3.816, -0.934
63, 3.811, -0.937
62, 3.8, -0.949
61, 3.799, -0.997
60, 3.791, -0.963
59, 3.796, -0.954
58, 3.788, -0.962
57, 3.782, -0.964
56, 3.767, -1.036
55, 3.773, -0.952
54, 3.77, -0.961
53, 3.767, -0.968
52, 3.76, -0.942
51, 3.75, -1.041
50, 3.74, -0.977
49, 3.731, -0.968
48, 3.734, -0.967
47, 3.733, -0.946
46, 3.711, -0.984
45, 3.719, -0.975
44, 3.714, -0.961
43, 3.706, -0.956
42, 3.7, -0.964
41, 3.678, -0.982
40, 3.688, -0.992
39, 3.684, -0.96
38, 3.678, -1.017
37, 3.67, -0.972
36, 3.664, -0.979
36, 3.66, -1.0
35, 3.657, -1.003
34, 3.648, -1.04
33, 3.646, -0.993
32, 3.644, -0.998
31, 3.623, -0.996
30, 3.619, -0.997
29, 3.619, -1.009
28, 3.627, -0.993
27, 3.622, -0.977
26, 3.616, -0.998
25, 3.612, -1.014
24, 3.607, -0.991
23, 3.587, -1.02
22, 3.597, -0.999
21, 3.594, -0.989
20, 3.592, -0.985
19, 3.588, -0.988
18, 3.583, -0.996
17, 3.579, -1.009
16, 3.573, -1.02
15, 3.557, -0.99
14, 3.568, -0.998
13, 3.565, -1.008
12, 3.561, -0.998
11, 3.558, -1.001
10, 3.553, -1.01
9, 3.553, -1.031
8, 3.551, -0.994
7, 3.547, -1.011
6, 3.531, -1.004
5, 3.538, -1.007
4, 3.539, -1.002
3, 3.519, -1.022
11, 3.744, 1.036
12, 3.747, 1.037
13, 3.75, 1.037
14, 3.754, 1.038
15, 3.758, 1.038
16, 3.761, 1.037
17, 3.765, 1.037
18, 3.768, 1.038
19, 3.772, 1.038
20, 3.776, 1.038
21, 3.779, 1.038
22, 3.784, 1.038
23, 3.788, 1.038
24, 3.792, 1.038
25, 3.797, 1.038
26, 3.801, 1.039
27, 3.806, 1.039
28, 3.811, 1.039
29, 3.816, 1.039
30, 3.821, 1.039
31, 3.827, 1.038
32, 3.832, 1.038
33, 3.838, 1.039
34, 3.844, 1.039
35, 3.85, 1.039
36, 3.857, 1.039
37, 3.864, 1.039
38, 3.87, 1.039
38, 3.876, 1.039
39, 3.877, 1.039
40, 3.884, 1.039
41, 3.891, 1.039
42, 3.898, 1.038
43, 3.905, 1.039
44, 3.911, 1.04
45, 3.918, 1.04
46, 3.923, 1.04
47, 3.929, 1.039
48, 3.935, 1.04
49, 3.94, 1.041
50, 3.945, 1.04
51, 3.95, 1.039
52, 3.955, 1.04
53, 3.96, 1.039
54, 3.964, 1.039
55, 3.969, 1.04
56, 3.974, 1.039
57, 3.978, 1.04
58, 3.983, 1.039
59, 3.987, 1.04
60, 3.991, 1.039
61, 3.996, 1.039
62, 4.0, 1.04
63, 4.004, 1.04
64, 4.009, 1.039
65, 4.013, 1.039
66, 4.017, 1.039
67, 4.022, 1.039
68, 4.026, 1.039
69, 4.031, 1.04
70, 4.036, 1.04
71, 4.04, 1.039
72, 4.044, 1.039
73, 4.049, 1.039
74, 4.054, 1.039
75, 4.059, 1.039
76, 4.063, 1.039
77, 4.068, 1.038
78, 4.073, 1.039
79, 4.078, 1.039
80, 4.084, 1.039
81, 4.089, 1.04
82, 4.094, 1.039
83, 4.1, 1.04
84, 4.105, 1.04
85, 4.11, 1.039
86, 4.116, 1.039
87, 4.121, 1.039
88, 4.127, 1.04
89, 4.132, 1.04
90, 4.137, 1.039
91, 4.144, 1.04
92, 4.149, 1.04
93, 4.154, 1.04
94, 4.159, 1.04
95, 4.165, 1.039
96, 4.17, 1.04
97, 4.175, 1.04
97, 4.069, 0.0
97, 4.068, 0.0
97, 4.067, 0.0
97, 4.066, 0.0
97, 4.066, 0.0

Hi,

When a new battery is installed, it can sometimes take a long time for the HAT to detect battery health and level. In some cases, it gives correct values after the battery has been discharged/charged once.