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 :
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?
Code: Select all
from machine import I2C from ads1x15 import * from time import sleep i2c = I2C(2) adc = ADS1115(i2c = i2c, address = 72, gain = 4) while True: value_no2 = adc.read( rate=0, channel1=0 ) value_nh3 = adc.read( rate=0, channel1=1 ) value_co = adc.read( rate=0, channel1=2 ) 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)
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?