Grove - HCHO Sensor

From Wiki
Jump to: navigation, search


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.

HCHO Sensor 01.jpg


Operating Voltage: 5.0V ± 0.3V Target Gases: HCHO, Benzene,Toluene,Alcohol Concentration Range: 1~50 ppm Sensor Resistance Value(Rs): 10KΩ-100KΩ(in 10ppm HCHO) Sensitivity: Rs(in air)/Rs(10ppm HCHO)≥5 Demonstration

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.

HCHO Hardware Connection.jpg

// 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.

Test result1.jpg

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:

Test result3.jpg

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.

File:Sensitivity Characteristic.png 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. 3.Connection Plug the sensor to grovepi socket A0 by using a grove cable. 4.Navigate to the demos' directory:

  cd yourpath/GrovePi/Software/Python/

To see the code

  nano   # "Ctrl+x" to exit #

import time import grovepi

  1. The sensitivity can be adjusted by the onboard potentiometer
  1. Connect the Grove HCHO Sensor to analog port A0

hcho_sensor = 0


  1. 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