-
Notifications
You must be signed in to change notification settings - Fork 21
/
battery8cell.cfg
92 lines (78 loc) · 3.65 KB
/
battery8cell.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
# *****BATTERY LOGGER CONFIG FILE*****
# Copyright (C) 2014 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]
interface = 'from getatod import Raw'
alarms = 'from alarmsnull import Alarms'
# logfile is location and name of file used for logging all data
logfile = '/batdat/log'
# errfile is location and name of error log
errfile = 'data/errorlog'
# summaryfile is location and name of a summary of the data
summaryfile = '/batdat/summary'
# hoursummaryfile is the location of the hourly summary file
hoursummaryfile = '/dev/null'
# daysummaryfile is the location and name of daily summary file
daysummaryfile = '/batdat/daysummary'
# monthsummaryfile is the location and name of monthly summary file
monthsummaryfile = '/batdat/monthsummary'
# yearsummaryfile is the location and name of yearly summary file
yearsummaryfile = '/batdat/yearsummary'
[battery]
name = 'My'
numcells = 8
capacity = 360
ahloss = 0.1
vreset = 27.6 # voltage to reset DOD counter
ireset = 9.0 # current to reset DOD counter
ilowcurrent = 7.2 # C/50 lowcurrent voltage logging current
[AtoDs]
atod0 = 'AtoD.ADS1115(address=0x48)'
atod1 = 'AtoD.ADS1115(address=0x49)'
atod2 = 'AtoD.ADS1115(address=0x4A)'
[VoltageInputs]
v1 = 'atod0.read_adc(0, gain=2)*0.06250197'
v2 = 'atod0.read_adc(1, gain=2)*0.06250197'
v3 = 'atod0.read_adc(2, gain=2)*0.06250197'
v4 = 'atod0.read_adc(3, gain=2)*0.06250197'
v5 = 'atod1.read_adc(0, gain=2)*0.06250197'
v6 = 'atod1.read_adc(1, gain=2)*0.06250197'
v7 = 'atod1.read_adc(2, gain=2)*0.06250197'
v8 = 'atod1.read_adc(3, gain=2)*0.06250197'
[CurrentInputs]
iin1 = 'atod2.read_adc_difference(0, gain=16)'
iin2 = 'atod2.read_adc_difference(3, gain=16)'
iin3 = 'self.current[0] - self.current[1]'
[sampling]
# sampletime is time between samples in seconds
sampletime = 1.002
# samplesav is number of samples in running average
samplesav = 10
[calibrate]
ibatoffset = 0.0 # 0 offset current in amps
ibatgain = 3.33333 # 250/75 gain to multiply AtoD output in mV to A
iinoffset = 0.0 # 0 offset current in amps
iingain = 1.33333 # 100/75 gain to multiply AtoD output in mV to A
pcurrent = .063 # parasitic current in A not measured (battery monitor power)
batvgain = 14.33333 # resistor divider (2.49kohm+33.2kohm)/2.49kohm
delta = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
measured = [0.0, 3.320, 6.638, 9.958, 13.278, 16.599, 19.92, 23.242, 26.564, 26.0]
displayed = [0.000, 3.283, 6.597, 9.872, 13.158, 16.497, 19.755, 23.138, 26.415, 26.0]
measureddelta = [ 0.0, 3.320, 3.318, 3.320, 3.320, 3.321, 3.321, 3.322, 3.322, 3.000]
displayeddelta = [ 0.0, 3.321, 3.317, 3.322, 3.312, 3.324, 3.316, 3.324, 3.324, 3.000]
[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)']