General

DIY A FORMALDEHYDE DETECTOR

userHead 1078883988 2017-09-20 01:46:28 14722 Views1 Replies
HCOH (Formaldehyde) is colorless, poisonous, high water-soluble, high alcohol-soluble and high ether-soluble gas with an obnoxious odor. It is widely used in decoration, such as adhesives, carpeting, decorative paneling and so on. HCOH is a prominent factor in sick-building syndrome as its emissions (accelerated by heat and moisture) irritate eyes and mucous membranes in nose and throat, and cause headache and dizziness. It is widely used in decoration, such as adhesives, carpeting, decorative paneling and so on.

My brotherhave just decorated a new house as the marriage house couple of days ago and he cannot wait for long, for the wedding date is fixed in 1st-Oct. There are many things to check and purify air, kinds of plants and tools. The last time I saw him, he was buying a formaldehyde detector on line, but he complained the inaccuracy of the detector yesterday. As a maker, how could I dfrobot this chance to DIY a simple HCOH detector?

The common solution to measure HCHO in air is the reagent or colorimetric card. But the solution will occupy much time, and used only once. And the result is not very accurate and you just know probably. VOC gas sensor is second-generation solution. it can detect HCHO roughly, because this sensor only expresses the whole concentration of VOC gas, not just HCHO only. There are three kinds of HCOH detectors in the main market, semiconductor sensor, resistance heating and test paper.
DSC_5522.JPG

Components in Need
Gravity: Formaldehyde (HCHO) Sensor
1373_P_1490599039255.jpg
This one is an electrochemical sensor, which can transform HCOH gas concentration to weak current signal and you can convert a weak current signal to stable current that can be measured by the converter. Compatible with Arduino, it can suppress interference gas and measure HCOH concentration in the air accurately with great stability and high resolution. And the service life is as long as 2 years.
With Gravity interface and wide range power supply, this HCHO sensor supporting analog voltage and serial output. Combined with IOT, it is possible to make an automatic air quality station which can measure HCHO in different sites.

DFRduino UNO R3
3.jpg
Compared to other master boards, DFRduino UNO R3 which compatible withArduino Uno Rev 3 is more cost effective.

Others
Gravity: I2C 16x2 Arduino LCD with RGB Backlight Display
Gravity: IO Expansion Shield for Arduino V7.1

Components Diagram
PEIJIAN1.jpg
Circuit Diagram 1-DAC
DAC.png
Switch to DAC, connection diagram is shown as above.

Wiring Diagram1
SWLJ-DAC.JPG
Caution: In the DAC mode, the measurement accuracy would be influenced by master ADC bit number, reference voltage accuracy. So please charge the main controller with the high precision power supply or the internal reference voltage.

Circuit Diagram2-UART
UART.png
Switch to UART, connection diagram is shown as above.
Wiring Diagram2
UART-LX.JPG
Comparing two modes, I’d love to recommend UART for its better precision.
Sketch
green.JPG
Gravity: I2C 16x2 Arduino LCD with RGB Backlight Display is the combination of 16 million colors, and I chose 4 colors (Green,Red,Yellow,Purple) to represent the distinguish between different HCOH concentration.
DSC_5521.JPG

The screen display is Green when the HCOH concentration is in a secure range (the indoor air HCOH is lower than 0.08mg/m3 or 0.06ppm)
yellow (2).JPG

The screen display is Yellow when the HCOH concentration exceeds a secure range (the indoor air HCOH is higher than 0.06ppm and lower than 0.2ppm), which suggests that you need to take measures to remove HCOH.
red.JPG

The screen display is Red when the HCOH concentration over-exceeds a secure range (the indoor air HCOH is higher than 0.2ppm and lower than 4ppm), which means that you’d better leave it empty for half a year.
(7.39 MiB) Downloaded 6493 times
The screen display is Red&Purple when the HCOH concentration more than 4ppm (the maximum HCOH measuring range is 5ppm).

Situations
In the 21st century, we meet both harms and benefits. Only when we pay enough attention to health can we age day by day. It is necessary to detect HCOH concentration is many environments, such as bookcase, automobile room, conference room, especially in the newly decorated house.


Bookcase
DSC_5582.JPG
Automobile room
DSC_5525.JPG
Conference room
Meeting Room.JPG
Shelves
zwj.jpg

