H2S IoT node with ESP8266 and openSenseMap


In this blog post, I will show you how to build an IoT H2S monitoring node based on SPEC DGS-H2S sensor and ESP8266, and how to upload the data to openSenseMap. The same approach should work with other digital gas sensors from SPEC Sensors such as DGS-NO2, DGS-O3, and DGS-CO, with only minor changes in the code.

To publish the gathered data, I will use the openSenseMap cloud platform. There are two reasons for choosing this platform:

  • It is a map-centered cloud platform, allowing me to show the position of my IoT node on the map. Visitors can navigate the map and see what sensors are available in their area of interest
  • The sensor data is explicitly accessible to anyone who wants to use it, under the Public Domain Dedication and License 1.0. Under this license terms you are free:
    • to Share: To copy, distribute, and use the database
    • to Create: To produce works from the database
    • to Adapt: To modify, transform, and build upon the database

If you wish to know more about what you can do with the data, you can read the full PDDL 1.0 license text for the exact terms that apply.



openSenseMap is an open data platform for location-related measurement data, developed by a team from the GI@School Lab at the Institute for Geoinformatics at the University of Münster.

The cloud service openSenseMap, along with the Arduino-based IoT node senseBox, facilitates the development of citizen science projects, allowing for the collection of data with do-it-yourself sensor stations – thus providing an accessible way to work with geographic information and environmental data.

The senseBox fact sheet states:

The senseBox was developed within a BMBF research project at the Institute of Geoinformatics at the University of Münster. The resulting project and research work have won several awards in the university competition of the Federal Ministry of Education and Research (BMBF) (2013, 2014 and 2016). In addition, the senseBox:edu received the special prize for Digital Learning and Teaching at the CeBIT Innovation Award 2017. In 2018 Reedu GmbH & Co KG was founded as a spin-off from the research project. Reedu ensures that further development and distribution of the senseBox scale with the increasing demand for citizen science tools in education and society. Reedu is supported by the Federal Ministry of Economics and Energy and the European Social Fund as part of the EXIST programme.

Not surprisingly, the largest number of stations that send data to openSenseMap is found in Germany. A large number on openSenseMap of IoT nodes are luftdaten.info PM2.5 and PM10 particle monitoring stations. Those can be configured to send the gathered data to openSenseMap with ease – but more about luftdaten.info in a future blog post.

With some browsing on the map, someone might find some interesting sensors. Some contributors publish pictures with their sensor nodes – a great source of inspiration.

My country, Romania, is almost blank. Even Bulgaria fares better 🙁



Creating an openSenseMap node

While the senseBox is the official hardware, one is not limited on using it – such as I will do with ESP8266 Thing dev. All I have to do is to configure the node in manual mode and change the code generated by openSenseMAp according to my needs. It sounds a bit complicated but, trust me, is not that difficult.

Before anything else, one needs to create an account with openSenseMap. Be sure to use a working email address – you will receive the Arduino sketch by email.

openSenseMap create account

openSenseMap create account

Once the account is created and the email address you have provided is verified, you can create a new sensebox. Below is a guide on how to create a new sensor box that uploads four variables:

  • H2S is the computed value, in ppm
  • H2S-RAW is the RAW ADC data. Combined with the temperature and humidity data, it can be later used to recompute H2S levels.
  • Temperature
  • Humidity

I will start by creating a new sensebox

openSenseMap create sensebox

Then I give a name to my station, I select the exposure of the station (indoor/outdoor/mobile), and I place it on the map:

openSenseMap new box location

Then I will configure the station. In the next screen, I will scroll down to manual configuration:

New sensebox creation

Then I will click the “Add sensor” button to create the four new variables for the gas sensor.

openSenseMap manual configuration of the sensor

In the next screen, I click “confirm” to accept the license terms for uploading the data.

openSenseMap sensor confirmation

Finally, I will be presented with a summary screen and the Arduino sketch will be generated and sent by email.

openSenseMap box confirmation

Write down the sennseboxID and the ID’s of each sensor – you will need them later.

This completes the creation of the sensor node. We can now proceed to build the hardware of the sensor.

1 2 3 4

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.