个人资料
归档
正文

DTC/OBD规程

(2017-10-03 23:18:58) 下一个

https://en.wikipedia.org/wiki/On-board_diagnostics#OBD-II_diagnostic_connector  https://en.wikipedia.org/wiki/OBD-II_PIDs

12V车接头座是SAE J1962 TypeA,常用规程有5种,Toyota在98开始用9141(10.4bps 8N1,12V,K Bidir,L for waken up only can be pulled up, obsolete),之前是VPW。各规程分立元件接口电路:http://injector.fotocrimea.com/eklmn.html 下图9141-up接口仅用OC将输出提到12V,输入直接电阻分压给uP:

https://learn.sparkfun.com/tutorials/getting-started-with-obd-ii  http://pinoutguide.com/CarElectronics/obd2_simple_cable_pinout.shtml  http://www.next.gr/circuits/Tech-Toy-Hacks-l21764.html  http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/  http://www.instructables.com/id/Arduino-OBD2-ELM327-I2C-LCD-HC05-Bluetooth/ http://www.instructables.com/id/Low-Cost-OBD2-Communications-on-K-line-ISO-9141-2-/ 

Arduino开发包:https://github.com/iwanders/OBD9141  lastguy/C1,含接口IC。ELM327源码:http://www.electro-tech-online.com/threads/obdii-elmscan-source-code-for-the-elm327.146842/  以下限于ISO2141,丰田多用它但也有用CAN/KWP的。

1.handshake: ISO9141-2与ISO14230(KWP2000)共有三种,以ISO9141-2为例:

OBD发33(hex)@5bps然后设为10400bps,此时半工态故返回33;Car在20-300ms内响应55(此后双方为10400bps),Car等5-20ms发08,等0-20ms再发08;在25-50ms内OBD发08,等0-20ms发08的反码即F7;在25-50ms内Car发33的反码即CC,初始化结束。

2.Determine PIDs supported(First data exchange): PID00,OBD发addr=68 6A F1,mode=01,data/PID=00,chksum(相加值)=C4;Car返回4bytes:https://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_1_PID_00 

3. Vehicle speed: OBD发addr=68 6A F1 01 0D D1,Car返回1byte例如00.

4. Car返回限于12bytes。如果OBD接受的Car响应错则应重发命令,Car自会纠错。

在Torque Pro中自定义PID:https://www.fjcruiserforums.com/threads/torque-pids.158045/  https://priuschat.com/threads/gen2-prius-custom-pids-for-torque-android-app-with-formulas.95370/ https://www.toyotanation.com/threads/torque-pro-custom-pids.1645034/ https://www.siennachat.com/threads/monitor-transmission-oil-temperature-with-a-scangauge.1139/ 

[ 打印 ]
阅读 ()评论 (0)
评论
目前还没有任何评论
登录后才可评论.