OBD 1 Diag port reader - YotaTech Forums

Notices
86-95 Trucks & 4Runners 2nd/3rd gen pickups, and 1st/2nd gen 4Runners with IFS

OBD 1 Diag port reader

Old 03-16-2014, 08:48 PM
  #1  
RJR
Registered User
Thread Starter
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,605
Thanks: 0
Thanked 7 Times in 6 Posts
OBD 1 Diag port reader

Hi all,

As I mentioned on Gevo's smog thread a few days ago, I've been working on a program to read the diagnostic serial data from the OBD 1 diagnostic port. I've created a version with some documentation and attached it as a .zip archive to this thread. I invite you to download it and try it out. Read the UserManual.doc first.

If you short TE2 to E1 on the OBD1 connector, the ECU outputs serial data on pin VF1. Included parameters are rpm, vehicle speed, injector pulse width, ignition advance, TPS setting, AFM setting, ECT value, plus the state of the start switch, the CSI status, idle switch, warm-up mode, air conditioning on, and diag code status.

This program reads that data, displays it and optionally logs it to disk for later analysis after a test drive. It also calculates miles driven, fuel used, and estimated mpg.

Let me know if/how it works for you.

I'm working on a version that integrates O2 sensor data with the data stream, but that's a little while off.
Attached Files
File Type: zip
ToyotaDiagRelease.zip (637.4 KB, 377 views)
RJR is online now  
The Following User Says Thank You to RJR For This Useful Post:
UGR (09-27-2018)
Old 03-17-2014, 09:56 PM
  #2  
Registered User
 
Join Date: Sep 2013
Posts: 1,404
Thanks: 0
Thanked 0 Times in 0 Posts
Glad to see this ! Thanks for all your work RJR.

First thing is first, see if the program will run in windows 8 compatibility mode... unless your program is able to run in android
Gevo is offline  
Old 03-17-2014, 10:01 PM
  #3  
RJR
Registered User
Thread Starter
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,605
Thanks: 0
Thanked 7 Times in 6 Posts
I don't have a Win 8 machine, so I had no way of testing it. However, it's written in Microsoft VB.net 2010 which is Win 8 compatible, so I would expect it to work. Just double click on the .exe file in the runtime directory and see if the form comes up. Even if it can't find a serial port, it should get that far.

I wouldn't hold out much hope for the Android, however:-)
RJR is online now  
Old 03-17-2014, 10:31 PM
  #4  
Registered User
 
Join Date: Sep 2013
Posts: 1,404
Thanks: 0
Thanked 0 Times in 0 Posts
Ill test it on my win 8 machine tomorrow. Android has always come through for me !!
Gevo is offline  
Old 03-21-2014, 06:38 AM
  #5  
Registered User
 
Join Date: Sep 2013
Posts: 1,404
Thanks: 0
Thanked 0 Times in 0 Posts
I tried it on my windows 8 machine, compatibility mode came up and ran into some issues. Lagged around a bit and I had to restart. I think it may work though. On restart comp started updating windows so I let it go and haven't tried it again yet.
Gevo is offline  
Old 03-21-2014, 07:43 AM
  #6  
RBX
Registered User
 
RBX's Avatar
 
Join Date: Jan 2010
Location: Bloodymore
Posts: 3,725
Thanks: 0
Thanked 0 Times in 0 Posts
very cool, been looking for something like this..... thank you!!
Now, perhaps I can eventually tie this into an Arduino to monitor the data in the vehicle.....just dreaming for now.

Last edited by RBX; 03-21-2014 at 07:46 AM.
RBX is offline  
Old 03-21-2014, 07:47 AM
  #7  
Registered User
 
Join Date: Sep 2013
Posts: 1,404
Thanks: 0
Thanked 0 Times in 0 Posts
Nha, don't dream, do it! Ardhunios are awesome!

(Sorry slightly off topic) I wanted 110V output in my audi, but didn't want to have car on all the time nor did i want to worry about draining when car was off. So my friend and I wrote a little program using ardhuni as controller, designed a circuit purchased all the parts did some testing and now.. the circuit automatically cuts off when voltage is below some level. If my car was auto we were even gonna have it start the engine automatically. Super fun project! Gonna put it in my 4Runner soon! (wife doesn't need it since I gave her the audi )
Gevo is offline  
Old 03-21-2014, 07:54 AM
  #8  
