Grove - Gas Sensor(O₂)

From Wiki
Jump to: navigation, search


Grove-Gas Sensor (O₂) is a kind of sensor to test the oxygen concentration in air, which is based on the principle of the electrochemical cell to the original work. You can know clearly the current oxygen concentration when you output voltage values proportional to the concentration of oxygen and refer to the oxygen concentration linear characteristic graph. It’s very suitable for detecting oxygen concentration in the environment protection. Grove - Gas Sensor(O₂) is an organic reaction module, it can provide a little current while putting it in the air, we don't need to provide a external power to it, and output voltage will change as time current changes.


High-precision High sensitivity Wide linearity range Strong anti-interference ability Extraordinary reliability Specification

Items Parameter Measurement Range 0-25%vol Detect Life two years Sensitivity 0.05~0.15 mA(in air) Temperature Range ﹣20℃~50℃ Pressure range QNE±10﹪ Response Time ≤15S Humidity range 0~99﹪RH Non-condensing Stability <2% Usage

That requires us to use the analog port of Arduino to take the readings. We have converted the read value to the corresponding concentration of O2. It's more convenient for you to get a value of O2 directly without watching the figure.

Notice: Please power the Gas Sensor(O2) more than 48 hrs before you get data from it.

Here is an example of concentration control Buzzer. When Oxygen concentration gets lower than the minimum safe concentration , the Buzzer will sound.

1. Connect the module to the Analog port 0 of Grove - Basic Shield using the 4-pin grove cable and connect Buzzer to Pin 3. 2. Plug the Grove - Basic Shield into Arduino. And connect Arduino to PC by using a USB cable. 3. Copy and paste the code below to a new Arduino sketch. Please click here if you do not know how to upload.

  1. include <math.h>

const int buzzerPin=3; //Connect the Buzzer Grove module to Pin3, Digital 3 float WarningValue= 19.5; //The minimum sate concentration of O2 in air void setup() {

  Serial.begin(9600);                //Start the Serial connection

} void loop() { //long unsigned a; float sensorValue; float sensorVoltage; float Value_O2; sensorValue = analogRead(A0); sensorVoltage =(sensorValue/1024)*5.0; sensorVoltage = sensorVoltage/201*10000; Value_O2 = sensorVoltage/7.43;

Serial.print("Concentration of O2 is "); Serial.print(Value_O2,1); Serial.println("%");


else digitalWrite(3,LOW);

delay(1000); } }

4. When the sensor is in air, the buzzer will not sound. You can blow toward the sensor, at this time, if Oxygen concentration is lower than threshold we set, the Buzzer will sound. You can check the output voltage(amplify 201) after opening the Serial Monitor.

Gas Sensor O2.png

We tested it in a office, so the concentration of O2 is about 20.5%. Notice: We have adjusted the figure in a clear air, and we have updated it in the program, please refer to the program instead of datasheet.

600px-O2 figure.png