OCS-3F WINPOWER Ultrasonic Oxygen Sensor

Hi all,

I've found a good oxygen sensor with a fairly good accuracy.
But there wasn't any good code yet to find.

There are two versions, a OCS-3F-2.1 and OCS-3F-3.0

OCS-3F-2.1 WINPOWER Ultrasonic Oxygen Sensor for oxygen concentrator 2024 detect 21%-95.6% ,0-10L New gas detector

So here's a small working example.

#include <SoftwareSerial.h>

SoftwareSerial oxygenSensor(10, 11); // RX, TX

void setup() {
  Serial.begin(9600);
  oxygenSensor.begin(9600);
}

void loop() {
  if (oxygenSensor.available() >= 12) { // Wait until full package has received
    byte buffer[12];
    for (int i = 0; i < 12; i++) {
      buffer[i] = oxygenSensor.read();
    }

    // Check the header (first trhee bytes have to be 0x16, 0x09, 0x01)
    if (buffer[0] == 0x16 && buffer[1] == 0x09 && buffer[2] == 0x01) {
      int concentration = (buffer[3] << 8) | buffer[4]; // Oxygen at 0,1%
      int flow = (buffer[5] << 8) | buffer[6]; // Flow in L/min
      int temperature = (buffer[7] << 8) | buffer[8]; // Temperature at 0,1 °C

      // Calculate checksum and validate
      byte checksum = 0;
      for (int i = 0; i < 11; i++) {
        checksum += buffer[i];
      }
      checksum = 0x00 - checksum;

      if (checksum == buffer[11]) { // Checksum validate
        Serial.print("Concentration: ");
        Serial.print(concentration / 10.0);
        Serial.println(" %");

        Serial.print("Flow: ");
        Serial.print(flow / 10.0);
        Serial.println(" L/min");

        Serial.print("Temperature: ");
        Serial.print(temperature / 10.0);
        Serial.println(" °C");
      } else {
        Serial.println("Checksum error!");
      }
    }
  }
}

OCS-3F 2.1data sheet.pdf (598.0 KB)

2 Likes

Thank you for the information; it will surely be helpful.

1 Like

You know anything about ozone sensors? I got a project where ozone might be a biproduct.

Which sensor is it?

I got no one in my mind, just if you knew or where to look.

I've got no experience with ozone sensors, yet.

For my future project I need to monitor ozone and I'm thinking of a type MQ131 or a SC01-O3.
And if I've got some working code I'll make a new topic for it.

1 Like

Google these sensors, this thread is already at 6th place

MQ131 detects 10 - 100 ppm, I need 0.1 ppm where the levels are unhealthy to humans, preferably lower.

SC01-O3 I cannot find a datasheet.

The SCO1-03 is more accurate:

  • Range : 0 ~ 9999PPB
  • Resolution : <= 1PPB
  • Precision : 10PPB

Where I think with a Precision of 10PPB the resolution cannot be smaller than 1PPB (but that's my thoughts)

Found it here : https://www.aliexpress.com/item/1005007256508123.html

Without calibration, all precision and resolution is irrelevant. What is your plan for calibration? You can buy cans of with known concentrations of O2.

1 Like

Good suggestion!

Didn't thought of this.

Do you have any recommendations for brand of O2 to calibrate to ?

Try Fisher Scientific or similar companies.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.