Comparing MH-Z19B and SCD41: Building a Smarter CO₂ Monitor
A small device based on the MH-Z19B sensor has been sitting on my desk for years, quietly reminding me when it’s time to open a window and let some fresh air in. Its design is… well, not exactly elegant, but the utility more than makes up for any aesthetic shortcomings.
That said, the MH-Z19B isn’t without its flaws. First of all, it’s quite bulky. Second, it’s pretty power-hungry and requires at least a 5V power supply. These factors make it a bit inconvenient for building a battery-powered portable device. So I started wondering: has anything new hit the market for measuring CO₂ levels?
Turns out—yes! For example, there are sensors like the SCD40 and SCD41. Without wasting a second, I grabbed one to compare it to the MH-Z19B. Naturally, I went for the SCD41—it supports up to 5000 ppm.
According to the datasheet, the new sensor also uses infrared technology to detect carbon dioxide levels. It’s significantly smaller and runs on 3.3 volts. Here’s a quick comparison of the main specs:
Sensor | MH-Z19B | SCD40 | SCD41 |
---|---|---|---|
Type | Infrared | Infrared | Infrared |
Supply Voltage | 4.5V — 5.5V | 3.3V | 3.3V |
Current Draw | 60mA | 15mA | 15mA |
Measurement Range (ppm) | 0 — 5000 | 0 — 2000 | 0 — 5000 |
Interface | UART, PWM | I2C | I2C |
Dimensions (mm) | 32×19.5×8.5 | 10×10×6 | 10×10×6 |
Assembling a quick test setup on a breadboard took just a few minutes. For data logging, I spun up a similar stack to the one I used last time: InfluxDB and Grafana.
The results were genuinely impressive. Both sensors reported nearly the same values, accounting for differences in hardware and calibration. The graph clearly shows a drop in CO₂ levels overnight, a steady rise during the workday, two meetings in a fully closed room, and a lunchtime dip.
Looks like I’ve found a great candidate for building the next version of my desk CO₂ monitor. I can use a more modern microcontroller, make the whole thing more compact, maybe even battery-powered—the overall power consumption should allow for that. And of course, BLE—because let’s face it, everything is better with Bluetooth. Oh, and it’s high time to move on to USB Type-C, too. Definitely worth upgrading in that part as well.