카테고리 없음

Obd Ii Iso 9141 Interface

gefsaceli1973 2020. 2. 11. 17:15

Is my vehicle equipped with OBD-2?On Board Diagnostics, OBD-II, is required on all automobiles and light trucks in the United States from 1996 onward. OBD-II is a set of specifications for monitoring and reporting on engine performance in modern automobiles. Diesel (compression ignition) vehicles were not required to support OBD until 2004. Some pre-2001 petrol vehicles and pre-2004 diesel vehicles have a 16-pin connectors but they may not be OBD-II or EOBD compliant. Where is an OBD II connector?Locating your OBD-II connector can be a difficult task as vehicle manufacturers tend to hide away the socket.

Usually OBD-2 connector is located on the driver's side of the passenger compartment near the center console. Sometimes it's located in the driver's foot well, under the steering wheel, behind panels in the dashboard fascia and the central area between the driver's seat and the passenger seat.

Some connectors have been located behind ashtrays, under the passenger seat and even over by the passengers door.OBD-2 connector must have pins 4, 5 for ground connections and pin 16 for 12 volt power supply from the vehicle battery.What is OBD DTC?Prior to OBD, auto manufacturers did not standardize DTC's (diagnostic trouble code). OBD-I begins standardized DTC's OBD-II adds specific tests to determine the vehicles emission performance OBD-III adds more features, and is in the regulatory development phase.If the vehicle's onboard diagnostic system detects a malfunction, a DTC corresponding to the malfunction is stored in the vehicle's computer, as well as realtime data from the sensors connected to the on-board computer.

In addition, the OBD-II interface provides a means to clear the DTC's once maintenance has been completed. A service technician can retrieve the DTC, using a scan tool, and take appropriate action to resolve the malfunction. Prior to the advent of digital powertrain control modules, which is the technical enabler for the OBD feature, repairing a vehicle relied solely upon the technicians skill and service literature from the auto manufacturer. OBD-II connector specificationsThe OBD-II specification provides for a standartized hardware interface - the female 16-pin (2x8) J1962 connector. Unlike the OBD-I connector, which was found under the hood of the vehicle, the OBD-II connector is located on the driver's side of the passenger compartment near the center console.Refer to related pinouts for vendor-specific OBD-2 pinouts.

Obd

This is just another OBD2 solution for monitoring the sensors in a verhicle. It supports the K-line OBD2 serial communication between a verhicle and a microcontroller. This K-line communication is also known as ISO 9141-2 or ISO 14230-4 (also known as Keyword Protocol 2000 or KWP). Both ISO's are almost similar. This solution differs from the rest that is low cost (for less than 10 euro!!). It is low cost in the way that you don't need an arduino, raspberry pi or smart phone. Both ISO's 9141 and 14230 knows a 5 baud initialization sequence.

The microcontroller must start this init by transmitting byte 0x33 to the verhicle at 5 bits per second. The total transmit time for transmitting byte 0x33 takes about 2 seconds. After this initialization it is expected to continue communicating at 10k4 baud.ISO 9141-2 initialization response:For ISO 9141-2 the verhicle ECU will respond with synchronization byte 0x55.

After this, the verhicle will respond with key bytes 0x08 and 0x08 or 0x96 and 0x96. The sync byte with key bytes of the verhicle must be acknowledged by the microcontroller by inverting the second key byte. This will end the initialization part of ISO 9141-2.ISO 14230 initialization response:The response of ISO 14230 is slightly different. The verhicle ECU will also respond with synchronization byte 0x55. Only the key bytes are different.

Iso 9141 2 code

In case of a VW Touran of 2003 the key bytes are 0xef and 0x8f. Also here the second key byte must be acknowledged by the microcontroller by inverting it. After the initialization process it is possible to submit a request to the verhicle ECU. A request is a sequence of bytes where adressing, a mode, a PID and a checksum is present. The following are example requests:For ISO 9141-2 this sequence of bytes is 0x68, 0x6a, 0xf1, 0x01, 0x0d and 0xd1.For ISO 14230 this sequence of bytes is 0xc2, 0x33, 0xf1, 0x01, 0x0d and 0xf4.The first three bytes are for addressing. The fourth is the mode field.

The fifth byte is the data field with the PID and the last byte is the checksum.In this example mode 1 is used. This mode will show 'current data' as how it is at this moment. This mode is perfect for displaying actual information.

The data field contains the PID. In this case 0x0d which is the verhicle speed. The checksum is the sum of the bytes with mod 256.

See this link for a list of PIDs:The response is almost similar. The data field reflects actual data which will probably change every request. The following are example responses with 0x00 as data (which is verhicle speed 0).For ISO 9141-2: 0x48, 0x6b, 0x10, 0x41, 0x0d, 0x00, 0x11.For ISO 14230: 0x83, 0xf1, 0x10, 0x41, 0x0d, 0x00, 0xd2.This OBD2 solution displays the calculated engine load (PID 0x04), engine coolant temperature (PID 0x05), verhicle speed (PID 0x0d) and engine RPM (PID 0x0c) on a LCD display. The verhicle will supply the circuit with 12 volt via pins 5 and 16 of the ODB2 connector.

Obd Ii Interface Kit

The voltage regulator will create 5 volt out of this for the microcontroller and LCD.K-line signals of pin 7 will be converted to appropriate levels via an interface of resistors and a transistor.The two trimm resistors are used to control the contrast and backlight of the LCD.On port RC1 you can connect a LED (optional). With help of the PWM module of the microcontroller the intensity of the LED will be controlled by the calculated engine load (PID 0x04).On port RC7 you can connect a buzzer (optional). When the engine coolant temperature (PID 0x05) exceeds the 93 degrees this port will be enabled. The Microchip XLCD peripheral routines with some small changes are used for the external LCD module (less blurry result with fast changing data compared with other LCD routines).A routine for displaying and clearing stored diagnostic trouble codes is included. This can be initiated by pressing the switch for 2 seconds. This routine is untested and will most probably not work.

Feel free to try if you have a car with trouble codes.The 5 baud init is also called 'slow init'. There is also a 'fast init'. The fast init does not use the 5 baud init as descibed above but starts directly at 10.4 kbps. A StartCommunication request 0xc1, 0x33, 0xf1, 0x81, 0x66 must be submitted prior submitting requests.

I don't have a car which supports this fast init so maybe someone can help including it in this code to help others.You can easily change the code if you want to have miles instead of km.For simplicity no checksum is checked.The code can be imported in Microchip MPLAB X IDE v3.20 with compiler XC8 v1.36. For programming the 16f886 microcontroller you need a programmer like pickit2 or pickit3.A hex file is included in case you want to program the 16f886 with your own programming software/device.

Obd Ii Iso 9141 Interface

1396amir and milani1387: I have Sagem S2000-1 on the table and it 'IS OBD compliant', but it has errors in implementation in some ways. (ECU is -01, hope it comes from 6FZ/EW7J4 engine, but I am not sure about it.) first problem: There is a long time (longer than standard allows) between a tester command and an ECU answer. ECU answers (just after fast init pattern) after 130ms, but ISO14230 says max.

Iso 9141 2 Code

Due this, for example Bosch tester model 560 is not able to connect it (it waits for an answer for cca 80ms). Second problem: I must have unconnected L-line (pin B3 on ecu). Once I have it connected to L-line (+12Volt from tester 510ohm resistor), ECU does not response to fast init patter at all.

Really don't know why. Maybe due to my wiring on the table without any sensors???