個人資料
歸檔
正文

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)
評論
目前還沒有任何評論
登錄後才可評論.