RBX
Registered User
 
RBX's Avatar
 
Join Date: Jan 2010
Location: Bloodymore
Posts: 3,725
Thanks: 0
Thanked 0 Times in 0 Posts
that is cool, you could have done it with the 5spd by tapping into the clutch kill switch, then monitor rpm(incase you left it in gear) you could remote start it with a bluetooth or wifi shield.
My inverter shuts down before the battery dies....but i have an aux battery anyhow, so I'm not worried about draining a starter battery.

Arduino project to tackle first will be efan control.

now that I think about it, does this software need to be in the jumper mode to work? I'd like to make a mobile unit like a scan gauge, but you can't or shouldn't go driving around all the time in diagnostic mode(jumping the two pins) since that dicks with your timing.
RBX is offline  
Old 03-21-2014, 09:13 AM
  #9  
Registered User
 
Join Date: Sep 2013
Posts: 1,404
Thanks: 0
Thanked 0 Times in 0 Posts
Oh I know that There are ones with built in shut offs. I had a nice inverter that I wanted to use. And the project was a fun exercise.

This OBD reader sounds like it will help my diagnosing the rich condition. I have to find time to make the connector
Gevo is offline  
Old 03-21-2014, 09:30 AM
  #10  
RJR
Registered User
Thread Starter
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,605
Thanks: 0
Thanked 7 Times in 6 Posts
Originally Posted by RBX View Post
now that I think about it, does this software need to be in the jumper mode to work? I'd like to make a mobile unit like a scan gauge, but you can't or shouldn't go driving around all the time in diagnostic mode(jumping the two pins) since that dicks with your timing.
Reading the serial bit stream requires TE2 to be jumped to E1 (ground). This is not the same as jumping TE1 to ground, which is the one that messes with your timing. TE2 puts the system into "super diag" mode which can cause the CEL to come on more quickly to trap intermittent problems, but other than that it does not affect engine performance at all.
RJR is online now  
Old 03-21-2014, 01:26 PM
  #11  
Registered User
 
jbtvt's Avatar
 
Join Date: May 2009
Location: Southern NH
Posts: 493
Thanks: 0
Thanked 0 Times in 0 Posts
Awesome project! Unfortunately I know that at least my '90 doesn't have TE2, only TE1. Not sure about the '85 and '88 but probably not. No way to get around that, that you know of?

Anyone that's used this, are you modifying the connections using small spade connectors to the male pins, chopping off the wire at the back of a separate female connector and tying in there, or...?

Also, would this be a compatible 9 pin serial port? Cheap if it is -
Amazon.com: TRENDnet USB 2.0 to RS-232 DB9 Serial Converter, TU-S9: Electronics Amazon.com: TRENDnet USB 2.0 to RS-232 DB9 Serial Converter, TU-S9: Electronics

Last edited by jbtvt; 03-21-2014 at 02:00 PM.
jbtvt is offline  
Old 03-21-2014, 08:03 PM
  #12  
Registered User
 
Join Date: Sep 2013
Posts: 1,404
Thanks: 0
Thanked 0 Times in 0 Posts
Ron, in part 2-A-3-a you mention to get a female db9 connector. If I understand the setuo correctly then we need the db9 connector to connect to pc, right? If so then we need a male connector, correct? Otherwise I may have misunderstood and a 2nd connector is need for some other part?

Thanks. Im at radio shack buying the parts. Lol

EDIT::::: nevermind, I forgot about the serial cable. Lol. Dumb question

Last edited by Gevo; 03-21-2014 at 08:06 PM.
Gevo is offline  
Old 03-21-2014, 08:51 PM
  #13  
RJR
Registered User
Thread Starter
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,605
Thanks: 0
Thanked 7 Times in 6 Posts
Originally Posted by jbtvt View Post
Awesome project! Unfortunately I know that at least my '90 doesn't have TE2, only TE1. Not sure about the '85 and '88 but probably not. No way to get around that, that you know of?

Anyone that's used this, are you modifying the connections using small spade connectors to the male pins, chopping off the wire at the back of a separate female connector and tying in there, or...?

