Winsen MH-Z19B/C/E
Also known as: MH-Z19 · MH-Z19B · MH-Z19C · MHZ19 · Air quality
The CO2 sensor of the 2018–2023 DIY wave — half the internet's air-quality builds used one. Still works, still supported, but the SCD4x has taken the default slot.
As an Amazon Associate and an affiliate we may earn from qualifying purchases. Prices and availability are set by the retailer.
Declining pick: it still works, but better options exist at this price — see the "vs" note.
At a glance
⚑ flag an error| Measures | co2 |
|---|---|
| Accuracy | NDIR CO2 400–5000 ppm ±(50 ppm + 5 %) — genuine units; clones read low |
| Interface | UART (9600 baud; PWM output too) |
| Supply | 5 V (3.3 V logic) |
| Battery-viable | No (continuous draw) |
| ESPHome | Native ESPHome component — mhz19 |
| Typical price | $10-14 (street, varies) |
Compare all sensor modules in one table →
Which one do I buy?
vs SCD41: the SCD is smaller, I2C, better behaved and clone-resistant at similar money — buy the MH-Z19 only to match an existing build.
Clone check
Good for
Gotchas to know
- Automatic baseline calibration (ABC) assumes weekly fresh air — in a bedroom it recalibrates 'stuffy' to 400 ppm. Set automatic_baseline_calibration: false and calibrate outdoors.
- Reading pegged at 5000 ppm usually means a bad power supply or a clone, not CO2.
- Baseline drifts over months even on genuine units — periodic outdoor zeroing is part of ownership.
Wiring it up
Give it a hardware UART (UART1/2 on any ESP32) rather than software serial. Any dev board works; the DevKitC class is the default host, and if you're building a sensor-plus-screen device, pick a display board with spare pins like the JC3248W535.