Delphi Universal Oxygen Sensor (Lambda - AFR VALUE)

Dear Arduino Community,

I'm new here, I want to do Lambda Monitor.

Buyed 4 wire Universal Delphi O2 Sensor

Wiring Connection: Black - Sensor Signal (+) - Arduino A0 Gray - Negative - Arduino GND

How can i calculate Lambda value in source code ?

any one can help me ?

int SensorValue=0;

void setup()
{
 Serial.begin(9600);              // setup up serial connection for testing
 pinMode(A0, INPUT); // Set pin A0 as input
}

void loop()
{
  int SensorValue = analogRead(A0);                     //Read input from sensor 
  float afrValue = SensorValue * (5.0 / 1023.0);                    //Convert to V
  Serial.print("AFR Value:");
  Serial.println(afrValue);
}

Can you share us relevant data sheet of the product. Mention the output voltage level.

I want to do Lambda Monitor.

To my mind a Lambda value is a measure of thermal conductivity. What has this got to do with Oxygen?

It’s what they call the oxygen sensor in cars. Why it is called a “lambda sensor”, I don’t know. It is actually measuring the electrochemical potential created across a porous layer, when the gas on either side has different concentrations of oxygen.

The device will create an analog voltage in the range of a few hundred millivolts. You can measure this with the arduino, to a fairly low resolution as the arduino adc is going to give you 1 count per 5 mV change.

You cannot calculate the oxygen content from this by any specific formula, you would have to test and calibrate your device at a range of oxygen concentrations that you can somehoe determine by other means, and the use some kind of interpolated look-up table which is based on your calibration tests.

Devices intended for automotive uses are going to be designed to be most useful for measuring gas with low remaining oxygen, because that is what they are trying to achieve for efficient vehicle operation.

You could also read wikipedia for "nerst equation".