Hydrogen Sulfide sensing with Arduino Due

Some of the links on this blog are affiliated links. READ MORE

It’s almost two years since I was forced to relocate my office. The good thing is that now I work on in quiet location and I have to drive only 15 minutes from my home. Unfortunately, there’s a bad thing, too. During the hot summer days, a nasty smell originating from a garbage dump located some 3km away lingers in the air. It seems that the rotten egg smell is typical to hydrogen sulfide (H2S). I’m not the only one bothered by the smell; there were a lot of complaints this summer. The local environment authorities have performed some measurements and found that none of the values are above the legal limits. Still, there’s the smelly issue…

As hydrogen sulfide is bad for health, even in concentrations as small as ten parts per million, I wanted to build my monitoring station, to know exactly what’s in the air I breathe. Easier said than done!

The biggest issue was finding a reliable H2S sensor.

There’s the cheap MQ-136 H2S sensor, which goes below 30$. The problem is, that sensor has an analog output. As such, I have to read it with an ADC, and it’s extremely difficult to calibrate without access to specialized lab equipment.

The MQ-136 sensor is also sensitive to other gases, such as carbon monoxide, sulfur dioxide or methane. So, do I have a high level of hydrogen sulfide, or a high level of carbon monoxide, or what? It’s quite difficult to get an accurate reading from this sensor.

Second, there are dedicated H2S sensors, calibrated, reliable, but they cost a fortune. I’m not going to pay 2000$ for such a sensor, considering that it will go into a small project.

And then, recently, I stumbled upon the website of Spec Sensors, a company specialized manufacturing sensors for gas sensing application. What caught my attention is their line of digital gas sensors for IoT. Besides the hydrogen sulfide sensor I was looking for, one can find dedicated sensors for carbon monoxide, ozone, sulfur dioxide, nitrogen dioxide, breath alcohol, and other respiratory irritants. And the best thing is that, with a price tag of 75$, these sensors are quite cheap.

As a side note, I ordered mine from digikey.com, as I got zero transport cost. All I had to do is pay the VAT to the local customs office.

SPEC Digital H2S sensor

SPEC Digital H2S sensor

The DGS-H2S 968-036 digital hydrogen sulfide sensor comprises the sensor itself, the digital breakout board and one USB-UART adapter (not pictured here). I haven’t used the UAB-UART adapter at all; it could have been omitted from the package at all to save a few bucks.

SPEC hydrogen sulfide sensor

SPEC hydrogen sulfide sensor

The sensor itself doesn’t say much. From its datasheet I find that it’s anĀ amperometric gas sensor, that is an electrochemical sensor which generates a current proportional to the volumetric fraction of the gas. More information can be found in the technical documents. The bottom line is, this sensor needs a complicated analog front-end, something difficult to design and build by the average maker.

And here comes into play the digital breakout.

SPEC Digital H2S Sensor - bottom view

SPEC Digital H2S Sensor – bottom view

SPEC Digital H2S Sensor - top viewSPEC Digital H2S Sensor - top view

SPEC Digital H2S Sensor – top view

The analog front end is implemented using one LMP91000, a programmable AFE potentiostat designed for use in use in micro-power electrochemical sensing applications. This little thing supports gas sensitivities over a range of 0.5 nA/ppm and up to 9500 nA/ppm. Communication with the microcontroller is done via I2C, plus one analog line for the sensor readings.

The microcontroller used is a PIC24F16KM202, featuring a 12-bit A/D converter with threshold detect, which takes care of all the computations and sends data to the host application via UART interface (3.3V logic levels).

There’s also one IC that looks to me like a Si7021-A20 I2C temperature and humidity sensor. On the top side, there’s an IC marked “SPH3” which I haven’t been able to identify.

Anyway, that’s not even important; all one has to know is the communication protocol.

1 2

Leave A Reply