MQ-X Arduino Library 1.0.0
This is a library for the MQ-X Sensors.
Loading...
Searching...
No Matches
sensorConfigData.h
Go to the documentation of this file.
1
11#ifndef SENSOR_CONFIG_DATA
12#define SENSOR_CONFIG_DATA
13
21
22
23/*
24 Exponential regression:
25 Gas | a | b
26 H2 | 987.99 | -2.162
27 LPG | 574.25 | -2.222
28 CO | 36974 | -3.109
29 Alcohol| 3616.1 | -2.675
30 Propane| 658.71 | -2.168
31 */
32const struct sensorType MQ2_config={
33 1, //Regression method type (a*ratio^b)
34
35 9.83, //Rs/R0 in clean air
36
37 //Coefficient values calculated (LPG)
38 574.25, //a
39
40 -2.222, //b
41
42};
43
44
45 /*
46 Exponential regression:
47 Gas | a | b
48 LPG | 44771 | -3.245
49 CH4 | 2*10^31| 19.01
50 CO | 521853 | -3.821
51 Alcohol| 0.3934 | -1.504
52 Benzene| 4.8387 | -2.68
53 Hexane | 7585.3 | -2.849
54 */
55const struct sensorType MQ3_config={
56 1, //Regression method type (a*ratio^b)
57
58 60, //Rs/R0 in clean air
59
60 //Coefficient values calculated (Alcohol)
61 0.3934, //a
62
63 -1.504, //b
64
65};
66
67
68 /*
69 Exponential regression:
70 Gas | a | b
71 LPG | 3811.9 | -3.113
72 CH4 | 1012.7 | -2.786
73 CO | 200000000000000 | -19.05
74 Alcohol| 60000000000 | -14.01
75 smoke | 30000000 | -8.308
76 */
77const struct sensorType MQ4_config={
78 1, //Regression method type (a*ratio^b)
79
80 4.4, //Rs/R0 in clean air
81
82 //Coefficient values calculated (CH4)
83 1012.7, //a
84
85 -2.786, //b
86
87};
88
89
90
91 /*
92 Exponential regression:
93 Gas | a | b
94 LPG | 80.897 | -2.431
95 CH4 | 177.65 | -2.56
96 CO | 491204 | -5.826
97 H2 | 1163.8 | -3.874
98 alcohol| 97124 | -4.918
99 */
100const struct sensorType MQ5_config={
101 1, //Regression method type (a*ratio^b)
102
103 6.5, //Rs/R0 in clean air
104
105 //Coefficient values calculated (CH4)
106 80.897, //a
107
108 -2.431, //b
109
110};
111
112 /*
113 Exponential regression:
114 GAS | a | b
115 H2 | 88158 | -3.597
116 LPG | 1009.2 | -2.35
117 CH4 | 2127.2 | -2.526
118 CO | 1000000000000000 | -13.5
119 Alcohol | 50000000 | -6.017
120 */
121const struct sensorType MQ6_config={
122 1, //Regression method type (a*ratio^b)
123
124 10, //Rs/R0 in clean air
125
126 //Coefficient values calculated (LPG)
127 1009.2, //a
128
129 -2.35, //b
130
131};
132
133 /*
134 Exponential regression:
135 GAS | a | b
136 H2 | 69.014 | -1.374
137 LPG | 700000000 | -7.703
138 CH4 | 60000000000000 | -10.54
139 CO | 99.042 | -1.518
140 Alcohol | 40000000000000000 | -12.35
141 */
142const struct sensorType MQ7_config={
143 1, //Regression method type (a*ratio^b)
144
145 27.5, //Rs/R0 in clean air
146
147 //Coefficient values calculated (CO)
148 99.042, //a
149
150 -1.518, //b
151
152};
153
154
155 /*
156 Exponential regression for all gasses:
157 GAS | a | b
158 H2 | 976.97 | -0.688
159 LPG | 10000000 | -3.123
160 CH4 | 80000000000000 | -6.666
161 CO | 2000000000000000000 | -8.074
162 Alcohol | 76101 | -1.86
163 */
164const struct sensorType MQ8_config={
165 1, //Regression method type
166
167 70, //Rs/R0 in clean air
168
169 //Coefficient values calculated (H2)
170 976.97, //a
171
172 -0.688, //b
173
174
175};
176
177 /*
178 Exponential regression:
179 GAS | a | b
180 LPG | 1000.5 | -2.186
181 CH4 | 4269.6 | -2.648
182 CO | 599.65 | -2.244
183 */
184const struct sensorType MQ9_config={
185 1, //Regression method type
186
187 9.6, //Rs/R0 in clean air
188
189 //Coefficient values calculated (LPG)
190 1000.5, //a
191
192 -2.186, //b
193
194
195};
196
197
198 /*
199 Linear regression:
200 GAS | a | b
201 O3 | 0.41195 | -0.4708
202 */
204 0, //Regression method type
205
206 1, //Rs/R0 in clean air
207
208 //Coefficient values calculated (O3)
209 0.41195, //a
210
211 -0.4708, //b
212
213
214};
215
216 /*
217 Linear regression:
218 GAS | a | b
219 H2 | -0.5101 | 0.31988
220 NH3 | -0.47712 | 0.4491
221 Toulene | -0.21779 | -0.23269
222
223 */
225 0, //Regression method type
226
227 1, //Rs/R0 in clean air
228
229 //Coefficient values calculated (NH3)
230 -0.47712, //a
231
232 0.4491, //b
233
234
235};
236
237 /*
238 Linear regression:
239 GAS | a | b
240 NH3 | -0.26406 | -0.24143
241 */
243 0, //Regression method type
244
245 1, //Rs/R0 in clean air
246
247 //Coefficient values calculated (NH3)
248 -0.26406, //a
249
250 -0.24143, //b
251 };
252
253 /*
254 Linear regression:
255 GAS | a | b
256 Alcohol | -0.46099 | 0.0681
257 Acetone | -0.52356 | 0.49225
258 Toluene | -0.4434 | 0.15397
259 */
261 0, //Regression method type
262
263 1, //Rs/R0 in clean air
264
265 //Coefficient values calculated (Toluene)
266 -0.4434, //a
267
268 0.15397, //b
269 };
270
271//Used as the configuration for not yet supported sensors
273 0, //Regression method type
274
275 0, //Rs/R0 in clean air
276
277 //Coefficient values calculated
278 0, //a
279
280 0, //b
281 };
282
283#endif
const struct sensorType MQ7_config
Definition sensorConfigData.h:142
const struct sensorType MQ8_config
Definition sensorConfigData.h:164
const struct sensorType MQ2_config
Definition sensorConfigData.h:32
const struct sensorType MQ138_config
Definition sensorConfigData.h:260
const struct sensorType MQ3_config
Definition sensorConfigData.h:55
const struct sensorType Blank_config
Definition sensorConfigData.h:272
const struct sensorType MQ137_config
Definition sensorConfigData.h:242
const struct sensorType MQ9_config
Definition sensorConfigData.h:184
const struct sensorType MQ5_config
Definition sensorConfigData.h:100
const struct sensorType MQ6_config
Definition sensorConfigData.h:121
const struct sensorType MQ135_config
Definition sensorConfigData.h:224
const struct sensorType MQ4_config
Definition sensorConfigData.h:77
const struct sensorType MQ131_config
Definition sensorConfigData.h:203
Definition sensorConfigData.h:15
double coefficient_a
Definition sensorConfigData.h:18
int regression_method
Definition sensorConfigData.h:16
double Rs_R0_ratio
Definition sensorConfigData.h:17
double coefficient_b
Definition sensorConfigData.h:19