Closed Rudi984Gh closed 1 week ago
Unfortunately there's nothing wrong with the library. According to the datasheet the the ETOH
values are just the TVOC
values, because the TVOC
values are calibrated for ethanol! You can see that here:
"_Virtual Mirror of the ethanol-calibrated DATATVOC Register"
...and again here "_DATA_ETOH (0x22) = DATATVOC"
I also left notes within the library noting that the values share the same register. They are in fact the same....
#define SFE_ENS160_DATA_TVOC 0x22
// TVOC Data - shares register with ethanol data
typedef struct
{
uint8_t tvoc_msb : 8;
uint8_t tvoc_lsb : 8;
} sfe_ens160_data_tvoc_t;
#define SFE_ENS160_DATA_ETOH 0x22
// Ethanol Data - shares register with TVOC data
typedef struct
{
uint8_t etoh_msb : 8;
uint8_t etoh_lsb : 8;
} sfe_ens160_data_etho_t;
Hope this helps.
I use the Indoor Air Quality Sensor (ENS160, SEN-20844) and some other sensors connected to the DataLogger IoT (DEV-22462, firmware 01.02.00) via Qwiic. When reading the air quality parameters, the values for ENS160.TVOC and for ENS160.ETOH are always identical. Eg. (column 7 and 8):
RV8803.Read ISO8601 DateTime (Y,OPT4048.CIEx,OPT4048.CIEy,OPT4048.CCT,OPT4048.Lux,ENS160.AQI,ENS160.TVOC,ENS160.ETOH,ENS160.eCO2,ENS160.Temp Comp,ENS160.Humidity Comp,SHTC3.Humidity (%RH),SHTC3.Temperature (C) 2024-10-15T21:14:35,0.494,0.373,1990.557,6,1,24,24,400,23.819,44.164,66.523,23.286 2024-10-15T21:14:36,0.449,0.406,2825.014,6,1,0,0,400,23.819,44.164,66.151,23.267 2024-10-15T21:14:37,0.432,0.429,3276.878,6,1,0,0,400,23.819,44.164,65.873,23.275 2024-10-15T21:14:37,0.432,0.429,3276.878,6,1,0,0,400,23.819,44.164,65.554,23.350 2024-10-15T21:14:38,0.437,0.425,3157.467,6,1,0,0,400,23.819,44.164,65.370,23.422 2024-10-15T21:14:38,0.458,0.397,2606.449,6,1,0,0,400,23.819,44.164,65.483,23.414 2024-10-15T21:14:44,0.485,0.368,2032.776,7,1,24,24,400,23.819,44.164,62.698,23.264 2024-10-15T21:14:45,0.485,0.368,2032.776,7,1,0,0,400,23.819,44.164,62.553,23.243 2024-10-15T21:14:45,0.487,0.366,2002.021,7,1,0,0,400,23.819,44.164,62.354,23.235 2024-10-15T21:14:46,0.487,0.366,2002.021,7,1,1,1,400,23.819,44.164,62.150,23.248 2024-10-15T21:14:46,0.491,0.363,1949.545,7,1,1,1,400,23.819,44.164,62.090,23.251 2024-10-15T21:14:47,0.489,0.365,1978.156,7,1,11,11,400,23.819,44.164,62.037,23.259 2024-10-15T21:14:47,0.489,0.365,1978.156,7,1,11,11,400,23.819,44.164,61.872,23.256 2024-10-15T21:14:48,0.489,0.365,1978.156,7,1,0,0,400,23.819,44.164,61.801,23.235 2024-10-15T21:14:48,0.489,0.365,1978.156,7,1,0,0,400,23.819,44.164,61.682,23.227 2024-10-15T21:14:49,0.489,0.365,1978.156,7,1,18,18,400,23.819,44.164,61.605,23.200 2024-10-15T21:14:49,0.489,0.365,1978.156,7,1,18,18,400,23.819,44.164,61.617,23.222 2024-10-15T21:14:50,0.488,0.363,1972.120,7,1,16,16,400,23.819,44.164,61.526,23.176 2024-10-15T21:14:50,0.495,0.368,1953.360,7,1,16,16,400,23.819,44.164,61.472,23.214 2024-10-15T21:14:51,0.495,0.368,1953.360,7,1,18,18,400,23.819,44.164,61.360,23.163 2024-10-15T21:14:51,0.390,0.445,4160.824,7,1,18,18,400,23.819,44.164,61.332,23.200 2024-10-15T21:14:52,0.431,0.401,2799.283,5,1,18,18,400,23.819,44.164,61.390,23.171 2024-10-15T21:14:52,0.448,0.401,2799.283,5,1,11,11,400,23.819,44.164,61.390,23.190 2024-10-15T21:14:53,0.543,0.332,1819.159,5,1,11,11,400,23.819,44.164,61.300,23.190 2024-10-15T21:14:53,0.497,0.388,2075.423,7,1,16,16,400,23.819,44.164,61.379,23.155 2024-10-15T21:14:54,0.470,0.367,2181.740,7,1,16,16,400,23.819,44.164,61.273,23.179 2024-10-15T21:14:54,0.486,0.356,1939.271,7,1,18,18,400,23.819,44.164,61.279,23.168 2024-10-15T21:14:55,0.483,0.360,1998.144,7,1,18,18,400,23.819,44.164,61.209,23.160 2024-10-15T21:14:55,0.483,0.360,1998.144,7,1,16,16,400,23.819,44.164,61.244,23.168 2024-10-15T21:14:56,0.483,0.360,1998.144,7,1,16,16,400,23.819,44.164,61.292,23.168 2024-10-15T21:14:56,0.484,0.358,1968.217,7,1,20,20,400,23.819,44.164,61.358,23.198 2024-10-15T21:14:57,0.491,0.363,1949.545,7,1,20,20,400,23.819,44.164,61.175,23.160 2024-10-15T21:14:57,0.491,0.363,1949.545,7,1,18,18,400,23.819,44.164,61.181,23.155 2024-10-15T21:14:58,0.487,0.366,2002.021,7,1,18,18,400,23.819,44.164,61.273,23.139 2024-10-15T21:14:58,0.484,0.357,1961.909,7,1,24,24,402,23.819,44.164,61.277,23.144 2024-10-15T21:14:59,0.484,0.357,1961.909,7,1,24,24,402,23.819,44.164,61.274,23.168 2024-10-15T21:14:59,0.484,0.357,1961.909,7,1,16,16,400,23.819,44.164,61.312,23.168 2024-10-15T21:15:00,0.480,0.361,2023.475,7,1,16,16,400,23.819,44.164,61.308,23.125 2024-10-15T21:15:00,0.487,0.366,2002.021,7,1,17,17,400,23.819,44.164,61.263,23.163 2024-10-15T21:15:01,0.450,0.392,2678.550,7,1,17,17,400,23.819,44.164,61.326,23.171
My post in the sparkfun forum was answered by TS-Russell - he guess it is a typo in the library and he asked me to create an issue here... which I have done now :-)
Can this be fixed? Thanks in advance!
Rudi