Also, would this be a compatible 9 pin serial port? Cheap if it is - Amazon.com: TRENDnet USB 2.0 to RS-232 DB9 Serial Converter, TU-S9: Electronics
Yes, that looks like what you need. The female DB9 I mentioned should plug directly into that.

Edit: I don't know when Toyota added this capability to the diag port. I think it was when they went to the larger diag connector, so I'm guessing that the earlier ones with just a few pins won't support this. Nothing I can do about that. There may be a way to get at the data tying directly into a couple of ECU pins, but that would require knowledge only available from inside Toyota R&D and would be far beyond the scope of this project.

Last edited by RJR; 03-22-2014 at 08:16 AM.
RJR is online now  
Old 03-24-2014, 01:09 PM
  #14  
Registered User
 
jgrant721's Avatar
 
Join Date: Jul 2008
Location: Cloverdale, BC
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah I got all excited and went out to check my '91 4Runner connector. Funny thing is the pinout diagram under the protector cap for the connector shows all the pin info for each pin required for this feature, but the connector itself is missing the pins necessary for the serial data (sigh...).This is confirmed by the electrical wiring diagram in the FSM; none of the necessary connection are equipped.

Jim G.
jgrant721 is offline  
Old 03-24-2014, 03:17 PM
  #15  
RJR
Registered User
Thread Starter
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,605
Thanks: 0
Thanked 7 Times in 6 Posts
Bummer there. Looks like you're one or two model years early. You might want to check and see if the VF1 and TE2 pins exist on your ECU. Maybe they just left the wires out of the harness going to the diag connector.
RJR is online now  
Old 03-24-2014, 03:41 PM
  #16  
Registered User
 
JustDSM's Avatar
 
Join Date: Dec 2006
Location: Las Cruces, NM
Posts: 383
Thanks: 0
Thanked 0 Times in 0 Posts
What is the sampling rate during data logging? Pretty awesome project, and even cooler that you shared your work!
JustDSM is offline  
Old 03-24-2014, 03:48 PM
  #17  
RJR
Registered User
Thread Starter
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,605
Thanks: 0
Thanked 7 Times in 6 Posts
A complete data stream is output once every 1.33 seconds on my vehicle.
RJR is online now  
Old 03-24-2014, 05:17 PM
  #18  
Registered User
 
JustDSM's Avatar
 
Join Date: Dec 2006
Location: Las Cruces, NM
Posts: 383
Thanks: 0
Thanked 0 Times in 0 Posts
Interesting! Thanks for the info!. I suppose thats adequate for these vehicles. My prior OBD-I Mitsubishi's that I have experience tweaking would sample upwards of 40 samples/sec.

Do you know if the ECU (Denso I assume) is rewrite-able? I'm getting ahead of myself though.. No one is going to compile a dump of the ECU to write a program which would allow us to "tune" the fuel and timing maps, alter idle speeds, ect.
JustDSM is offline  
Old 03-24-2014, 05:46 PM
  #19  
Registered User
 
Join Date: Sep 2007
Location: San Francisco East Bay
Posts: 6,357
Thanks: 0
Thanked 40 Times in 38 Posts
Originally Posted by JustDSM View Post
...
Do you know if the ECU (Denso I assume) is rewrite-able? I'm getting ahead of myself though.. No one is going to compile a dump of the ECU to write a program which would allow us to "tune" the fuel and timing maps, alter idle speeds, ect.
I have not actually disassembled my ECU and tried to reverse-engineer it, but based on a medium amount of research:

No, there is no "input" programming to the ECU.
scope103 is offline  
Old 03-24-2014, 06:19 PM
  #20  
RJR
Registered User
Thread Starter
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,605
Thanks: 0
Thanked 7 Times in 6 Posts
Yeah, that sounds beyond the scope (no pun intended!) of what I'm likely to tackle.
RJR is online now  

Thread Tools
Search this Thread
Quick Reply: OBD 1 Diag port reader


Contact Us Archive Advertising Cookie Policy Privacy Statement Terms of Service

© 2018 MH Sub I, LLC dba Internet Brands

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
 
  • Ask a Question
    Get answers from community experts
Question Title:
Description:
Your question will be posted in: