4

I want to calculate the stopping distance of a car from an OBD2 device. Say, I am driving at 30 kmph and apply my brakes hard. My car will skid and stop at a distance "x" meters from that point. This "x" meters is defined as the stopping distance of the car (@30kmph). But how do I calculate this stopping distance from an OBD device. When I apply the brakes (at max), the car engine stops to rotate and hence the OBD(reading from ECU) will start reading speed = 0. It will not read the speed of the car skidding. Hence I will never know that my car has skid from the OBD device. Any help please on how to calculate the braking distance.

Watch this video for a demo of braking distance:

  • 1
    Is this for a certain car? All modern cars come with an anti-lock breaking system, so the wheel (and speedometer) speed will not be zero until the car comes to a stop. – JPhi1618 Feb 1 '16 at 13:29
  • Yes, say for Hyundai i10 Era 2012 model. If it has an anti-lock braking system, shall I be able to tap that PID? – Soumya Sen Feb 1 '16 at 15:58
  • 2
    Isn't this something a GPS system could solve more readily? I mean, you can determine acceleration through the GPS (1/4 mile time/speed and HP derived from apps on phones using GPS). Why couldn't the same reasoning be used for deceleration? – Pᴀᴜʟsᴛᴇʀ2 Feb 1 '16 at 16:30
  • For that I have to monitor the car continuously (data at each second), which means a huge volume of data. That is not feasible,Sorry! – Soumya Sen Feb 1 '16 at 17:10
  • Why won't the OBD device read the speed of the car? Do you lock the brakes? – I have no idea what I'm doing Feb 2 '16 at 11:20
5

You cannot. You can't even do it that well with GPS.

The only relevant OBD2 parameters are speed and RPMs. If the wheels are locked or traction is otherwise lost, neither of these can be used in the calculation.

Brake pedal position is also not a standard PID so you won't always even have a reference point.

I am assuming you want to log data from within the vehicle then calculate stopping distance later. You need one of the following sets of information:

  1. Either a complete actual speed profile, from which you can observe the braking point and full stop point then integrate to estimate distance, or
  2. Your location at the point where you applied the brake and your location at the point where you stopped, from which the distance measurement is straightforward.

Neither of these are available to you via OBD2. With other systems you'll still run into a variety of problems, including but not limited to:

  1. Speed Profile:
    • The only commonly available device that can really measure this is GPS. With GPS you'll have the following problems:
      • Refresh interval will compromise accuracy, both by making the brake / stop point hard to pinpoint, and by introducing inaccuracies in the distance integral.
      • As of 2014, GPS was accurate to within 4.6m (15 feet), 95% of the time (source). This will translate to inaccuracies in speed measurement.
  2. Brake and stop locations:
    • Again, you'd have to go with GPS here, and you would run into the following difficulties:
      • Identifying the brake point. Subject to same inaccuracies as above, and hurt by the fact that OBD2 doesn't have to have a brake pedal PID, and synchronization between that and a GPS device would be difficult anyways.
      • Identifying the stop point. GPS accuracy issue as described above.

By the way, in the comments you mentioned an example of capturing GPS data once per second. That's still not good enough. Let's say you are travelling at 30 MPH. Your brake point could be anywhere in that 1 second interval. 30 MPH = 44 ft/sec so you're already introducing +/- 22 feet there. Combine with GPS horizontal accuracy of +/- 15 feet and you've got a 95% chance of getting +/- 37 feet, and a 5% chance of getting worse. Combine it with GPS accuracy for the stop point too, and your final distance measurement is somewhere around +/- 52 feet. That's not nearly good enough.

Now, a less simple solution, which would work in theory but in practice may be subject to all sorts of inaccuracies, is to use your OBD2 device to track your wheel speed in combination with an accelerometer aligned with the road axis (we'll assume your car doesn't spin when you brake):

  • Using the accelerometer, observe where braking deceleration (should be pretty sharp, as opposed to deceleration from just letting off the gas) begins.
  • Using the OBD2 info, make note of your vehicle speed at that point (which you assume to be accurate as you have full traction). This is the speed when you started braking.
  • Using your speed where you start braking as your initial speed, integrate the accelerometer readings to estimate a speed profile.
  • Integrate the speed profile to estimate a stopping distance.

Main difficulty there being synchronizing OBD2 speed readings with your accelerometer. That won't be trivial although if you can get close you can at least calculate a lower and upper bound for stop distance (like, if you knew you were somewhere between 29 and 31 mph when you began braking). The other difficulty is there is plenty of opportunity to introduce errors, which will amplify with each integral.

I suppose if you were technically and electronically inclined, and have that DIY spirit, you could rig up something else, e.g. a computer that monitors stopping distance by processing video from a dash cam combined with an accelerometer or something on your brake pedal to identify stopping point. Or some sort of laser/image based actual speed sensor on the bottom of your car. But, you know...

All of this, though, is a ton of trouble. By far the easiest and most reliable way to measure your stopping distance is to drive a constant speed, pick a landmark on the road and hit the brakes there. Then, when you stop, get out and measure it.

1

It's not something you can calculate because there are so many factors which not one affect the calculation but will be different every time. These include;

  • Tyre temperature
  • Tyre pressure
  • Tyre wear
  • Tyre condition (i.e. flat spots, etc)
  • Ambient air temperature
  • Road surface temperature
  • Road surface condition
  • Road surface moisture level
  • Residual temperature in braking system
  • Camber of road
  • Load in car
  • Distribution of load in car (front to rear)
  • Distribution of load in car (side to side)
  • Fuel level
  • Angle of incline in road
  • Height above sea level
  • Condition of brake fluid
  • Condition of braking hydraulic rubber components
  • Temperature of brake fluid

This is just a very small selection of the amount of things that will determine how long it will take to stop. The effects of brake fade and brake glazing are probably your biggest determining factor and a data logger won't know anything about how your brakes are "feeling".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.