Grove - HCHO Sensor

The Grove - HCHO Sensor is a semiconductor VOC gas sensor. Its design is based on WSP2110 whose conductivity changes with the concentration of VOC gas in air. Through the circuit, the conductivity can be converted to output signal that corresponding to the gas concentration. This sensor has a very high sensitivity and stability, it can detect the gas whose concentration is up to 1ppm. It’s suitable for detecting formaldehyde, benzene, toluene and other volatile components. This product can be used to detect harmful gas in the home environment. Therefore, it’s a good assistant for you to improve indoor environment quality of life.

Note that The sensor value only reflects the approximated trend of gas concentration in a permissible error range, it DOES NOT represent the exact gas concentration. The detection of certain components in the air usually requires a more precise and costly instrument, which cannot be done with a single gas sensor. If your project is aimed at obtaining the gas concentration at a very precise level, then we do not recommend this gas sensor.


Getting Started

With Arduino

The Grove - HCHO Sensor can be used to detect VOCs, such as HCHO,toluene, benzene, alcohol. Here we take alcohol for an example to demonstrate how to use this sensor.

// demo of Grove - HCHO Sensor
void setup()
void loop()
    int sensorValue=analogRead(A0);
    float Vol=sensorValue*4.95/1023;
    Serial.print("Vol = ");

After uploading the code, open the serial monitor to get the voltage(Vol) under normal condition.

Now list out the formula describing the relationship of Vol and R0:

R0=(Vc/Vol-1)×R1 (Vc=4.95V) ①

Then put a bottle of alcohol near the sensor, and read again the sensor value:

And we get the Rs:

Rs = (Vc/Vol-1)×R1 (Vc=4.95V) ②

Now calculate Rs/R0. Here we get 0.285. Then refer to the sensitivity characteristic diagram below and find the alcohol concentration is about 5 ppm.

With Raspberry Pi

1.You should have got a raspberry pi and a grovepi or grovepi+.
2.You should have completed configuring the development enviroment, otherwise follow here.

4.Navigate to the demos' directory:

   cd yourpath/GrovePi/Software/Python/
   nano   # "Ctrl+x" to exit #
import time
import grovepi

# The sensitivity can be adjusted by the onboard potentiometer

# Connect the Grove HCHO Sensor to analog port A0
hcho_sensor = 0


# Vcc of the grove interface is normally 5v
grove_vcc = 5

while True:
        # Get sensor value
        sensor_value = grovepi.analogRead(hcho_sensor)

        # Calculate voltage
        voltage = (float)(sensor_value * grove_vcc / 1024)

        print "sensor_value =", sensor_value, " voltage =", voltage

    except IOError:
        print "Error"

5.Run the demo.

   sudo python


Help us to make it better

Copyright (c) 2008-2016 Seeed Development Limited ( /
This static html page was created from