1

I'm developing an Android application where we use the OBDII to read car's engine parameters. Currently we are obtaining speed (kmh), engine's RPM and mass airflow live while driving the car. We now have to find a way how using these parameters we are able to obtain from OBDII determine which gear is set at the moment. I thought about just specifying that for instance given RPM level and given speed the car is driving on a particular gear, but I thing it will not do the trick.

Maybe some of you have some experience in such a field - I will be very helpful for any help!

Msk
  • 857
  • 9
  • 16
Dawid Sibiński
  • 1,657
  • 3
  • 21
  • 40

2 Answers2

0

Without any prior physics knowledge (i.e. knowing if there is any formula to calculate the gear from a set of input parameters), you could make use of the area of data mining.

You just calculate a lot of data (including gear!) and then check, if it is possible to find a formula including the channels you think might be relevant, that gives you the correct gear often enough (how often is your choice, might be 90% or 99%).

Apart from this, I'd say that it is quite hard to find a formula valid for each car with your input parameters (engine rpm, air mass flow, speed in km/h). The problem is, that the actual speed in km/h is also dependant on the wheel size and such stuff. And I do not know if all transmissions use the same transmission ratios (probably not, because we have transmissions with 5 gears and such with 6 gears). Thus, measuring your rpm at the engine might result in totally different rpm's on the wheel which might have totally different diameters per car.

aufziehvogel
  • 7,167
  • 5
  • 34
  • 56
  • I have found one interesting thing - simply dividing the current speed by current RPM's you get the connstant value on a particular gear (plus/minus some mistake value). For example for a given car on 3rd gear you get the speed/RPM constant 0,02 +- 0.003 and it allows to detect on which gear you are driving at the moment. I tested this in the car at it works very well! The only thing now is to think about some calibration mechanism for the users using our app :). We can even let the user to calibrate the application by driving for some time and calculate the constants for all gears. – Dawid Sibiński May 12 '15 at 15:45
  • Yes, I thought about this on the way to work. For a given car, one would not need the air mass flow. Thinking about the powertrain from the engine to the wheels, the RPM of the engine and the gear -> rpm of the wheels, I'd say. Even if you drive uphill or downhill (where load is totally different). – aufziehvogel May 13 '15 at 06:50
0

So for the future users dealing with the same problem: It is sufficient to divide the current speed by the current RPM actually. By doing so, driving on a particular gear you will get a constant value (+- some small mistake value).

It means that if you have 5 gears in your car, you can ask the user to calibrate the device on each gear meaning that while user is driving on a parcitular gear (does not matter on which RPM/speed level) diving the current speed by current RPM will give you a constant value. If you count this constant using different "levels" of RPMs and speed on a particular gear, it will give you some small mistake value (lets say mistake will be 0,001). So for example, on 2nd gear you will get constant = 0,02 +- 0,001. Defining such a constant value on each gear you can almost certainly classify on which gear you are driving at the moment by simply dividing the current speed by current RPM and checking, for which gear's constant value (+- mistake value) that value fits.

I tested it - it works perfectly fine ;).

Dawid Sibiński
  • 1,657
  • 3
  • 21
  • 40
  • That's only going to work with a manual - if it's an auto you need to consider what the torque converter is doing because there is "slip" in the gearbox. – peter_mcc Sep 15 '15 at 13:48