LuminOx O2 Sensor on Arduino

The LuminOx Oxygen sensor seems to be a pretty decent O2 sensor and easy to get setup and running.
1Vs (+5V)
2GND (0V)
33.3V UART* Sensor Transmit
43.3V UART* Sensor Receive
 * 5V tolerant
Looks like it is 5V tolerant so you should not need a logic level shifter.

Wiring Up LuminOx O2 Sensor to Arduino

Fortunately wiring up the LuminOx O2 Sensor to an Arduino is super easy

In the code example below we will use pins 10 and 11 to communicate with the sensor. So you can wire it up as follows

sensor pin 1 -> 5V power
sensor pin 2 -> Ground
sensor pin 3 -> pin 10
sensor pin 4 -> pin 11

Arduino Code for LuminOx O2 Sensor

Should be able to just copy and past the code into the arduino editor and upload it.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX (O2 Pin 3), TX (O2 Pin 4)

void setup() {

void loop() {
 if (mySerial.available())  {

Open up the serial console to view the sensor output

LuminOx O2 Sensor Output

Helpful links
Arduino forum:

Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.

Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.

Arduino upload error

Looks like this can randomly happen. Things to try to resolve the problem

  1. Unplug USB cable for a little bit
  2. Restart Arduino IDE
  3. Reboot computer

More information here

Using Seeed Studio O2 Sensor Arduino Without Grove Breakout board

The Seeed Studio O2 sensor is a nice Oxygen sensor. It works up to 25% Oxygen concentration and is easy to use in an Arduino project.

Wiring Up the O2 Sensor to Arduino

If you look on the back of the sensor there are only 3 wires used. VCC, GND, and a SIG. The NC pin is “Not Connected”

Wire the
GND -> Arduino ground
VCC -> Arduino 3.3V (Looks like it may also accept 5V)
SIG -> A5 (Analog 5)

Code to read O2 Sensor

Copy and paste the following code into the Arduino IDE

// 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   = A5;

void setup() 
    // put your setup code here, to run once:
    Serial.println("Grove - Gas Sensor Test Code...");

void loop() 
    // put your main code here, to run repeatedly:
    float Vout =0;
    Serial.print("Vout =");

    Vout = readO2Vout();
    Serial.print(" V, Concentration of O2 is ");

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;

Upload and Launch the Serial Monitor
Tools -> Serial Monitor
Ctrl + Shift + M