📜 ⬆️ ⬇️

Diagnostic connector OBDII: whether it is possible to “tame”

The idea is not new, but there are many questions. On the one hand, you can remove almost any data, and on the other hand, OBDII looks like a patchwork quilt, because The total number of physical interfaces and protocols will frighten anyone. And everything is explained by the fact that by the time the first versions of OBD specifications appeared, most automakers had already developed something of their own. The appearance of the standard, although it brought some order, but required the inclusion in the specification of all interfaces and protocols that existed at the time, well, or almost all.



According to the J1962M standard, there are three standard interfaces in the OBDII connector: MS_CAN, K / L-Line, 1850, plus the battery and two earths (signal and just mass). This is according to the standard, the remaining 7 of 16 conclusions are OEM, that is, each manufacturer uses these conclusions as he pleases. But standardized conclusions often have advanced, advanced features. For example, MS_CAN can be HS_CAN, HS_CAN can be on other pins (non-standard) along with standard MS_CAN., Pin No. 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 bidirectional., The CAN interface rate is also growing. In general, the overwhelming majority of European cars of the 90s and the beginning of zero years could be diagnosed with only K –Line, and the majority of American cars only with SAE1850. At present, the general vector of development is an ever wider application of CAN, an increase in the rate of exchange, and more and more often we see a single-wire SW_CAN.
')
There is an opinion that an English-language programmer, sitting on specialized (English-speaking) forums, digging into the texts of standards, can build a universal engine for “a maximum of 4-5 months”, which will cope with all this diversity. In practice, this is not the case. 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 declare about 800-900 types of supported cars, and in practice 10-20 actually tested. And this is a system — in the Russian Federation, the author knows at least 3 development teams that followed this thorny path and all with the same dismal result: you need to sniff / customize each car model, but there are no resources / funds for that. And the reason for this is this: the standard is the standard, and each manufacturer when forced, and when deliberately introduces something in its implementation, is not described by the standard. In addition, not all data by default is present on the connector. There is data, the appearance of which you need to initiate (give one or another block of the car a command to transfer the necessary data).

And here OBDII bus interpreters come on the scene. This is a microcontroller, with a set of interfaces complying with the J1962M standard, which translates all the diversity of data on different interfaces of diagnostic connectors into a language more convenient for applications, for example, for diagnostic applications. In other words, the whole variety of protocols is now decrypted by the application, no matter what works on it - on a computer with Windows or on a tablet / smartphone. The first mass open-protocol OBDII interpreter was the ELM327. This is an 8-bit microcontroller MicroChip PIC18F2580. Let the reader not be surprised by the fact that this microcontroller is a mass instrument of general application. 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 variety of scanners / adapters with prices from “1000 rubles” come from on the market, you ask? And this is our Chinese friends have tried! Oh, how they cloned this chip, poisoned the crystal in layers or snuffed day and night - we leave it behind the scenes. But the fact remains: clones appeared on the market (for reference: the 8-bit MicroChip controller in bulk purchases now costs less than a dollar). Another thing is how well these clones work. There is an opinion that “as long as people buy cheap adapters, auto electricians won't be left without work”. That is, a person buys an adapter with the thought “to reload or adjust something there.”, And the result is different, well, that is, not the one that was expected. 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 otherwise. Several factors can be mixed here at once: the wrong adapter (clone), the wrong software, the wrong bundle of the adapter + software, well, and “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 this adapter? Well, probably the most frequent case, put in the glove box “just in case.” View and reset the error as soon as it appears. Odometer reset before selling a car, or vice versa, “wind up” if you are a hired driver. Enable any option in the car, which is turned off by default, and at the authorized dealer this service is paid. Updating the firmware and reconfiguring the electronic units, still leave the experts, but most adapters allow it. Someone just like to 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, in which the android tablet is installed in front of the dashboard and completely covers it, so: this tablet is most likely connected to such an adapter via Bluetooth or Wi-Fi. There are also a number of other applications. This is the use of such an adapter together with a telematics device (tracker) or an alarm system. Connecting to the diagnostic connector through this adapter allows you to capture data necessary for monitoring with a small amount of blood. In most cases, this method is cheaper for the developer, and the installation itself is simpler, because the need to install various sensors disappears, everything (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, the speeds of exchange on the CAN bus went up, SW_CAN appeared. But most importantly: the increased length (number of characters) in the code words. And if it is possible by hardware, through a relay or a trivial toggle switch, to crush crutches to ELM327, which allow working with both MS and HS and SW SW releases, then the PIC18F2580 with 4 MIPS computational power is not enough for long codewords. By the way, the latest version of ELM327 (V1.4) is dated 2009. And to use this chip without “crutches” is possible only for cars of release to the middle of zero. So what to do. There is a way out, oddly enough, and not one.
CAN-LOG is also an interpreter, but not a complete set of OBDII interfaces, but two CAN buses. It turns out that this is enough to remove all the necessary information in most cases. However, not all cars have both CAN buses displayed on the diagnostic connector. So you have to connect under the dashboard. And this is not always acceptable for reasons of preserving the guarantee, although there is an option for wirelessly retrieving information from the bus, but it is even more expensive, and the accuracy of the data taken is not 100%. You can use it as a ready-made device by connecting it via UART or RS232, or simply by integrating it on 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 vehicles and functions. Moreover, the list of supported cars includes not only cars, but also trucks, construction, road and agricultural machinery. CAN-LOG works slightly differently than ELM327 and its clones. When connecting to the tires of the car, you must select and install the program number corresponding to the car. And it is convenient, because the developer does not need to delve into all the variety of protocols. (In ELM327, the choice of the car and the fine-tuning of the chip are left to the application).
There are other solutions that allow you to easily and gracefully remove data from the diagnostic connector. Well, the question of whether it is possible to tame the standard diagnostic connector, and how, each developer decides for himself. For the fleet of cars of the same brand, you can try to write your software, unless of course the manufacturer does not close the protocols. And if the telematics device will be installed on different models, then it is wiser to use any of the OBDII interpreters.

Source: https://habr.com/ru/post/275387/


All Articles