Windowsill
yt.jpg
Office
bgs1.jpg
Besides these private environments, HCOH detection is also in need in public. For example, building materials, furniture… It can never be too much to mention the damage caused by HCOH, HCOH detectors of civilian values are valued by the public. To satisfy requirements of public, I designed this small, light and cost effective HCOH detector. You can download documents attached in the end page. :D:D
Programs:
HCOH_DAC
Code: Select all
#define SensorAnalogPin A2  //this pin read the analog voltage from the HCHO sensor
#define VREF  5.0   //voltage on AREF pin
#include "DFRobot_RGBLCD.h"
DFRobot_RGBLCD lcd(16, 2);

void setup()
{
    Serial.begin(9600);
    lcd.init();
    lcd.setRGB(0, 0,255);
    lcd.setCursor(1, 0 );
    lcd.print("HCHO:");
}

void loop()
{  
    Serial.print(analogReadPPM());
    Serial.println("ppm");
    delay(1000);
    lcd.setCursor(6,1); 
      lcd.print(analogReadPPM());
     lcd.print("ppm");
     lcd.setCursor(6,0);
     lcd.print(analogReadPPM()*1.34);
     lcd.print("mg/m3");
     if(analogReadPPM()<0.06)
     {
     lcd.setRGB(0, 255, 0);
     }
     else if(analogReadPPM()<0.2)
    { 
      lcd.setRGB(250, 128, 10);
    }
    else if(analogReadPPM()<4)
    {
       lcd.setRGB(255, 0, 0);
    }
    else 
    {
     
          lcd.setRGB(255, 0, 0);
          delay(250);
           lcd.setRGB(0, 0, 0);
         
    }
    delay(100);
}

float analogReadPPM()
{
   float analogVoltage = analogRead(SensorAnalogPin) / 1024.0 * VREF;
   float ppm = 3.125 * analogVoltage - 1.25;  //linear relationship(0.4V for 0 ppm and 2V for 5ppm)
   if(ppm<0)  ppm=0;
   else if(ppm>5)  ppm = 5;
   return ppm;
}
HCOH_UART
Code: Select all
#include <Wire.h>
#include <DFRobotHCHOSensor.h>
#include <SoftwareSerial.h>
#include "DFRobot_RGBLCD.h"
DFRobot_RGBLCD lcd(16, 2);
#define SensorSerialPin  10  //this pin read the uart signal from the HCHO sensor
SoftwareSerial sensorSerial(SensorSerialPin,SensorSerialPin);
DFRobotHCHOSensor hchoSensor(&sensorSerial);


void setup()
{  
    sensorSerial.begin(9600); //the baudrate of HCHO is 9600
    sensorSerial.listen();
    Serial.begin(9600);
    lcd.init();
    lcd.setRGB(0, 0,255);
    lcd.setCursor(1, 0 );
    lcd.print("HCHO:");
      lcd.setCursor(1, 1 );
}

void loop()
{
  
    if(hchoSensor.available()>0)  
    {
      // delay(1000);
      Serial.print(hchoSensor.uartReadPPM());
      Serial.println("ppm");
      lcd.setCursor(6,1); 
      lcd.print(hchoSensor.uartReadPPM());
     lcd.print("ppm");
     lcd.setCursor(6,0);
     lcd.print(hchoSensor.uartReadPPM()*1.34);
     lcd.print("mg/m3");
     if(hchoSensor.uartReadPPM()<0.06)
     {
     lcd.setRGB(0, 255, 0);
     }
     else if(hchoSensor.uartReadPPM()<0.2)
    { 
      lcd.setRGB(250, 128, 10);
    }
    else if(hchoSensor.uartReadPPM()<4)
    {
       lcd.setRGB(255, 0, 0);
    }
    else 
    {
     
          lcd.setRGB(255, 0, 0);
          delay(500);
           lcd.setRGB(255, 0, 255);
         
    }
    
      delay(100);
      
    }
}    
(923.33 KiB) Downloaded 383 times
(20.34 KiB) Downloaded 351 times
icon 3.jpg Download(0)
icon 1373_P_1490599039255.jpg Download(0)
icon bgs1.jpg Download(0)
icon DAC.png Download(0)
icon DSC_5521.JPG Download(0)
icon DSC_5522.JPG Download(0)
icon DSC_5525.JPG Download(0)
icon DSC_5556.JPG Download(0)
icon DSC_5582.JPG Download(0)
icon green.JPG Download(0)
icon jq.gif Download(0)
icon Meeting Room.JPG Download(0)
icon PEIJIAN1.jpg Download(0)
icon red.JPG Download(0)
icon SWLJ-DAC.JPG Download(0)
icon UART.png Download(0)
icon UART-LX.JPG Download(0)
icon yellow (2).JPG Download(0)
icon yt.jpg Download(0)
icon zwj.jpg Download(0)
icon 3D printing files and 3D image HCOH Detection.rar Download(0)
icon fixed library files.rar Download(0)