SPEC DGS sensors: new firmware, new behavior

Yesterday I managed to damage the DGS-H2S sensor I used in my projects. No big deal, I dropped in on the floor, and the sensor broke. While I wait for a replacement sensor to arrive, I tried to work with a spare one, a new sensor that I plan to put into a permanent location.

SURPRISE!!! The new sensor didn’t work!

I expected that SPEC DGS sensors are drop-in replacements, but I was proven wrong. After a day of investigating this issue, I realized that there are two firmware versions of the same sensor, and each firmware comes with its features. To make matters more complicated, there is no marking on the sensor itself to tell the firmware version. Furthermore, all documentation on https://www.spec-sensors.com/ is for the old firmware.

But, here is what I have found about the new version:

Checking the firmware version of the sensor

To check the firmware version of the sensor one has to connect it to an Arduino Due or an Arduino Uno board, as described in my previous projects, and then run the SerialPassthrough Arduino sketch.

Open serial monitor, then configure it to send only the carriage return.

DGS-H2S — checking firmware version

Reset the sensor by sending ‘r ‘ or ‘R ‘. Then try to rapidly send several times the character ‘ f’ (lower-case f, without quotation marks), until the sensor responds. If the sensor has the new firmware, it will respond with ‘ 15SEP17′. If you have the old version, you will trigger a measurement, and then it will respond with ‘ 14FEB17′.

Oh, and the SPEC-DGS library is for the firmware version 25SEP17.

New firmware, new behavior

Some issues and features I have found so far in the new firmware:

  • When started, the first thing to do is reset the sensor by sending ‘r’ or ‘R’
  • The sensor no longer expects the unlock code 12345/r
  • Triggering a single measurement works by sending ‘\r’ only
  • One can instead put the sensor in continuous mode by sending ‘c’.
  • Continuous mode is stopped with ‘c’.
  • Continous mode is one second only
  • The sensor is much faster!!!
  • There is a new command ‘A’ which configures the sensor to perform the average of a given number of measurements. To use this feature, send ‘A’ , without ‘/r’. The sensor will respond with “Enter Average Total:”. Insert the average value (between 1 and 300), followed by ‘/r’. If successful, the sensor will respond with ‘/r/n’
  • The response time of the sensor changes according to the average value. While triggering a single measurement by sending ‘/r’, the sensor responds in 287ms if A=1, and in 375ms if A=300.
  • You can check the Average_Total value in the EEPROM dump, by sending ‘e’
  • Recommended values are least 60 for O3/NO2/H2S and 300 for SO.
  • There is a sleep command, ‘s’. Wake up the sensor by sending anything on the serial port. Wait for about one second, then you can issue commands.

New Arduino code

Below is a code version that I have tested with Arduino Due.


Air quality,2,Arduino code library,2,Arduino projects,23,Buggy,1,Casual stuff,1,ESP8266,2,MikroElektronika,3,PIC projects,7,Review,26,Robots,1,Tutorial,20,
Electronza: SPEC DGS sensors: new firmware, new behavior
SPEC DGS sensors: new firmware, new behavior
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content