Read values from O2 Wideband Wensor

Hi,

I am quite new on Arduino and I am trying to read the values sent by the Wideband 02 from Tech Edge (version 2COB), the latter is connected to a Bosh sensor (LSU 4. something). My problem is that I am not able to read a correct value, it keeps changing like when the pin is not connected to something. I am supposed to read 5V (I think) as the sensor is in the ambiant air (so about 20% of 02) so the maximum lambda (or maximum AFR) for an engine (if I understood correctly).

Here is the technical features I've been able to find : Wideband 2C0B (updated) Technical Information (Tech Edge)

I am using the differential 12 bit WBlin output (0 - 5V). As a start I plug the WB- into the GND pin as you may seen on the picture and I plug the WB+ one int the A0 pin of my Arduino (analog input).

You'll find a picture of my wiring attached, with the output of the WBO2 2COB and the pin A0 linked on the line 9 of the bread board. I tried to add a LED to see the voltage but as I don't see the good values on the Arduino don't pay attention to it.

Here is the code I've done :

/* Sensor output WB+ : 0 - 5 V (differential wideband output, 12 bit accuracy)
WB- connected to the GND of the wideband for the moment */

int sensorPin = A0;

void setup () {
  Serial.begin(9600);
  pinMode(sensorPin, INPUT);
}

void loop () {
  // read the value on analog pin 0
  int lambdaSensor = analogRead (A0);
  // Digital value
  Serial.print("Digital value (0 to 1023) : ");
  Serial.println(lambdaSensor);
  // Convert to voltage
  float lambdaVoltage = lambdaSensor * (5.0 / 1023.0);
  // print the voltage value
  Serial.print("Voltage : ");
  Serial.println(lambdaVoltage);
  // convert the value to AFR
  float lambdaAFR = 9.0 + lambdaSensor * ((10.0 - 9.0) / 1023);
  // print the AFR value
  Serial.print("AFR : ");
  Serial.println(lambdaAFR);
  Serial.print(" ");
}

If you find time for helping me it would be great because I don't manage to see what I am doing wrong.

Thanks in advance

You need to connect the ground on the sensor to the ground on the Arduino. Without it there's no zero volt point of reference.

Thank you ! It works. Stupid mistake.