Search This Blog

Sunday, September 7, 2008

The meanders of OBD-II protocols

As we travel through the history of automotive technology back and forth, we realize that at the heart of the machines that enable us to go from point A to point B faster than our legs, are a number of components that essentially haven't changed too much: engines still burn fossil fuels and the vast majority are based on pistons that transform the explosive energy of the fuel combustion into movement.

Only a large number of gradual improvements have taken place here and there, defining the milestones that fill the many stages of automotive evolution.

However, electronics and digital technology have envolved in a much faster and radical way. The first computers have very few resemblances to a computer from the modern days. In a few decades the speed and capacity of computing devices have grown thousands of times. Computers play a vital role in peoples lifes today, both personally and professionally.

Cars haven't envolved with the same rithm and pattern. The most important lines of evolution in car design and technology have been centered in improving the user experience (better handling, comfort, performance, design) , safety (as the number of people driving cars have been increasing, the rate of disasters with casualties have also increased over the years), fuel efficiency and low emissions (many regulations have started being imposed by the governments
in an attempt to force the industry to reduce the gas emissions that are known to contribute
to the greenhouse effect).

With all the requirements that are placed in the development of better cars, the use of modern electronics could not be disregarded, as it is at base of a large number of improvements that could not be achieved by any other means:
  • Fuel efficiency and low emissions: by adding an ECU (Engine Control Unit), precise control over the ignition timings and fuel injection have been made possible. The ECU, a specialized computer that receives information from many sensors mounted in different parts of the powertrain, ajusts the optimal fuel mix and ignition timing dinamically, varying the parameters as the conditions change (air temperature, engine temperature, air pressure, engine RPM, etc). As the engine ages, the parameters are also changed in order to obtain the best performance given the altered engine characteristics. By ensuring the optimal fuel mix it also decreases greenhouse gas emissions, as it ensures a correct burn that minimizes the more nocive substances at the exhaust.
  • Safety: the braking system is one of the most important items in a car's safety, which can play a vital role in preventing a crash or reducing the speed to minimize the effects of an unavoidable This is not trivial, as the natural instincts in a critical situation not always match the optimal result. In many cases it can be catastrophic, as applying excessive break pressure can cause the weels to block, thus increasing wheel slippage, preventing the car from stopping at a safe distance. Modern electronics allowed a layer of control to be put inbetween, causing the brakes response to be always optimal, regardless of user input. crash. However its efficiency have been dependent upon the proper skills of the driver in assessing the correct pressure to apply in order to achieve the right result.
    This system, called ABS (from the german expression Antiblockier-Bremssystem, which means Anti-locking System) have been a large improvement in reducing accidents specially in slippery terrains. The ABS relies on a small computer that has sensors which pickup the acceleration, speed at the wheels and brake pedal pressure, acting on the brakes hidraulic system, causing the user control to be partially overriden by this system, whenever necessary.
    Another important system is the one which governs Airbags inflation. By monitoring the car speed and information at the special impact sensor (a heavy duty accelerometer), in the event of a crash it should be deployed, as the decelleration is high enough to contribute to injure the occupants.
  • User experience: digital technology is present today in other aspects of a car, such as onboard navigation systems (GPS), car stereo/dvd, automatic air conditioning, etc.
On the technical backstage, it soon became a requirement that the critical electronics inside a vehicle (e.g.: upon an ECU failure the engine will stop running) should be monitorable and allow some sort of diagnostics link so that technicians could better track the problems without too much guessing. The way the car components could be linked to an external device for diagnosis (i.e.: a computer or some type of dedicated terminal) would vary according to each manufacturer. So in the early 90's there were several protocols, such as ALDL, OBD-I, K-Line protocol, etc.

But around early 1996, there have been some pressure over the industry to create a standard that would allow a single equipment to at least read a minimal ammount of important data from any vehicle no mater what make or model.

OBD-II is still quite generic in definition, as manufacturers usually implement a particular subset of the specification, specially at the type of bus(es) that is(are) used.

A complete device should be capable of recognizing the bus in use, switch to it and begin the proper handshaking.

Commercially available devices that allow a connection between the OBD-II bus from a car and the computer are usually expensive, even though material costs are low (manufacturers and resellers still benefit from the lack of competition in this market, and a reasonable sustained demand).

For those who are skilled with the soldering iron, the DIY alternative is quite advantageous. While a commercial OBD-II <-> RS-232 can cost up to 200 €, the DIY solution will cost as low as 60 € (30 € for the necessary microcontroller, 20 € for the J1962 connector - the one that attaches to the socket in the dashboard, and 10 € for the remaining components). About 7 hours of effort and you're done (yes, the microcontroller and the connector are expensive, and
the effort is not neglectable: the microcontroller you pay more because it's bundled with a
commercial firmware, and the connector is supplied by a car accessories reseller).

No comments: