Took my MIX8410 sensor out of the bag the first time, but it seems broke. On my WIO Terminal I have it connected to Grove-port A0, I have verified that other sensors are working fine connected to same port. I’ve also left the O2-sensor “running” for more than 30 minutes to ensure it’s preheated enough.
Obviously I’ve secured that the Grove cable is properly connected…and I’ve tried with another cable (that works with another sensor). Also, blowing on the sensor does not have any effect at all.
This is what I’ve found:
When running the calibration code from the wiki (Grove - Gas O₂ Sensor(MIX8410) - Seeed Wiki) on my Wio Terminal the reading jumps all the time between 20.80 and 31.20.
When running the test code from the same wiki
// Grove - Gas Sensor(O2) test code
// Note:
// 1. It need about about 5-10 minutes to preheat the sensor
// 2. modify VRefer if needed
const float VRefer = 3.3; // voltage of adc reference
const int pinAdc = A0;
void setup()
{
// put your setup code here, to run once:
Serial.begin(9600);
Serial.println("Grove - Oxygen Sensor(MIX8410) Test Code...");
}
void loop()
{
// put your main code here, to run repeatedly:
float Vout =0;
Serial.print("Vout =");
Vout = readO2Vout();
Serial.print(Vout);
Serial.print(" V, Concentration of O2 is ");
Serial.println(readConcentration());
delay(500);
}
float readO2Vout()
{
long sum = 0;
for(int i=0; i<32; i++)
{
sum += analogRead(pinAdc);
}
sum >>= 5;
float MeasuredVout = sum * (VRefer / 1023.0);
return MeasuredVout;
}
float readConcentration()
{
// Vout samples are with reference to 3.3V
float MeasuredVout = readO2Vout();
//float Concentration = FmultiMap(MeasuredVout, VoutArray,O2ConArray, 6);
//when its output voltage is 2.0V,
float Concentration = MeasuredVout * 0.21 / 2.0;
float Concentration_Percentage=Concentration*100;
return Concentration_Percentage;
}
I get repeatedly following output which is of course ridiculous if the sensor would work:
Vout =0.01 V, Concentration of O2 is 0.10
Vout =0.01 V, Concentration of O2 is 0.10
Vout =0.01 V, Concentration of O2 is 0.07
Vout =0.01 V, Concentration of O2 is 0.10
Vout =0.01 V, Concentration of O2 is 0.10