fr3ts0n / AndrOBD

Android OBD diagnostics with any ELM327 adapter
http://fr3ts0n.github.io/AndrOBD/
GNU General Public License v3.0
1.45k stars 310 forks source link

False values O2-Lambda-Sensor #173

Closed Artur-debug closed 3 years ago

Artur-debug commented 3 years ago

Untitled 1

Hi, how is the lambda value O2 sensor calculated? I think the app miscalculates this value (Service 01 PID 24). The values that AndrODB shows me do not match a turbo diesel and other.

It looks like AndrOBD calculates the lambda value (Service 01 PID 24) like this:

EQ_RAT = 2/65535 * Byte_A_B_PID24

However, if Byte_A_PID4F (Service 01 PID 4F) is set, then this must be included in the calculation:

EQ_RAT = Byte_A_PID4F / 65535 * Byte_A_B_PID24

For me the Byte_APID4F = 32 (10) and therefore has to multiply the AndrOBD values by 16 so that it fits.

photo_2021-09-17_14-17-38 photo_2021-09-17_14-17-46

Important details on your environment:

Artur-debug commented 3 years ago

Additional info:

->ATZ ELM327 v1.5 ->0120 41 20 90 00 00 01

Artur-debug commented 3 years ago

Small supplement: The picture above was taken with the engine idling. 16 0.217 would result in a lambda value of 3.472. I would say that this is a normal value for turbo diesel. The values can also be far higher in idle mode.
Engine at full load, AndrOBD measures values around 0.08 and would produce a correct lambda value of 16
0.08 = 1.28. In the range Lambda 1.05 - 1.5, turbo diesels work at full engine load according literature.

fr3ts0n commented 3 years ago

HI @Artur-debug Thank you for your detailled report.

You are absolutely correct. Currently AndrOBD does only use a static calculation for PID's $24... data. The values of PID $4F are not considered yet.

I'll try to implement this and inform you when a test version is availabe.

fr3ts0n commented 3 years ago

Test version (V2.4.2) is available here for your tests: https://t.me/AndrOBD_dev/235

fr3ts0n commented 3 years ago

Sorry, I didn't mean to close the issue before you can confirm the BugFix ...

Artur-debug commented 3 years ago

Works great.

In the picture you can see the lambda warm-up phase. With broadband probes, the lambda value is generated by a pump current in the probe. 0 mA pump current means lambda = 1. During the warm-up phase the pump current is also 0 mA and shows me lambda = 1. The later values also fit.

I was only able to test PID 24. Other lambda probes are not installed in the vehicle. Thank you!

screen-2021-09-19-16-21-31

Artur-debug commented 3 years ago

Often the first two values do not go into the new calculation with the new scaling factor 32.

0.062 x 16 = 0.992

CSV-Data: screen-2021-09-26-20-54-27

fr3ts0n commented 3 years ago

Looks like these are requests of PID $24 before PID $4F got requested and conversion factors got updated Currently there is no way to define dependencies between PIDs and ensure requests in order of dependencies.