Grove - HCHO Sensor

From Wiki
Jump to: navigation, search

Introduction

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




Specification

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() {

   Serial.begin(9600);

}

void loop() {

   int sensorValue=analogRead(A0);
   float Vol=sensorValue*4.95/1023;
   Serial.print("Vol = ");
   Serial.println(Vol);
   delay(500);

} 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 grove_hcho_sensor.py   # "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
  2. SIG,NC,VCC,GND

hcho_sensor = 0

grovepi.pinMode(hcho_sensor,"INPUT")

  1. Vcc of the grove interface is normally 5v

grove_vcc = 5

while True:

   try:
       # 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
       time.sleep(.5)
   except IOError:
       print "Error"

5.Run the demo.

  sudo python grove_hcho_sensor.py