Commit 001b25df authored by Derick's avatar Derick

adjusted ADC2 calibration for O2 sensor

parent 126dcdb0
Pipeline #838 failed
......@@ -243,8 +243,10 @@ float adcToO2PercentFloat(float adc, float offset)
float PCB_Gain = 4. ; // real voltage is 4 times higher thant the measured in the PCB (there is a voltage divider)
float Sensor_Gain = 100./10000. ; // the sensor gain is 100 % / 10000 mVolts
float ADC_to_Voltage_Gain = 3300./4096.0 ; // maximum Voltage of 3.3V for 4096 ADC counts - (It might need recalibration?)
float o2pc = PCB_Gain * Sensor_Gain * ADC_to_Voltage_Gain * (adc - offset);
float ADC_to_mVoltage_Gain = 0.788; // this is the measured gain
float ADC_offset = 162.; // this is the measured offset
float o2pc = PCB_Gain * Sensor_Gain * (ADC_to_mVoltage_Gain * adc - ADC_offset);
return o2pc;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment