ostaquet / Arduino-MQ131-driver

Arduino driver for gas sensor MQ131 (Ozone / O3)
MIT License
65 stars 19 forks source link

Add sensor from SainSmart #23

Closed toze3 closed 4 years ago

toze3 commented 4 years ago

This will add the data for the sain smart sensor.

This is quite a mess, is my first time editing and merging so there is some things to ignore.

I wanted to use your code to add a sensor, that I caled ETC_CALIBRATION model, i had made the calibration curves. In this correlation code, it should also be made the last changes in the calc to subtract the zero. So it must be changed to: return convert((23.8887 * pow(ratio, 1.1101) - 23.8887), PPB, unit);

Also changed the enviromental correlation calculation, by making the 3 curves calculation in the reading temperature, and then making an average ratio between 2 curves.

Also note that for the default enviroment compensation the ratio shoulb around 1.088 (i put 1.06 on previous, but should be 1.088 because it's the 20ºC point of the curve in the 60% humidity)

Congrts for the good work

toze3 commented 4 years ago

needs clean up