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:
47Gas | a | b
48LPG | 44771 | -3.245
49CH4 | 2*10^31| 19.01
50CO | 521853 | -3.821
51Alcohol| 0.3934 | -1.504
52Benzene| 4.8387 | -2.68
53Hexane | 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:
70Gas | a | b
71LPG | 3811.9 | -3.113
72CH4 | 1012.7 | -2.786
73CO | 200000000000000 | -19.05
74Alcohol| 60000000000 | -14.01
75smoke | 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 Exponential regression:
92Gas | a | b
93LPG | 80.897 | -2.431
94CH4 | 177.65 | -2.56
95CO | 491204 | -5.826
96H2 | 1163.8 | -3.874
97alcohol| 97124 | -4.918
98*/
99const struct sensorType MQ5_config = {
100 1, // Regression method type (a*ratio^b)
101
102 6.5, // Rs/R0 in clean air
103
104 // Coefficient values calculated (CH4)
105 80.897, // a
106
107 -2.431, // b
108
109};
110
111/*
112 Exponential regression:
113GAS | a | b
114H2 | 88158 | -3.597
115LPG | 1009.2 | -2.35
116CH4 | 2127.2 | -2.526
117CO | 1000000000000000 | -13.5
118Alcohol | 50000000 | -6.017
119*/
120const struct sensorType MQ6_config = {
121 1, // Regression method type (a*ratio^b)
122
123 10, // Rs/R0 in clean air
124
125 // Coefficient values calculated (LPG)
126 1009.2, // a
127
128 -2.35, // b
129
130};
131
132/*
133 Exponential regression:
134GAS | a | b
135H2 | 69.014 | -1.374
136LPG | 700000000 | -7.703
137CH4 | 60000000000000 | -10.54
138CO | 99.042 | -1.518
139Alcohol | 40000000000000000 | -12.35
140*/
141const struct sensorType MQ7_config = {
142 1, // Regression method type (a*ratio^b)
143
144 27.5, // Rs/R0 in clean air
145
146 // Coefficient values calculated (CO)
147 99.042, // a
148
149 -1.518, // b
150
151};
152
153
154/*
155 Exponential regression for all gasses:
156GAS | a | b
157H2 | 976.97 | -0.688
158LPG | 10000000 | -3.123
159CH4 | 80000000000000 | -6.666
160CO | 2000000000000000000 | -8.074
161Alcohol | 76101 | -1.86
162*/
163const struct sensorType MQ8_config = {
164 1, // Regression method type
165
166 70, // Rs/R0 in clean air
167
168 // Coefficient values calculated (H2)
169 976.97, // a
170
171 -0.688, // b
172
173
174};
175
176/*
177 Exponential regression:
178GAS | a | b
179LPG | 1000.5 | -2.186
180CH4 | 4269.6 | -2.648
181CO | 599.65 | -2.244
182*/
183const struct sensorType MQ9_config = {
184 1, // Regression method type
185
186 9.6, // Rs/R0 in clean air
187
188 // Coefficient values calculated (LPG)
189 1000.5, // a
190
191 -2.186, // b
192
193
194};
195
196
197/*
198 Linear regression:
199GAS | a | b
200O3 | 0.41195 | -0.4708
201*/
202const struct sensorType MQ131_config = {
203 0, // Regression method type
204
205 1, // Rs/R0 in clean air
206
207 // Coefficient values calculated (O3)
208 0.41195, // a
209
210 -0.4708, // b
211
212
213};
214
215/*
216 Linear regression:
217GAS | a | b
218H2 | -0.5101 | 0.31988
219NH3 | -0.47712 | 0.4491
220Toulene | -0.21779 | -0.23269
221
222*/
223const struct sensorType MQ135_config = {
224 0, // Regression method type
225
226 1, // Rs/R0 in clean air
227
228 // Coefficient values calculated (NH3)
229 -0.47712, // a
230
231 0.4491, // b
232
233
234};
235
236/*
237 Linear regression:
238GAS | a | b
239NH3 | -0.26406 | -0.24143
240*/
241const struct sensorType MQ137_config = {
242 0, // Regression method type
243
244 1, // Rs/R0 in clean air
245
246 // Coefficient values calculated (NH3)
247 -0.26406, // a
248
249 -0.24143, // b
250};
251
252/*
253 Linear regression:
254GAS | a | b
255Alcohol | -0.46099 | 0.0681
256Acetone | -0.52356 | 0.49225
257Toluene | -0.4434 | 0.15397
258*/
259const struct sensorType MQ138_config = {
260 0, // Regression method type
261
262 1, // Rs/R0 in clean air
263
264 // Coefficient values calculated (Toluene)
265 -0.4434, // a
266
267 0.15397, // b
268};
269
270// Used as the configuration for not yet supported sensors
271const struct sensorType Blank_config = {
272 0, // Regression method type
273
274 0, // Rs/R0 in clean air
275
276 // Coefficient values calculated
277 0, // a
278
279 0, // b
280};
281
282#endif
const struct sensorType MQ7_config
Definition sensorConfigData.h:141
const struct sensorType MQ8_config
Definition sensorConfigData.h:163
const struct sensorType MQ2_config
Definition sensorConfigData.h:32
const struct sensorType MQ138_config
Definition sensorConfigData.h:259
const struct sensorType MQ3_config
Definition sensorConfigData.h:55
const struct sensorType Blank_config
Definition sensorConfigData.h:271
const struct sensorType MQ137_config
Definition sensorConfigData.h:241
const struct sensorType MQ9_config
Definition sensorConfigData.h:183
const struct sensorType MQ5_config
Definition sensorConfigData.h:99
const struct sensorType MQ6_config
Definition sensorConfigData.h:120
const struct sensorType MQ135_config
Definition sensorConfigData.h:223
const struct sensorType MQ4_config
Definition sensorConfigData.h:77
const struct sensorType MQ131_config
Definition sensorConfigData.h:202
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