@@ -31,22 +31,33 @@ compensation to measure CO2 concentration in air.
31
31
32
32
### Pins
33
33
34
+ WARNING: The pins between MH-Z19B and MH-Z19C are different. See tables below:
35
+
34
36
``` c++
35
- // MH-Z19B front connector
36
37
// __ _______
37
38
// +------------------+
38
39
// | |
39
40
// | . . . . . . . |
40
41
// | 1 2 3 4 5 6 7 |
41
42
// +------------------+
42
43
//
43
- // Pin 1: Yellow None
44
- // Pin 2: Green UART (TXD) TTL Level Data Output -> TO RXD
45
- // Pin 3: Blue UART(RXD) TTL Level Data Input -> TO TXD
46
- // Pin 4: Red Positive Power Supply (Vin +5V)
47
- // Pin 5: Black Negative Power Supply (GND)
48
- // Pin 6: White None
49
- // Pin 7: Brown Analog Output Vo (Not used)
44
+ // MH-Z19B front connector:
45
+ // Pin 1: Yellow None
46
+ // Pin 2: Green UART (TXD) TTL Level Data Output -> TO RXD
47
+ // Pin 3: Blue UART (RXD) TTL Level Data Input -> TO TXD
48
+ // Pin 4: Red Positive Power Supply (Vin +5V)
49
+ // Pin 5: Black Negative Power Supply (GND)
50
+ // Pin 6: White None
51
+ // Pin 7: Brown Analog Output Vo (Not used)
52
+ //
53
+ // MH-Z19C front connector:
54
+ // Pin 1: PWM
55
+ // Pin 2: UART (TXD) TTL Level data output -> TO RXD
56
+ // Pin 3: UART (RXD) TTL Level data input -> TO TXD
57
+ // Pin 4: Positive Power Supply (Vin +5V)
58
+ // Pin 5: Negative Power Supply (GND)
59
+ // Pin 6: Analog Output Vo
60
+ // Pin 7: HD (Hand-operated calibration)
50
61
//
51
62
// The following ESP8266 pins are reserved:
52
63
// TX/RX: Serial (in use)
@@ -80,7 +91,8 @@ The following targets are supported and tested:
80
91
81
92
- [ Online HTML] ( https://erriez.github.io/ErriezMHZ19B )
82
93
- [ Doxygen PDF] ( https://github.com/Erriez/ErriezMHZ19B/blob/gh-pages/ErriezMHZ19B.pdf )
83
- - [ Datasheet PDF] ( https://github.com/Erriez/ErriezMHZ19B/blob/master/extras/mh-z19b-co2-ver1_0.pdf )
94
+ - [ MH-Z19B datasheet PDF] ( https://github.com/Erriez/ErriezMHZ19B/blob/master/extras/mh-z19b-co2-ver1_0.pdf )
95
+ - [ MH-Z19C datasheet PDF] ( https://github.com/Erriez/ErriezMHZ19B/blob/master/extras/mh-z19c-co2-ver1_21.pdf )
84
96
85
97
86
98
## CO2 Concentrations
@@ -131,7 +143,7 @@ The status can be read with function `getAutoCalibration()`.
131
143
For simplicity, this library uses the terminology ` Automatic Calibration ` which is identical to the
132
144
` ABC (Automatic Baseline Correction) logic on/off ` mentioned in the datasheet.
133
145
134
- ### 2. Manual Calibration (400ppm)
146
+ ### 2. Manual ZERO Calibration (400ppm)
135
147
136
148
Procedure for manual calibration at 400ppm:
137
149
@@ -144,13 +156,21 @@ Procedure for manual calibration at 400ppm:
144
156
145
157
Now the sensor is calibrated. Repeat the sequence more often for higher accuracy.
146
158
147
- ### 3. Manual Calibration (SPAN)
159
+ ### 3. MH-Z19B only: Manual SPAN Calibration
160
+
161
+ The SPAN point calibration procedure is not implemented in this library as it requires special
162
+ calibration equipment. This functionality is not available in MH-Z19C.
148
163
149
- The datasheet also mentions a command ` 0x88 Span Point Calibration ` . The calibration procedure is
150
- not clear and therefore not implemented in this library.
164
+ ### 4. MH-Z19C only: Hand-operated calibration
151
165
166
+ Procedure according to the MH-Z19C datasheet:
167
+ - Connect module’s HD pin to low level(0V), lasting for 7 seconds at least.
168
+ - Before calibrating the zero point, please ensure that the sensor is stable for more than 20
169
+ minutes at 400ppm ambient environment.
170
+ - The application is responsible to control the external MH-Z19C HD pin and is not available on
171
+ the MH-Z19B.
152
172
153
- ## MH-Z19B API
173
+ ## MH-Z19B/C API
154
174
155
175
** Initialization Software Serial**
156
176
0 commit comments