Diagnostic OBDII connector: is it possible to “tame” it
There are three standard interfaces in the OBDII connector according to the J1962M standard: MS_CAN, K / L-Line, 1850, plus a battery and two earths (signal and just ground). This is by standard, the remaining 7 of the 16 conclusions are OEM, that is, each manufacturer uses these conclusions as he pleases. But standardized outputs often have advanced, advanced features. For example, MS_CAN can be HS_CAN, HS_CAN can be on other pins (not specified by the standard) along with standard MS_CAN. Pin number 1 can be: for Ford - SW_CAN, for WAGs - IGN_ON, for KIA - check_engene. Etc. All interfaces were also not stationary in their development: the same K –Line interface was initially unidirectional, now it is bi-directional., CAN Baudrate is also growing. At all, the overwhelming majority of European cars of the 90s and the beginning of the zero could well have been diagnosed with only K-Line, and most American cars had only SAE1850. Currently, the general vector of development is the ever wider use of CAN, increasing the exchange rate., More and more often we see a single-wire SW_CAN.
There is an opinion that an English-speaking programmer, sitting on specialized (English-speaking) forums, having buried himself in the texts of standards, can build a universal engine that can cope with all this diversity in “maximum 4-5 months”. In practice, this is not so. All the same, there is a need to sniff every new car., Sometimes even the same car, but in different trim levels. And it turns out that they claim about 800-900 types of supported cars, but in practice 10-20 are actually tested. And this is a system — in the Russian Federation, the author knows at least 3 development teams that have taken this thorny path and all have the same disastrous result: you need to sniff / customize each car model, but there are no resources / funds for this. And the reason for this is this: standard-standard, and every manufacturer, when forced, and when he deliberately introduces something of his own into the implementation that is not described by the standard. In addition, not all data is present by default on the connector. There is data whose appearance needs to be initiated (give this or that block of the car a command to transmit the necessary data).
And here the OBDII bus interpreters enter the scene. This is a microcontroller with a set of interfaces that comply with the J1962M standard, translating the entire variety of data on different interfaces of the diagnostic connectors into a language that is more convenient for applications, for example, for diagnostic applications. In other words, the entire variety of protocols is now decrypted by the application, no matter what it works on - on a Windows computer or on a tablet / smartphone. The first mass OBDII interpreter with an open protocol was ELM327. This is an 8-bit MicroChip PIC18F2580 microcontroller. Let the reader not be surprised by the fact that this microcontroller is a mass device of general use. The firmware is just proprietary and the real cost of “PIC18F2580 + FirmWare” is an impressive $ 19-24. That is a scanner, made on an “honest” ELM327 chip cannot cost less than 50 evergreen presidents. Where does the market for such a variety of scanners / adapters with prices from “1000 rubles” come from, you ask? And this is our Chinese friends tried! So they cloned this chip, etched the crystal layer by layer or snuffled day and night - leave it behind the scenes. But the fact remains: clones appeared on the market (for reference: the 8-bit MicroChip controller in wholesale purchases now costs less than a dollar). Another thing is how correctly these clones work. There is an opinion that “while people buy cheap adapters, auto electricians will not remain without work.” That is, a person buys an adapter with the idea of “reloading or adjusting something there.”, And the result is different, well, that is, not the one he was counting on. Well, for example, suddenly the multimedia system starts blinking with all its lights, or an error pops up, or in general the box goes into emergency mode. And well, if without serious consequences - in most cases, a specialist with professional equipment will cure an iron horse. But it happens differently. Here several factors can mix right away: the wrong adapter (clone), the wrong software, the wrong adapter + software bundle, and the “crooked” hands can also play their part. I note that the adapter on an honest chip from the manufacturer with the correct software will not lead to disastrous results, at least the author is not aware of such cases. But it happens differently. Here several factors can mix right away: the wrong adapter (clone), the wrong software, the wrong adapter + software bundle, and the “crooked” hands can also play their part. I note that the adapter on an honest chip from the manufacturer with the correct software will not lead to disastrous results, at least the author is not aware of such cases. But it happens differently. Here several factors can mix right away: the wrong adapter (clone), the wrong software, the wrong adapter + software bundle, and the “crooked” hands can also play their part. I note that the adapter on an honest chip from the manufacturer with the correct software will not lead to disastrous results, at least the author is not aware of such cases.
And what can be done with such an adapter? Well, probably the most common case, put in the glove compartment “just in case”. View and reset the error as soon as it appears. Reset the odometer before selling a car, or vice versa, “wind up” if you are a hired driver. Turn on any option in the car, which is turned off by default, and the official dealer this service is paid. Updating the firmware and reconfiguring the electronic components will still be left to specialists, but most adapters allow this too. Someone will like to just have more information about the parameters of the engine and other systems in the form of beautiful graphics on a tablet or smartphone. Often found on the road, for some reason, taxi drivers whose Android tablet is installed in front of the dashboard and completely covers it, and so: This tablet is most likely connected to such an adapter via bluetooth or Wi-Fi. There are also a number of applications, this is the use of such an adapter in conjunction with a telematics device (tracker) or alarm. Connecting to the diagnostic connector using such an adapter allows you to take the data necessary for monitoring with a little blood. In most cases, this method is cheaper for the developer, and the installation itself is easier, because the need to install various sensors disappears, everything (well, or almost everything) can be removed from OBDII.
Another thing is that the capabilities of the chip are currently insufficient for use in modern cars. Somewhere in the middle of the zero years, CAN exchange speeds went up, SW_CAN appeared. But most importantly: the length (number of characters) in the code words has increased. And if it is possible by hardware, through a relay or a commonplace toggle switch, to stick crutches to the ELM327, which will allow working with both MS and HS and with SW releases CAN, then the PIC18F2580 with its 4 MIPS is not enough for long code words of computing power. By the way, the latest version of ELM327 (V1.4) dates back to 2009. And you can use this chip without “crutches” only for cars of production up to the middle of zero. So what to do. Oddly enough, there is more than one way out.
CAN-LOG, also an interpreter, but not a complete set of OBDII interfaces, but two CAN buses. It turns out that this is enough to in most cases remove all the necessary information. True, far from all cars, both CAN buses are output to the diagnostic connector. So, you have to connect under the dashboard. And this is not always acceptable for reasons of preserving the warranty, although there is an option to wirelessly retrieve information from the bus, but this is even more expensive, and the reliability of the captured data is not 100%. You can use either a ready-made device by connecting it via UART or RS232, or just a chip, integrating it onto a device board with a small number of discrete components. The cost of the device is certainly higher than the cost of an authentic ELM327, but this is offset by a huge list of supported cars and functions. Moreover, the list of supported cars includes not only cars, but also trucks, construction, road and agricultural machinery. CAN-LOG works a little differently than ELM327 and its clones. When connecting to the tires of a vehicle, it is necessary to select and set the program number corresponding to the vehicle. And it’s convenient, because the developer does not need to delve into the wide variety of protocols. (In ELM327, the choice of car and fine-tuning the chip are left to the app). the developer does not need to delve into the wide variety of protocols. (In ELM327, the choice of car and fine-tuning the chip are left to the app). the developer does not need to delve into the wide variety of protocols. (In ELM327, the choice of car and fine-tuning the chip are left to the app).
There are other solutions that allow you to easily and elegantly remove data from the diagnostic connector. Well, the question is whether it is possible to tame a standard diagnostic connector, and how, each developer will decide for himself. For a fleet of cars of the same brand, you can try to write your own software, unless of course the manufacturer does not close the protocols. And if the telematic device will be installed on different models, then it is more reasonable to use any of the OBDII interpreters.