70
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]

The SCD4x sensor from Sensirion measures CO₂, temperature, and humidity, and communicates these values via I²C.

The measurement principle for the CO2 is that of photoacoustic sensing. The fundamental principle is shown in the diagram below: shine light that the CO2 molecules absorb and use a microphone to listen to the pressure variations.

Principle of the CO2 sensor via photoacoustic sensing

I ordered a batch of SCD41 sensors from China for various projects, including fermentation, mushroom and plant cultivation, and field monitoring.

Since I had extras, I sacrificed one for macro photography. I removed the cover with a dremel and pliers, then cleaned the internals using isopropanol.

Here is my take:

The temperature and humidity are measured by Sensirion’s SHT40, seen as the black square at the bottom right. It’s likely accessed by the internal microcontroller over an internal I²C bus.

The pink square at the top left is a MEMS IR emitter. The SCD4x datasheet doesn’t specify the emission wavelength, but 4.3 µm is standard for NDIR-based CO₂ detection. A similar emitter example is this one from Microhybrid. These emitters usually produce broadband IR, with a 4.3 µm band-pass interference filter on top. The pink hue likely comes from this filter. Filters like these are critical to target CO₂ absorption while avoiding spectral overlap with other gases. For further reading, see Infratec's application note and Delta Optical Thin Film’s technical explanation.

The gold component labeled “o119 ANC” is the MEMS microphone, used to detect pressure waves caused by gas molecules absorbing pulsed IR light—this is photoacoustic sensing. The vibration excited by 4.3 µm light occurs at ~70 THz, far beyond acoustic detection. However, the IR source is pulsed at a modulation frequency (typically 20–60 Hz, e.g. 40 Hz), and the microphone detects the resulting pressure variations at this frequency. The principle is outlined in patent US 2024/0133801 A1.

An example of a compatible MEMS microphone is Infineon’s IM72D128V01, which supports frequencies down to 20 Hz.

The final main component is the metal-shielded package. It likely contains a microcontroller responsible for:

  • Driving the MEMS IR emitter with a modulated current (e.g., at 40 Hz)
  • Capturing and analyzing the MEMS microphone signal to extract the amplitude of acoustic pressure oscillations (proportional to CO₂ concentration)
  • Acting as an I²C master to retrieve temperature and humidity data from the SHT40
  • Acting as an I²C slave to provide CO₂, temperature, and humidity data to an external controller

Here are top and bottom views of the sensor cap:

Top view of cap of SCD41
Bottom view of cap of SCD41

The cap has a circular gas inlet. The white material covering it is likely a hydrophobic ePTFE membrane, which allows gas exchange while blocking liquid water.

I hope someone else finds this interesting too!


EDIT: After posted this, I searched online and I found a photo from someone who went a deeper than me and did expose the microcontroller: https://www.hackteria.org/wiki/CO2_Soil_Respiration_Chamber

This is the photo borrowed from that site:


top 17 comments
sorted by: hot top new old
[-] [email protected] 8 points 1 month ago* (last edited 1 month ago)

Wow, thanks for posting this. I use these sensors and I never knew what was inside other than the principle they’re based on. I also use SHT41 in conjunction and both the SDC40 and SHT41 show almost the exact same temperature and humidity values which is now easily explainable by the fact there’s a SHT40 inside this CO2 sensor! I won’t use SHT41 anymore when a project already includes this CO2 sensor, awesome!

[-] [email protected] 4 points 1 month ago

I'm happy to share and glad someone else finds it interesting too :D

I also use SHT41 for other projects. It is a very nice sensor. I made an incubator with PID control and tested multiple different sensors, and the SHT41 was my final choice. Responds very fast and its accuracy is excellent.

In my mushroom chamber I have found out that CO2 is not actually an important control variable because the humidity is what changes the fastest and blowing humid air through the chamber brings the CO2 down anyway. So I would probably be able to get away with the SHT41, but measuring CO2 is just fun.

[-] [email protected] 4 points 1 month ago

Thanks! I recently was in the headquarters/production facilities of Sensiron which interestingly are located near Zurich in Switzerland. It's quite rare to see production of IC's in this country. The "magic sauce" of the sht40 and friends is the deposition of a certain matieral (can't remember which one) on top of the classic silicon die.

[-] [email protected] 3 points 1 month ago

That is very cool! I did not know they were producing in Switzerland. I would like to visit. Do you know if they routinely open to the public?

I wonder if the "magic sauce" is a polyimide. Those polymers are often used as the dielectric layer to make capacitors that are humidity-sensitive. These polymers have sites into which water molecules can reversibly dock such that the occupancy at equilibrium is proportional to the % relative humidity.

[-] [email protected] 2 points 1 month ago

I do not know if they are open to the public per se, but it seemed to be something they do quite regularly. Concerning the material, they say on their site that it is a "polymer". On this page they go quickly over how the measurements work.

I was actually not visiting sensirion, but lumiphase. A smaller company they are investing in which does optical chips. It's interesting stuff, they are also depositing unusual materials on the silicon wafer to make their chips work.

[-] [email protected] 1 points 1 month ago

Awesome, thanks! I will look into it.

[-] [email protected] 4 points 1 month ago

Funny enough, I also used Sensirion sensors for mushroom cultivation, even had a mobile dashboard using MQTT dash.

After a couple of years, I went back to basic "gardening" to focus on the essentials, but it was interesting for a while. Unless going commercial, I do not consider the sensors to have added significant value beyond providing an interesting side project.

[-] [email protected] 3 points 1 month ago

The CO2 has not proven too valuable because the humidity controller refreshes the air before CO2 builds up. But the humidity sensor is quite handy. I made a simple humidifier and it gets triggered by a raspberry pi over Zigbee when the humidity drops below 85%.

[-] [email protected] 4 points 1 month ago

Sure. It's just that I determined the same effect could be achieved by a preprogrammed cycle of ventilation and misting - no closed loop needed, as the conditions in the cultivation chamber do not vary enough to warrant the setup.

[-] [email protected] 3 points 1 month ago

That is true. To me, the sensor data in itself is of value because I am interested in learning about, for example, whether the CO2 emission changes while the fruiting happens. But it is definitely not necessary for achieving good results. I see it more like a hobby on top of a hobby. Hobby stacking!

[-] [email protected] 3 points 1 month ago

Yes, same here. As I said, it was quite interesting and I did it for the same reason, to combine interests.

[-] [email protected] 4 points 1 month ago

Super cool write up! Thanks for doing all the work and sharing what you found!

[-] [email protected] 2 points 1 month ago

You are welcome! Wanted to do this for some time and writing about it is a way to force myself to think about what I see more carefully.

[-] [email protected] 4 points 1 month ago

Great write-up, I'd never even heard of this type of photo acoustic sensor before. Is it really spectroscopy if it's a monochromatic IR emitter though?

[-] [email protected] 3 points 1 month ago

Probably not! That was a mistake on my part. The better term would be photoacoustic sensing I believe, so I have edited the post to use that term instead.

Although the response is proportional to the absorbance value at a narrow wavelength range, and CO2 is detected selectively because its molar absorption coefficient is high at that specific wavelength. I think the argument can be made that this is an action spectroscopy method limited to a single point. But I am not quite sure, so 'photoacoustic sensing' wins. Thanks!

[-] [email protected] 3 points 1 month ago

Thanks for the pictures and explanation!

I use a few sensors like this in different projects, super cool to get to know them a bit better.

[-] [email protected] 3 points 1 month ago

No problem! Happy to share

this post was submitted on 04 May 2025
70 points (100.0% liked)

Electronics

2505 readers
11 users here now

Projects, pictures, industry discussions and news about electronic engineering & component-level electronic circuits.

Rules

1: Be nice.

2: Be on-topic (eg: Electronic, not electrical).

3: No commercial stuff, buying, selling or valuations.

4: No circuit design or repair, tools or component questions.

5: No excessively promoting your own sites, social media, videos etc.


Ask questions in https://discuss.tchncs.de/c/askelectronics


founded 2 years ago
MODERATORS