Page 1 of 1

### good use of MICS-6814 sensor (gaz) ?

Posted: Fri May 15, 2020 6:52 am
Hi,
I'm using a MICS-6814 sensor (from china) which indicate 3 gaz concentrations (N02, NH3 and CO) by a analog sensor... on a pyboard.
Output voltages are very lows.
So, I use a ADS1115 amplificator. The result looks good.
But, I have interrogations about NO2 sensor.
The datasheet of the sensor : https://www.sgxsensortech.com/content/u ... -rev-8.pdf
My simple code :

Code: Select all

from machine import I2C
from time import sleep

i2c = I2C(2)

while True:

print("NO2brut= ", value_no2)
print("NH3brut= ", value_nh3)
print("CObrut= ", value_co)

no2_volt = value_no2 * (0.512/32767)
nh3_volt = value_nh3 * (0.512/32767)
co_volt = value_co * (0.512/32767)

print("NO2volt= ", no2_volt, "volt")
print("NH3volt= ", nh3_volt, "volt")
print("COvolt= ", co_volt, "volt")

no2 =  (10) * (value_no2 * (0.512/32767))
nh3 = (100) * (value_nh3 * (0.512/32767))
co = (1000) * (value_co * (0.512/32767))

print("NO2= ", no2, "ppm")
print("NH3= ", nh3, "ppm")
print("CO= ", co, "ppm")

sleep(10)
So, results looks goods, but I don't understand the fact that the no2 sensor have a resistor wich get down with an increase of concentration, reverse for 2 others sensor and, in final only the same calcul of concentration looks working for all sensors?

Moreover, I can't display the result on the lcd160cr... a i2c conflict with ads1115? If someone known a solution for display result from ads1115?

Thanks.

### Re: good use of MICS-6814 sensor (gaz) ?

Posted: Fri May 22, 2020 11:01 am
Hi,
Everything is resolved...
This script looks works fine with lcd160 too...

Code: Select all

from machine import I2C
from time import sleep
import lcd160cr

i2c = I2C(2)

lcd = lcd160cr.LCD160CR('X')
lcd.set_orient(lcd160cr.LANDSCAPE)

lcd.set_text_color(lcd.rgb(0, 0, 255), lcd.rgb(0, 0, 0))
lcd.set_font(1, scale=1)

while True:

print("NO2brut= ", value_no2)
print("NH3brut= ", value_nh3)
print("CObrut= ", value_co)

no2_volt = value_no2 * (0.512/32767)
nh3_volt = value_nh3 * (0.512/32767)
co_volt = value_co * (0.512/32767)

print("NO2volt= ", no2_volt, "volt")
print("NH3volt= ", nh3_volt, "volt")
print("COvolt= ", co_volt, "volt")

no2 =  value_no2 * (10*(0.512/32767))
nh3 = value_nh3 * (500*(0.512/32767))
co = value_co * (1000*(0.512/32767))

print("NO2= ", no2, "ppm")
print("NH3= ", nh3, "ppm")
print("CO= ", co, "ppm")

no2 = round(no2, 3)
nh3 = round(nh3, 3)
co = round(co, 3)
no2 = str(no2)
nh3 = str(nh3)
co = str(co)

lcd.erase()
lcd.set_pos(0, 0)
lcd.write("NO2= ")
lcd.write(no2)
lcd.write("ppm")
lcd.set_pos(0, 20)
lcd.write("NH3= ")
lcd.write(nh3)
lcd.write("ppm")
lcd.set_pos(0, 40)
lcd.write("CO= ")
lcd.write(co)
lcd.write("ppm")
sleep(1)

sleep(1)
I think that values aren't perfectly exacts, but not very far from reality... Maybe I'm completly wrong...
If somoene has an advise for values 's calculation....

I have tested this china sensor with ad1115 and arduino without success... Arduino need a sensor with i2c connection. I think resolution coulden't be as well as with ad1115...

Enjoy!

### Re: good use of MICS-6814 sensor (gaz) ?

Posted: Tue Jul 07, 2020 5:28 pm
After calibration with 2 arduino ; one with the 3 gas sensor (I2c), and the other with an analog MQ-2 sensor ; wich doesn't have exactly same values, I obtain that... in " my normal" testing condition...

Code: Select all

no2 =  value_no2 * (80*(0.256/32767))
nh3 = value_nh3 * (4000*(0.256/32767))
co = value_co * (2500000*(0.256/32767))

### Re: good use of MICS-6814 sensor (gaz) ?

Posted: Mon Jul 20, 2020 10:47 am
Yep,

After testing with a professional co sensor, co gas value is wrong. CO value change when real value has no change...
I don't know for NH3 and NO2 values...
I'm given up with co value of this sensor.

### Re: good use of MICS-6814 sensor (gaz) ?

Posted: Wed Jul 22, 2020 2:21 pm
Finally, co gas woks fine, for sure, with this code:

Code: Select all