-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathbattery12cellBMS.cfg
110 lines (96 loc) · 4.1 KB
/
battery12cellBMS.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# *****BATTERY LOGGER CONFIG FILE*****
# Copyright (C) 2018 Simon Richard Matthews
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
[files]
# logfile is location and name of file used for logging all data
logfile = 'data/log'
# errfile is location and name of error log
errfile = 'data/errorlog'
# summaryfile is location and name of a summary of the data
summaryfile = 'data/summary'
# hoursummaryfile is the location of the hourly summary file
hoursummaryfile = '/dev/null'
# daysummaryfile is the location and name of daily summary file
daysummaryfile = '/dev/null'
# monthsummaryfile is the location and name of monthly summary file
monthsummaryfile = '/dev/null'
# yearsummaryfile is the location and name of yearly summary file
yearsummaryfile = '/dev/null'
[logging]
data = "self.printtime+batdata.vbat+batdata.vdelta \
+batdata.iall+batdata.soctxt+batdata.socadjtxt+str(batdata.pip.rawdat)"
[battery]
name = 'My Bike Battery'
numcells = 12
capacity = 20
ahloss = 0.1
vreset = 48.0 # voltage to reset DOD counter
ireset = 0.5 # current to reset DOD counter
ilowcurrent = 1.0 # C/20 lowcurrent voltage logging current
[VoltageInputs]
v01 = 'self.bms.rawdat["V01"]'
v02 = 'self.bms.rawdat["V02"]'
v03 = 'self.bms.rawdat["V03"]'
v04 = 'self.bms.rawdat["V04"]'
v05 = 'self.bms.rawdat["V05"]'
v06 = 'self.bms.rawdat["V06"]'
v07 = 'self.bms.rawdat["V07"]'
v08 = 'self.bms.rawdat["V08"]'
v09 = 'self.bms.rawdat["V09"]'
v10 = 'self.bms.rawdat["V10"]'
v11 = 'self.bms.rawdat["V11"]'
v12 = 'self.bms.rawdat["V12"]'
vbat = 'self.bms.rawdat["V12"]'
[CurrentInputs]
iin1 = 'self.bms.rawdat["Ibat"]'
[TemperatureInputs]
tin1 = 'self.bms.rawdat["T1"]'
tin2 = 'self.bms.rawdat["T2"]'
[BalanceFlags]
balf01 = 'self.bms.rawdat["Bal"] & 1'
balf02 = 'self.bms.rawdat["Bal"] >> 1 & 1'
balf03 = 'self.bms.rawdat["Bal"] >> 2 & 1'
balf04 = 'self.bms.rawdat["Bal"] >> 3 & 1'
balf05 = 'self.bms.rawdat["Bal"] >> 4 & 1'
balf06 = 'self.bms.rawdat["Bal"] >> 5 & 1'
balf07 = 'self.bms.rawdat["Bal"] >> 6 & 1'
balf08 = 'self.bms.rawdat["Bal"] >> 7 & 1'
balf09 = 'self.bms.rawdat["Bal"] >> 8 & 1'
balf10 = 'self.bms.rawdat["Bal"] >> 9 & 1'
balf11 = 'self.bms.rawdat["Bal"] >> 10 & 1'
balf12 = 'self.bms.rawdat["Bal"] >> 11 & 1'
balf13 = 'self.bms.rawdat["Bal"] >> 12 & 1'
balf14 = 'self.bms.rawdat["Bal"] >> 13 & 1'
balf15 = 'self.bms.rawdat["Bal"] >> 14 & 1'
[Status]
chargestate = "self.pip.rawdat['ChgStat']"
[sampling]
# sampletime is time between samples in seconds
sampletime = 1.002
# samplesav is number of samples in running average
samplesav = 10
[calibrate]
currentgain = [-0.01, 1.0, 1.0]
currentoffset = [-0.0, 0.0, 0.0]
batvgain = 1
measured = [0.0, 3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0, 27.0, 30.0, 33.0, 36.0, 36.0]
displayed = [0.0, 3.0, 6.0, 9.0, 12.0, 15.0, 18.0, 21.0, 24.0, 27.0, 30.0, 33.0, 36.0, 36.0]
measureddelta = [ 0.0, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000]
displayeddelta = [ 0.0, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000, 3.000]
delta = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
[alarms]
# each alarm has five attributes, the first is the alarm initialisation code
# if the second attribute test is true the third attribute will be executed
# if the fourth attribute is true the fith attribute will be executed
#alarm = ['GPIO.setup("P8_10", GPIO.OUT)', 'test=minvolts<2.8 or maxvolts>3.60', 'GPIO.output("P8_10", GPIO.HIGH)', \
# 'test=minvolts>2.9 and maxvolts<3.59', 'GPIO.output("P8_10", GPIO.LOW)']